Compare commits

...

3 Commits

Author SHA1 Message Date
2496b12a7c feat: Add security context
All checks were successful
Build and deploy / build (push) Successful in 11m49s
2025-12-22 01:16:24 +01:00
3c387ca803 fix: Outdated glibc 2025-12-22 01:15:50 +01:00
dba119951b chore: Renamed credentials secret in deployment 2025-12-22 01:15:50 +01:00
2 changed files with 16 additions and 5 deletions

View File

@@ -20,6 +20,6 @@ RUN cargo auditable build --release && /app/target/release/crdgen > /crds.yaml
FROM scratch AS manifests
COPY --from=builder /crds.yaml /
FROM gcr.io/distroless/cc-debian12:nonroot AS runtime
FROM gcr.io/distroless/cc-debian13:nonroot AS runtime
COPY --from=builder /app/target/release/lldap-controller /lldap-controller
CMD ["/lldap-controller"]

View File

@@ -18,12 +18,17 @@ spec:
kubectl.kubernetes.io/default-container: lldap-controller
spec:
serviceAccountName: lldap-controller
securityContext: {}
securityContext:
runAsNonRoot: true
runAsUser: 1000
runAsGroup: 1000
fsGroup: 1000
seccompProfile:
type: RuntimeDefault
containers:
- name: lldap-controller
image: '{{ index .images "lldap-controller" }}'
imagePullPolicy: IfNotPresent
securityContext: {}
resources:
limits:
cpu: 200m
@@ -43,10 +48,16 @@ spec:
- name: LLDAP_USERNAME
value: admin
- name: LLDAP_PASSWORD_FILE
value: /secrets/credentials/lldap-ldap-user-pass
value: /secrets/credentials/admin-pass
- name: LLDAP_BIND_DN
value: uid={username},ou=people,dc=huizinga,dc=dev
securityContext:
allowPrivilegeEscalation: false
runAsNonRoot: true
capabilities:
drop:
- ALL
volumes:
- name: credentials
secret:
secretName: lldap-credentials
secretName: credentials