Skip to content

Commit 69a2d82

Browse files
committed
fix(argocd-image-updater): make metricsSecure and enableHTTP2 fully optional
These flags only apply to the new controller-runtime based `run` command and should not be rendered unless explicitly set by the user. Default to empty string so the flags are omitted entirely when not configured. Signed-off-by: Ilia Lazebnik <[email protected]> Signed-off-by: Ilia <[email protected]>
1 parent c9ab6e0 commit 69a2d82

3 files changed

Lines changed: 12 additions & 10 deletions

File tree

charts/argocd-image-updater/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ The `config.registries` value can be used exactly as it looks in the documentati
112112
| createClusterRoles | bool | `true` | Create cluster roles for cluster-wide installation. |
113113
| dualStack.ipFamilies | list | `[]` | IP families that should be supported and the order in which they should be applied to ClusterIP as well. Can be IPv4 and/or IPv6. |
114114
| dualStack.ipFamilyPolicy | string | `""` | IP family policy to configure dual-stack see [Configure dual-stack](https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services) |
115-
| enableHTTP2 | bool | `false` | Enable HTTP/2 for the metrics and webhook servers |
115+
| enableHTTP2 | string | `""` | Enable HTTP/2 for the metrics and webhook servers. Upstream default is `false`. Only applies to the new `run` command (controller-runtime based). Leave empty to omit the flag entirely. @type -- bool |
116116
| extraArgs | list | `[]` | Extra arguments for argocd-image-updater not defined in `config.argocd`. If a flag contains both key and value, they need to be split to a new entry. |
117117
| extraEnv | list | `[]` | Extra environment variables for argocd-image-updater. |
118118
| extraEnvFrom | list | `[]` | Extra envFrom to pass to argocd-image-updater |
@@ -144,7 +144,7 @@ The `config.registries` value can be used exactly as it looks in the documentati
144144
| metrics.serviceMonitor.namespace | string | `""` | Prometheus ServiceMonitor namespace |
145145
| metrics.serviceMonitor.relabelings | list | `[]` | Prometheus [RelabelConfigs] to apply to samples before scraping |
146146
| metrics.serviceMonitor.selector | object | `{}` | Prometheus ServiceMonitor selector |
147-
| metricsSecure | bool | `true` | Serve metrics endpoint securely via HTTPS (default `true`). Set to `false` to use HTTP |
147+
| metricsSecure | string | `""` | Serve metrics endpoint securely via HTTPS. Upstream default is `true`. Only applies to the new `run` command (controller-runtime based). Leave empty to omit the flag entirely. @type -- bool |
148148
| nameOverride | string | `""` | Global name (argocd-image-updater.name in _helpers.tpl) override |
149149
| namespaceOverride | string | `""` | Global namespace (argocd-image-updater.namespace in _helpers.tpl) override |
150150
| nodeSelector | object | `{}` | Kubernetes nodeSelector settings for the deployment |

charts/argocd-image-updater/templates/deployment.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@ spec:
3737
args:
3838
- --metrics-bind-address=:{{ .Values.containerPorts.metrics }}
3939
- --health-probe-bind-address=:{{ .Values.containerPorts.health }}
40-
{{- if not .Values.metricsSecure }}
41-
- --metrics-secure=false
40+
{{- if kindIs "bool" .Values.metricsSecure }}
41+
- --metrics-secure={{ .Values.metricsSecure }}
4242
{{- end }}
43-
{{- if .Values.enableHTTP2 }}
44-
- --enable-http2
43+
{{- if kindIs "bool" .Values.enableHTTP2 }}
44+
- --enable-http2={{ .Values.enableHTTP2 }}
4545
{{- end }}
4646
- run
4747
{{- with .Values.extraArgs }}

charts/argocd-image-updater/values.yaml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,13 @@ namespaceOverride: ""
3636
## If you want to use this, please set `.Values.rbac.enabled` true as well.
3737
createClusterRoles: true
3838

39-
# -- Serve metrics endpoint securely via HTTPS (default `true`). Set to `false` to use HTTP
40-
metricsSecure: true
39+
# -- Serve metrics endpoint securely via HTTPS. Upstream default is `true`. Only applies to the new `run` command (controller-runtime based). Leave empty to omit the flag entirely.
40+
# @type -- bool
41+
metricsSecure: ""
4142

42-
# -- Enable HTTP/2 for the metrics and webhook servers
43-
enableHTTP2: false
43+
# -- Enable HTTP/2 for the metrics and webhook servers. Upstream default is `false`. Only applies to the new `run` command (controller-runtime based). Leave empty to omit the flag entirely.
44+
# @type -- bool
45+
enableHTTP2: ""
4446

4547
# -- Extra arguments for argocd-image-updater not defined in `config.argocd`.
4648
# If a flag contains both key and value, they need to be split to a new entry.

0 commit comments

Comments
 (0)