kube-secrets-init icon indicating copy to clipboard operation
kube-secrets-init copied to clipboard

Issue when mutating native sidecar init containers

Open hhollenstain opened this issue 10 months ago • 0 comments

When mutating a init container that is native side car we run into a few issues. It comes from the fact the patch is removing the restartPolicy.

  {
    "op": "remove",
    "path": "/spec/initContainers/0/restartPolicy"
  },

This causes the replicaset to fail

spec.initContainers[1].lifecycle: Forbidden: may not be set for init containers without restartPolicy=Always, spec.initContainers[1].livenessProbe: Forbidden: may not be set for init containers without restartPolicy=Always, spec.initContainers[1].startupProbe: Forbidden: may not be set for init containers without restartPolicy=Always

Digging into this appears we need to update the core/v1 /update to go 1.23.

hhollenstain avatar Jan 24 '25 16:01 hhollenstain