From 0504785a26e40db3eaa988295866210cf2fd6e70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20Schr=C3=B6ter?= Date: Thu, 19 Dec 2024 15:00:37 +0100 Subject: [PATCH] test: add test case for resource-name config --- test/resources/sidecar.yaml | 40 ++++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/test/resources/sidecar.yaml b/test/resources/sidecar.yaml index 40ca9c44..9f820553 100644 --- a/test/resources/sidecar.yaml +++ b/test/resources/sidecar.yaml @@ -388,4 +388,42 @@ metadata: type: Opaque stringData: username: "user1" - password: "abcdefghijklmnopqrstuvwxyz" \ No newline at end of file + password: "abcdefghijklmnopqrstuvwxyz" + +--- +apiVersion: v1 +kind: Pod +metadata: + name: sidecar-pythonscript-resource-name + namespace: default +spec: + serviceAccountName: sample-acc + containers: + - name: sidecar + image: kiwigrid/k8s-sidecar:testing + volumeMounts: + - name: shared-volume + mountPath: /tmp/ + - name: script-volume + mountPath: /opt/script.py + subPath: script.py + env: + - name: LABEL + value: "findme" + - name: FOLDER + value: /tmp/ + - name: RESOURCE + value: both + - name: RESOURCE_NAME + value: configmap/sample-configmap,secret/sample-secret-binary + - name: SCRIPT + value: "/opt/script.py" + - name: LOG_LEVEL + value: "DEBUG" + volumes: + - name: shared-volume + emptyDir: { } + - name: script-volume + configMap: + name: script-configmap + defaultMode: 0777