Skip to content

Commit

Permalink
Merge pull request #47 from ksangers/main
Browse files Browse the repository at this point in the history
Expand deployment security context configurability
  • Loading branch information
jouve authored Apr 24, 2024
2 parents 0ba2109 + c4b1015 commit 7321a78
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 7 deletions.
2 changes: 1 addition & 1 deletion charts/mailpit/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: mailpit
description: An email and SMTP testing tool with API for developers
icon: https://raw.githubusercontent.com/axllent/mailpit/develop/server/ui/mailpit.svg
type: application
version: 0.15.3
version: 0.15.4
appVersion: 1.15.1
dependencies:
- name: common
Expand Down
6 changes: 1 addition & 5 deletions charts/mailpit/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,7 @@ spec:
image: {{ include "common.images.image" (dict "imageRoot" .Values.image "global" .Values.global) }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
securityContext:
allowPrivilegeEscalation: false
runAsUser: 1001
runAsGroup: 1001
runAsNonRoot: true
readOnlyRootFilesystem: true
{{- toYaml .Values.podSecurityContext | nindent 12 }}
args:
- --db-file
- /var/lib/mailpit/mailpit.db
Expand Down
5 changes: 4 additions & 1 deletion charts/mailpit/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@
}
}
},
"podSecurityContext": {
"type": "object"
},
"replicaCount": {
"type": "number",
"description": "Number of replicas to deploy",
Expand Down Expand Up @@ -427,4 +430,4 @@
}
}
}
}
}
10 changes: 10 additions & 0 deletions charts/mailpit/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,16 @@ updateStrategy:
##
type: RollingUpdate

## @param podSecurityContext.type [object] SecurityContext for pods
## ref: https://kubernetes.io/docs/concepts/security/pod-security-standards/
##
podSecurityContext:
allowPrivilegeEscalation: false
runAsUser: 1001
runAsGroup: 1001
runAsNonRoot: true
readOnlyRootFilesystem: true

## @param replicaCount Number of replicas to deploy
##
replicaCount: 1
Expand Down

0 comments on commit 7321a78

Please sign in to comment.