rancher / local-path-provisioner

Dynamically provisioning persistent local storage with Kubernetes
Apache License 2.0
2.07k stars 439 forks source link

Applying with Kustomize and nameSuffix results in a "Error starting daemon: invalid empty flag helper-pod-file and it also does not exist ... " error #401

Open timatlee opened 1 month ago

timatlee commented 1 month ago

Pod does not start with the following error when applying local-path-provisioner through a kustomization file with a nameSuffix properties.

Error:

time="2024-05-17T19:14:04Z" level=fatal msg="Error starting daemon: invalid empty flag helper-pod-file and it also does not exist at ConfigMap local-path-storage-ceph/local-path-config with err: configmaps \"local-path-config\" not found"

kustomization.yaml file:

apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: local-path-storage-ceph
resources:
- https://raw.githubusercontent.com/rancher/local-path-provisioner/master/deploy/local-path-storage.yaml

nameSuffix: "-ceph"

Without the nameSuffix property defined, this works fine.

The generated manifest from kustomize build looks correct - the configMap is named correctly with the suffix, the Deployment references the corrected configmap.