Skip to content

Commit

Permalink
Add support privileged sec context config
Browse files Browse the repository at this point in the history
  • Loading branch information
flamarion committed Oct 21, 2024
1 parent b9c6de2 commit 0f363da
Show file tree
Hide file tree
Showing 10 changed files with 31 additions and 4 deletions.
1 change: 1 addition & 0 deletions charts/operator-wandb/charts/app/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ container:
drop: []
allowPrivilegeEscalation: false
readOnlyRootFilesystem: false
privileged: false

common:
labels: {}
Expand Down
1 change: 1 addition & 0 deletions charts/operator-wandb/charts/console/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ container:
drop: []
allowPrivilegeEscalation: false
readOnlyRootFilesystem: false
privileged: false

service:
type: ClusterIP
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ container:
drop: []
allowPrivilegeEscalation: false
readOnlyRootFilesystem: false
privileged: false

common:
labels: {}
Expand Down
1 change: 1 addition & 0 deletions charts/operator-wandb/charts/otel/charts/agent/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ container:
drop: []
allowPrivilegeEscalation: false
readOnlyRootFilesystem: false
privileged: false

clusterRole:
annotations: {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,14 @@ spec:
{{- if .Values.pod.annotations -}}
{{- toYaml .Values.pod.annotations | nindent 8 }}
{{- end }}
{{- include "wandb.nodeSelector" . | nindent 6 }}
{{- include "wandb.priorityClassName" . | nindent 6 }}
{{- include "wandb.podSecurityContext" .Values.pod.securityContext | nindent 6 }}
spec:
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
{{- include "wandb.containerSecurityContext" .Values.container.securityContext | nindent 10 }}
command: ["stackdriver_exporter"]
volumeMounts:
{{- if or .Values.stackdriver.serviceAccountSecret .Values.stackdriver.serviceAccountKey }}
Expand Down Expand Up @@ -102,9 +106,6 @@ spec:
tolerations:
{{- toYaml .tolerations | nindent 8 }}
{{- end }}
{{- include "wandb.nodeSelector" . | nindent 6 }}
{{- include "wandb.priorityClassName" . | nindent 6 }}
{{- include "wandb.podSecurityContext" .Values.pod.securityContext | nindent 6 }}
volumes:
{{- if .Values.stackdriver.serviceAccountSecret }}
- name: stackdriver-service-account
Expand Down
18 changes: 17 additions & 1 deletion charts/operator-wandb/charts/stackdriver/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,26 @@ service:
annotations: {}

pod:
labels: {}
annotations: {}
securityContext:
runAsNonRoot: true
runAsUser: 999
runAsGroup: 0
fsGroup: 0
fsGroupChangePolicy: "OnRootMismatch"
labels: {}
seccompProfile:
type: ""

container:
securityContext:
capabilities:
add: []
drop: []
allowPrivilegeEscalation: false
readOnlyRootFilesystem: false
privileged: false


deployment: {}

Expand Down
1 change: 1 addition & 0 deletions charts/operator-wandb/charts/weave-trace/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ container:
drop: []
allowPrivilegeEscalation: false
readOnlyRootFilesystem: false
privileged: false

resources:
requests:
Expand Down
1 change: 1 addition & 0 deletions charts/operator-wandb/charts/weave/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ container:
drop: []
allowPrivilegeEscalation: false
readOnlyRootFilesystem: false
privileged: false

resources:
# We usually recommend not to specify default resources and to leave this as a
Expand Down
1 change: 1 addition & 0 deletions charts/operator-wandb/charts/yace/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ container:
drop: []
allowPrivilegeEscalation: false
readOnlyRootFilesystem: false
privileged: false


deployment: {}
Expand Down
3 changes: 3 additions & 0 deletions charts/operator-wandb/templates/_pods.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ securityContext:
{{- if hasKey $csc "runAsGroup" }}
runAsGroup: {{ $csc.runAsGroup }}
{{- end }}
{{- if hasKey $csc "privileged" }}
privileged: {{ $csc.privileged }}
{{- end }}
{{- end }}
{{- end -}}

Expand Down

0 comments on commit 0f363da

Please sign in to comment.