Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

be able to disable namespace watching by configuring the operator watches file #257

Merged
merged 1 commit into from
May 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading