diff --git a/charts/mlflow-server/templates/deployment.yaml b/charts/mlflow-server/templates/deployment.yaml index b11bcbe..2c9f157 100644 --- a/charts/mlflow-server/templates/deployment.yaml +++ b/charts/mlflow-server/templates/deployment.yaml @@ -121,7 +121,9 @@ spec: {{- toYaml .Values.resources | nindent 12 }} {{- if .Values.openshiftOauth.enabled }} - name: oauth-proxy - image: registry.redhat.io/openshift4/ose-oauth-proxy:v4.10 + securityContext: + {{- toYaml .Values.securityContext | nindent 12 }} + image: registry.redhat.io/openshift4/ose-oauth-proxy:v4.11 imagePullPolicy: IfNotPresent ports: - containerPort: 8443 diff --git a/charts/mlflow-server/templates/tests/test-connection.yaml b/charts/mlflow-server/templates/tests/test-connection.yaml index 6368989..e64f886 100644 --- a/charts/mlflow-server/templates/tests/test-connection.yaml +++ b/charts/mlflow-server/templates/tests/test-connection.yaml @@ -9,6 +9,12 @@ metadata: spec: containers: - name: wget + securityContext: + allowPrivilegeEscalation: false + runAsNonRoot: true + capabilities: + drop: + - ALL image: busybox command: ['wget'] args: ['{{ include "mlflow-server.fullname" . }}:{{ .Values.service.port }}'] diff --git a/charts/mlflow-server/templates/tests/test-training.yaml b/charts/mlflow-server/templates/tests/test-training.yaml index 65b6e92..fc151ab 100644 --- a/charts/mlflow-server/templates/tests/test-training.yaml +++ b/charts/mlflow-server/templates/tests/test-training.yaml @@ -9,6 +9,12 @@ metadata: spec: containers: - name: training + securityContext: + allowPrivilegeEscalation: false + runAsNonRoot: true + capabilities: + drop: + - ALL image: "{{ .Values.trainingTestImage.repository }}:{{ .Values.trainingTestImage.tag | default .Chart.AppVersion }}" imagePullPolicy: "{{ .Values.trainingTestImage.pullPolicy}}" env: diff --git a/charts/mlflow-server/values.yaml b/charts/mlflow-server/values.yaml index b376660..d0d7828 100644 --- a/charts/mlflow-server/values.yaml +++ b/charts/mlflow-server/values.yaml @@ -41,15 +41,15 @@ podAnnotations: {} # -- podSecurityContext: {} - # fsGroup: 2000 - -securityContext: {} - # capabilities: - # drop: - # - ALL - # readOnlyRootFilesystem: true - # runAsNonRoot: true - # runAsUser: 1000 + # seccompProfile: + # type: RuntimeDefault + +securityContext: + allowPrivilegeEscalation: false + runAsNonRoot: true + capabilities: + drop: + - ALL objectStorage: objectBucketClaim: