try dropping privs for znc

This commit is contained in:
2026-01-17 11:39:03 -05:00
parent a685eca1f5
commit 71907f24dd
2 changed files with 56 additions and 29 deletions
+1 -1
View File
@@ -12,13 +12,13 @@ spec:
selector: selector:
matchLabels: matchLabels:
app.kubernetes.io/name: thelounge app.kubernetes.io/name: thelounge
app.kubernetes.io/instance: thelounge
serviceName: "thelounge" serviceName: "thelounge"
replicas: 1 replicas: 1
template: template:
metadata: metadata:
labels: labels:
app.kubernetes.io/name: thelounge app.kubernetes.io/name: thelounge
app.kubernetes.io/instance: thelounge
spec: spec:
priorityClassName: low-priority priorityClassName: low-priority
automountServiceAccountToken: false automountServiceAccountToken: false
+55 -28
View File
@@ -1,17 +1,16 @@
## StatefulSet
---
apiVersion: apps/v1 apiVersion: apps/v1
kind: StatefulSet kind: StatefulSet
metadata: metadata:
name: znc name: znc
annotations: annotations:
polaris.fairwinds.com/runAsRootAllowed-exempt: "true" # linuxserver.io images don't support this, need to build my own polaris.fairwinds.com/runAsRootAllowed-exempt: "true"
polaris.fairwinds.com/tagNotSpecified-exempt: "true" # allow latest tag for this app polaris.fairwinds.com/tagNotSpecified-exempt: "true"
polaris.fairwinds.com/topologySpreadConstraint-exempt: "true" # statefulset doesn't support multiple replicas polaris.fairwinds.com/topologySpreadConstraint-exempt: "true"
spec: spec:
selector: selector:
matchLabels: matchLabels:
app.kubernetes.io/name: znc app.kubernetes.io/name: znc
app.kubernetes.io/instance: znc
serviceName: "znc" serviceName: "znc"
replicas: 1 replicas: 1
template: template:
@@ -23,28 +22,56 @@ spec:
priorityClassName: low-priority priorityClassName: low-priority
automountServiceAccountToken: false automountServiceAccountToken: false
containers: containers:
- name: znc - name: znc
image: lscr.io/linuxserver/znc:latest image: lscr.io/linuxserver/znc:latest
securityContext:
allowPrivilegeEscalation: false ports:
ports: - containerPort: 6501
- containerPort: 6501 name: irc-6501
name: irc-6501
volumeMounts: securityContext:
- name: config runAsNonRoot: false
mountPath: "/app/config" allowPrivilegeEscalation: false
privileged: false
capabilities:
drop: ["ALL"]
seccompProfile:
type: RuntimeDefault
volumeMounts:
- name: config
mountPath: "/app/config"
resources:
requests:
memory: "256Mi"
cpu: "100m"
limits:
memory: "512Mi"
cpu: "500m"
livenessProbe:
tcpSocket:
port: 6501
initialDelaySeconds: 30
periodSeconds: 10
timeoutSeconds: 2
failureThreshold: 3
readinessProbe:
tcpSocket:
port: 6501
initialDelaySeconds: 10
periodSeconds: 5
timeoutSeconds: 2
failureThreshold: 3
volumeClaimTemplates:
- metadata:
name: config
spec:
accessModes:
- ReadWriteOnce
resources: resources:
requests: requests:
memory: "256Mi" storage: 4Gi
cpu: "100m"
limits:
memory: "512Mi"
cpu: "500m"
volumeClaimTemplates:
- metadata:
name: config
spec:
accessModes: [ "ReadWriteOnce" ]
resources:
requests:
storage: 4Gi