Adding an external Git CaBundle
To enable the porch server to communicate with a custom git deployment over HTTPS, we must:
- Provide an additional arguments flag
use-git-cabundle=true
to the porch-server deployment. - Provide an additional Kubernetes secret containing the relevant certificate chain in the form of a cabundle.
The secret itself must meet the following criteria:
- exist in the same namespace as the Repository CR (Custom Resource) that requires it
- be named specifically <namespace>-ca-bundle
- have a Data key named ca.crt containing the relevant ca certificate (chain)
For example, a Git Repository is hosted over HTTPS at the https://my-gitlab.com/joe.bloggs/blueprints.git URL:
https://my-gitlab.com/joe.bloggs/blueprints.git
Before creating the new Repository in the GitLab namespace, we must create a secret that fulfils the criteria above.
kubectl create secret generic gitlab-ca-bundle --namespace=gitlab --from-file=ca.crt
Which would produce the following:
apiVersion: v1
kind: Secret
metadata:
name: gitlab-ca-bundle
namespace: gitlab
type: Opaque
data:
ca.crt: FAKE1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUNuakNDQWdHZ0F3SUJBZ0lRTEdmUytUK3YyRDZDczh1MVBlUUlKREFLQmdncWhrak9QUVFEQkRBZE1Sc3cKR1FZRFZRUURFeEpqWlhKMExXMWhibUZuWlhJdWJHOWpZV3d3SGhjTk1qUXdOVE14TVRFeU5qTXlXaGNOTWpRdwpPREk1TVRFeU5qTXlXakFWTVJNd0VRWURWUVFGRXdveE1qTTBOVFkzT0Rrd01JSUJJakFOQmdrcWhraUc5dzBCCkFRRUZBQU9DQVE4QU1JSUJDZ0tDQVFFQXhCUUtWMEVzQ1JOOGxuV3lQR1ZWNXJwam5QZkI2emszK0N4cEp2NVMKUWhpMG1KbDI0elV1WWZjRzNxdFUva1NuREdjK3NQRUY0RmlOcUlsSTByWHBQSXBPazhKbjEvZU1VT3RkZUUyNgpSWEZBWktjeDVvdUJyZVNja3hsN2RPVkJnOE1EM1h5RU1PQU5nM0hJZ1J4ZWx2U2p1dy8vMURhSlRnK0lBS0dUCkgrOVlRVFcrZDIwSk5wQlR3NkdnQlRsYmdqL2FMRWEwOXVYSVBjK0JUSkpXRTh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