From c8994d16e61917fbaf26bbe77529f591de43547a Mon Sep 17 00:00:00 2001 From: John Mazzitelli Date: Mon, 2 May 2022 16:05:33 -0400 Subject: [PATCH] be able to add containers to Kiali pod part of: https://github.com/kiali/kiali/issues/5028 operator PR: https://github.com/kiali/kiali-operator/pull/524 --- kiali-operator/templates/deployment.yaml | 2 ++ kiali-operator/values.yaml | 4 ++++ kiali-server/templates/deployment.yaml | 3 +++ kiali-server/values.yaml | 1 + 4 files changed, 10 insertions(+) diff --git a/kiali-operator/templates/deployment.yaml b/kiali-operator/templates/deployment.yaml index 5f70bb4..02db826 100644 --- a/kiali-operator/templates/deployment.yaml +++ b/kiali-operator/templates/deployment.yaml @@ -88,6 +88,8 @@ spec: - name: ALLOW_AD_HOC_OSSMCONSOLE_IMAGE value: {{ .Values.allowAdHocOSSMConsoleImage | quote }} {{- end }} + - name: ALLOW_AD_HOC_CONTAINERS + value: {{ .Values.allowAdHocContainers | quote }} - name: ALLOW_SECURITY_CONTEXT_OVERRIDE value: {{ .Values.allowSecurityContextOverride | quote }} - name: ALLOW_ALL_ACCESSIBLE_NAMESPACES diff --git a/kiali-operator/values.yaml b/kiali-operator/values.yaml index 0827938..16de348 100644 --- a/kiali-operator/values.yaml +++ b/kiali-operator/values.yaml @@ -77,6 +77,10 @@ allowAdHocKialiImage: false # This is only applicable when running on OpenShift. allowAdHocOSSMConsoleImage: false +# allowAdHocContainers tells the operator to allow a user to be able to install additional pod containers to the Kiali pod. +# In other words, it will allow the Kiali CR spec.deployment.additional_pod_containers_yaml to be configured by the user. +allowAdHocContainers: false + # allowSecurityContextOverride tells the operator to allow a user to be able to fully override the Kiali # container securityContext. If this is false, certain securityContext settings must exist on the Kiali # container and any attempt to override them will be ignored. diff --git a/kiali-server/templates/deployment.yaml b/kiali-server/templates/deployment.yaml index 0a21a72..5722928 100644 --- a/kiali-server/templates/deployment.yaml +++ b/kiali-server/templates/deployment.yaml @@ -139,6 +139,9 @@ spec: resources: {{- toYaml .Values.deployment.resources | nindent 10 }} {{- end }} + {{- if .Values.deployment.additional_pod_containers_yaml }} + {{- toYaml .Values.deployment.additional_pod_containers_yaml | nindent 6 }} + {{- end }} volumes: - name: {{ include "kiali-server.fullname" . }}-configuration configMap: diff --git a/kiali-server/values.yaml b/kiali-server/values.yaml index 26cd58b..e60f52c 100644 --- a/kiali-server/values.yaml +++ b/kiali-server/values.yaml @@ -35,6 +35,7 @@ deployment: # For more control over what the Kial Service Account can see, use the Kiali Operator accessible_namespaces: - "**" + additional_pod_containers_yaml: {} additional_service_yaml: {} affinity: node: {}