ProofedMesh/deploy/dummy-sink/20-deployment.yaml

126 lines
4.1 KiB
YAML
Raw Permalink Normal View History

apiVersion: apps/v1
kind: Deployment
metadata:
name: dummy-sink
namespace: agent-trust
labels:
app.kubernetes.io/name: dummy-sink
app.kubernetes.io/part-of: proofedmesh
app.kubernetes.io/component: sink
spec:
# ReadWriteOnce PVC → single-writer. Scaling past replicas=1 requires
# an RWX storage class or per-pod PVCs (not Phase-1 scope).
replicas: 1
revisionHistoryLimit: 5
strategy:
type: Recreate
selector:
matchLabels:
app.kubernetes.io/name: dummy-sink
template:
metadata:
labels:
app.kubernetes.io/name: dummy-sink
app.kubernetes.io/part-of: proofedmesh
app.kubernetes.io/component: sink
spec:
serviceAccountName: dummy-sink
# Default auto-mount is off; the projected `trust-api`-audience
# token is provided via an explicit projected volume below.
automountServiceAccountToken: false
securityContext:
runAsNonRoot: true
runAsUser: 65532
runAsGroup: 65532
fsGroup: 65532
seccompProfile:
type: RuntimeDefault
containers:
- name: dummy-sink
image: harbor.basicstack.de/basicstack/dummy-sink:dev
imagePullPolicy: IfNotPresent
args:
- "-listen=:8083"
- "-data-dir=/data/dummy-sink"
- "-verify-url=http://verification-service.agent-trust.svc.cluster.local:8084"
- "-signing-url=http://signing-service.agent-trust.svc.cluster.local:8081"
- "-tlog-url=http://transparency-log.agent-trust.svc.cluster.local"
- "-sink-id=sink:dummy-sink"
- "-actor=agent-dummy-sink"
- "-signing-key-ref=trust-api/agent-dummy-sink-2026-q4"
env:
# Pocket-ID client credentials for the Authorization: Bearer
# half of the signing-service double-identity check.
- name: POCKET_ID_ISSUER
valueFrom:
secretKeyRef:
name: dummy-sink-dev
key: POCKET_ID_ISSUER
- name: POCKET_ID_CLIENT_ID
valueFrom:
secretKeyRef:
name: dummy-sink-dev
key: POCKET_ID_CLIENT_ID
- name: POCKET_ID_CLIENT_SECRET
valueFrom:
secretKeyRef:
name: dummy-sink-dev
key: POCKET_ID_CLIENT_SECRET
- name: POCKET_ID_AUDIENCE
valueFrom:
secretKeyRef:
name: dummy-sink-dev
key: POCKET_ID_AUDIENCE
ports:
- name: http
containerPort: 8083
protocol: TCP
readinessProbe:
httpGet:
path: /healthz
port: http
initialDelaySeconds: 2
periodSeconds: 10
failureThreshold: 3
livenessProbe:
httpGet:
path: /healthz
port: http
initialDelaySeconds: 10
periodSeconds: 20
failureThreshold: 3
resources:
requests:
cpu: "50m"
memory: "64Mi"
limits:
cpu: "500m"
memory: "256Mi"
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
capabilities:
drop:
- ALL
volumeMounts:
- name: data
mountPath: /data/dummy-sink
- name: workload-token
mountPath: /var/run/secrets/tokens
readOnly: true
volumes:
- name: data
persistentVolumeClaim:
claimName: dummy-sink-data
# Projected ServiceAccount token addressed to the trust-api
# audience. signing-service accepts this via its K8s
# TokenReview path (DEV-609) as the workload-identity side of
# the double-identity contract.
- name: workload-token
projected:
sources:
- serviceAccountToken:
path: trust-api
audience: trust-api
expirationSeconds: 3600