Skip to content

Commit

Permalink
up
Browse files Browse the repository at this point in the history
  • Loading branch information
samirtahir91 committed Mar 22, 2024
1 parent cce94c6 commit 84a2642
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions internal/controller/secretsync_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ package controller

import (
"context"
"os"
//"os"
"reflect"

apierrors "k8s.io/apimachinery/pkg/api/errors"
Expand Down Expand Up @@ -301,11 +301,12 @@ func sourceNamespacePredicate() predicate.Predicate {
func (r *SecretSyncReconciler) SetupWithManager(mgr ctrl.Manager) error {

// Read the source namespace from environment variable
sourceNamespace = os.Getenv("SOURCE_NAMESPACE")
if sourceNamespace == "" {
sourceNamespace = "default"
//sourceNamespace = os.Getenv("SOURCE_NAMESPACE")
//if sourceNamespace == "" {
// Handle case where environment variable is not set
panic("SOURCE_NAMESPACE environment variable not set")
}
// panic("SOURCE_NAMESPACE environment variable not set")
//}

/*
The `spec.secrets` field must be indexed by the manager, so that we will be able to lookup `SecretSyncs` by a referenced `Secret` name.
Expand Down

0 comments on commit 84a2642

Please sign in to comment.