cmd/k8s-operator: fix type comparison in apiserver proxy template (#17981)

ArgoCD sends boolean values but the template expects strings, causing
"incompatible types for comparison" errors. Wrap values with toString
so both work.

Fixes #17158

Signed-off-by: Raj Singh <raj@tailscale.com>
pull/17987/head
Raj Singh 3 weeks ago committed by GitHub
parent e1dd9222d4
commit 62d64c05e1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -3,8 +3,8 @@
# If old setting used, enable both old (operator) and new (ProxyGroup) workflows.
# If new setting used, enable only new workflow.
{{ if or (eq .Values.apiServerProxyConfig.mode "true")
(eq .Values.apiServerProxyConfig.allowImpersonation "true") }}
{{ if or (eq (toString .Values.apiServerProxyConfig.mode) "true")
(eq (toString .Values.apiServerProxyConfig.allowImpersonation) "true") }}
apiVersion: v1
kind: ServiceAccount
metadata:
@ -25,7 +25,7 @@ kind: ClusterRoleBinding
metadata:
name: tailscale-auth-proxy
subjects:
{{- if eq .Values.apiServerProxyConfig.mode "true" }}
{{- if eq (toString .Values.apiServerProxyConfig.mode) "true" }}
- kind: ServiceAccount
name: operator
namespace: {{ .Release.Namespace }}

Loading…
Cancel
Save