Skip to content

gke-deploy: apply existing Namespace configs#1102

Open
Haihan-Jiang wants to merge 1 commit into
GoogleCloudPlatform:masterfrom
Haihan-Jiang:codex/cloud-builders-apply-existing-namespace
Open

gke-deploy: apply existing Namespace configs#1102
Haihan-Jiang wants to merge 1 commit into
GoogleCloudPlatform:masterfrom
Haihan-Jiang:codex/cloud-builders-apply-existing-namespace

Conversation

@Haihan-Jiang
Copy link
Copy Markdown

Fixes #873.

gke-deploy apply currently handles Namespace objects specially: it checks whether each Namespace already exists, creates it if missing, and then removes Namespace objects from the normal apply list. That means existing Namespace objects are never applied again, so changes such as new labels in the manifest are silently skipped.

This change keeps the existing create-warning behavior for missing namespaces, but always applies the Namespace manifest. Existing namespaces can then be updated by kubectl apply, matching the behavior users expect from applying the same YAML with kubectl directly. Namespace objects are still excluded from the deployment summary.

Validation:

  • go test ./deployer ./core/cluster ./core/resource from gke-deploy
  • go test ./... from gke-deploy
  • git diff --check

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.

[BUG] gke-deploy does not update namespaces with new labels if the namespace already exists

1 participant