diff --git a/extra-manifests/registry-ca-configmap.yaml b/extra-manifests/registry-ca-configmap.yaml new file mode 100644 index 0000000..642fddb --- /dev/null +++ b/extra-manifests/registry-ca-configmap.yaml @@ -0,0 +1,67 @@ +# The registry CA's PUBLIC certificate, for Docker clients that push to +# Harbor from inside the cluster. +# +# Not a secret, which is why it is committed here in plain sight rather than +# going through Vault: it is the same certificate every node already fetches +# from Secret Manager, and publishing a CA's public half is what a CA is for. +# The private key is a different matter entirely — it exists only in +# Terraform state and reaches the cluster as the `registry-ca` Secret in the +# cert-manager namespace, which cert-manager uses to sign. +# +# Why this exists at all: the node pool trusting the CA covers image PULLS, +# performed by containerd on the node. A `docker push` from a build pod is a +# separate client with its own trust store, and it has no idea the node +# trusts anything. Without this, pushes fail TLS verification while pulls of +# the very same image work — which reads like a broken registry rather than a +# missing trust anchor. +# +# Mount it in whichever container runs dockerd, at +# /etc/docker/certs.d/harbor.35.238.248.203.nip.io/ca.crt +# The directory name must be the registry hostname exactly; dockerd looks the +# path up by host, so a mismatch silently does nothing. Consumers so far: the +# base-images mirror pod (devops-base-images-gcp) and devops-lib-gcp's build +# pod template. +# +# The homelab needs none of this — its Harbor is plain HTTP and its dind +# passes --insecure-registry instead. +# +# If the CA is ever regenerated in Terraform, this file must be updated to +# match, along with the cert-manager Secret and the node pool's Secret +# Manager version. +apiVersion: v1 +kind: ConfigMap +metadata: + name: registry-ca + namespace: jenkins +data: + ca.crt: | + -----BEGIN CERTIFICATE----- + MIIFMTCCAxmgAwIBAgIRAPf5gf3756sdf3nlZBTnlREwDQYJKoZIhvcNAQELBQAw + MjERMA8GA1UEChMIdG9vbHNoZWQxHTAbBgNVBAMTFHRvb2xzaGVkLXJlZ2lzdHJ5 + LWNhMB4XDTI2MDkxMTA0MDIxNloXDTM2MDkwODA0MDIxNlowMjERMA8GA1UEChMI + dG9vbHNoZWQxHTAbBgNVBAMTFHRvb2xzaGVkLXJlZ2lzdHJ5LWNhMIICIjANBgkq + hkiG9w0BAQEFA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