Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds securityContext to initConfig #374

Merged
merged 2 commits into from
Apr 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/atlantis/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: v1
appVersion: v0.27.2
description: A Helm chart for Atlantis https://www.runatlantis.io
name: atlantis
version: 4.24.1
version: 4.25.0
keywords:
- terraform
home: https://www.runatlantis.io
Expand Down
1 change: 1 addition & 0 deletions charts/atlantis/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ extraManifests:
| initConfig.image | string | `"alpine:latest"` | |
| initConfig.imagePullPolicy | string | `"IfNotPresent"` | |
| initConfig.script | string | Check values.yaml. | Script to run on the init container. |
| initConfig.securityContext | object | `{}` | Security context for the container. |
| initConfig.sharedDir | string | `"/plugins"` | SharedDir is set as env var INIT_SHARED_DIR. |
| initConfig.sizeLimit | string | `"100Mi"` | Size for the shared volume. |
| initConfig.workDir | string | `"/tmp"` | |
Expand Down
3 changes: 3 additions & 0 deletions charts/atlantis/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,9 @@ spec:
subPath: init-config.sh
- name: init-shared-path
mountPath: {{ .Values.initConfig.sharedDir }}
{{- if .Values.initConfig.containerSecurityContext }}
securityContext: {{- toYaml .Values.initConfig.containerSecurityContext | nindent 12 }}
{{- end }}
{{- end }}
{{- end }}
containers:
Expand Down
5 changes: 5 additions & 0 deletions charts/atlantis/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1001,6 +1001,11 @@
"type": "string",
"description": "Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images"
},
"containerSecurityContext": {
"type": "object",
"description": "SecurityContext configuration for the initConfig container.",
"$ref": "#/definitions/io.k8s.api.core.v1.SecurityContext"
},
"sharedDir": {
"type": "string",
"description": "sharedDir is set as env var INIT_SHARED_DIR"
Expand Down
2 changes: 2 additions & 0 deletions charts/atlantis/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,8 @@ initConfig:
workDir: /tmp
# -- Size for the shared volume.
sizeLimit: 100Mi
# -- Security context for the container.
securityContext: {}
# -- Script to run on the init container.
# @default -- Check values.yaml.
script: |
Expand Down