feat(pss): drop 5 namespaces from PSS privileged to restricted

argocd, cert-manager, cloudnative-pg already compliant — label flip only.
ocis: add overlay injecting seccompProfile=RuntimeDefault, drop ALL caps,
allowPrivilegeEscalation=false across all chart Deployments/CronJobs;
patch idm initContainer; harden custom precheck Job; refactor s3-backup
to rclone/rclone image (avoids apk-add-as-root).
victoria-metrics-single: overlay sets full restricted SC on the StatefulSet
that ships with empty securityContext: {}.

forgejo, traefik, kube-system stay privileged (hostPort / CSI driver).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Felix Wolf 2026-05-03 00:52:45 +02:00
parent bf0cf0a11d
commit 33c52be1c5
53 changed files with 448 additions and 102 deletions

View file

@ -9,7 +9,7 @@ kind: Namespace
metadata: metadata:
name: #@ ns name: #@ ns
labels: labels:
pod-security.kubernetes.io/enforce: privileged pod-security.kubernetes.io/enforce: restricted
#@overlay/match by=overlay.all, expects="1+" #@overlay/match by=overlay.all, expects="1+"
--- ---

View file

@ -9,7 +9,7 @@ kind: Namespace
metadata: metadata:
name: #@ ns name: #@ ns
labels: labels:
pod-security.kubernetes.io/enforce: privileged pod-security.kubernetes.io/enforce: restricted
#@overlay/match by=overlay.all, expects="1+" #@overlay/match by=overlay.all, expects="1+"
--- ---

View file

@ -9,7 +9,7 @@ kind: Namespace
metadata: metadata:
name: #@ ns name: #@ ns
labels: labels:
pod-security.kubernetes.io/enforce: privileged pod-security.kubernetes.io/enforce: restricted
#@overlay/match by=overlay.all, expects="1+" #@overlay/match by=overlay.all, expects="1+"
--- ---

View file

@ -60,6 +60,12 @@ spec:
spec: spec:
serviceAccountName: ocis-external-secret-precheck serviceAccountName: ocis-external-secret-precheck
restartPolicy: OnFailure restartPolicy: OnFailure
securityContext:
runAsNonRoot: true
runAsUser: 65532
runAsGroup: 65532
seccompProfile:
type: RuntimeDefault
containers: containers:
- name: precheck - name: precheck
image: alpine/k8s:1.32.3 image: alpine/k8s:1.32.3
@ -80,3 +86,9 @@ spec:
valueFrom: valueFrom:
fieldRef: fieldRef:
fieldPath: metadata.namespace fieldPath: metadata.namespace
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
capabilities:
drop:
- ALL

View file

@ -9,7 +9,7 @@ kind: Namespace
metadata: metadata:
name: #@ ns name: #@ ns
labels: labels:
pod-security.kubernetes.io/enforce: privileged pod-security.kubernetes.io/enforce: restricted
#@overlay/match by=overlay.all, expects="1+" #@overlay/match by=overlay.all, expects="1+"
--- ---

View file

@ -0,0 +1,62 @@
#@ load("@ytt:overlay", "overlay")
#@ helm_match = overlay.subset({"metadata": {"labels": {"app.kubernetes.io/managed-by": "Helm"}}})
#@overlay/match by=overlay.and_op(overlay.subset({"kind": "Deployment"}), helm_match), expects="1+"
---
spec:
template:
spec:
securityContext:
#@overlay/match missing_ok=True
seccompProfile:
type: RuntimeDefault
containers:
#@overlay/match by=overlay.all, expects="1+"
-
securityContext:
#@overlay/match missing_ok=True
allowPrivilegeEscalation: false
#@overlay/match missing_ok=True
capabilities:
drop:
- ALL
#! idm is the only chart Deployment with initContainers
#@overlay/match by=overlay.subset({"kind": "Deployment", "metadata": {"name": "idm"}})
---
spec:
template:
spec:
initContainers:
#@overlay/match by=overlay.all, expects="1+"
-
securityContext:
#@overlay/match missing_ok=True
allowPrivilegeEscalation: false
#@overlay/match missing_ok=True
capabilities:
drop:
- ALL
#@overlay/match by=overlay.and_op(overlay.subset({"kind": "CronJob"}), helm_match), expects="1+"
---
spec:
jobTemplate:
spec:
template:
spec:
securityContext:
#@overlay/match missing_ok=True
seccompProfile:
type: RuntimeDefault
containers:
#@overlay/match by=overlay.all, expects="1+"
-
securityContext:
#@overlay/match missing_ok=True
allowPrivilegeEscalation: false
#@overlay/match missing_ok=True
capabilities:
drop:
- ALL

View file

@ -27,74 +27,76 @@ spec:
spec: spec:
restartPolicy: OnFailure restartPolicy: OnFailure
serviceAccountName: ocis-s3-backup serviceAccountName: ocis-s3-backup
securityContext:
runAsNonRoot: true
runAsUser: 1009
runAsGroup: 1009
seccompProfile:
type: RuntimeDefault
containers: containers:
- name: backup - name: backup
image: alpine:3.20 image: rclone/rclone:1.69.0
args:
- sync
- "s3:ocis-tr1ceracop"
- "backup:"
- --transfers=4
- -v
resources: resources:
requests: requests:
memory: 128Mi memory: 128Mi
cpu: 50m cpu: 50m
command:
- sh
- -c
- |
set -e
apk add --no-cache rclone >/dev/null 2>&1
mkdir -p /tmp/rclone
cat > /tmp/rclone/rclone.conf <<CONF
[s3]
type = s3
provider = Other
access_key_id = ${S3_ACCESS_KEY}
secret_access_key = ${S3_SECRET_KEY}
endpoint = https://nbg1.your-objectstorage.com
acl = private
[storagebox]
type = sftp
host = ${STORAGEBOX_HOST}
port = 23
user = ${STORAGEBOX_USER}
key_file = /etc/storagebox/ssh-key
shell_type = none
md5sum_command = none
sha1sum_command = none
[backup]
type = compress
remote = storagebox:ocis-backup
CONF
echo "Syncing S3 bucket to Storage Box (compressed)..."
rclone sync s3:ocis-tr1ceracop backup: \
--config /tmp/rclone/rclone.conf \
--transfers 4 \
-v
rm -rf /tmp/rclone
echo "Backup complete."
env: env:
- name: S3_ACCESS_KEY - name: RCLONE_CONFIG_S3_TYPE
value: s3
- name: RCLONE_CONFIG_S3_PROVIDER
value: Other
- name: RCLONE_CONFIG_S3_ENDPOINT
value: https://nbg1.your-objectstorage.com
- name: RCLONE_CONFIG_S3_ACL
value: private
- name: RCLONE_CONFIG_S3_ACCESS_KEY_ID
valueFrom: valueFrom:
secretKeyRef: secretKeyRef:
name: ocis-s3-credentials name: ocis-s3-credentials
key: accessKey key: accessKey
- name: S3_SECRET_KEY - name: RCLONE_CONFIG_S3_SECRET_ACCESS_KEY
valueFrom: valueFrom:
secretKeyRef: secretKeyRef:
name: ocis-s3-credentials name: ocis-s3-credentials
key: secretKey key: secretKey
- name: STORAGEBOX_HOST - name: RCLONE_CONFIG_STORAGEBOX_TYPE
value: sftp
- name: RCLONE_CONFIG_STORAGEBOX_PORT
value: "23"
- name: RCLONE_CONFIG_STORAGEBOX_KEY_FILE
value: /etc/storagebox/ssh-key
- name: RCLONE_CONFIG_STORAGEBOX_SHELL_TYPE
value: none
- name: RCLONE_CONFIG_STORAGEBOX_MD5SUM_COMMAND
value: none
- name: RCLONE_CONFIG_STORAGEBOX_SHA1SUM_COMMAND
value: none
- name: RCLONE_CONFIG_STORAGEBOX_HOST
valueFrom: valueFrom:
secretKeyRef: secretKeyRef:
name: ocis-storagebox-credentials name: ocis-storagebox-credentials
key: host key: host
- name: STORAGEBOX_USER - name: RCLONE_CONFIG_STORAGEBOX_USER
valueFrom: valueFrom:
secretKeyRef: secretKeyRef:
name: ocis-storagebox-credentials name: ocis-storagebox-credentials
key: user key: user
- name: RCLONE_CONFIG_BACKUP_TYPE
value: compress
- name: RCLONE_CONFIG_BACKUP_REMOTE
value: storagebox:ocis-backup
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
capabilities:
drop:
- ALL
volumeMounts: volumeMounts:
- name: storagebox-ssh - name: storagebox-ssh
mountPath: /etc/storagebox mountPath: /etc/storagebox

View file

@ -9,7 +9,7 @@ kind: Namespace
metadata: metadata:
name: #@ ns name: #@ ns
labels: labels:
pod-security.kubernetes.io/enforce: privileged pod-security.kubernetes.io/enforce: restricted
#@overlay/match by=overlay.all, expects="1+" #@overlay/match by=overlay.all, expects="1+"
--- ---

View file

@ -0,0 +1,25 @@
#@ load("@ytt:overlay", "overlay")
#@overlay/match by=overlay.subset({"kind": "StatefulSet", "metadata": {"name": "victoria-metrics-single-server"}})
---
spec:
template:
spec:
#@overlay/replace
securityContext:
runAsNonRoot: true
runAsUser: 1000
runAsGroup: 1000
fsGroup: 1000
seccompProfile:
type: RuntimeDefault
containers:
#@overlay/match by=overlay.subset({"name": "vmsingle"})
-
#@overlay/replace
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
capabilities:
drop:
- ALL

View file

@ -4,6 +4,6 @@ metadata:
annotations: annotations:
a8r.io/repository: ssh://git@git.tr1ceracop.de:222/gitea_admin/k8s-and-chill.git a8r.io/repository: ssh://git@git.tr1ceracop.de:222/gitea_admin/k8s-and-chill.git
labels: labels:
pod-security.kubernetes.io/enforce: privileged pod-security.kubernetes.io/enforce: restricted
name: argocd name: argocd
namespace: argocd namespace: argocd

View file

@ -4,6 +4,6 @@ metadata:
annotations: annotations:
a8r.io/repository: ssh://git@git.tr1ceracop.de:222/gitea_admin/k8s-and-chill.git a8r.io/repository: ssh://git@git.tr1ceracop.de:222/gitea_admin/k8s-and-chill.git
labels: labels:
pod-security.kubernetes.io/enforce: privileged pod-security.kubernetes.io/enforce: restricted
name: cert-manager name: cert-manager
namespace: cert-manager namespace: cert-manager

View file

@ -4,6 +4,6 @@ metadata:
annotations: annotations:
a8r.io/repository: ssh://git@git.tr1ceracop.de:222/gitea_admin/k8s-and-chill.git a8r.io/repository: ssh://git@git.tr1ceracop.de:222/gitea_admin/k8s-and-chill.git
labels: labels:
pod-security.kubernetes.io/enforce: privileged pod-security.kubernetes.io/enforce: restricted
name: cnpg-system name: cnpg-system
namespace: cnpg-system namespace: cnpg-system

View file

@ -13,78 +13,80 @@ spec:
template: template:
spec: spec:
containers: containers:
- command: - args:
- sh - sync
- -c - s3:ocis-tr1ceracop
- | - 'backup:'
set -e - --transfers=4
apk add --no-cache rclone >/dev/null 2>&1 - -v
mkdir -p /tmp/rclone
cat > /tmp/rclone/rclone.conf <<CONF
[s3]
type = s3
provider = Other
access_key_id = ${S3_ACCESS_KEY}
secret_access_key = ${S3_SECRET_KEY}
endpoint = https://nbg1.your-objectstorage.com
acl = private
[storagebox]
type = sftp
host = ${STORAGEBOX_HOST}
port = 23
user = ${STORAGEBOX_USER}
key_file = /etc/storagebox/ssh-key
shell_type = none
md5sum_command = none
sha1sum_command = none
[backup]
type = compress
remote = storagebox:ocis-backup
CONF
echo "Syncing S3 bucket to Storage Box (compressed)..."
rclone sync s3:ocis-tr1ceracop backup: \
--config /tmp/rclone/rclone.conf \
--transfers 4 \
-v
rm -rf /tmp/rclone
echo "Backup complete."
env: env:
- name: S3_ACCESS_KEY - name: RCLONE_CONFIG_S3_TYPE
value: s3
- name: RCLONE_CONFIG_S3_PROVIDER
value: Other
- name: RCLONE_CONFIG_S3_ENDPOINT
value: https://nbg1.your-objectstorage.com
- name: RCLONE_CONFIG_S3_ACL
value: private
- name: RCLONE_CONFIG_S3_ACCESS_KEY_ID
valueFrom: valueFrom:
secretKeyRef: secretKeyRef:
key: accessKey key: accessKey
name: ocis-s3-credentials name: ocis-s3-credentials
- name: S3_SECRET_KEY - name: RCLONE_CONFIG_S3_SECRET_ACCESS_KEY
valueFrom: valueFrom:
secretKeyRef: secretKeyRef:
key: secretKey key: secretKey
name: ocis-s3-credentials name: ocis-s3-credentials
- name: STORAGEBOX_HOST - name: RCLONE_CONFIG_STORAGEBOX_TYPE
value: sftp
- name: RCLONE_CONFIG_STORAGEBOX_PORT
value: "23"
- name: RCLONE_CONFIG_STORAGEBOX_KEY_FILE
value: /etc/storagebox/ssh-key
- name: RCLONE_CONFIG_STORAGEBOX_SHELL_TYPE
value: none
- name: RCLONE_CONFIG_STORAGEBOX_MD5SUM_COMMAND
value: none
- name: RCLONE_CONFIG_STORAGEBOX_SHA1SUM_COMMAND
value: none
- name: RCLONE_CONFIG_STORAGEBOX_HOST
valueFrom: valueFrom:
secretKeyRef: secretKeyRef:
key: host key: host
name: ocis-storagebox-credentials name: ocis-storagebox-credentials
- name: STORAGEBOX_USER - name: RCLONE_CONFIG_STORAGEBOX_USER
valueFrom: valueFrom:
secretKeyRef: secretKeyRef:
key: user key: user
name: ocis-storagebox-credentials name: ocis-storagebox-credentials
image: alpine:3.20 - name: RCLONE_CONFIG_BACKUP_TYPE
value: compress
- name: RCLONE_CONFIG_BACKUP_REMOTE
value: storagebox:ocis-backup
image: rclone/rclone:1.69.0
name: backup name: backup
resources: resources:
requests: requests:
cpu: 50m cpu: 50m
memory: 128Mi memory: 128Mi
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true
volumeMounts: volumeMounts:
- mountPath: /etc/storagebox - mountPath: /etc/storagebox
name: storagebox-ssh name: storagebox-ssh
readOnly: true readOnly: true
restartPolicy: OnFailure restartPolicy: OnFailure
securityContext:
runAsGroup: 1009
runAsNonRoot: true
runAsUser: 1009
seccompProfile:
type: RuntimeDefault
serviceAccountName: ocis-s3-backup serviceAccountName: ocis-s3-backup
volumes: volumes:
- name: storagebox-ssh - name: storagebox-ssh

View file

@ -96,6 +96,10 @@ spec:
name: storage-users-clean-expired-uploads name: storage-users-clean-expired-uploads
resources: {} resources: {}
securityContext: securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true readOnlyRootFilesystem: true
runAsGroup: 1000 runAsGroup: 1000
runAsNonRoot: true runAsNonRoot: true
@ -110,6 +114,8 @@ spec:
securityContext: securityContext:
fsGroup: 1000 fsGroup: 1000
fsGroupChangePolicy: OnRootMismatch fsGroupChangePolicy: OnRootMismatch
seccompProfile:
type: RuntimeDefault
volumes: volumes:
- emptyDir: {} - emptyDir: {}
name: tmp-volume name: tmp-volume

View file

@ -77,6 +77,10 @@ spec:
name: storage-users-purge-expired-trash-bin-items name: storage-users-purge-expired-trash-bin-items
resources: {} resources: {}
securityContext: securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true readOnlyRootFilesystem: true
runAsGroup: 1000 runAsGroup: 1000
runAsNonRoot: true runAsNonRoot: true
@ -91,6 +95,8 @@ spec:
securityContext: securityContext:
fsGroup: 1000 fsGroup: 1000
fsGroupChangePolicy: OnRootMismatch fsGroupChangePolicy: OnRootMismatch
seccompProfile:
type: RuntimeDefault
volumes: volumes:
- emptyDir: {} - emptyDir: {}
name: tmp-volume name: tmp-volume

View file

@ -79,6 +79,10 @@ spec:
name: storage-users-restart-postprocessing name: storage-users-restart-postprocessing
resources: {} resources: {}
securityContext: securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true readOnlyRootFilesystem: true
runAsGroup: 1000 runAsGroup: 1000
runAsNonRoot: true runAsNonRoot: true
@ -93,6 +97,8 @@ spec:
securityContext: securityContext:
fsGroup: 1000 fsGroup: 1000
fsGroupChangePolicy: OnRootMismatch fsGroupChangePolicy: OnRootMismatch
seccompProfile:
type: RuntimeDefault
volumes: volumes:
- emptyDir: {} - emptyDir: {}
name: tmp-volume name: tmp-volume

View file

@ -37,6 +37,10 @@ spec:
name: thumbnails-cleanup name: thumbnails-cleanup
resources: {} resources: {}
securityContext: securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true readOnlyRootFilesystem: true
runAsGroup: 1000 runAsGroup: 1000
runAsNonRoot: true runAsNonRoot: true
@ -51,6 +55,8 @@ spec:
securityContext: securityContext:
fsGroup: 1000 fsGroup: 1000
fsGroupChangePolicy: OnRootMismatch fsGroupChangePolicy: OnRootMismatch
seccompProfile:
type: RuntimeDefault
volumes: volumes:
- name: thumbnails-data - name: thumbnails-data
persistentVolumeClaim: persistentVolumeClaim:

View file

@ -106,6 +106,10 @@ spec:
cpu: 10m cpu: 10m
memory: 64Mi memory: 64Mi
securityContext: securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true readOnlyRootFilesystem: true
runAsGroup: 1000 runAsGroup: 1000
runAsNonRoot: true runAsNonRoot: true
@ -118,6 +122,8 @@ spec:
securityContext: securityContext:
fsGroup: 1000 fsGroup: 1000
fsGroupChangePolicy: OnRootMismatch fsGroupChangePolicy: OnRootMismatch
seccompProfile:
type: RuntimeDefault
volumes: volumes:
- emptyDir: {} - emptyDir: {}
name: messaging-system-ca name: messaging-system-ca

View file

@ -90,6 +90,10 @@ spec:
cpu: 10m cpu: 10m
memory: 64Mi memory: 64Mi
securityContext: securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true readOnlyRootFilesystem: true
runAsGroup: 1000 runAsGroup: 1000
runAsNonRoot: true runAsNonRoot: true
@ -103,6 +107,8 @@ spec:
securityContext: securityContext:
fsGroup: 1000 fsGroup: 1000
fsGroupChangePolicy: OnRootMismatch fsGroupChangePolicy: OnRootMismatch
seccompProfile:
type: RuntimeDefault
volumes: volumes:
- emptyDir: {} - emptyDir: {}
name: tmp-volume name: tmp-volume

View file

@ -75,6 +75,10 @@ spec:
cpu: 10m cpu: 10m
memory: 64Mi memory: 64Mi
securityContext: securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true readOnlyRootFilesystem: true
runAsGroup: 1000 runAsGroup: 1000
runAsNonRoot: true runAsNonRoot: true
@ -87,6 +91,8 @@ spec:
securityContext: securityContext:
fsGroup: 1000 fsGroup: 1000
fsGroupChangePolicy: OnRootMismatch fsGroupChangePolicy: OnRootMismatch
seccompProfile:
type: RuntimeDefault
volumes: volumes:
- emptyDir: {} - emptyDir: {}
name: messaging-system-ca name: messaging-system-ca

View file

@ -93,6 +93,10 @@ spec:
cpu: 10m cpu: 10m
memory: 64Mi memory: 64Mi
securityContext: securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true readOnlyRootFilesystem: true
runAsGroup: 1000 runAsGroup: 1000
runAsNonRoot: true runAsNonRoot: true
@ -104,6 +108,8 @@ spec:
securityContext: securityContext:
fsGroup: 1000 fsGroup: 1000
fsGroupChangePolicy: OnRootMismatch fsGroupChangePolicy: OnRootMismatch
seccompProfile:
type: RuntimeDefault
volumes: volumes:
- emptyDir: {} - emptyDir: {}
name: tmp-volume name: tmp-volume

View file

@ -98,6 +98,10 @@ spec:
cpu: 10m cpu: 10m
memory: 64Mi memory: 64Mi
securityContext: securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true readOnlyRootFilesystem: true
runAsGroup: 1000 runAsGroup: 1000
runAsNonRoot: true runAsNonRoot: true
@ -109,6 +113,8 @@ spec:
securityContext: securityContext:
fsGroup: 1000 fsGroup: 1000
fsGroupChangePolicy: OnRootMismatch fsGroupChangePolicy: OnRootMismatch
seccompProfile:
type: RuntimeDefault
volumes: volumes:
- emptyDir: {} - emptyDir: {}
name: tmp-volume name: tmp-volume

View file

@ -96,6 +96,10 @@ spec:
cpu: 10m cpu: 10m
memory: 64Mi memory: 64Mi
securityContext: securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true readOnlyRootFilesystem: true
runAsGroup: 1000 runAsGroup: 1000
runAsNonRoot: true runAsNonRoot: true
@ -108,6 +112,8 @@ spec:
securityContext: securityContext:
fsGroup: 1000 fsGroup: 1000
fsGroupChangePolicy: OnRootMismatch fsGroupChangePolicy: OnRootMismatch
seccompProfile:
type: RuntimeDefault
volumes: volumes:
- emptyDir: {} - emptyDir: {}
name: messaging-system-ca name: messaging-system-ca

View file

@ -81,6 +81,10 @@ spec:
cpu: 10m cpu: 10m
memory: 64Mi memory: 64Mi
securityContext: securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true readOnlyRootFilesystem: true
runAsGroup: 1000 runAsGroup: 1000
runAsNonRoot: true runAsNonRoot: true
@ -93,6 +97,8 @@ spec:
securityContext: securityContext:
fsGroup: 1000 fsGroup: 1000
fsGroupChangePolicy: OnRootMismatch fsGroupChangePolicy: OnRootMismatch
seccompProfile:
type: RuntimeDefault
volumes: volumes:
- emptyDir: {} - emptyDir: {}
name: messaging-system-ca name: messaging-system-ca

View file

@ -158,6 +158,10 @@ spec:
cpu: 10m cpu: 10m
memory: 64Mi memory: 64Mi
securityContext: securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true readOnlyRootFilesystem: true
runAsGroup: 1000 runAsGroup: 1000
runAsNonRoot: true runAsNonRoot: true
@ -171,6 +175,8 @@ spec:
securityContext: securityContext:
fsGroup: 1000 fsGroup: 1000
fsGroupChangePolicy: OnRootMismatch fsGroupChangePolicy: OnRootMismatch
seccompProfile:
type: RuntimeDefault
volumes: volumes:
- emptyDir: {} - emptyDir: {}
name: tmp-volume name: tmp-volume

View file

@ -106,6 +106,10 @@ spec:
cpu: 10m cpu: 10m
memory: 64Mi memory: 64Mi
securityContext: securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true readOnlyRootFilesystem: true
runAsGroup: 1000 runAsGroup: 1000
runAsNonRoot: true runAsNonRoot: true
@ -117,6 +121,8 @@ spec:
securityContext: securityContext:
fsGroup: 1000 fsGroup: 1000
fsGroupChangePolicy: OnRootMismatch fsGroupChangePolicy: OnRootMismatch
seccompProfile:
type: RuntimeDefault
volumes: volumes:
- emptyDir: {} - emptyDir: {}
name: tmp-volume name: tmp-volume

View file

@ -132,6 +132,10 @@ spec:
cpu: 10m cpu: 10m
memory: 64Mi memory: 64Mi
securityContext: securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true readOnlyRootFilesystem: true
runAsGroup: 1000 runAsGroup: 1000
runAsNonRoot: true runAsNonRoot: true
@ -147,6 +151,8 @@ spec:
securityContext: securityContext:
fsGroup: 1000 fsGroup: 1000
fsGroupChangePolicy: OnRootMismatch fsGroupChangePolicy: OnRootMismatch
seccompProfile:
type: RuntimeDefault
volumes: volumes:
- emptyDir: {} - emptyDir: {}
name: messaging-system-ca name: messaging-system-ca

View file

@ -99,6 +99,10 @@ spec:
cpu: 10m cpu: 10m
memory: 64Mi memory: 64Mi
securityContext: securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true readOnlyRootFilesystem: true
runAsGroup: 1000 runAsGroup: 1000
runAsNonRoot: true runAsNonRoot: true
@ -113,6 +117,8 @@ spec:
securityContext: securityContext:
fsGroup: 1000 fsGroup: 1000
fsGroupChangePolicy: OnRootMismatch fsGroupChangePolicy: OnRootMismatch
seccompProfile:
type: RuntimeDefault
volumes: volumes:
- emptyDir: {} - emptyDir: {}
name: tmp-volume name: tmp-volume

View file

@ -113,6 +113,10 @@ spec:
cpu: 10m cpu: 10m
memory: 256Mi memory: 256Mi
securityContext: securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true readOnlyRootFilesystem: true
runAsGroup: 1000 runAsGroup: 1000
runAsNonRoot: true runAsNonRoot: true
@ -136,6 +140,10 @@ spec:
cpu: 10m cpu: 10m
memory: 256Mi memory: 256Mi
securityContext: securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true readOnlyRootFilesystem: true
runAsGroup: 1000 runAsGroup: 1000
runAsNonRoot: true runAsNonRoot: true
@ -147,6 +155,8 @@ spec:
securityContext: securityContext:
fsGroup: 1000 fsGroup: 1000
fsGroupChangePolicy: OnRootMismatch fsGroupChangePolicy: OnRootMismatch
seccompProfile:
type: RuntimeDefault
volumes: volumes:
- name: ldap-cert - name: ldap-cert
secret: secret:

View file

@ -96,6 +96,10 @@ spec:
cpu: 10m cpu: 10m
memory: 64Mi memory: 64Mi
securityContext: securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true readOnlyRootFilesystem: true
runAsGroup: 1000 runAsGroup: 1000
runAsNonRoot: true runAsNonRoot: true
@ -113,6 +117,8 @@ spec:
securityContext: securityContext:
fsGroup: 1000 fsGroup: 1000
fsGroupChangePolicy: OnRootMismatch fsGroupChangePolicy: OnRootMismatch
seccompProfile:
type: RuntimeDefault
volumes: volumes:
- emptyDir: {} - emptyDir: {}
name: ocis-data-tmp name: ocis-data-tmp

View file

@ -70,6 +70,10 @@ spec:
cpu: 10m cpu: 10m
memory: 192Mi memory: 192Mi
securityContext: securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true readOnlyRootFilesystem: true
runAsGroup: 1000 runAsGroup: 1000
runAsNonRoot: true runAsNonRoot: true
@ -81,6 +85,8 @@ spec:
securityContext: securityContext:
fsGroup: 1000 fsGroup: 1000
fsGroupChangePolicy: OnRootMismatch fsGroupChangePolicy: OnRootMismatch
seccompProfile:
type: RuntimeDefault
volumes: volumes:
- name: nats-data - name: nats-data
persistentVolumeClaim: persistentVolumeClaim:

View file

@ -101,6 +101,10 @@ spec:
cpu: 10m cpu: 10m
memory: 64Mi memory: 64Mi
securityContext: securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true readOnlyRootFilesystem: true
runAsGroup: 1000 runAsGroup: 1000
runAsNonRoot: true runAsNonRoot: true
@ -110,4 +114,6 @@ spec:
securityContext: securityContext:
fsGroup: 1000 fsGroup: 1000
fsGroupChangePolicy: OnRootMismatch fsGroupChangePolicy: OnRootMismatch
seccompProfile:
type: RuntimeDefault
volumes: null volumes: null

View file

@ -98,6 +98,10 @@ spec:
cpu: 10m cpu: 10m
memory: 64Mi memory: 64Mi
securityContext: securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true readOnlyRootFilesystem: true
runAsGroup: 1000 runAsGroup: 1000
runAsNonRoot: true runAsNonRoot: true
@ -107,4 +111,6 @@ spec:
securityContext: securityContext:
fsGroup: 1000 fsGroup: 1000
fsGroupChangePolicy: OnRootMismatch fsGroupChangePolicy: OnRootMismatch
seccompProfile:
type: RuntimeDefault
volumes: null volumes: null

View file

@ -79,6 +79,10 @@ spec:
cpu: 10m cpu: 10m
memory: 64Mi memory: 64Mi
securityContext: securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true readOnlyRootFilesystem: true
runAsGroup: 1000 runAsGroup: 1000
runAsNonRoot: true runAsNonRoot: true
@ -91,6 +95,8 @@ spec:
securityContext: securityContext:
fsGroup: 1000 fsGroup: 1000
fsGroupChangePolicy: OnRootMismatch fsGroupChangePolicy: OnRootMismatch
seccompProfile:
type: RuntimeDefault
volumes: volumes:
- emptyDir: {} - emptyDir: {}
name: messaging-system-ca name: messaging-system-ca

View file

@ -123,6 +123,10 @@ spec:
cpu: 10m cpu: 10m
memory: 96Mi memory: 96Mi
securityContext: securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true readOnlyRootFilesystem: true
runAsGroup: 1000 runAsGroup: 1000
runAsNonRoot: true runAsNonRoot: true
@ -134,6 +138,8 @@ spec:
securityContext: securityContext:
fsGroup: 1000 fsGroup: 1000
fsGroupChangePolicy: OnRootMismatch fsGroupChangePolicy: OnRootMismatch
seccompProfile:
type: RuntimeDefault
volumes: volumes:
- configMap: - configMap:
name: proxy-config name: proxy-config

View file

@ -103,6 +103,10 @@ spec:
cpu: 10m cpu: 10m
memory: 64Mi memory: 64Mi
securityContext: securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true readOnlyRootFilesystem: true
runAsGroup: 1000 runAsGroup: 1000
runAsNonRoot: true runAsNonRoot: true
@ -117,6 +121,8 @@ spec:
securityContext: securityContext:
fsGroup: 1000 fsGroup: 1000
fsGroupChangePolicy: OnRootMismatch fsGroupChangePolicy: OnRootMismatch
seccompProfile:
type: RuntimeDefault
volumes: volumes:
- emptyDir: {} - emptyDir: {}
name: messaging-system-ca name: messaging-system-ca

View file

@ -124,6 +124,10 @@ spec:
cpu: 10m cpu: 10m
memory: 64Mi memory: 64Mi
securityContext: securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true readOnlyRootFilesystem: true
runAsGroup: 1000 runAsGroup: 1000
runAsNonRoot: true runAsNonRoot: true
@ -133,4 +137,6 @@ spec:
securityContext: securityContext:
fsGroup: 1000 fsGroup: 1000
fsGroupChangePolicy: OnRootMismatch fsGroupChangePolicy: OnRootMismatch
seccompProfile:
type: RuntimeDefault
volumes: null volumes: null

View file

@ -132,6 +132,10 @@ spec:
cpu: 10m cpu: 10m
memory: 64Mi memory: 64Mi
securityContext: securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true readOnlyRootFilesystem: true
runAsGroup: 1000 runAsGroup: 1000
runAsNonRoot: true runAsNonRoot: true
@ -148,6 +152,8 @@ spec:
securityContext: securityContext:
fsGroup: 1000 fsGroup: 1000
fsGroupChangePolicy: OnRootMismatch fsGroupChangePolicy: OnRootMismatch
seccompProfile:
type: RuntimeDefault
volumes: volumes:
- emptyDir: {} - emptyDir: {}
name: tmp-volume name: tmp-volume

View file

@ -94,6 +94,10 @@ spec:
cpu: 10m cpu: 10m
memory: 64Mi memory: 64Mi
securityContext: securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true readOnlyRootFilesystem: true
runAsGroup: 1000 runAsGroup: 1000
runAsNonRoot: true runAsNonRoot: true
@ -106,6 +110,8 @@ spec:
securityContext: securityContext:
fsGroup: 1000 fsGroup: 1000
fsGroupChangePolicy: OnRootMismatch fsGroupChangePolicy: OnRootMismatch
seccompProfile:
type: RuntimeDefault
volumes: volumes:
- emptyDir: {} - emptyDir: {}
name: messaging-system-ca name: messaging-system-ca

View file

@ -92,6 +92,10 @@ spec:
cpu: 10m cpu: 10m
memory: 64Mi memory: 64Mi
securityContext: securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true readOnlyRootFilesystem: true
runAsGroup: 1000 runAsGroup: 1000
runAsNonRoot: true runAsNonRoot: true
@ -103,6 +107,8 @@ spec:
securityContext: securityContext:
fsGroup: 1000 fsGroup: 1000
fsGroupChangePolicy: OnRootMismatch fsGroupChangePolicy: OnRootMismatch
seccompProfile:
type: RuntimeDefault
volumes: volumes:
- emptyDir: {} - emptyDir: {}
name: tmp-volume name: tmp-volume

View file

@ -88,6 +88,10 @@ spec:
cpu: 10m cpu: 10m
memory: 64Mi memory: 64Mi
securityContext: securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true readOnlyRootFilesystem: true
runAsGroup: 1000 runAsGroup: 1000
runAsNonRoot: true runAsNonRoot: true
@ -99,6 +103,8 @@ spec:
securityContext: securityContext:
fsGroup: 1000 fsGroup: 1000
fsGroupChangePolicy: OnRootMismatch fsGroupChangePolicy: OnRootMismatch
seccompProfile:
type: RuntimeDefault
volumes: volumes:
- emptyDir: {} - emptyDir: {}
name: tmp-volume name: tmp-volume

View file

@ -112,6 +112,10 @@ spec:
cpu: 10m cpu: 10m
memory: 64Mi memory: 64Mi
securityContext: securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true readOnlyRootFilesystem: true
runAsGroup: 1000 runAsGroup: 1000
runAsNonRoot: true runAsNonRoot: true
@ -125,6 +129,8 @@ spec:
securityContext: securityContext:
fsGroup: 1000 fsGroup: 1000
fsGroupChangePolicy: OnRootMismatch fsGroupChangePolicy: OnRootMismatch
seccompProfile:
type: RuntimeDefault
volumes: volumes:
- emptyDir: {} - emptyDir: {}
name: tmp-volume name: tmp-volume

View file

@ -186,6 +186,10 @@ spec:
cpu: 10m cpu: 10m
memory: 512Mi memory: 512Mi
securityContext: securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true readOnlyRootFilesystem: true
runAsGroup: 1000 runAsGroup: 1000
runAsNonRoot: true runAsNonRoot: true
@ -202,6 +206,8 @@ spec:
securityContext: securityContext:
fsGroup: 1000 fsGroup: 1000
fsGroupChangePolicy: OnRootMismatch fsGroupChangePolicy: OnRootMismatch
seccompProfile:
type: RuntimeDefault
volumes: volumes:
- emptyDir: {} - emptyDir: {}
name: tmp-volume name: tmp-volume

View file

@ -108,6 +108,10 @@ spec:
cpu: 10m cpu: 10m
memory: 96Mi memory: 96Mi
securityContext: securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true readOnlyRootFilesystem: true
runAsGroup: 1000 runAsGroup: 1000
runAsNonRoot: true runAsNonRoot: true
@ -119,6 +123,8 @@ spec:
securityContext: securityContext:
fsGroup: 1000 fsGroup: 1000
fsGroupChangePolicy: OnRootMismatch fsGroupChangePolicy: OnRootMismatch
seccompProfile:
type: RuntimeDefault
volumes: volumes:
- name: thumbnails-data - name: thumbnails-data
persistentVolumeClaim: persistentVolumeClaim:

View file

@ -102,6 +102,10 @@ spec:
cpu: 10m cpu: 10m
memory: 64Mi memory: 64Mi
securityContext: securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true readOnlyRootFilesystem: true
runAsGroup: 1000 runAsGroup: 1000
runAsNonRoot: true runAsNonRoot: true
@ -114,6 +118,8 @@ spec:
securityContext: securityContext:
fsGroup: 1000 fsGroup: 1000
fsGroupChangePolicy: OnRootMismatch fsGroupChangePolicy: OnRootMismatch
seccompProfile:
type: RuntimeDefault
volumes: volumes:
- emptyDir: {} - emptyDir: {}
name: messaging-system-ca name: messaging-system-ca

View file

@ -99,6 +99,10 @@ spec:
cpu: 10m cpu: 10m
memory: 64Mi memory: 64Mi
securityContext: securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true readOnlyRootFilesystem: true
runAsGroup: 1000 runAsGroup: 1000
runAsNonRoot: true runAsNonRoot: true
@ -113,6 +117,8 @@ spec:
securityContext: securityContext:
fsGroup: 1000 fsGroup: 1000
fsGroupChangePolicy: OnRootMismatch fsGroupChangePolicy: OnRootMismatch
seccompProfile:
type: RuntimeDefault
volumes: volumes:
- emptyDir: {} - emptyDir: {}
name: tmp-volume name: tmp-volume

View file

@ -110,6 +110,10 @@ spec:
cpu: 10m cpu: 10m
memory: 64Mi memory: 64Mi
securityContext: securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true readOnlyRootFilesystem: true
runAsGroup: 1000 runAsGroup: 1000
runAsNonRoot: true runAsNonRoot: true
@ -125,6 +129,8 @@ spec:
securityContext: securityContext:
fsGroup: 1000 fsGroup: 1000
fsGroupChangePolicy: OnRootMismatch fsGroupChangePolicy: OnRootMismatch
seccompProfile:
type: RuntimeDefault
volumes: volumes:
- configMap: - configMap:
name: web-config name: web-config

View file

@ -87,6 +87,10 @@ spec:
cpu: 10m cpu: 10m
memory: 64Mi memory: 64Mi
securityContext: securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true readOnlyRootFilesystem: true
runAsGroup: 1000 runAsGroup: 1000
runAsNonRoot: true runAsNonRoot: true
@ -96,4 +100,6 @@ spec:
securityContext: securityContext:
fsGroup: 1000 fsGroup: 1000
fsGroupChangePolicy: OnRootMismatch fsGroupChangePolicy: OnRootMismatch
seccompProfile:
type: RuntimeDefault
volumes: null volumes: null

View file

@ -91,6 +91,10 @@ spec:
cpu: 10m cpu: 10m
memory: 64Mi memory: 64Mi
securityContext: securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true readOnlyRootFilesystem: true
runAsGroup: 1000 runAsGroup: 1000
runAsNonRoot: true runAsNonRoot: true
@ -100,4 +104,6 @@ spec:
securityContext: securityContext:
fsGroup: 1000 fsGroup: 1000
fsGroupChangePolicy: OnRootMismatch fsGroupChangePolicy: OnRootMismatch
seccompProfile:
type: RuntimeDefault
volumes: null volumes: null

View file

@ -31,6 +31,18 @@ spec:
fieldPath: metadata.namespace fieldPath: metadata.namespace
image: alpine/k8s:1.32.3 image: alpine/k8s:1.32.3
name: precheck name: precheck
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true
restartPolicy: OnFailure restartPolicy: OnFailure
securityContext:
runAsGroup: 65532
runAsNonRoot: true
runAsUser: 65532
seccompProfile:
type: RuntimeDefault
serviceAccountName: ocis-external-secret-precheck serviceAccountName: ocis-external-secret-precheck
ttlSecondsAfterFinished: 300 ttlSecondsAfterFinished: 300

View file

@ -4,6 +4,6 @@ metadata:
annotations: annotations:
a8r.io/repository: ssh://git@git.tr1ceracop.de:222/gitea_admin/k8s-and-chill.git a8r.io/repository: ssh://git@git.tr1ceracop.de:222/gitea_admin/k8s-and-chill.git
labels: labels:
pod-security.kubernetes.io/enforce: privileged pod-security.kubernetes.io/enforce: restricted
name: ocis name: ocis
namespace: ocis namespace: ocis

View file

@ -4,6 +4,6 @@ metadata:
annotations: annotations:
a8r.io/repository: ssh://git@git.tr1ceracop.de:222/gitea_admin/k8s-and-chill.git a8r.io/repository: ssh://git@git.tr1ceracop.de:222/gitea_admin/k8s-and-chill.git
labels: labels:
pod-security.kubernetes.io/enforce: privileged pod-security.kubernetes.io/enforce: restricted
name: monitoring name: monitoring
namespace: monitoring namespace: monitoring

View file

@ -69,13 +69,24 @@ spec:
requests: requests:
cpu: 100m cpu: 100m
memory: 256Mi memory: 256Mi
securityContext: {} securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true
volumeMounts: volumeMounts:
- mountPath: /storage - mountPath: /storage
name: server-volume name: server-volume
- mountPath: /scrapeconfig - mountPath: /scrapeconfig
name: scrapeconfig name: scrapeconfig
securityContext: {} securityContext:
fsGroup: 1000
runAsGroup: 1000
runAsNonRoot: true
runAsUser: 1000
seccompProfile:
type: RuntimeDefault
serviceAccountName: victoria-metrics-single-server serviceAccountName: victoria-metrics-single-server
terminationGracePeriodSeconds: 60 terminationGracePeriodSeconds: 60
volumes: volumes: