Skip to content

Commit

Permalink
UPSTREAM: 34020: Allow empty annotation values
Browse files Browse the repository at this point in the history
Annotations with empty values can be used, for example, in diagnostics
logging. This patch removes the client-side check for empty values in
an annotation key-value pair.

**Before**
```
$ kubectl annotate pod zookeeper-1 node-selector="" --overwrite
error: invalid annotation format: node-selector=
```

**After**
```
$ kubectl annotate pod zookeeper-1 node-selector="" --overwrite
pod "zookeper-1" annotated
```

```
$ kubectl get po/zookeeper-1 --template='{{.metadata.annotations}}'
map[... node-selector: test-label:test]
```
  • Loading branch information
juanvallejo committed Oct 4, 2016
1 parent 01c20d0 commit c242a8b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion vendor/k8s.io/kubernetes/pkg/kubectl/cmd/label.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/k8s.io/kubernetes/pkg/kubectl/cmd/util/helpers.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c242a8b

Please sign in to comment.