Skip to content

Commit 13e5568

Browse files
committed
FEATURE/MAJOR: Remove initContainers privileged container
Remove privileged initContainers container with net.ipv4.ip_unprivileged_port_start sysctl in favor of native IC rootless container in upcoming IC 1.8 release. Also install container with unprivileged mode by default. Signed-off-by: Dinko Korunic <[email protected]>
1 parent bb32a52 commit 13e5568

File tree

3 files changed

+3
-27
lines changed

3 files changed

+3
-27
lines changed

kubernetes-ingress/templates/controller-daemonset.yaml

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -191,21 +191,9 @@ spec:
191191
{{ toYaml .Values.controller.extraVolumes | indent 8 }}
192192
{{- end }}
193193
{{- end }}
194-
{{- if or .Values.controller.unprivileged .Values.controller.initContainers }}
194+
{{- with.Values.controller.initContainers }}
195195
initContainers:
196-
{{- if .Values.controller.unprivileged }}
197-
- name: sysctl
198-
image: busybox:musl
199-
command:
200-
- /bin/sh
201-
- -c
202-
- sysctl -w net.ipv4.ip_unprivileged_port_start=0
203-
securityContext:
204-
privileged: true
205-
{{- end }}
206-
{{- with.Values.controller.initContainers }}
207196
{{- toYaml . | nindent 8 }}
208-
{{- end }}
209197
{{- end }}
210198
{{- with .Values.controller.nodeSelector }}
211199
nodeSelector:

kubernetes-ingress/templates/controller-deployment.yaml

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -186,21 +186,9 @@ spec:
186186
{{ toYaml .Values.controller.extraVolumes | indent 8 }}
187187
{{- end }}
188188
{{- end }}
189-
{{- if or .Values.controller.unprivileged .Values.controller.initContainers }}
189+
{{- with.Values.controller.initContainers }}
190190
initContainers:
191-
{{- if .Values.controller.unprivileged }}
192-
- name: sysctl
193-
image: busybox:musl
194-
command:
195-
- /bin/sh
196-
- -c
197-
- sysctl -w net.ipv4.ip_unprivileged_port_start=0
198-
securityContext:
199-
privileged: true
200-
{{- end }}
201-
{{- with.Values.controller.initContainers }}
202191
{{- toYaml . | nindent 8 }}
203-
{{- end }}
204192
{{- end }}
205193
{{- with .Values.controller.nodeSelector }}
206194
nodeSelector:

kubernetes-ingress/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ controller:
6161

6262
## Running container without root privileges
6363
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
64-
unprivileged: false
64+
unprivileged: true
6565

6666
## Init Containers
6767
## ref: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/

0 commit comments

Comments
 (0)