Skip to content
Snippets Groups Projects
Verified Commit 68a13ef0 authored by Sheogorath's avatar Sheogorath :european_castle:
Browse files

fix(shared): Make sure labels aren't unintentionally dropped

The first patch that "adds" `{}` to `/metadata/labels` would replace any
existing labels resulting in unexpected behaviour. Instead we rely on
the preexistence of the labels field in the namespace.
parent d2081350
No related branches found
No related tags found
No related merge requests found
...@@ -2,3 +2,4 @@ apiVersion: v1 ...@@ -2,3 +2,4 @@ apiVersion: v1
kind: Namespace kind: Namespace
metadata: metadata:
name: findmydevice name: findmydevice
labels: {}
...@@ -2,3 +2,4 @@ apiVersion: v1 ...@@ -2,3 +2,4 @@ apiVersion: v1
kind: Namespace kind: Namespace
metadata: metadata:
name: forecastle name: forecastle
labels: {}
- op: add
path: /metadata/labels
value: {}
- op: add - op: add
path: /metadata/labels/pod-security.kubernetes.io~1audit path: /metadata/labels/pod-security.kubernetes.io~1audit
value: restricted value: restricted
......
- op: add
path: /metadata/labels
value: {}
- op: add - op: add
path: /metadata/labels/pod-security.kubernetes.io~1audit path: /metadata/labels/pod-security.kubernetes.io~1audit
value: restricted value: restricted
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment