kubewarden/helm-charts

1.11.0-rc1 UPGRADE FAILED: cannot patch "audit-scanner" with kind CronJob: "" is invalid

kravciak opened this issue · 0 comments

Controller helm chart upgrade into rc1 fails with error:

json: cannot unmarshal bool into Go struct field Container.spec.jobTemplate.spec.template.spec.containers.command of type string

Error: UPGRADE FAILED: cannot patch "audit-scanner" with kind CronJob: "" is invalid: patch: Invalid value: "{"apiVersion":"batch/v1","kind":"CronJob","metadata":{"annotations":{"meta.helm.sh/release-name":"rancher-kubewarden-controller","meta.helm.sh/release-namespace":"cattle-kubewarden-system"},"creationTimestamp":"2024-03-01T14:16:47Z","generation":1,"labels":{"app.kubernetes.io/component":"controller","app.kubernetes.io/instance":"rancher-kubewarden-controller","app.kubernetes.io/managed-by":"Helm","app.kubernetes.io/name":"kubewarden-controller","app.kubernetes.io/part-of":"kubewarden","app.kubernetes.io/version":"v1.11.0-rc1","helm.sh/chart":"kubewarden-controller-2.0.9-rc1"},"managedFields":[{"manager":"helm","operation":"Update","apiVersion":"batch/v1","time":"2024-03-01T14:16:47Z","fieldsType":"FieldsV1","fieldsV1":{"f:metadata":{"f:annotations":{".":{},"f:meta.helm.sh/release-name":{},"f:meta.helm.sh/release-namespace":{}},"f:labels":{".":{},"f:app.kubernetes.io/component":{},"f:app.kubernetes.io/instance":{},"f:app.kubernetes.io/managed-by":{},"f:app.kubernetes.io/name":{},"f:app.kubernetes.io/part-of":{},"f:app.kubernetes.io/version":{},"f:helm.sh/chart":{}}},"f:spec":{"f:concurrencyPolicy":{},"f:failedJobsHistoryLimit":{},"f:jobTemplate":{"f:spec":{"f:template":{"f:spec":{"f:containers":{"k:{\"name\":\"audit-scanner\"}":{".":{},"f:command":{},"f:image":{},"f:imagePullPolicy":{},"f:name":{},"f:resources":{".":{},"f:limits":{".":{},"f:cpu":{},"f:memory":{}},"f:requests":{".":{},"f:cpu":{},"f:memory":{}}},"f:securityContext":{".":{},"f:allowPrivilegeEscalation":{}},"f:terminationMessagePath":{},"f:terminationMessagePolicy":{},"f:volumeMounts":{".":{},"k:{\"mountPath\":\"/pki\"}":{".":{},"f:mountPath":{},"f:name":{},"f:readOnly":{}}}}},"f:dnsPolicy":{},"f:restartPolicy":{},"f:schedulerName":{},"f:securityContext":{".":{},"f:runAsNonRoot":{}},"f:serviceAccount":{},"f:serviceAccountName":{},"f:terminationGracePeriodSeconds":{},"f:volumes":{".":{},"k:{\"name\":\"policyservers-ca-cert\"}":{".":{},"f:name":{},"f:secret":{".":{},"f:defaultMode":{},"f:items":{},"f:secretName":{}}}}}}}},"f:schedule":{},"f:successfulJobsHistoryLimit":{},"f:suspend":{}}}},{"manager":"k3s","operation":"Update","apiVersion":"batch/v1","time":"2024-03-01T14:19:00Z","fieldsType":"FieldsV1","fieldsV1":{"f:status":{"f:active":{},"f:lastScheduleTime":{},"f:lastSuccessfulTime":{}}},"subresource":"status"}],"name":"audit-scanner","namespace":"cattle-kubewarden-system","resourceVersion":"6026","uid":"adc7327d-16d9-4af8-b62a-ca8c24361dbb"},"spec":{"concurrencyPolicy":"Forbid","failedJobsHistoryLimit":5,"jobTemplate":{"metadata":{"creationTimestamp":null},"spec":{"template":{"metadata":{"creationTimestamp":null},"spec":{"containers":[{"command":["/audit-scanner","--kubewarden-namespace","cattle-kubewarden-system","--loglevel","info","--disable-store",false,"--extra-ca","/pki/policy-server-root-ca-pem","-i","calico-apiserver","-i","calico-system","-i","cattle-alerting","-i","cattle-csp-adapter-system","-i","cattle-elemental-system","-i","cattle-epinio-system","-i","cattle-externalip-system","-i","cattle-fleet-local-system","-i","cattle-fleet-system","-i","cattle-gatekeeper-system","-i","cattle-global-data","-i","cattle-global-nt","-i","cattle-impersonation-system","-i","cattle-istio","-i","cattle-istio-system","-i","cattle-logging","-i","cattle-logging-system","-i","cattle-monitoring-system","-i","cattle-neuvector-system","-i","cattle-prometheus","-i","cattle-provisioning-capi-system","-i","cattle-resources-system","-i","cattle-sriov-system","-i","cattle-system","-i","cattle-ui-plugin-system","-i","cattle-windows-gmsa-system","-i","cert-manager","-i","cis-operator-system","-i","fleet-default","-i","ingress-nginx","-i","istio-system","-i","kube-node-lease","-i","kube-public","-i","kube-system","-i","longhorn-system","-i","rancher-alerting-drivers","-i","security-scan","-i","tigera-operator"],"image":"ghcr.io/kubewarden/audit-scanner:v1.11.0-rc1","imagePullPolicy":"IfNotPresent","name":"audit-scanner","resources":{"limits":{"cpu":"500m","memory":"300Mi"},"requests":{"cpu":"250m","memory":"1Gi"}},"securityContext":{"allowPrivilegeEscalation":false},"volumeMounts":[{"mountPath":"/pki","name":"policyservers-ca-cert","readOnly":true}]}],"dnsPolicy":"ClusterFirst","restartPolicy":"Never","schedulerName":"default-scheduler","securityContext":{"runAsNonRoot":true},"serviceAccount":"audit-scanner","serviceAccountName":"audit-scanner","terminationGracePeriodSeconds":30,"volumes":[{"name":"policyservers-ca-cert","secret":{"secretName":"policy-server-root-ca","items":[{"key":"policy-server-root-ca-pem","path":"policy-server-root-ca-pem"}],"defaultMode":420}}]}}}},"schedule":"*/1 * * * *","successfulJobsHistoryLimit":3,"suspend":false},"status":{"active":[{"kind":"Job","namespace":"cattle-kubewarden-system","name":"audit-scanner-28488379","uid":"83eebf99-5b8f-4e0f-bfdf-b83dec632125","apiVersion":"batch/v1","resourceVersion":"6024"}],"lastScheduleTime":"2024-03-01T14:19:00Z","lastSuccessfulTime":"2024-03-01T14:18:05Z"}}": json: cannot unmarshal bool into Go struct field Container.spec.jobTemplate.spec.template.spec.containers.command of type string