github.com/jenkins-x/jx/v2@v2.1.155/pkg/flagger/flagger.go (about) 1 package flagger 2 3 import ( 4 appsv1 "k8s.io/api/apps/v1" 5 ) 6 7 // IsCanaryAuxiliaryDeployment returns whether this deployment has been created automatically by Flagger from a Canary object 8 func IsCanaryAuxiliaryDeployment(d appsv1.Deployment) bool { 9 ownerReferences := d.GetObjectMeta().GetOwnerReferences() 10 for i := range ownerReferences { 11 if ownerReferences[i].Kind == "Canary" { 12 return true 13 } 14 } 15 return false 16 }