Files
argo-cd/gitops-engine/pkg/sync/syncwaves/waves.go
Leonardo Luz Almeida bcc0243f1e prepare repo for migration to ArgoCD repo
Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>
2025-09-23 10:05:42 -04:00

22 lines
436 B
Go

package syncwaves
import (
"strconv"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"github.com/argoproj/gitops-engine/pkg/sync/common"
helmhook "github.com/argoproj/gitops-engine/pkg/sync/hook/helm"
)
func Wave(obj *unstructured.Unstructured) int {
text, ok := obj.GetAnnotations()[common.AnnotationSyncWave]
if ok {
val, err := strconv.Atoi(text)
if err == nil {
return val
}
}
return helmhook.Weight(obj)
}