Skip to content

Commit

Permalink
be able to disable namespace watching by configuring the operator wat…
Browse files Browse the repository at this point in the history
…ches file (#257)

part of: kiali/kiali#7322
  • Loading branch information
jmazzitelli authored May 3, 2024
1 parent e3b8098 commit 5703675
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
16 changes: 11 additions & 5 deletions kiali-operator/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down Expand Up @@ -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 }}
Expand Down
8 changes: 8 additions & 0 deletions kiali-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 5703675

Please sign in to comment.