Skip to content

feat: support deploying ZTVP from private git repositories#140

Open
minmzzhang wants to merge 4 commits into
validatedpatterns:mainfrom
minmzzhang:ztvp-private-repos
Open

feat: support deploying ZTVP from private git repositories#140
minmzzhang wants to merge 4 commits into
validatedpatterns:mainfrom
minmzzhang:ztvp-private-repos

Conversation

@minmzzhang
Copy link
Copy Markdown
Collaborator

@minmzzhang minmzzhang commented May 29, 2026

Summary

  • Add bootstrap_secrets configuration to values-secret.yaml.template for both SSH and HTTPS/PAT authentication to private Git repositories
  • Create docs/private-repos.md with step-by-step deployment instructions, verification steps, and troubleshooting guide
  • Update ztvp-certificates chart to merge existing proxy CA ConfigMaps (e.g. corporate CAs added pre-install for internal GitLab) into ztvp-proxy-ca, ensuring workloads like ACS Central can trust both cluster-internal routes and external hosts without manual intervention

Key features

  • SSH key authentication with insecureIgnoreHostKey for ArgoCD repo-server containers
  • HTTPS/PAT authentication with support for GitHub and GitLab (including internal instances)
  • ACM chart 0.2.x: bump chartVersion from 0.1.* to 0.2.* so the vp-private-hub-policy reads global.vpArgoNamespace (set automatically by the VP operator) instead of hardcoding openshift-gitops
  • Corporate CA handling: documents the pre-install custom-ca requirement for internal Git hosts, and the automatic merge into ztvp-proxy-ca post-install
  • DISABLE_VALIDATE_ORIGIN support for skipping local git ls-remote pre-flight check

Troubleshooting coverage

  • Git remote URL / auth type mismatch
  • SSH knownhosts: key is unknown
  • HTTPS x509: certificate signed by unknown authority (internal CAs)
  • GitLab PAT authorization failed (Reporter role + read_repository scope required)
  • ACM vp-private-hub-policy NonCompliant

Add bootstrap_secrets configuration to values-secret.yaml.template
with two options for private repository access:
- Option A: SSH deploy key authentication
- Option B: HTTPS with Personal Access Token (PAT)

Add docs/private-repos.md with step-by-step deployment instructions,
verification steps, and troubleshooting guidance.

The common Makefile already supports TOKEN_SECRET and TOKEN_NAMESPACE;
this commit provides the pattern-level configuration and documentation.

Signed-off-by: Min Zhang <minzhang@redhat.com>
The ArgoCD repo-server container does not have Git host SSH fingerprints
in its known_hosts file, causing "knownhosts: key is unknown" errors.
Add insecureIgnoreHostKey field to the SSH bootstrap_secrets template.

Also document:
- DISABLE_VALIDATE_ORIGIN for private repo pre-flight check
- ACM temporary Degraded state during initial install (self-heals)
- SSH known_hosts troubleshooting entry

Signed-off-by: Min Zhang <minzhang@redhat.com>
When deploying from an internal Git host (e.g. gitlab.cee.redhat.com),
users must add corporate CAs to proxy/cluster before install.  Previously
the ztvp-certificates job refused to overwrite a user-set trustedCA,
leaving ACS Central unable to trust Keycloak via the ingress CA.

Changes:
- PHASE 8.5: include all extracted CAs (custom, additional, cluster) in
  the proxy CA bundle, not just ingress + service
- PHASE 8.6: merge existing proxy CA ConfigMap content into ztvp-proxy-ca
  before taking over trustedCA management
- docs/private-repos.md: document pre-install CA requirement and explain
  automatic merge behavior
- values-secret.yaml.template: add ACM workaround bootstrap_secrets entry

Signed-off-by: Min Zhang <minzhang@redhat.com>
@minmzzhang minmzzhang requested review from mlorenzofr, p-rog and sabre1041 and removed request for mlorenzofr May 29, 2026 14:29
The duplicate bootstrap_secrets entry targeting openshift-gitops is no
longer needed.  The VP operator (0.0.70+) copies credentials into
vp-gitops and automatically sets global.vpArgoNamespace.  The ACM chart
0.2.x reads that variable, so the private-repo policy resolves without
any manual override or duplicate secret.

- Remove second bootstrap_secrets entries (SSH and HTTPS workarounds)
- Bump ACM chartVersion from 0.1.* to 0.2.*
- Update docs/private-repos.md and values-secret.yaml.template comments

Signed-off-by: Min Zhang <minzhang@redhat.com>
@minmzzhang minmzzhang force-pushed the ztvp-private-repos branch from dd8c6ab to cb9264d Compare May 29, 2026 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant