Describe the bug
After setting the controller.strategy in the values file, I'll see this error when running the helm install.
error validating "": error validating data: [apiVersion not set, kind not set]
To Reproduce
Steps to reproduce the behavior:
- run
helm template --set 'controller.strategy.type=OnDelete' deployments/helm-chart/
- You will see a manifest like below. This is not a valid manifest and can't be applied.
---
# Source: nginx-ingress/templates/controller-daemonset.yaml
updateStrategy:
type: OnDelete
Expected behavior
That manifest should not be generated.
Your environment
- Version of the Ingress Controller: 2.3.0
- Version of Kubernetes: 1.20
- Kubernetes platform: rke
- Using NGINX or NGINX Plus: Plus
Additional context
I think the issue introduced from this PR #2672.