Skip to content

Commit

Permalink
Add container securityContext
Browse files Browse the repository at this point in the history
- container is now immutable (file integrity guaranteed): readOnlyRootFilesystem
- remove rights the application doesn't need: allowPrivilegeEscalation+capabilities
  • Loading branch information
damienleger committed Nov 24, 2021
1 parent 732cb65 commit c9ae6c7
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,12 @@ spec:
mountPath: /etc/ssl/certs/ca-certificates.crt #/etc/ssl/certs/ca-bundle.crt for Amazon Linux Worker Nodes
readOnly: true
imagePullPolicy: "Always"
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- all
readOnlyRootFilesystem: true
volumes:
- name: ssl-certs
hostPath:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,12 @@ spec:
mountPath: /etc/ssl/certs/ca-certificates.crt #/etc/ssl/certs/ca-bundle.crt for Amazon Linux Worker Nodes
readOnly: true
imagePullPolicy: "Always"
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- all
readOnlyRootFilesystem: true
volumes:
- name: ssl-certs
hostPath:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,12 @@ spec:
mountPath: /etc/ssl/certs/ca-certificates.crt #/etc/ssl/certs/ca-bundle.crt for Amazon Linux Worker Nodes
readOnly: true
imagePullPolicy: "Always"
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- all
readOnlyRootFilesystem: true
volumes:
- name: ssl-certs
hostPath:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,12 @@ spec:
mountPath: /etc/ssl/certs/ca-certificates.crt #/etc/ssl/certs/ca-bundle.crt for Amazon Linux Worker Nodes
readOnly: true
imagePullPolicy: "Always"
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- all
readOnlyRootFilesystem: true
volumes:
- name: ssl-certs
hostPath:
Expand Down

0 comments on commit c9ae6c7

Please sign in to comment.