Browse Source

chore(charts): Expose storeRequeueInterval in helm charts (#6140)

Co-authored-by: Jean-Philippe Evrard <jean-philippe.evrard+rochepub@external.roche.com>
Co-authored-by: Gergely Bräutigam <gergely.brautigam@sap.com>
Signed-off-by: Jean-Philippe Evrard <jean-philippe.evrard+rochepub@external.roche.com>
jfhcagip 1 week ago
parent
commit
7455c7605e

+ 1 - 0
deploy/charts/external-secrets/README.md

@@ -243,6 +243,7 @@ The command removes all the Kubernetes components associated with the chart and
 | serviceMonitor.relabelings | list | `[]` | Relabel configs to apply to samples before ingestion. [Relabeling](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config) |
 | serviceMonitor.renderMode | string | `"skipIfMissing"` | How should we react to missing CRD "`monitoring.coreos.com/v1/ServiceMonitor`"  Possible values: - `skipIfMissing`: Only render ServiceMonitor resources if CRD is present, skip if missing. - `failIfMissing`: Fail Helm install if CRD is not present. - `alwaysRender` : Always render ServiceMonitor resources, do not check for CRD. @schema enum: - skipIfMissing - failIfMissing - alwaysRender @schema |
 | serviceMonitor.scrapeTimeout | string | `"25s"` | Timeout if metrics can't be retrieved in given time interval |
+| storeRequeueInterval | string | `""` | Default time duration between reconciling (Cluster)SecretStores. |
 | strategy | object | `{}` | Set deployment strategy |
 | systemAuthDelegator | bool | `false` | If true the system:auth-delegator ClusterRole will be added to RBAC |
 | tolerations | list | `[]` |  |

+ 3 - 0
deploy/charts/external-secrets/templates/deployment.yaml

@@ -100,6 +100,9 @@ spec:
           {{- if not .Values.processSecretStore }}
           - --enable-secret-store-reconciler=false
           {{- end }}
+          {{- if .Values.storeRequeueInterval }}
+          - --store-requeue-interval={{ .Values.storeRequeueInterval }}
+          {{- end }}
           {{- if .Values.controllerClass }}
           - --controller-class={{ .Values.controllerClass }}
           {{- end }}

+ 13 - 0
deploy/charts/external-secrets/tests/controller_test.yaml

@@ -472,3 +472,16 @@ tests:
       - contains:
           path: spec.template.spec.containers[0].args
           content: "--zap-time-encoding=epoch"
+  - it: should omit store-requeue-interval flag by default
+    asserts:
+      - notContains:
+          path: spec.template.spec.containers[0].args
+          content: "--store-requeue-interval"
+  - it: should render store-requeue-interval flag when set
+    set:
+      storeRequeueInterval: "30s"
+    asserts:
+      - contains:
+          path: spec.template.spec.containers[0].args
+          content: "--store-requeue-interval=30s"
+

+ 3 - 0
deploy/charts/external-secrets/values.schema.json

@@ -912,6 +912,9 @@
                 }
             }
         },
+        "storeRequeueInterval": {
+            "type": "string"
+        },
         "strategy": {
             "type": "object"
         },

+ 3 - 0
deploy/charts/external-secrets/values.yaml

@@ -132,6 +132,9 @@ processClusterStore: true
 # -- if true, the operator will process secret store. Else, it will ignore them.
 processSecretStore: true
 
+# -- Default time duration between reconciling (Cluster)SecretStores.
+storeRequeueInterval: ""
+
 # -- if true, the operator will process cluster generator. Else, it will ignore them.
 processClusterGenerator: true