diff --git a/chart/README.md b/chart/README.md index 394c66b..af83849 100644 --- a/chart/README.md +++ b/chart/README.md @@ -436,6 +436,12 @@ You should now be able to connect to the FusionAuth application at http://localh {} Define labels for fusionauth Deployment. + + podSecurityContext + object + {} + Security context for the pod. Ref: Kubernetes docs. + readinessProbe object @@ -485,6 +491,12 @@ You should now be able to connect to the FusionAuth application at http://localh "http" Protocol to use when connecting to elasticsearch. Ignored when search.engine is NOT elasticsearch. + + securityContext + object + {} + Security context for the fusionauth container. Ref: Kubernetes docs. + service.annotations object diff --git a/chart/templates/deployment.yaml b/chart/templates/deployment.yaml index aaf8b88..0c8291a 100644 --- a/chart/templates/deployment.yaml +++ b/chart/templates/deployment.yaml @@ -133,6 +133,10 @@ spec: {{- end }} resources: {{- toYaml .Values.resources | nindent 12 }} + {{- with .Values.securityContext }} + securityContext: + {{- toYaml . | nindent 12 }} + {{- end }} {{- if or .Values.kickstart.enabled .Values.extraVolumeMounts }} volumeMounts: @@ -149,6 +153,10 @@ spec: {{- if .Values.extraContainers }} {{- toYaml .Values.extraContainers | nindent 8 }} {{- end }} + {{- with .Values.podSecurityContext }} + securityContext: + {{- toYaml . | nindent 8 }} + {{- end }} {{- if .Values.dnsConfig }} dnsConfig: {{- toYaml .Values.dnsConfig |nindent 8 }} diff --git a/chart/values.schema.json b/chart/values.schema.json index fbc4e13..1f81d39 100644 --- a/chart/values.schema.json +++ b/chart/values.schema.json @@ -207,6 +207,9 @@ "nodeSelector": { "type": "object" }, + "podSecurityContext": { + "type": "object" + }, "podAnnotations": { "type": "object" }, @@ -246,6 +249,9 @@ "resources": { "type": "object" }, + "securityContext": { + "type": "object" + }, "search": { "type": "object", "properties": { diff --git a/chart/values.yaml b/chart/values.yaml index 1367767..7e72900 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -229,6 +229,19 @@ autoscaling: targetCPU: 50 # targetMemory: 50 +# podSecurityContext -- Security context for the pod. Ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ +podSecurityContext: {} + # runAsNonRoot: true + # seccompProfile: + # type: RuntimeDefault + +# securityContext -- Security context for the fusionauth container. Ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ +securityContext: {} + # allowPrivilegeEscalation: false + # capabilities: + # drop: + # - ALL + # nodeSelector -- Define nodeSelector for kubernetes to use when scheduling fusionauth pods. nodeSelector: {}