Skip to content

Set controller.strategy for the helm chart will cause error  #3105

@wd

Description

@wd

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:

  1. run helm template --set 'controller.strategy.type=OnDelete' deployments/helm-chart/
  2. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions