diff --git a/cmd/build/helmify/kustomization.yaml b/cmd/build/helmify/kustomization.yaml index 45eee7b3db5..d229b3a4eee 100644 --- a/cmd/build/helmify/kustomization.yaml +++ b/cmd/build/helmify/kustomization.yaml @@ -99,6 +99,9 @@ patchesJson6902: kind: Deployment name: gatekeeper-audit patch: |- + - op: replace + path: /spec/template/spec/containers/0/name + value: "{{ .Values.audit.containerName }}" - op: remove path: /spec/template/spec/containers/0/resources/limits - op: remove @@ -125,6 +128,9 @@ patchesJson6902: kind: Deployment name: gatekeeper-controller-manager patch: |- + - op: replace + path: /spec/template/spec/containers/0/name + value: "{{ .Values.controllerManager.containerName }}" - op: remove path: /spec/template/spec/containers/0/resources/limits - op: remove diff --git a/cmd/build/helmify/static/README.md b/cmd/build/helmify/static/README.md index e7359e7e364..ff24c055568 100644 --- a/cmd/build/helmify/static/README.md +++ b/cmd/build/helmify/static/README.md @@ -182,6 +182,7 @@ information._ | image.pullSecrets | Specify an array of imagePullSecrets | `[]` | | resources | The resource request/limits for the container image | limits: 1 CPU, 512Mi, requests: 100mCPU, 256Mi | | nodeSelector | The node selector to use for pod scheduling | `kubernetes.io/os: linux` | +| controllerManager.containerName | Container name for controller manager | `manager` | | controllerManager.podLabels | The labels to add to the controller manager pod | `{}` | | controllerManager.affinity | The node affinity to use for controller manager pod scheduling | `{}` | | controllerManager.topologySpreadConstraints | The topology spread constraints to use for controller manager pod scheduling | `[]` | @@ -205,6 +206,7 @@ information._ | controllerManager.networkPolicy.ingress | Additional ingress rules to be added to the controller manager network policy | `{}` | | controllerManager.strategyType | The strategy type to use for Controller Manager deployment | `RollingUpdate` | | controllerManager.strategyRollingUpdate | [RollingUpdate](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#rolling-update-deployment) configuration for Controller Manager deployment | `{}` | +| audit.containerName | Container name for audit | `manager` | | audit.podLabels | The labels to add to the audit pod | `{}` | | audit.affinity | The node affinity to use for audit pod scheduling | `{}` | | audit.topologySpreadConstraints | The topology spread constraints to use for audit pod scheduling | `[]` | diff --git a/cmd/build/helmify/static/values.yaml b/cmd/build/helmify/static/values.yaml index a68fdcd345c..92789b23218 100644 --- a/cmd/build/helmify/static/values.yaml +++ b/cmd/build/helmify/static/values.yaml @@ -167,6 +167,7 @@ enableRuntimeDefaultSeccompProfile: true controllerManager: serviceAccount: name: gatekeeper-admin + containerName: manager exemptNamespaces: [] exemptNamespacePrefixes: [] hostNetwork: false @@ -227,6 +228,7 @@ controllerManager: audit: serviceAccount: name: gatekeeper-admin + containerName: manager hostNetwork: false dnsPolicy: ClusterFirst metricsPort: 8888 diff --git a/manifest_staging/charts/gatekeeper/README.md b/manifest_staging/charts/gatekeeper/README.md index e7359e7e364..ff24c055568 100644 --- a/manifest_staging/charts/gatekeeper/README.md +++ b/manifest_staging/charts/gatekeeper/README.md @@ -182,6 +182,7 @@ information._ | image.pullSecrets | Specify an array of imagePullSecrets | `[]` | | resources | The resource request/limits for the container image | limits: 1 CPU, 512Mi, requests: 100mCPU, 256Mi | | nodeSelector | The node selector to use for pod scheduling | `kubernetes.io/os: linux` | +| controllerManager.containerName | Container name for controller manager | `manager` | | controllerManager.podLabels | The labels to add to the controller manager pod | `{}` | | controllerManager.affinity | The node affinity to use for controller manager pod scheduling | `{}` | | controllerManager.topologySpreadConstraints | The topology spread constraints to use for controller manager pod scheduling | `[]` | @@ -205,6 +206,7 @@ information._ | controllerManager.networkPolicy.ingress | Additional ingress rules to be added to the controller manager network policy | `{}` | | controllerManager.strategyType | The strategy type to use for Controller Manager deployment | `RollingUpdate` | | controllerManager.strategyRollingUpdate | [RollingUpdate](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#rolling-update-deployment) configuration for Controller Manager deployment | `{}` | +| audit.containerName | Container name for audit | `manager` | | audit.podLabels | The labels to add to the audit pod | `{}` | | audit.affinity | The node affinity to use for audit pod scheduling | `{}` | | audit.topologySpreadConstraints | The topology spread constraints to use for audit pod scheduling | `[]` | diff --git a/manifest_staging/charts/gatekeeper/templates/gatekeeper-audit-deployment.yaml b/manifest_staging/charts/gatekeeper/templates/gatekeeper-audit-deployment.yaml index c88c5b40124..e525d64e21e 100644 --- a/manifest_staging/charts/gatekeeper/templates/gatekeeper-audit-deployment.yaml +++ b/manifest_staging/charts/gatekeeper/templates/gatekeeper-audit-deployment.yaml @@ -135,7 +135,7 @@ spec: path: /healthz port: {{ .Values.audit.healthPort }} timeoutSeconds: {{ .Values.audit.livenessTimeout }} - name: manager + name: '{{ .Values.audit.containerName }}' ports: - containerPort: {{ .Values.audit.metricsPort }} name: metrics diff --git a/manifest_staging/charts/gatekeeper/templates/gatekeeper-controller-manager-deployment.yaml b/manifest_staging/charts/gatekeeper/templates/gatekeeper-controller-manager-deployment.yaml index a815d3f86ec..1e17d0c84c9 100644 --- a/manifest_staging/charts/gatekeeper/templates/gatekeeper-controller-manager-deployment.yaml +++ b/manifest_staging/charts/gatekeeper/templates/gatekeeper-controller-manager-deployment.yaml @@ -143,7 +143,7 @@ spec: path: /healthz port: {{ .Values.controllerManager.healthPort }} timeoutSeconds: {{ .Values.controllerManager.livenessTimeout }} - name: manager + name: '{{ .Values.controllerManager.containerName }}' ports: - containerPort: {{ .Values.controllerManager.port }} name: webhook-server diff --git a/manifest_staging/charts/gatekeeper/values.yaml b/manifest_staging/charts/gatekeeper/values.yaml index a68fdcd345c..92789b23218 100644 --- a/manifest_staging/charts/gatekeeper/values.yaml +++ b/manifest_staging/charts/gatekeeper/values.yaml @@ -167,6 +167,7 @@ enableRuntimeDefaultSeccompProfile: true controllerManager: serviceAccount: name: gatekeeper-admin + containerName: manager exemptNamespaces: [] exemptNamespacePrefixes: [] hostNetwork: false @@ -227,6 +228,7 @@ controllerManager: audit: serviceAccount: name: gatekeeper-admin + containerName: manager hostNetwork: false dnsPolicy: ClusterFirst metricsPort: 8888