Skip to content

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

Description

@jezzirolk

Notice

If you are reporting an issue with the hosted Google Cloud Build service, please contact your Google Cloud Support representative or report your issue using Google's public issue tracker.

This GitHub issue tracker is intended for bugs with the officially supported builder images only. This issue tracker is not the right place to report issues with triggers or notifications.

If you're not sure where to report your issue, use Google's public issue tracker.

Affected builder image

gcr.io/cloud-builders/gke-deploy

Expected Behavior

Applying an existing namespace with a new label will update the labels to what is in the YAML

Actual Behavior

Applying an existing namespace with a new label does not update the namespaces labels at all.

Steps to Reproduce the Problem

  1. apply a namespace via a yaml file
---
apiVersion: v1
kind: Namespace
metadata:
  name: dev
  labels:
    name: dev
    role: shared-ingress
  1. kubectl get namespaces --show-labels shows it has the above labels
    3 update that namespace to add a new label
---
apiVersion: v1
kind: Namespace
metadata:
  name: dev
  labels:
    name: dev
    role: shared-ingress
    pod-security.kubernetes.io/audit: restricted
  1. kubectl get namespaces --show-labels shows the labels have not been updated

Additional Info

doing these same steps but instead using kubectl locally they all work.

Metadata

Metadata

Assignees

Labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions