fix(reflector): restricted pod-security

This commit is contained in:
JJGadgets
2024-02-08 21:04:03 +08:00
parent 0aac319a6d
commit 20128a59e4
2 changed files with 16 additions and 1 deletions

View File

@@ -20,4 +20,17 @@ spec:
priorityClassName: "system-cluster-critical"
tolerations:
- key: "node-role.kubernetes.io/control-plane"
operator: "Exists"
operator: "Exists"
# restricted PSS
podSecurityContext:
runAsNonRoot: true
runAsUser: &uid ${APP_UID_REFLECTOR:=1000}
runAsGroup: *uid
fsGroup: *uid
fsGroupChangePolicy: "Always"
seccompProfile: { type: "RuntimeDefault" }
securityContext:
readOnlyRootFilesystem: true
allowPrivilegeEscalation: false
capabilities:
drop: ["ALL"]

View File

@@ -6,9 +6,11 @@ metadata:
namespace: flux-system
labels: &l
app.kubernetes.io/name: "reflector"
wait.flux.home.arpa/disabled: "true"
spec:
commonMetadata:
labels: *l
path: ./kube/deploy/core/secrets/reflector/app
targetNamespace: "reflector"
wait: false
dependsOn: []