Skip to content

Commit

Permalink
fix(charts): add security profiles to BPDM deployment containers
Browse files Browse the repository at this point in the history
- adds seccomp and app armor profiles
- security context configuration now affects also initcontainers
  • Loading branch information
nicoprow committed Jan 14, 2025
1 parent 10ab9b5 commit d2eafec
Show file tree
Hide file tree
Showing 13 changed files with 33 additions and 11 deletions.
3 changes: 3 additions & 0 deletions charts/bpdm/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ The format is based on Keep a Changelog (https://keepachangelog.com/en/1.0.0/),
- update BPDM Cleaning Service Dummy Chart to version 3.3.0
- update BPDM Bridge Chart to version 3.3.0
- update Central-IDP dependency to 4.0.0 [#1145](https://github.com/eclipse-tractusx/bpdm/pull/1145)
- Add missing app armor profiles for BPDM application containers [#1153](https://github.com/eclipse-tractusx/bpdm/issues/1153)
- Add missing seccomp profiles for BPDM application containers [#1152](https://github.com/eclipse-tractusx/bpdm/issues/1152)


## [5.2.0] - 2024-11-28

Expand Down
2 changes: 1 addition & 1 deletion charts/bpdm/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ dependencies:
alias: bpdm-orchestrator
condition: bpdm-orchestrator.enabled
- name: bpdm-common
version: 1.0.2
version: 1.0.3-SNAPSHOT
- name: postgresql
version: 12.12.10
repository: https://charts.bitnami.com/bitnami
Expand Down
2 changes: 2 additions & 0 deletions charts/bpdm/charts/bpdm-cleaning-service-dummy/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ The format is based on Keep a Changelog (https://keepachangelog.com/en/1.0.0/),

- Increase appversion to 6.3.0
- update Central-IDP dependency to 4.0.0 [#1145](https://github.com/eclipse-tractusx/bpdm/pull/1145)
- Add missing app armor profile [#1153](https://github.com/eclipse-tractusx/bpdm/issues/1153)
- Add missing seccomp profile [#1152](https://github.com/eclipse-tractusx/bpdm/issues/1152)

## [3.2.0] - 2024-11-28

Expand Down
2 changes: 2 additions & 0 deletions charts/bpdm/charts/bpdm-cleaning-service-dummy/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ springProfiles: []
securityContext:
seccompProfile:
type: RuntimeDefault
appArmorProfile:
type: RuntimeDefault
allowPrivilegeEscalation: false
runAsNonRoot: true
readOnlyRootFilesystem: true
Expand Down
6 changes: 6 additions & 0 deletions charts/bpdm/charts/bpdm-common/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog (https://keepachangelog.com/en/1.0.0/),

## [1.0.3] - tbd

### Changed

- Add security context configuration to the deployment's init container

## [1.0.2] - 2024-10-25

### Changed
Expand Down
2 changes: 1 addition & 1 deletion charts/bpdm/charts/bpdm-common/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
apiVersion: v2
type: library
name: bpdm-common
version: 1.0.2
version: 1.0.3-SNAPSHOT
description: A library Helm Chart for other BPDM Charts
home: https://eclipse-tractusx.github.io/docs/kits/Business%20Partner%20Kit/Adoption%20View
sources:
Expand Down
11 changes: 2 additions & 9 deletions charts/bpdm/charts/bpdm-common/templates/_deployment.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ spec:
# @url: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#use-the-default-service-account-to-access-the-api-server
automountServiceAccountToken: false
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
{{- toYaml .Values.securityContext | nindent 8 }}
containers:
- name: {{ .Chart.Name }}
securityContext:
Expand Down Expand Up @@ -84,14 +84,7 @@ spec:
- name: startup-delay
image: busybox:1.28
securityContext:
allowPrivilegeEscalation: false
runAsNonRoot: true
readOnlyRootFilesystem: true
runAsUser: 10001
runAsGroup: 10001
capabilities:
drop:
- ALL
{{- toYaml .Values.securityContext | nindent 12 }}
command: ['sh', '-c', "sleep {{ $.Values.startupDelaySeconds }}"]
{{- with .Values.nodeSelector }}
nodeSelector:
Expand Down
2 changes: 2 additions & 0 deletions charts/bpdm/charts/bpdm-gate/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ The format is based on Keep a Changelog (https://keepachangelog.com/en/1.0.0/),

- Increase appversion to 6.3.0
- update Central-IDP dependency to 4.0.0 [#1145](https://github.com/eclipse-tractusx/bpdm/pull/1145)
- Add missing app armor profile [#1153](https://github.com/eclipse-tractusx/bpdm/issues/1153)
- Add missing seccomp profile [#1152](https://github.com/eclipse-tractusx/bpdm/issues/1152)

## [6.2.0] - 2024-11-28

Expand Down
4 changes: 4 additions & 0 deletions charts/bpdm/charts/bpdm-gate/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ podAnnotations: {}
springProfiles: []

securityContext:
seccompProfile:
type: RuntimeDefault
appArmorProfile:
type: RuntimeDefault
allowPrivilegeEscalation: false
runAsNonRoot: true
readOnlyRootFilesystem: true
Expand Down
2 changes: 2 additions & 0 deletions charts/bpdm/charts/bpdm-orchestrator/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ The format is based on Keep a Changelog (https://keepachangelog.com/en/1.0.0/),

- Increase appversion to 6.3.0
- update Central-IDP dependency to 4.0.0 [#1145](https://github.com/eclipse-tractusx/bpdm/pull/1145)
- Add missing app armor profile [#1153](https://github.com/eclipse-tractusx/bpdm/issues/1153)
- Add missing seccomp profile [#1152](https://github.com/eclipse-tractusx/bpdm/issues/1152)

## [3.2.0] - 2024-11-28

Expand Down
2 changes: 2 additions & 0 deletions charts/bpdm/charts/bpdm-orchestrator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ springProfiles: []
securityContext:
seccompProfile:
type: RuntimeDefault
appArmorProfile:
type: RuntimeDefault
allowPrivilegeEscalation: false
runAsNonRoot: true
readOnlyRootFilesystem: true
Expand Down
2 changes: 2 additions & 0 deletions charts/bpdm/charts/bpdm-pool/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ The format is based on Keep a Changelog (https://keepachangelog.com/en/1.0.0/),

- Increase appversion to 6.3.0
- update Central-IDP dependency to 4.0.0 [#1145](https://github.com/eclipse-tractusx/bpdm/pull/1145)
- Add missing app armor profile [#1153](https://github.com/eclipse-tractusx/bpdm/issues/1153)
- Add missing seccomp profile [#1152](https://github.com/eclipse-tractusx/bpdm/issues/1152)

## [7.2.0] - 2024-11-28

Expand Down
4 changes: 4 additions & 0 deletions charts/bpdm/charts/bpdm-pool/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ podAnnotations: {}
springProfiles: []

securityContext:
seccompProfile:
type: RuntimeDefault
appArmorProfile:
type: RuntimeDefault
allowPrivilegeEscalation: false
runAsNonRoot: true
readOnlyRootFilesystem: true
Expand Down

0 comments on commit d2eafec

Please sign in to comment.