File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -200,6 +200,9 @@ spec:
200200 {{- if .Values.cozystackOperator.platformSourceSecret }}
201201 - --platform-source-secret={{ .Values.cozystackOperator.platformSourceSecret }}
202202 {{- end }}
203+ {{- if .Values.cozystackOperator.platformSourceCertSecret }}
204+ - --platform-source-cert-secret={{ .Values.cozystackOperator.platformSourceCertSecret }}
205+ {{- end }}
203206 {{- $hasEndpointEnv := or (eq .Values.cozystackOperator.variant "talos") (eq .Values.cozystackOperator.variant "generic") }}
204207 {{- if or .Values.cozystackOperator.platformVersion $hasEndpointEnv }}
205208 env :
Original file line number Diff line number Diff line change 1+ suite : cozystack-operator platform source arguments
2+
3+ templates :
4+ - templates/cozystack-operator.yaml
5+
6+ tests :
7+ - it : passes platformSourceCertSecret to the operator
8+ set :
9+ cozystackOperator.platformSourceUrl : oci://registry.internal:8083/cozystack/cozystack/cozystack-packages
10+ cozystackOperator.platformSourceSecret : registry-creds
11+ cozystackOperator.platformSourceCertSecret : registry-ca
12+ asserts :
13+ - contains :
14+ path : spec.template.spec.containers[0].args
15+ content : --platform-source-cert-secret=registry-ca
16+ documentSelector :
17+ path : kind
18+ value : Deployment
19+ - contains :
20+ path : spec.template.spec.containers[0].args
21+ content : --platform-source-secret=registry-creds
22+ documentSelector :
23+ path : kind
24+ value : Deployment
25+
26+ - it : omits the cert secret flag by default
27+ asserts :
28+ - notContains :
29+ path : spec.template.spec.containers[0].args
30+ content : --platform-source-cert-secret=
31+ documentSelector :
32+ path : kind
33+ value : Deployment
Original file line number Diff line number Diff line change @@ -63,6 +63,15 @@ cozystackOperator:
6363 # otherwise source-controller will report a failed condition until it is created.
6464 # See FluxCD source-controller docs for the exact key layout per scheme.
6565 platformSourceSecret : ' '
66+ # Name of the Secret in cozy-system namespace with TLS material for an OCI
67+ # platform source: `ca.crt` for a registry whose certificate is issued by a
68+ # private CA, and/or `tls.crt`+`tls.key` for client certificate auth (type
69+ # Opaque or kubernetes.io/tls). When non-empty, sets spec.certSecretRef on the
70+ # generated OCIRepository; the operator rewrites that object on every start,
71+ # so a certSecretRef patched onto it by hand does not survive a restart.
72+ # The cozystack-packages source copies the spec, so it inherits the CA too.
73+ # OCI only: for a Git source put `ca.crt` into the platformSourceSecret Secret.
74+ platformSourceCertSecret : ' '
6675# Generic variant configuration (only used when cozystackOperator.variant=generic)
6776cozystack :
6877 # Kubernetes API server host (IP only, no protocol/port)
You can’t perform that action at this time.
0 commit comments