mirror of
https://github.com/arangodb/kube-arangodb.git
synced 2024-12-14 11:57:37 +00:00
[Feature] Allow replace on empty annotations (#644)
This commit is contained in:
parent
02f651c019
commit
ac5456dbad
2 changed files with 7 additions and 0 deletions
|
@ -7,6 +7,7 @@
|
|||
- Fix Upgrade procedure to safely evict pods during upgrade
|
||||
- Fix Panics in Deployments without authentication
|
||||
- Fix ChaosMonkey mode
|
||||
- Allow append on empty annotations
|
||||
|
||||
## [1.0.8](https://github.com/arangodb/kube-arangodb/tree/1.0.8) (2020-09-10)
|
||||
- Fix Volume rotation on AKS
|
||||
|
|
|
@ -160,6 +160,9 @@ func getFieldPatch(mode api.LabelsMode, section string, expected map[string]stri
|
|||
case api.LabelsDisabledMode:
|
||||
break
|
||||
case api.LabelsAppendMode:
|
||||
if len(actual) == 0 {
|
||||
return patch.NewPatch(patch.ItemReplace(patch.NewPath("metadata", section), expected))
|
||||
}
|
||||
for e, v := range expected {
|
||||
if a, ok := actual[e]; !ok {
|
||||
p.ItemAdd(patch.NewPath("metadata", section, e), v)
|
||||
|
@ -168,6 +171,9 @@ func getFieldPatch(mode api.LabelsMode, section string, expected map[string]stri
|
|||
}
|
||||
}
|
||||
case api.LabelsReplaceMode:
|
||||
if len(actual) == 0 {
|
||||
return patch.NewPatch(patch.ItemReplace(patch.NewPath("metadata", section), expected))
|
||||
}
|
||||
for e, v := range expected {
|
||||
if a, ok := actual[e]; !ok {
|
||||
p.ItemAdd(patch.NewPath("metadata", section, e), v)
|
||||
|
|
Loading…
Reference in a new issue