falco helm upgrade / labelselector field immutable

falco helm upgrade / labelselector field immutable

  • Written by
    Walter Doekes
  • Published on

Today I got this unusual error when upgrading the Falco helm chart from 1.19.4 to 2.0+.

Error: UPGRADE FAILED: cannot patch "falco" with kind DaemonSet:
 DaemonSet.apps "falco" is invalid:
 spec.selector: Invalid value: v1.LabelSelector{
  MatchLabels:map[string]string{"app.kubernetes.io/instance":"falco", "app.kubernetes.io/name":"falco"},
 }: field is immutable

The explanation is here as given by Stackoverflow user misha2048:

You cannot update selectors for [...] ReplicasSets, Deployments, DaemonSets [...] from my-app: ABC to my-app: XYZ and then simply [apply the changes].

Instead, you should kubectl delete ds falco first. In this case, because the labels changed from:

  app: falco
  app.kubernetes.io/managed-by: Helm
  chart: falco-1.19.4
  heritage: Helm
  release: falco


  app.kubernetes.io/instance: falco
  app.kubernetes.io/managed-by: Helm
  app.kubernetes.io/name: falco
  app.kubernetes.io/version: 0.32.2
  helm.sh/chart: falco-2.0.16

Maybe it would've been nice if this was mentioned in the not so verbose Falco Helm changelog. Are there upgrade docs anywhere?

Back to overview Newer post: chromium browser / without ubuntu snap / linux mint Older post: flipper zero multi-tool / developing