tls-secret.example.yaml 1.2 KB

12345678910111213141516171819202122232425262728293031
  1. # TLS + client-CA material (task 46). EXAMPLE ONLY — not in kustomization.
  2. #
  3. # The Deployment mounts the `d-oauth-tls` Secret read-only at `/certs`.
  4. # Provision it with cert-manager (preferred) or create it by hand:
  5. #
  6. # kubectl create secret generic d-oauth-tls -n d-oauth \
  7. # --from-file=tls.crt=./tls.crt \
  8. # --from-file=tls.key=./tls.key \
  9. # --from-file=client-ca.crt=./client-ca.crt \
  10. # --from-file=db-ca.crt=./db-ca.crt
  11. #
  12. # `client-ca.crt` is REQUIRED while `D_OAUTH_TLS__CLIENT_CA_PATH` is set in
  13. # the ConfigMap (in-process mTLS verification). Omit the file AND unset the
  14. # env key together if mTLS is not used.
  15. #
  16. # `db-ca.crt` is the Postgres CA for `sslmode=verify-full`, read through
  17. # `D_OAUTH_DATABASE__ROOT_CERT_PATH`. Omit it and that key together only if the
  18. # database serves a publicly-trusted certificate. Never bake this material into
  19. # the image; `scripts/check_manifests.py` fails on PEM blocks inside manifests.
  20. # ---
  21. # apiVersion: v1
  22. # kind: Secret
  23. # metadata:
  24. # name: d-oauth-tls
  25. # namespace: d-oauth
  26. # type: kubernetes.io/tls
  27. # stringData:
  28. # tls.crt: "<server certificate PEM>"
  29. # tls.key: "<server private key PEM>"
  30. # client-ca.crt: "<client CA bundle PEM>"
  31. # db-ca.crt: "<Postgres CA bundle PEM>"