k8s-sidecar
k8s-sidecar copied to clipboard
BUG: With METHOD SLEEP deleting configmap does not delete the file.
I'm having issues with METHOD: "SLEEP". I'm getting the below error when I use something like the config I've specified. To be more precise this happens when a configmap is deleted.
Version: v1.25.2
ERROR:
Traceback (most recent call last):
File "/app/resources.py", line 300, in _update_file
return remove_file(dest_folder, filename)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/helpers.py", line 103, in remove_file
complete_file = os.path.join(folder, filename)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen posixpath>", line 76, in join
TypeError: expected str, bytes or os.PathLike object, not NoneType
CONFIG:
- name:k8s-sidecar
image: kiwigrid/k8s-sidecar:1.25.2
imagePullPolicy: IfNotPresent
volumeMounts:
- name: config-volume
mountPath: "/config/"
- name: merge-script-volume
mountPath: "/opt/merge.sh"
subPath: "merge.sh"
- name: merge-script-volume
mountPath: "/opt/config_merge.py"
subPath: "config_merge.py"
- name: merge-script-volume
mountPath: "/opt/requirements.txt"
subPath: "requirements.txt"
env:
- name: LABEL
value: "config"
- name: FOLDER
value: "/config/"
- name: RESOURCE
value: "configmap"
- name: REQ_URL
value: "http://localhost:8080/reload"
- name: NAMESPACE
value: "config-dev"
- name: SCRIPT
value: "/opt/merge.sh"
- name: REQ_METHOD
value: "POST"
- name: REQ_SKIP_TLS_VERIFY
value: "true"
- name: METHOD
value: "SLEEP"
- name: IGNORE_ALREADY_PROCESSED
value: "true"