Skip to content

Commit

Permalink
Add top level clustering field (#242)
Browse files Browse the repository at this point in the history
  • Loading branch information
nrfox authored Jan 12, 2024
1 parent a41a14d commit 47c2b08
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
4 changes: 2 additions & 2 deletions kiali-server/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,8 @@ Returns a JSON dict whose keys are the cluster names and values are the cluster
*/}}
{{- define "kiali-server.remote-cluster-secrets" -}}
{{- $theDict := dict }}
{{- if .Values.kiali_feature_flags.clustering.autodetect_secrets.enabled }}
{{- $secretLabelToLookFor := (regexSplit "=" .Values.kiali_feature_flags.clustering.autodetect_secrets.label 2) }}
{{- if .Values.clustering.autodetect_secrets.enabled }}
{{- $secretLabelToLookFor := (regexSplit "=" .Values.clustering.autodetect_secrets.label 2) }}
{{- $secretLabelNameToLookFor := first $secretLabelToLookFor }}
{{- $secretLabelValueToLookFor := last $secretLabelToLookFor }}
{{- range $i, $secret := (lookup "v1" "Secret" .Release.Namespace "").items }}
Expand Down
4 changes: 2 additions & 2 deletions kiali-server/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ spec:
- name: {{ $key }}
mountPath: "/kiali-remote-cluster-secrets/{{ $val }}"
{{- end }}
{{- range .Values.kiali_feature_flags.clustering.clusters }}
{{- range .Values.clustering.clusters }}
- name: {{ .name }}
mountPath: "/kiali-remote-cluster-secrets/{{ .secret_name }}"
{{- end }}
Expand Down Expand Up @@ -174,7 +174,7 @@ spec:
secret:
secretName: {{ $val }}
{{- end }}
{{- range .Values.kiali_feature_flags.clustering.clusters }}
{{- range .Values.clustering.clusters }}
- name: {{ .name }}
secret:
secretName: {{ .secret_name }}
Expand Down
11 changes: 6 additions & 5 deletions kiali-server/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ auth:
openshift: {}
strategy: ""

clustering:
autodetect_secrets:
enabled: true
label: "kiali.io/multiCluster=true"
clusters: []

deployment:
# This only limits what Kiali will attempt to see, but Kiali Service Account has permissions to see everything.
# For more control over what the Kial Service Account can see, use the Kiali Operator
Expand Down Expand Up @@ -98,11 +104,6 @@ kiali_feature_flags:
secrets:
- cacerts
- istio-ca-secret
clustering:
autodetect_secrets:
enabled: true
label: "kiali.io/multiCluster=true"
clusters: []
disabled_features: []
validations:
ignore: ["KIA1301"]
Expand Down

0 comments on commit 47c2b08

Please sign in to comment.