senthilrch / kube-fledged

A kubernetes operator for creating and managing a cache of container images directly on the cluster worker nodes, so application pods start almost instantly
Apache License 2.0
1.26k stars 119 forks source link

User configure webhookService.type not being respect for helm chart #234

Open zyue110026 opened 2 months ago

zyue110026 commented 2 months ago

We have noticed an instance of incorrect helming in one of your Kubernetes configuration files. Hardcoded or default configuration values in the template are considered anti-pattern and configurable values in the values.yaml file are not being respect, resulting in user-provided configurations never being applied. Additionally, we provide anecdotal evidence from https://github.com/aquasecurity/trivy-operator/issues/729 regarding the incorrect helming defect.

webhookService.type does not take effect when changed to a value other than default value 'ClusterIP'. This is due to webhookService.type is hardcoded in service-webhook-server.yaml file:

https://github.com/senthilrch/kube-fledged/blob/837f2b36307f9b3681996722d613b5c24945a203/deploy/kubefledged-operator/helm-charts/kubefledged/templates/service-webhook-server.yaml#L17

Expected Behavior

Change webhookService.type to other type other than 'ClusterIP' can take effect, or remove webhookService.type in values.yaml