From 59d1a9225cd778ece4415835d833064e544bd336 Mon Sep 17 00:00:00 2001 From: Zsolt Varga Date: Fri, 21 Jan 2022 14:41:51 +0100 Subject: [PATCH 1/2] fix istiod clusterrolebinding --- .../manifests/istio-discovery/templates/clusterrolebinding.yaml | 2 +- internal/assets/manifests/istio-discovery/values.yaml.tpl | 1 + internal/components/discovery/testdata/icp-expected-values.yaml | 1 + .../discovery/testdata/icp-passive-expected-values.yaml | 1 + 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/internal/assets/manifests/istio-discovery/templates/clusterrolebinding.yaml b/internal/assets/manifests/istio-discovery/templates/clusterrolebinding.yaml index ad110b0a1..f42a353d1 100644 --- a/internal/assets/manifests/istio-discovery/templates/clusterrolebinding.yaml +++ b/internal/assets/manifests/istio-discovery/templates/clusterrolebinding.yaml @@ -13,5 +13,5 @@ roleRef: subjects: - kind: ServiceAccount name: {{ include "name-with-revision" ( dict "name" "istiod" "context" $) }} - namespace: {{ .Values.global.istioNamespace }} + namespace: {{ .Release.Namespace }} {{- end }} diff --git a/internal/assets/manifests/istio-discovery/values.yaml.tpl b/internal/assets/manifests/istio-discovery/values.yaml.tpl index e308a85f2..828d6655a 100644 --- a/internal/assets/manifests/istio-discovery/values.yaml.tpl +++ b/internal/assets/manifests/istio-discovery/values.yaml.tpl @@ -122,6 +122,7 @@ telemetry: {{- end }} {{- define "global" }} +istioNamespace: "{{ .Namespace }}" {{ valueIf (dict "key" "distribution" "value" .GetSpec.GetDistribution) }} {{- if .GetSpec.GetMode }} mode: {{ .GetSpec.GetMode | toString }} diff --git a/internal/components/discovery/testdata/icp-expected-values.yaml b/internal/components/discovery/testdata/icp-expected-values.yaml index add529ad6..ce19924aa 100644 --- a/internal/components/discovery/testdata/icp-expected-values.yaml +++ b/internal/components/discovery/testdata/icp-expected-values.yaml @@ -1,4 +1,5 @@ global: + istioNamespace: istio-system proxy: image: proxyv2 privileged: false diff --git a/internal/components/discovery/testdata/icp-passive-expected-values.yaml b/internal/components/discovery/testdata/icp-passive-expected-values.yaml index d483f348d..cf6aa0bd9 100644 --- a/internal/components/discovery/testdata/icp-passive-expected-values.yaml +++ b/internal/components/discovery/testdata/icp-passive-expected-values.yaml @@ -1,4 +1,5 @@ global: + istioNamespace: istio-system meshID: mesh1 mode: PASSIVE multiCluster: From 1a623b5a4c572193391f11abd5de378de93c9e74 Mon Sep 17 00:00:00 2001 From: Zsolt Varga Date: Fri, 21 Jan 2022 15:32:57 +0100 Subject: [PATCH 2/2] fix image location in kustomize config --- config/manager/kustomization.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/manager/kustomization.yaml b/config/manager/kustomization.yaml index 8f4095771..9eab1e60d 100644 --- a/config/manager/kustomization.yaml +++ b/config/manager/kustomization.yaml @@ -4,4 +4,4 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization images: - name: controller - newName: banzaicloud/istio-operator + newName: ghcr.io/banzaicloud/istio-operator