|
|
@@ -57,6 +57,7 @@ var (
|
|
|
namespace string
|
|
|
enableClusterStoreReconciler bool
|
|
|
enableClusterExternalSecretReconciler bool
|
|
|
+ enablePushSecretReconciler bool
|
|
|
enableFloodGate bool
|
|
|
storeRequeueInterval time.Duration
|
|
|
serviceName, serviceNamespace string
|
|
|
@@ -149,15 +150,17 @@ var rootCmd = &cobra.Command{
|
|
|
setupLog.Error(err, errCreateController, "controller", "ExternalSecret")
|
|
|
os.Exit(1)
|
|
|
}
|
|
|
- if err = (&pushsecret.Reconciler{
|
|
|
- Client: mgr.GetClient(),
|
|
|
- Log: ctrl.Log.WithName("controllers").WithName("PushSecret"),
|
|
|
- Scheme: mgr.GetScheme(),
|
|
|
- ControllerClass: controllerClass,
|
|
|
- RequeueInterval: time.Hour,
|
|
|
- }).SetupWithManager(mgr); err != nil {
|
|
|
- setupLog.Error(err, errCreateController, "controller", "PushSecret")
|
|
|
- os.Exit(1)
|
|
|
+ if enablePushSecretReconciler {
|
|
|
+ if err = (&pushsecret.Reconciler{
|
|
|
+ Client: mgr.GetClient(),
|
|
|
+ Log: ctrl.Log.WithName("controllers").WithName("PushSecret"),
|
|
|
+ Scheme: mgr.GetScheme(),
|
|
|
+ ControllerClass: controllerClass,
|
|
|
+ RequeueInterval: time.Hour,
|
|
|
+ }).SetupWithManager(mgr); err != nil {
|
|
|
+ setupLog.Error(err, errCreateController, "controller", "PushSecret")
|
|
|
+ os.Exit(1)
|
|
|
+ }
|
|
|
}
|
|
|
if enableClusterExternalSecretReconciler {
|
|
|
if err = (&clusterexternalsecret.Reconciler{
|
|
|
@@ -199,6 +202,7 @@ func init() {
|
|
|
rootCmd.Flags().StringVar(&namespace, "namespace", "", "watch external secrets scoped in the provided namespace only. ClusterSecretStore can be used but only work if it doesn't reference resources from other namespaces")
|
|
|
rootCmd.Flags().BoolVar(&enableClusterStoreReconciler, "enable-cluster-store-reconciler", true, "Enable cluster store reconciler.")
|
|
|
rootCmd.Flags().BoolVar(&enableClusterExternalSecretReconciler, "enable-cluster-external-secret-reconciler", true, "Enable cluster external secret reconciler.")
|
|
|
+ rootCmd.Flags().BoolVar(&enablePushSecretReconciler, "experimental-enable-push-secret-reconciler", false, "Enable push secret reconciler.")
|
|
|
rootCmd.Flags().DurationVar(&storeRequeueInterval, "store-requeue-interval", time.Minute*5, "Default Time duration between reconciling (Cluster)SecretStores")
|
|
|
rootCmd.Flags().BoolVar(&enableFloodGate, "enable-flood-gate", true, "Enable flood gate. External secret will be reconciled only if the ClusterStore or Store have an healthy or unknown state.")
|
|
|
rootCmd.Flags().BoolVar(&enableAWSSession, "experimental-enable-aws-session-cache", false, "Enable experimental AWS session cache. External secret will reuse the AWS session without creating a new one on each request.")
|