Skip to content

Commit

Permalink
not delete kustomize.config.k8s.io/needs-hash
Browse files Browse the repository at this point in the history
  • Loading branch information
yutaroyamanaka committed Sep 9, 2023
1 parent 7c36ed2 commit 98cc766
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions api/krusty/configmaps_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,8 @@ resources:
configMapGenerator:
- name: project
behavior: merge
options:
disableNameSuffixHash: true
literals:
- ANOTHER_ENV_VARIABLE="bar"
`)
Expand Down
3 changes: 3 additions & 0 deletions api/resource/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -523,6 +523,9 @@ func mergeStringMapsWithBuildAnnotations(maps ...map[string]string) map[string]s
result := mergeStringMaps(maps...)
for i := range BuildAnnotations {
if len(maps) > 0 {
if BuildAnnotations[i] == utils.BuildAnnotationsGenAddHashSuffix {
continue
}
if v, ok := maps[0][BuildAnnotations[i]]; ok {
result[BuildAnnotations[i]] = v
continue
Expand Down

0 comments on commit 98cc766

Please sign in to comment.