Skip to content

Commit

Permalink
fixing needs-hash
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanmartins committed Nov 24, 2023
1 parent b070846 commit 9039932
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkg/function.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,10 @@ func Ksops(items []*yaml.RNode) ([]*yaml.RNode, error) {

var node *yaml.RNode
node, err = yaml.Parse(string(secret))
_ = node.SetAnnotations(map[string]string{"kustomize.config.k8s.io/needs-hash": "true"})
_ = node.SetAnnotations(map[string]string{"argocd.argoproj.io/sync-wave": "-3"})
currentAnnotations := node.GetAnnotations()
currentAnnotations["kustomize.config.k8s.io/needs-hash"] = "true"
currentAnnotations["argocd.argoproj.io/sync-wave"] = "-3"
_ = node.SetAnnotations(currentAnnotations)
if err != nil {
return nil, fmt.Errorf("failed parse secret into yaml file %s: %w\n", file, err)
}
Expand Down

0 comments on commit 9039932

Please sign in to comment.