GoogleCloudPlatform / GoogleCloudPlatform/cloud-builders

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

Open
#873 0 comments 0 reactions 1 assignee Claimed by @haroonc View on GitHub
bug
Dominant language
Go
Stars
1.5k
Forks
616
PR merge metrics
No merged PRs in 30d

Description

## 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](https://issuetracker.google.com/issues/new?component=190802&template=1162743).**

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](https://issuetracker.google.com/issues/new?component=190802&template=1162743).

## 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
```
2. `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
```
4. `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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.