Skip to content

Commit

Permalink
Add ability to configure pod level securityContext (#120)
Browse files Browse the repository at this point in the history
* add podSecurityContext

Signed-off-by: bryopsida <[email protected]>

* Updated changelog

Signed-off-by: bryopsida <[email protected]>

* bump minor and correct change log

Signed-off-by: bryopsida <[email protected]>

---------

Signed-off-by: bryopsida <[email protected]>
  • Loading branch information
bryopsida authored May 18, 2023
1 parent 5781216 commit 27a2975
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
8 changes: 3 additions & 5 deletions charts/coredns/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: coredns
version: 1.22.0
version: 1.23.0
appVersion: 1.10.1
home: https://coredns.io
icon: https://coredns.io/images/CoreDNS_Colour_Horizontal.png
Expand All @@ -19,7 +19,5 @@ engine: gotpl
type: application
annotations:
artifacthub.io/changes: |
- kind: fixed
description: Fix assignment of NET_BIND_SERVICE capability
- kind: fixed
description: Enable use of pullSecrets with Deployment
- kind: added
description: Added podSecurityContext
3 changes: 3 additions & 0 deletions charts/coredns/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ spec:
{{ toYaml .Values.podAnnotations | indent 8 }}
{{- end }}
spec:
{{- if .Values.podSecurityContext }}
securityContext: {{ toYaml .Values.podSecurityContext | nindent 8 }}
{{- end }}
{{- if .Values.terminationGracePeriodSeconds }}
terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }}
{{- end }}
Expand Down
3 changes: 3 additions & 0 deletions charts/coredns/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ isClusterService: true
# Optional priority class to be used for the coredns pods. Used for autoscaler if autoscaler.priorityClassName not set.
priorityClassName: ""

# Configure the pod level securityContext.
podSecurityContext: {}

# Configure SecurityContext for Pod.
# Ensure that required linux capability to bind port number below 1024 is assigned (`CAP_NET_BIND_SERVICE`).
securityContext:
Expand Down

0 comments on commit 27a2975

Please sign in to comment.