[v2][Bugfix] Applying K8s manifests to GKE clusters via URL#4352
Merged
shubpal07 merged 4 commits intoJul 22, 2025
Merged
Conversation
Revert "Merge pull request GoogleCloudPlatform#4350 from GoogleCloudPlatform/revert-4292-shubham/bugs/apply-manifest-from-url" This reverts commit 72f98ee, reversing changes made to 857aacd.
Contributor
Author
|
Ran the failing integration tests:
|
837a148 to
22473ad
Compare
22473ad to
fdca7fe
Compare
449abc9
into
GoogleCloudPlatform:develop
12 of 63 checks passed
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.
Fix: Correctly apply Kubernetes manifests from remote URLs
NOTE: We had re-raise this PR due to a regression found in the original PR #4292 . The root cause was identified:
This PR resolves a bug that caused Terraform to fail with an
Invalid count argumenterror when applying a Kubernetes manifest from a remote URL. The issue occurred when thekubectl-applymodule had a dependency on another resource i.e. GKE cluster, being created in the same run.The root cause was a Terraform plan/apply lifecycle conflict. The module was trying to fetch the URL content after the cluster was created (in the apply phase), but other parts of the plan depended on that content before the apply could start.
This fix refactors the
kubectl-applymodule with the following strategy:terraform planphase.This change allows for the robust and predictable deployment of URL-based manifests.
How to Test and Verify
Configure a Blueprint: Use a blueprint that calls the workload-manager-install module (modules/management/kubectl-apply).
Use a URL Source: In the settings, disable the internal Kueue installation and provide the Kueue manifest via a URL in the apply_manifests list. This configuration specifically targets the fixed logic.
YAML
Deploy: Run the deployment command (e.g., ./gcluster deploy ...).
Expected Result:
The terraform plan and terraform apply phases should complete successfully without any "Invalid count" or other planning errors.
NOTE: Community submissions can take up to 2 weeks to be reviewed.
Please take the following actions before submitting this pull request.