Skip to content

Commit

Permalink
🛂 Addressing PodSecurity violation warnings:
Browse files Browse the repository at this point in the history
* adding/updating securityContext, as needed, to allow running as 'restricted' standard.
* adding seccompProfile

PR references from knative/eventing repo:
* knative/eventing#5863
* knative/eventing#6533

Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
  • Loading branch information
matzew committed Sep 27, 2022
1 parent c42f668 commit 9bf287f
Show file tree
Hide file tree
Showing 13 changed files with 74 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,10 @@ spec:
terminationMessagePath: /dev/temination-log
securityContext:
allowPrivilegeEscalation: false
privileged: false
readOnlyRootFilesystem: true
capabilities:
drop:
- ALL
seccompProfile:
type: RuntimeDefault
restartPolicy: Always
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,12 @@ spec:

securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
capabilities:
drop:
- ALL
seccompProfile:
type: RuntimeDefault

ports:
- name: https-webhook
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,10 @@ spec:
terminationMessagePath: /dev/temination-log
securityContext:
allowPrivilegeEscalation: false
privileged: false
readOnlyRootFilesystem: true
capabilities:
drop:
- ALL
seccompProfile:
type: RuntimeDefault
restartPolicy: Always
9 changes: 9 additions & 0 deletions control-plane/config/post-install/500-post-install-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,12 @@ spec:
fieldPath: metadata.namespace
- name: CHANNEL_GENERAL_CONFIG_MAP_NAME
value: kafka-channel-config
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
runAsNonRoot: true
capabilities:
drop:
- ALL
seccompProfile:
type: RuntimeDefault
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,12 @@ spec:
- "kafkasources.sources.knative.dev"
- "kafkachannels.messaging.knative.dev"
- "kafkasinks.eventing.knative.dev"
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
runAsNonRoot: true
capabilities:
drop:
- ALL
seccompProfile:
type: RuntimeDefault
6 changes: 5 additions & 1 deletion data-plane/config/broker/500-dispatcher.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,12 @@ spec:
terminationMessagePath: /dev/temination-log
securityContext:
allowPrivilegeEscalation: false
privileged: false
readOnlyRootFilesystem: true
capabilities:
drop:
- ALL
seccompProfile:
type: RuntimeDefault
volumes:
- name: config-kafka-broker-data-plane
configMap:
Expand Down
6 changes: 5 additions & 1 deletion data-plane/config/broker/500-receiver.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,12 @@ spec:
terminationMessagePath: /dev/temination-log
securityContext:
allowPrivilegeEscalation: false
privileged: false
readOnlyRootFilesystem: true
capabilities:
drop:
- ALL
seccompProfile:
type: RuntimeDefault
volumes:
- name: kafka-broker-brokers-triggers
configMap:
Expand Down
6 changes: 5 additions & 1 deletion data-plane/config/brokerv2/500-dispatcher.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,12 @@ spec:
terminationMessagePath: /dev/temination-log
securityContext:
allowPrivilegeEscalation: false
privileged: false
readOnlyRootFilesystem: true
capabilities:
drop:
- ALL
seccompProfile:
type: RuntimeDefault
volumes:
- name: config-kafka-broker-data-plane
configMap:
Expand Down
6 changes: 5 additions & 1 deletion data-plane/config/channel/500-dispatcher.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,12 @@ spec:
terminationMessagePath: /dev/temination-log
securityContext:
allowPrivilegeEscalation: false
privileged: false
readOnlyRootFilesystem: true
capabilities:
drop:
- ALL
seccompProfile:
type: RuntimeDefault
volumes:
- name: config-kafka-channel-data-plane
configMap:
Expand Down
6 changes: 5 additions & 1 deletion data-plane/config/channel/500-receiver.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,12 @@ spec:
terminationMessagePath: /dev/temination-log
securityContext:
allowPrivilegeEscalation: false
privileged: false
readOnlyRootFilesystem: true
capabilities:
drop:
- ALL
seccompProfile:
type: RuntimeDefault
volumes:
- name: kafka-channel-channels-subscriptions
configMap:
Expand Down
6 changes: 5 additions & 1 deletion data-plane/config/channelv2/500-dispatcher.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,12 @@ spec:
terminationMessagePath: /dev/temination-log
securityContext:
allowPrivilegeEscalation: false
privileged: false
readOnlyRootFilesystem: true
capabilities:
drop:
- ALL
seccompProfile:
type: RuntimeDefault
volumes:
- name: config-kafka-channel-data-plane
configMap:
Expand Down
6 changes: 5 additions & 1 deletion data-plane/config/sink/500-receiver.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,12 @@ spec:
terminationMessagePath: /dev/temination-log
securityContext:
allowPrivilegeEscalation: false
privileged: false
readOnlyRootFilesystem: true
capabilities:
drop:
- ALL
seccompProfile:
type: RuntimeDefault
volumes:
- name: kafka-sink-sinks
configMap:
Expand Down
6 changes: 5 additions & 1 deletion data-plane/config/source/500-dispatcher.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,12 @@ spec:
terminationMessagePath: /dev/temination-log
securityContext:
allowPrivilegeEscalation: false
privileged: false
readOnlyRootFilesystem: true
capabilities:
drop:
- ALL
seccompProfile:
type: RuntimeDefault
volumes:
- name: config-kafka-source-data-plane
configMap:
Expand Down

0 comments on commit 9bf287f

Please sign in to comment.