@@ -19,6 +19,16 @@ Cluster ArgoCD and Hub ArgoCD instances can pull the pattern manifests.
1919* A fork or private copy of this repository
2020* A deploy key (SSH) or Personal Access Token (HTTPS) with ** read** access
2121
22+ > [ !IMPORTANT]
23+ > The git remote URL in your local clone ** must match** the auth type in
24+ > your ` bootstrap_secrets ` . The Makefile passes the remote URL to the
25+ > Pattern CR verbatim when ` TOKEN_SECRET ` is set:
26+ >
27+ > * SSH auth: remote must be ` git@host:org/repo.git `
28+ > * HTTPS/PAT auth: remote must be ` https://host/org/repo.git `
29+ >
30+ > Set with: ` git remote set-url origin <matching-url> `
31+
2232## Option A: SSH Key Authentication
2333
2434### 1. Generate a deploy key
@@ -38,10 +48,10 @@ Deploy keys, etc.).
3848Copy the template and uncomment the SSH ` bootstrap_secrets ` block:
3949
4050``` shell
41- cp values-secret.yaml.template ~ /values-secret-layered-zero-trust .yaml
51+ cp values-secret.yaml.template ~ /values-secret.yaml
4252```
4353
44- Edit ` ~/values-secret-layered-zero-trust .yaml ` and uncomment ** Option A**
54+ Edit ` ~/values-secret.yaml ` and uncomment ** Option A**
4555under the "BOOTSTRAP SECRETS" section. Update the ` url ` field with your
4656repository's SSH URL:
4757
@@ -61,6 +71,21 @@ bootstrap_secrets:
6171 value : " true"
6272 - name : sshPrivateKey
6373 path : ~/.ssh/ztvp-deploy-key
74+ # ACM workaround (see Troubleshooting)
75+ - name : vp-private-repo-credentials
76+ targetNamespaces :
77+ - openshift-gitops
78+ labels :
79+ argocd.argoproj.io/secret-type : repository
80+ fields :
81+ - name : type
82+ value : git
83+ - name : url
84+ value : git@github.com:YOUR-ORG/layered-zero-trust.git
85+ - name : insecureIgnoreHostKey
86+ value : " true"
87+ - name : sshPrivateKey
88+ path : ~/.ssh/ztvp-deploy-key
6489` ` `
6590
6691### 4. Deploy
@@ -75,7 +100,8 @@ bootstrap_secrets:
75100
76101* ** GitHub:** Settings -> Developer settings -> Personal access tokens ->
77102 Fine-grained tokens. Grant ** Contents: Read** on the target repository.
78- * ** GitLab:** Settings -> Access Tokens. Grant ` read_repository ` scope.
103+ * ** GitLab:** Settings -> Access Tokens. Grant ** Reporter** role with
104+ ` read_repository ` scope (Guest role is insufficient to clone code).
79105
80106Store the token in a local file:
81107
@@ -90,10 +116,10 @@ chmod 600 ~/.config/validated-patterns/git-pat
90116Copy the template and uncomment the HTTPS ` bootstrap_secrets ` block:
91117
92118``` shell
93- cp values-secret.yaml.template ~ /values-secret-layered-zero-trust .yaml
119+ cp values-secret.yaml.template ~ /values-secret.yaml
94120```
95121
96- Edit ` ~/values-secret-layered-zero-trust .yaml ` and uncomment ** Option B**
122+ Edit ` ~/values-secret.yaml ` and uncomment ** Option B**
97123under the "BOOTSTRAP SECRETS" section. Update the ` url ` , ` username ` , and
98124` password ` path:
99125
@@ -113,6 +139,21 @@ bootstrap_secrets:
113139 value : YOUR-USERNAME
114140 - name : password
115141 path : ~/.config/validated-patterns/git-pat
142+ # ACM workaround (see Troubleshooting)
143+ - name : vp-private-repo-credentials
144+ targetNamespaces :
145+ - openshift-gitops
146+ labels :
147+ argocd.argoproj.io/secret-type : repository
148+ fields :
149+ - name : type
150+ value : git
151+ - name : url
152+ value : https://github.com/YOUR-ORG/layered-zero-trust.git
153+ - name : username
154+ value : YOUR-USERNAME
155+ - name : password
156+ path : ~/.config/validated-patterns/git-pat
116157` ` `
117158
118159> [!NOTE]
@@ -176,13 +217,12 @@ Expected output: `Synced` (or `OutOfSync` if you have uncommitted changes).
176217
177218# # Troubleshooting
178219
179- * **ACM shows Degraded during initial install** -- This is expected. The
180- ACM policy `vp-private-hub-policy` copies the repository credentials to
181- the `open-cluster-management` namespace, but depends on the VP operator
182- first propagating the secret to `openshift-gitops`. On a fresh install
183- this takes an extra reconciliation cycle (1-2 minutes) while namespaces
184- are being created. The ACM application will self-heal once the VP
185- operator completes the copy.
220+ * **ACM shows Degraded (vp-private-hub-policy NonCompliant)** -- The ACM
221+ chart policy copies repo credentials from `openshift-gitops`, but the VP
222+ operator only places them in `vp-gitops`. Fix this by adding a second
223+ ` bootstrap_secrets` entry named `vp-private-repo-credentials` targeting
224+ ` openshift-gitops` (see the "ACM workaround" section in
225+ ` values-secret.yaml.template` ). Then re-run `load-secrets`.
186226
187227* **ArgoCD shows "repository not accessible"** -- Verify the SSH key or PAT
188228 has read access. For SSH, confirm the key has no passphrase (`ssh-keygen
@@ -192,9 +232,36 @@ Expected output: `Synced` (or `OutOfSync` if you have uncommitted changes).
192232 field is missing from the bootstrap secret. The ArgoCD repo-server runs
193233 in a container without your Git host's fingerprint in known_hosts.
194234
195- * **Secret not found during install** -- Ensure you ran `load-secrets` (part
196- of `post-install`) *after* the bootstrap secret was created. The
197- ` TOKEN_SECRET` and `TOKEN_NAMESPACE` values must match exactly.
235+ * **HTTPS: "x509: certificate signed by unknown authority"** -- This
236+ affects internal/self-hosted GitLab instances whose TLS certificates are
237+ signed by a corporate CA. GitHub and public GitLab (`gitlab.com`) use
238+ publicly trusted CAs and do not require this step.
239+
240+ The corporate CA must be in the cluster trust store **before** install
241+ because the VP operator needs it to clone the repo. Add the internal CA
242+ as a pre-install step :
243+
244+ ` ` ` shell
245+ oc create configmap custom-ca -n openshift-config \
246+ --from-file=ca-bundle.crt=/path/to/corporate-ca-bundle.pem
247+ oc patch proxy/cluster --type=merge \
248+ -p '{"spec":{"trustedCA":{"name":"custom-ca"}}}'
249+ ` ` `
250+
251+ Wait a few minutes for operator pods to restart with the updated bundle.
252+
253+ > [!NOTE]
254+ > After the pattern deploys, the `ztvp-certificates` chart automatically
255+ > merges your `custom-ca` content into its managed `ztvp-proxy-ca`
256+ > ConfigMap and switches `proxy/cluster.spec.trustedCA` to
257+ > `ztvp-proxy-ca`. This adds the cluster ingress and service CAs so
258+ > that workloads like ACS Central can reach Keycloak without additional
259+ > manual steps. You do **not** need to manually add the ingress CA to
260+ > your `custom-ca`.
261+
262+ * **Secret not found during install** -- Ensure you ran
263+ ` ./pattern.sh make load-secrets` *after* the bootstrap secret was created.
264+ The `TOKEN_SECRET` and `TOKEN_NAMESPACE` values must match exactly.
198265
199266* **GitLab HTTPS fails** -- Remember that GitLab PAT auth requires
200267 `username : oauth2`, not your GitLab user handle.
0 commit comments