Skip to content

controller.strategy.type: controller.strategy.type must be one of the following: "Recreate", "RollingUpdate" #3512

@wd

Description

@wd

Describe the bug

The values.schema.json defined the validate values for controller.strategy here

However, this key also has been used for daemonsets. Deamonsets have different restrictions for that value.

$ k explain daemonset.spec.updateStrategy.type
KIND:     DaemonSet
VERSION:  apps/v1

FIELD:    type <string>

DESCRIPTION:
     Type of daemon set update. Can be "RollingUpdate" or "OnDelete". Default is
     RollingUpdate.

We will get the error bellow when we set the type to OnDelete.

$ helm template --set 'controller.strategy.type=OnDelete' --set 'controller.kind=daemonset' deployments/helm-chart
Error: values don't meet the specifications of the schema(s) in the following chart(s):
nginx-ingress:
- controller.strategy.type: controller.strategy.type must be one of the following: "Recreate", "RollingUpdate"
- controller.strategy: Must validate all the schemas (allOf)

To Reproduce
Steps to reproduce the behavior:

$ helm template --set 'controller.strategy.type=OnDelete' --set 'controller.kind=daemonset' deployments/helm-chart

Expected behavior
No error should occur.

Your environment

  • Version of the Ingress Controller: v3.0.1
  • Version of Kubernetes: 1.22
  • Kubernetes platform (e.g. Mini-kube or GCP): rke engine
  • Using NGINX or NGINX Plus: nginx plus

Metadata

Metadata

Assignees

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