apiVersion: apps/v1 kind: Deployment metadata: name: signing-service namespace: agent-trust labels: app.kubernetes.io/name: signing-service app.kubernetes.io/part-of: proofedmesh app.kubernetes.io/component: trust-core spec: replicas: 2 revisionHistoryLimit: 5 strategy: type: RollingUpdate rollingUpdate: maxSurge: 1 maxUnavailable: 0 selector: matchLabels: app.kubernetes.io/name: signing-service template: metadata: labels: app.kubernetes.io/name: signing-service app.kubernetes.io/part-of: proofedmesh app.kubernetes.io/component: trust-core spec: serviceAccountName: signing-service # The signing-service MUST NOT get the default auto-mounted token # because we need a projected token with an explicit `trust-api` # audience so the pod SA token can be used to call the API server # for TokenReview (the audience on the pod's own SA token is what # the K8s API server will accept as Bearer credential). automountServiceAccountToken: false securityContext: runAsNonRoot: true runAsUser: 65532 runAsGroup: 65532 fsGroup: 65532 seccompProfile: type: RuntimeDefault containers: - name: signing-service image: harbor.basicstack.de/basicstack/signing-service:dev imagePullPolicy: IfNotPresent args: - "-listen=:8081" - "-backend=memory" - "-keys=trust-api/approval-signer-2026-q4,trust-api/agent-testagent-transform-2026-q4" - "-keys-from-env" - "-pocket-id-issuer=$(POCKET_ID_ISSUER)" - "-pocket-id-audience=$(POCKET_ID_AUDIENCE)" - "-k8s-tokenreview=on" - "-registry-dsn=$(TRUST_PG_DSN)" - "-policy-bundle=/etc/signing-service/policies/signing_service.rego" env: # ---- Pocket-ID OIDC discovery (DEV-609) ---- - name: POCKET_ID_ISSUER valueFrom: secretKeyRef: name: signing-service-prod key: POCKET_ID_ISSUER - name: POCKET_ID_AUDIENCE valueFrom: secretKeyRef: name: signing-service-prod key: POCKET_ID_AUDIENCE # ---- trust-api agent registry DSN (DEV-609) ---- - name: TRUST_PG_DSN valueFrom: secretKeyRef: name: signing-service-prod key: TRUST_PG_DSN # ---- Signing keys (same shape as dev; swapped to prod Secret) ---- - name: KEY_TRUST_API_APPROVAL_SIGNER_2026_Q4 valueFrom: secretKeyRef: name: signing-service-prod key: KEY_TRUST_API_APPROVAL_SIGNER_2026_Q4 - name: KEY_TRUST_API_AGENT_TESTAGENT_TRANSFORM_2026_Q4 valueFrom: secretKeyRef: name: signing-service-prod key: KEY_TRUST_API_AGENT_TESTAGENT_TRANSFORM_2026_Q4 ports: - name: http containerPort: 8081 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: "100m" memory: "128Mi" limits: cpu: "1000m" memory: "512Mi" securityContext: allowPrivilegeEscalation: false readOnlyRootFilesystem: true capabilities: drop: - ALL volumeMounts: - name: kube-api-token mountPath: /var/run/secrets/kubernetes.io/serviceaccount readOnly: true - name: opa-policy mountPath: /etc/signing-service/policies readOnly: true volumes: # Projected SA token the signing-service presents to the # Kubernetes API server to authorize TokenReview calls. The # projected volume also carries the API server CA, which the # in-cluster TokenReviewer loads from # /var/run/secrets/kubernetes.io/serviceaccount/ca.crt. - name: kube-api-token projected: sources: - serviceAccountToken: path: token # The API server audience — pod-SA tokens addressed to # the api server are what RBAC checks against. audience: "https://kubernetes.default.svc" expirationSeconds: 3600 - configMap: name: kube-root-ca.crt items: - key: ca.crt path: ca.crt - downwardAPI: items: - path: namespace fieldRef: fieldPath: metadata.namespace # OPA Rego policy source, mounted read-only. The ConfigMap is # created from policies/sinks/signing_service.rego by GitOps # (see deploy/signing-service/README.md). - name: opa-policy configMap: name: signing-service-policy items: - key: signing_service.rego path: signing_service.rego topologySpreadConstraints: - maxSkew: 1 topologyKey: kubernetes.io/hostname whenUnsatisfiable: ScheduleAnyway labelSelector: matchLabels: app.kubernetes.io/name: signing-service