Debug/classic gitops - #33
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fixed differences in hcp vs classic API server endpoints and how we derive urls so its more robust.