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
+35 -8
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:
@@ -25,14 +24,24 @@ spec:
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
securityContext:
runAsNonRoot: false
allowPrivilegeEscalation: false
privileged: false
capabilities:
drop: ["ALL"]
seccompProfile:
type: RuntimeDefault
volumeMounts: volumeMounts:
- name: config - name: config
mountPath: "/app/config" mountPath: "/app/config"
resources: resources:
requests: requests:
memory: "256Mi" memory: "256Mi"
@@ -40,11 +49,29 @@ spec:
limits: limits:
memory: "512Mi" memory: "512Mi"
cpu: "500m" 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: volumeClaimTemplates:
- metadata: - metadata:
name: config name: config
spec: spec:
accessModes: [ "ReadWriteOnce" ] accessModes:
- ReadWriteOnce
resources: resources:
requests: requests:
storage: 4Gi storage: 4Gi