Skip to content

Commit ddef2e5

Browse files
authored
Bump version to 1.44.2 and add new security context template for PSS restricted mode (#95)
Signed-off-by: Evsyukov Denis <[email protected]>
1 parent bc3c750 commit ddef2e5

File tree

4 files changed

+33
-5
lines changed

4 files changed

+33
-5
lines changed

charts/helm_lib/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
apiVersion: v2
22
type: library
33
name: deckhouse_lib_helm
4-
version: 1.44.1
4+
version: 1.44.2
55
description: "Helm utils template definitions for Deckhouse modules."

charts/helm_lib/README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@
6464
| [helm_lib_module_container_security_context_read_only_root_filesystem_capabilities_drop_all_and_add](#helm_lib_module_container_security_context_read_only_root_filesystem_capabilities_drop_all_and_add) |
6565
| [helm_lib_module_container_security_context_capabilities_drop_all_and_add](#helm_lib_module_container_security_context_capabilities_drop_all_and_add) |
6666
| [helm_lib_module_container_security_context_capabilities_drop_all_and_run_as_user_custom](#helm_lib_module_container_security_context_capabilities_drop_all_and_run_as_user_custom) |
67+
| [helm_lib_module_container_security_context_read_only_root_filesystem_capabilities_drop_all_pss_restricted](#helm_lib_module_container_security_context_read_only_root_filesystem_capabilities_drop_all_pss_restricted) |
6768
| **Module Storage Class** |
6869
| [helm_lib_module_storage_class_annotations](#helm_lib_module_storage_class_annotations) |
6970
| **Monitoring Grafana Dashboards** |
@@ -733,6 +734,19 @@ list:
733734
- User id
734735
- Group id
735736

737+
738+
### helm_lib_module_container_security_context_read_only_root_filesystem_capabilities_drop_all_pss_restricted
739+
740+
returns SecurityContext parameters for Container with minimal required settings to comply with the Restricted mode of the Pod Security Standards
741+
742+
#### Usage
743+
744+
`{{ include "helm_lib_module_container_security_context_read_only_root_filesystem_capabilities_drop_all_pss_restricted" . }} `
745+
746+
#### Arguments
747+
748+
- Template context with .Values, .Chart, etc
749+
736750
## Module Storage Class
737751

738752
### helm_lib_module_storage_class_annotations

charts/helm_lib/templates/_module_security_context.tpl

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ securityContext:
5959
securityContext:
6060
allowPrivilegeEscalation: false
6161
capabilities:
62-
drop:
63-
- all
62+
drop:
63+
- all
6464
runAsGroup: 64535
6565
runAsNonRoot: true
6666
runAsUser: 64535
@@ -197,3 +197,17 @@ securityContext:
197197
drop:
198198
- ALL
199199
{{- end }}
200+
201+
{{- /* Usage: {{ include "helm_lib_module_container_security_context_read_only_root_filesystem_capabilities_drop_all_pss_restricted" . }} */ -}}
202+
{{- /* returns SecurityContext parameters for Container with minimal required settings to comply with the Restricted mode of the Pod Security Standards */ -}}
203+
{{- define "helm_lib_module_container_security_context_read_only_root_filesystem_capabilities_drop_all_pss_restricted" -}}
204+
{{- /* Template context with .Values, .Chart, etc */ -}}
205+
securityContext:
206+
readOnlyRootFilesystem: true
207+
allowPrivilegeEscalation: false
208+
capabilities:
209+
drop:
210+
- ALL
211+
seccompProfile:
212+
type: RuntimeDefault
213+
{{- end }}

tests/tests/helm_lib_module_container_security_context_run_as_user_deckhouse_pss_restricted_test.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ tests:
1010
value:
1111
allowPrivilegeEscalation: false
1212
capabilities:
13-
drop:
14-
- all
13+
drop:
14+
- all
1515
runAsGroup: 64535
1616
runAsNonRoot: true
1717
runAsUser: 64535

0 commit comments

Comments
 (0)