Skip to content

Debug/classic gitops - #33

Merged
supernovae merged 3 commits into
mainfrom
debug/classic-gitops
Feb 16, 2026
Merged

Debug/classic gitops#33
supernovae merged 3 commits into
mainfrom
debug/classic-gitops

Conversation

@supernovae

Copy link
Copy Markdown
Owner

fixed differences in hcp vs classic API server endpoints and how we derive urls so its more robust.

supernovae and others added 3 commits February 16, 2026 09:00
The RHCS classic provider may return an empty api_url/console_url
even when the cluster is in ready state. This caused the kubernetes
provider to fail with "cannot load Kubernetes client config" during
Phase 2 (GitOps) apply.

Fix: Add effective_api_url and effective_console_url locals that
use coalesce() to fall back to the well-known ROSA URL pattern
(https://api.<domain>:6443) when the RHCS output is empty.
All module inputs and outputs now use these locals instead of
referencing module.rosa_cluster.api_url directly.

Applied to all 4 environments for consistency.

Co-authored-by: Cursor <cursoragent@cursor.com>
Two fixes for the kubernetes provider "cannot load Kubernetes client
config" error on classic clusters:

1. Remove config_paths=[] and config_context="" from all kubernetes
   provider blocks. In provider v3.0.1, an empty list is treated as
   "use defaults" which loads ~/.kube/config. A broken kubeconfig
   causes the provider to fail before applying the explicit host
   override.

2. Derive api_url/console_url from module.rosa_cluster.domain
   directly instead of using coalesce with api_url. The RHCS classic
   provider returns empty api_url even when the cluster is ready,
   but domain is always populated. ROSA URLs follow a well-known
   pattern: https://api.<domain>:6443

Co-authored-by: Cursor <cursoragent@cursor.com>
…ssues

Three root causes found and fixed:

1. HCP API uses port 443 (not 6443 like Classic). The domain-derived
   effective_api_url was hardcoding :6443 for all environments, causing
   i/o timeouts on HCP clusters.

2. OAuth discovery script lacked -L (follow redirects) and had no HCP
   fallback. HCP OAuth lives at oauth.<domain> not
   oauth-openshift.apps.<domain>. Script now probes both patterns.

3. RHCS provider returns empty api_url/console_url after cluster create.
   Added data source re-read after cluster_ready wait to capture URLs.
   Added config_path=/dev/null to suppress broken ~/.kube/config loading.

Updated cursor rules to document Classic vs HCP architecture differences
and prevent regressions on port, OAuth URL, and provider configuration.

Co-authored-by: Cursor <cursoragent@cursor.com>
@supernovae
supernovae merged commit 3b45c3a into main Feb 16, 2026
15 checks passed
@supernovae
supernovae deleted the debug/classic-gitops branch February 16, 2026 17:21
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