Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
add re-sync interval
Maidul Islamcb5c371a4f86
diff --git a/helm-charts/secrets-operator/Chart.yaml b/helm-charts/secrets-operator/Chart.yamlindex 6a290b96c2..c3e0073b5f 100644--- a/helm-charts/secrets-operator/Chart.yaml+++ b/helm-charts/secrets-operator/Chart.yaml@@ -18,4 +18,4 @@ version: 0.1.6# incremented each time you make changes to the application. Versions are not expected to# follow Semantic Versioning. They should reflect the version the application is using.# It is recommended to use it with quotes.-appVersion: "0.1.7"+appVersion: "0.1.8"diff --git a/helm-charts/secrets-operator/templates/infisicalsecret-crd.yaml b/helm-charts/secrets-operator/templates/infisicalsecret-crd.yamlindex eee275f5e8..ceeac67093 100644--- a/helm-charts/secrets-operator/templates/infisicalsecret-crd.yaml+++ b/helm-charts/secrets-operator/templates/infisicalsecret-crd.yaml@@ -95,6 +95,9 @@ spec:- secretName- secretNamespacetype: object+ resyncInterval:+ default: 60+ type: integertokenSecretReference:properties:secretName:@@ -109,6 +112,7 @@ spec:type: objectrequired:- managedSecretReference+ - resyncIntervaltype: objectstatus:description: InfisicalSecretStatus defines the observed state of InfisicalSecretdiff --git a/k8-operator/api/v1alpha1/infisicalsecret_types.go b/k8-operator/api/v1alpha1/infisicalsecret_types.goindex 96364bf869..203394417a 100644--- a/k8-operator/api/v1alpha1/infisicalsecret_types.go+++ b/k8-operator/api/v1alpha1/infisicalsecret_types.go@@ -42,6 +42,9 @@ type InfisicalSecretSpec struct {// +kubebuilder:validation:RequiredManagedSecretReference KubeSecretReference `json:"managedSecretReference"`+ // +kubebuilder:default:=60+ ResyncInterval int `json:"resyncInterval"`+// Infisical host to pull secrets from// +kubebuilder:validation:OptionalHostAPI string `json:"hostAPI"`diff --git a/k8-operator/config/crd/bases/secrets.infisical.com_infisicalsecrets.yaml b/k8-operator/config/crd/bases/secrets.infisical.com_infisicalsecrets.yamlindex 3bcdb0020e..f47efb0614 100644--- a/k8-operator/config/crd/bases/secrets.infisical.com_infisicalsecrets.yaml+++ b/k8-operator/config/crd/bases/secrets.infisical.com_infisicalsecrets.yaml@@ -95,6 +95,9 @@ spec:- secretName- secretNamespacetype: object+ resyncInterval:+ default: 60+ type: integertokenSecretReference:properties:secretName:@@ -109,6 +112,7 @@ spec:type: objectrequired:- managedSecretReference+ - resyncIntervaltype: objectstatus:description: InfisicalSecretStatus defines the observed state of InfisicalSecretdiff --git a/k8-operator/config/samples/sample.yaml b/k8-operator/config/samples/sample.yamlindex 1109654211..971df9f7c1 100644--- a/k8-operator/config/samples/sample.yaml+++ b/k8-operator/config/samples/sample.yaml@@ -4,6 +4,7 @@ metadata:name: infisicalsecret-samplespec:hostAPI: http://localhost:7070/api+ resyncInterval: 60authentication:serviceAccount:serviceAccountSecretReference:diff --git a/k8-operator/controllers/infisicalsecret_controller.go b/k8-operator/controllers/infisicalsecret_controller.goindex ddfc39e029..7aca836512 100644--- a/k8-operator/controllers/infisicalsecret_controller.go+++ b/k8-operator/controllers/infisicalsecret_controller.go@@ -33,8 +33,8 @@ type InfisicalSecretReconciler struct {// For more details, check Reconcile and its Result here:// - https://pkg.go.dev/sigs.k8s.io/[email protected]/pkg/reconcilefunc (r *InfisicalSecretReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) {- requeueTime := time.Minute * 1var infisicalSecretCR v1alpha1.InfisicalSecret+ requeueTime := time.Minute // secondserr := r.Get(ctx, req.NamespacedName, &infisicalSecretCR)if err != nil {@@ -51,6 +51,13 @@ func (r *InfisicalSecretReconciler) Reconcile(ctx context.Context, req ctrl.Requ}}+ if infisicalSecretCR.Spec.ResyncInterval != 0 {+ requeueTime = time.Second * time.Duration(infisicalSecretCR.Spec.ResyncInterval)+ fmt.Println("Manual re-sync interval set", "requeueAfter", requeueTime)+ }++ fmt.Println("Requeue duration set", "requeueAfter", requeueTime)+// Check if the resource is already marked for deletionif infisicalSecretCR.GetDeletionTimestamp() != nil {return ctrl.Result{diff --git a/k8-operator/kubectl-install/install-secrets-operator.yaml b/k8-operator/kubectl-install/install-secrets-operator.yamlindex 6c9d5ef0db..f362bcfa1d 100644--- a/k8-operator/kubectl-install/install-secrets-operator.yaml+++ b/k8-operator/kubectl-install/install-secrets-operator.yaml@@ -101,6 +101,9 @@ spec:- secretName- secretNamespacetype: object+ resyncInterval:+ default: 60+ type: integertokenSecretReference:properties:secretName:@@ -115,6 +118,7 @@ spec:type: objectrequired:- managedSecretReference+ - resyncIntervaltype: objectstatus:description: InfisicalSecretStatus defines the observed state of InfisicalSecret