Skip to content

Fix DaemonSet support for NGINX

Joshua Lambert requested to merge add-selector-to-nginx-daemonset into master

We are running into an error trying to flip NGINX to be a daemonset:

Error: release gl-mp-app failed: DaemonSet.apps "gl-mp-app-nginx-ingress-controller" is invalid: spec.template.metadata.labels: Invalid value: map[string]string{"component":"controller", "release":"gl-mp-app", "app":"nginx-ingress"}: `selector` does not match template `labels`

The reason we need this is because we bumped the apiVersion to apps/v1beta2, 8 months ago, for some reason. Upstream is still on apps/v1beta1.

There was a change to the controller spec in apps/v1beta2, that implied selectors no longer work:

As part of the greater controller GA effort, we have removed defaulting spec.selector to spec.template.labels values in apps/v1beta2 as the defaulting operation is semantically broken.

This change adds an explicit matching rule, since we are on apps/v1beta2. We also add this to the componentKinds and fix some broken whitespace handling as well.

Edited by Joshua Lambert

Merge request reports