diff --git a/cmd/operator.go b/cmd/operator.go index cdf43af84..2c6e7e3ce 100644 --- a/cmd/operator.go +++ b/cmd/operator.go @@ -111,7 +111,7 @@ func run(cmd *cobra.Command, args []string) { includeNamespaces := []string{} if operatorNamespace != "" { includeNamespaces = strings.Split(operatorNamespace, ",") - canary.SyncCanaryNamspaces = includeNamespaces + canary.CanaryNamespaces = includeNamespaces } runner.RunnerLabels = labels.LoadFromFile("/etc/podinfo/labels") diff --git a/pkg/jobs/canary/canary_jobs.go b/pkg/jobs/canary/canary_jobs.go index 3e30d151c..8db917b2a 100644 --- a/pkg/jobs/canary/canary_jobs.go +++ b/pkg/jobs/canary/canary_jobs.go @@ -32,7 +32,7 @@ var LogPass, LogFail bool // List of namespaces whose canary specs should be synced. // If empty, all namespaces will be synced -var SyncCanaryNamspaces []string +var CanaryNamespaces []string var Kommons *kommons.Client var Kubernetes kubernetes.Interface @@ -350,7 +350,7 @@ func SyncCanaryJob(dbCanary pkg.Canary) error { func SyncCanaryJobs() { logger.Debugf("Syncing canary jobs") - canaries, err := db.GetAllCanariesForSync(SyncCanaryNamspaces...) + canaries, err := db.GetAllCanariesForSync(CanaryNamespaces...) if err != nil { logger.Errorf("Failed to get canaries: %v", err)