From 53f51a9db2cd9fdc615430050c32f55f30dd7a95 Mon Sep 17 00:00:00 2001 From: Justin Brooks Date: Tue, 22 Aug 2023 22:35:16 -0400 Subject: [PATCH] fix: Properly set namespace for deployments --- controllers/weightsandbiases_controller.go | 3 ++- pkg/helm/chart.go | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/controllers/weightsandbiases_controller.go b/controllers/weightsandbiases_controller.go index cf241a1..538a413 100644 --- a/controllers/weightsandbiases_controller.go +++ b/controllers/weightsandbiases_controller.go @@ -169,11 +169,12 @@ func (r *WeightsAndBiasesReconciler) Reconcile(ctx context.Context, req ctrl.Req if err := specManager.SetActive(desiredSpec); err != nil { r.Recorder.Event(wandb, corev1.EventTypeNormal, "SetActiveFailed", "Failed to save active state") - log.Error(err, "Failed to save active sucessful spec.") + log.Error(err, "Failed to save active successful spec.") return ctrlqueue.DoNotRequeue() } log.Info("Successfully saved active spec") + r.Recorder.Event(wandb, corev1.EventTypeNormal, "Completed", "Completed reconcile successfully") statusManager.Set(status.Completed) return ctrlqueue.RequeueWithDelay(ctrlqueue.CheckForUpdatesFrequency) } diff --git a/pkg/helm/chart.go b/pkg/helm/chart.go index bb84183..d4bb702 100644 --- a/pkg/helm/chart.go +++ b/pkg/helm/chart.go @@ -25,6 +25,7 @@ var ( // where to store the versions func InitConfig(namespace string) (*cli.EnvSettings, *action.Configuration, error) { settings := cli.New() + settings.SetNamespace(namespace) config := new(action.Configuration) err := config.Init( settings.RESTClientGetter(),