Skip to content

Commit 3d7d76f

Browse files
authored
Merge pull request istio-ecosystem#160 from istio-ecosystem/periodic-reconcile-change-default-1
Make all options configurable via helm values
2 parents 21b9f63 + 4217201 commit 3d7d76f

File tree

4 files changed

+29
-3
lines changed

4 files changed

+29
-3
lines changed

ARCHITECTURE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ flowchart TD
218218
| `--compare-hub` | false | Require container image registry to match ConfigMap hub when detecting outdated pods |
219219
| `--restart-delay` | 0 | Delay between restarting each workload (e.g., 5s) |
220220
| `--istiod-config-read-delay` | 10s | Wait for Istiod to read updated ConfigMap before scanning |
221-
| `--reconcile-period` | 1h | Period between full reconciliations; 0 disables periodic reconcile |
221+
| `--reconcile-period` | 0 | Period between full reconciliations; 0 disables periodic reconcile |
222222
| `--annotation-cooldown` | 5m | Skip re-annotating if workload was annotated within this duration |
223223
| `--skip-namespaces` | kube-system,istio-system | Comma-separated namespaces to skip when scanning pods |
224224

cmd/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ func main() {
131131
"Delay between restarting each workload (e.g. 5s). Use 0 for no delay.")
132132
pflag.DurationVar(&istiodConfigReadDelay, "istiod-config-read-delay", 10*time.Second,
133133
"Wait for Istiod to read the updated ConfigMap before scanning (e.g. 10s). Use 0 to skip.")
134-
pflag.DurationVar(&reconcilePeriod, "reconcile-period", 1*time.Hour,
134+
pflag.DurationVar(&reconcilePeriod, "reconcile-period", 0,
135135
"Period between full reconciliations of all istio-sidecar-injector ConfigMaps. "+
136136
"Use 0 to disable periodic reconciliation.")
137137
pflag.DurationVar(&annotationCooldown, "annotation-cooldown", 5*time.Minute,

helm/src/chart/templates/manager/manager.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,13 @@ spec:
4444
- --metrics-bind-address=0
4545
{{- end }}
4646
- --health-probe-bind-address=:8081
47+
- --reconcile-period={{ (.Values.fortsaOptions).reconcilePeriod | default "10h" }}
48+
- --dry-run={{ (.Values.fortsaOptions).dryRun | default false }}
49+
- --compare-hub={{ (.Values.fortsaOptions).compareHub | default false }}
50+
- --restart-delay={{ (.Values.fortsaOptions).restartDelay | default "10s" }}
51+
- --istiod-config-read-delay={{ (.Values.fortsaOptions).istiodConfigReadDelay | default "10s" }}
52+
- --annotation-cooldown={{ (.Values.fortsaOptions).annotationCooldown | default "5m" }}
53+
- --skip-namespaces={{ (.Values.fortsaOptions).skipNamespaces | default "kube-system,istio-system" }}
4754
{{- range .Values.manager.args }}
4855
- {{ . }}
4956
{{- end }}

helm/src/chart/values.yaml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,26 @@
66
##
77
# fullnameOverride: ""
88

9+
## Fortsa controller options
10+
##
11+
fortsaOptions:
12+
## Period between full reconciliations of all istio-sidecar-injector ConfigMaps.
13+
## Use "0" to disable periodic reconciliation.
14+
reconcilePeriod: "10h"
15+
## If true, log what would be done without annotating workloads.
16+
dryRun: false
17+
## If true, require container image registry to match ConfigMap hub when detecting outdated pods.
18+
## This is useful if something mutates the registry part of pod images
19+
compareHub: false
20+
## Delay between restarting each workload (e.g. 5s). Use "0" for no delay.
21+
restartDelay: "10s"
22+
## Wait for Istiod to read the updated ConfigMap before scanning (e.g. 10s). Use "0" to skip.
23+
istiodConfigReadDelay: "10s"
24+
## Skip re-annotating a workload if it was annotated within this duration. Use "0" to disable.
25+
annotationCooldown: "5m"
26+
## Comma-separated list of namespaces to skip when scanning pods for outdated sidecars.
27+
skipNamespaces: "kube-system,istio-system"
28+
929
## Configure the controller manager deployment
1030
##
1131
manager:
@@ -18,7 +38,6 @@ manager:
1838
##
1939
args:
2040
- --leader-elect
21-
- --annotation-cooldown=5m
2241
## Environment variables
2342
##
2443
env: []

0 commit comments

Comments
 (0)