Skip to content

Commit

Permalink
boost default pod security
Browse files Browse the repository at this point in the history
Signed-off-by: Scott Trent <[email protected]>
  • Loading branch information
trent-s committed Sep 30, 2024
1 parent 75a3e98 commit 6148ebe
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 17 deletions.
9 changes: 2 additions & 7 deletions bundle/manifests/susql-operator.clusterserviceversion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ metadata:
capabilities: Basic Install
categories: Monitoring
containerImage: quay.io/sustainable_computing_io/susql_operator:0.0.32
createdAt: "2024-09-30T02:37:03Z"
createdAt: "2024-09-30T05:10:03Z"
description: 'Aggregates energy and CO2 emission data for pods tagged with SusQL
labels '
features.operators.openshift.io/disconnected: "false"
Expand Down Expand Up @@ -212,9 +212,7 @@ spec:
drop:
- ALL
readOnlyRootFilesystem: true
runAsGroup: 14001
runAsNonRoot: true
runAsUser: 14001
- command:
- /manager
env:
Expand Down Expand Up @@ -339,12 +337,9 @@ spec:
capabilities:
drop:
- ALL
runAsGroup: 12001
runAsUser: 12001
readOnlyRootFilesystem: true
securityContext:
runAsGroup: 11001
runAsNonRoot: true
runAsUser: 11001
serviceAccountName: susql-operator-susql-controller-manager
terminationGracePeriodSeconds: 10
permissions:
Expand Down
2 changes: 0 additions & 2 deletions config/default/manager_auth_proxy_patch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ spec:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
runAsNonRoot: true
runAsUser: 14001
runAsGroup: 14001
capabilities:
drop:
- "ALL"
Expand Down
3 changes: 1 addition & 2 deletions config/default/manager_config_patch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@ spec:
- name: manager
imagePullPolicy: Always
securityContext:
runAsUser: 11001
runAsGroup: 11001
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
runAsNonRoot: true
capabilities:
drop:
Expand Down
5 changes: 1 addition & 4 deletions config/manager/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@ spec:
# - linux
securityContext:
runAsNonRoot: true
runAsUser: 11001
runAsGroup: 11001
# TODO(user): For common cases that do not require escalating privileges
# it is recommended to ensure that all your Pods/Containers are restrictive.
# More info: https://kubernetes.io/docs/concepts/security/pod-security-standards/#restricted
Expand Down Expand Up @@ -165,9 +163,8 @@ spec:
imagePullPolicy: Always
name: manager
securityContext:
runAsUser: 12001
runAsGroup: 12001
allowPrivilegeEscalation: false
readOnlyRootFilesystem : true
capabilities:
drop:
- "ALL"
Expand Down
3 changes: 1 addition & 2 deletions deployment/susql-controller/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,8 @@ spec:
image: {{ required "Please specify a 'containerImage' in the user file" .Values.containerImage }}
imagePullPolicy: {{ .Values.imagePullPolicy | default "Always" }}
securityContext:
runAsUser: 10001
runAsGroup: 10001
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
runAsNonRoot: true
capabilities:
drop:
Expand Down

0 comments on commit 6148ebe

Please sign in to comment.