diff --git a/kiali-operator/templates/deployment.yaml b/kiali-operator/templates/deployment.yaml index 5f70bb4..ced80b4 100644 --- a/kiali-operator/templates/deployment.yaml +++ b/kiali-operator/templates/deployment.yaml @@ -49,11 +49,7 @@ spec: args: - "--zap-log-level=info" - "--leader-election-id={{ include "kiali-operator.fullname" . }}" -{{- if .Capabilities.APIVersions.Has "route.openshift.io/v1" }} - - "--watches-file=./watches-os.yaml" -{{- else }} - - "--watches-file=./watches-k8s.yaml" -{{- end }} + - "--watches-file=./$(WATCHES_FILE)" securityContext: {{- if .Values.securityContext }} {{- toYaml .Values.securityContext | nindent 10 }} @@ -114,6 +110,16 @@ spec: value: "/tmp/ansible/tmp" - name: ANSIBLE_REMOTE_TEMP value: "/tmp/ansible/tmp" + - name: WATCHES_FILE +{{- if .Values.watchesFile }} + value: "{{ .Values.watchesFile }}" +{{- else }} +{{- if .Capabilities.APIVersions.Has "route.openshift.io/v1" }} + value: "watches-os.yaml" +{{- else }} + value: "watches-k8s.yaml" +{{- end }} +{{- end }} {{- if .Values.env }} {{- toYaml .Values.env | nindent 8 }} {{- end }} diff --git a/kiali-operator/values.yaml b/kiali-operator/values.yaml index 0827938..0ece40f 100644 --- a/kiali-operator/values.yaml +++ b/kiali-operator/values.yaml @@ -99,6 +99,14 @@ allowAllAccessibleNamespaces: true # of the Istio control plane namespace (which is typically, but not necessarily, "istio-system"). accessibleNamespacesLabel: "" +# watchesFile: If specified, this determines what watches file will be used to configure the operator. There are four different +# files that can be selected: (a) `watches-os.yaml`, (b) `watches-os-ns.yaml`, (c) `watches-k8s.yaml` or (d) `watches-k8s-ns.yaml`. +# The first two are for OpenShift only, the last two are for non-OpenShift Kubernetes clusters. The two with "-ns" in their name +# enable the operator to automatically update the Kiali Server with access to new namespaces as those namespaces are created in +# the cluster. This namespace watching feature provides some advanced capabilities but is never required. It is also not +# the default behavior and is not necessary if your Kiali CRs will have `spec.deployment.cluster_wide_access` set to `true`. +watchesFile: "" + # For what a Kiali CR spec can look like, see: # https://github.com/kiali/kiali-operator/blob/master/deploy/kiali/kiali_cr.yaml cr: