ce7cb702218693d08ea6d83464d2457c9250027c

This commit is contained in:
ms2k 2026-11-12 20:46:28 +09:00
commit 34c5f8963c
4 changed files with 145336 additions and 0 deletions

View file

@ -0,0 +1,81 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: stalwart-controller
namespace: stalwart
spec:
selector:
matchLabels:
app.kubernetes.io/name: stalwart-controller
app.kubernetes.io/instance: stalwart
template:
metadata:
annotations:
quorate.internal/source-revision: 318c46b68e20be4d793a344ea1e5464e436edbaa
labels:
app.kubernetes.io/name: stalwart-controller
app.kubernetes.io/instance: stalwart
quorate.dev/zitadel-relay: "true"
spec:
serviceAccountName: stalwart
automountServiceAccountToken: false
runtimeClassName: gvisor
securityContext:
fsGroup: 65532
seccompProfile:
type: RuntimeDefault
containers:
- name: controller
image: registry.quorate.internal/quorate/stalwart-controller:delivery-318c46b68e20be4d793a344ea1e5464e436edbaa@sha256:70704960a5bf3eb8398c8f26ecaefe7341faa2e7e65c16fa3c40a8e13c94b7dd
imagePullPolicy: IfNotPresent
env:
- name: HOME
value: /tmp
ports:
- name: status
containerPort: 9090
livenessProbe:
httpGet:
path: /healthz
port: status
periodSeconds: 10
readinessProbe:
httpGet:
path: /readyz
port: status
periodSeconds: 5
securityContext:
runAsNonRoot: true
runAsUser: 65532
runAsGroup: 65532
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true
resources:
requests:
cpu: 25m
memory: 32Mi
limits:
cpu: 250m
memory: 128Mi
volumeMounts:
- name: desired
mountPath: /desired
readOnly: true
- name: database
mountPath: /run/database
readOnly: true
- name: tmp
mountPath: /tmp
volumes:
- name: desired
configMap:
name: desired
- name: database
secret:
secretName: stalwart-db
defaultMode: 0440
- name: tmp
emptyDir: {}

View file

@ -0,0 +1,6 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- deploy.yaml
- service.yaml
- policy.yaml

View file

@ -0,0 +1,48 @@
apiVersion: cilium.io/v2
kind: CiliumNetworkPolicy
metadata:
name: stalwart-controller
namespace: stalwart
spec:
endpointSelector:
matchLabels:
app.kubernetes.io/name: stalwart-controller
app.kubernetes.io/instance: stalwart
ingress:
- fromEntities:
- host
toPorts:
- ports:
- port: "9090"
protocol: TCP
egress:
- toEndpoints:
- matchLabels:
k8s:io.kubernetes.pod.namespace: postgres
cnpg.io/cluster: main
toPorts:
- ports:
- port: "5432"
protocol: TCP
- toEndpoints:
- matchLabels:
k8s:io.kubernetes.pod.namespace: kube-system
k8s-app: kube-dns
toPorts:
- ports:
- port: "53"
protocol: UDP
- port: "53"
protocol: TCP
rules:
dns:
- matchPattern: "*"
- toEndpoints:
- matchLabels:
k8s:io.kubernetes.pod.namespace: zitadel
app.kubernetes.io/name: zitadel-oidc-internal
app.kubernetes.io/instance: zitadel
toPorts:
- ports:
- port: "8443"
protocol: TCP

View file

@ -0,0 +1,14 @@
apiVersion: v1
kind: Service
metadata:
name: stalwart-controller
namespace: stalwart
spec:
type: ClusterIP
selector:
app.kubernetes.io/name: stalwart-controller
app.kubernetes.io/instance: stalwart
ports:
- name: status
port: 9090
targetPort: status