Skip to content
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
12 changes: 12 additions & 0 deletions docs/pages/includes/helm-reference/zz_generated.tbot.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -435,3 +435,15 @@ extraEnv:
- name: HTTPS_PROXY
value: "http://username:password@my.proxy.host:3128"
```

## `securityContext`

| Type | Default |
|------|---------|
| `object` | `null` |

`securityContext` sets the container security context for any pods created by the chart.
See [the Kubernetes documentation](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container)
for more details.

By default, this is unset.
11 changes: 11 additions & 0 deletions examples/chart/tbot/.lint/full.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,3 +98,14 @@ extraArgs:
extraEnv:
- name: "TEST_ENV"
value: "test-value"

securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true
runAsNonRoot: true
runAsUser: 9807
seccompProfile:
type: RuntimeDefault
3 changes: 3 additions & 0 deletions examples/chart/tbot/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@ spec:
{{- end }}
{{- if .Values.resources }}
resources: {{- toYaml .Values.resources | nindent 12 }}
{{- end }}
{{- if .Values.securityContext }}
securityContext: {{- toYaml .Values.securityContext | nindent 12 }}
{{- end }}
ports:
- containerPort: 3001
Expand Down
10 changes: 10 additions & 0 deletions examples/chart/tbot/tests/__snapshot__/deployment_test.yaml.snap
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,16 @@ should match the snapshot (full):
requests:
cpu: 250m
memory: 64Mi
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true
runAsNonRoot: true
runAsUser: 9807
seccompProfile:
type: RuntimeDefault
volumeMounts:
- mountPath: /config
name: config
Expand Down
7 changes: 7 additions & 0 deletions examples/chart/tbot/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -227,3 +227,10 @@ extraArgs: []
# value: "http://username:password@my.proxy.host:3128"
# ```
extraEnv: []

# securityContext(object) -- sets the container security context for any pods created by the chart.
# See [the Kubernetes documentation](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container)
# for more details.
#
# By default, this is unset.
securityContext: null