From c36dfc8341e0b1bf517f62c6870262490cdf46a6 Mon Sep 17 00:00:00 2001 From: John Mazzitelli Date: Fri, 27 Oct 2023 10:15:22 -0400 Subject: [PATCH] Provide different OpenShift and non-OpenShift watches yaml files fixes: https://github.com/kiali/kiali/issues/6790 --- build/Dockerfile | 3 ++- .../kiali.clusterserviceversion.yaml | 1 + watches-k8s.yaml | 24 +++++++++++++++++++ watches.yaml => watches-os.yaml | 1 + 4 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 watches-k8s.yaml rename watches.yaml => watches-os.yaml (97%) diff --git a/build/Dockerfile b/build/Dockerfile index 6c07c80b..9fca0bb3 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -10,7 +10,8 @@ USER ${USER_UID} COPY roles/ ${HOME}/roles/ COPY playbooks/ ${HOME}/playbooks/ -COPY watches.yaml ${HOME}/watches.yaml +COPY watches-k8s.yaml ${HOME}/watches-k8s.yaml +COPY watches-os.yaml ${HOME}/watches-os.yaml COPY requirements.yml ${HOME}/requirements.yml RUN ansible-galaxy collection install -r ${HOME}/requirements.yml \ diff --git a/manifests/kiali-ossm/manifests/kiali.clusterserviceversion.yaml b/manifests/kiali-ossm/manifests/kiali.clusterserviceversion.yaml index 074ac821..540e7be2 100644 --- a/manifests/kiali-ossm/manifests/kiali.clusterserviceversion.yaml +++ b/manifests/kiali-ossm/manifests/kiali.clusterserviceversion.yaml @@ -257,6 +257,7 @@ spec: args: - "--zap-log-level=info" - "--leader-election-id=kiali-operator" + - "--watches-file=./watches-os.yaml" securityContext: allowPrivilegeEscalation: false privileged: false diff --git a/watches-k8s.yaml b/watches-k8s.yaml new file mode 100644 index 00000000..5d407a5d --- /dev/null +++ b/watches-k8s.yaml @@ -0,0 +1,24 @@ +# KUBERNETES/NON-OPENSHIFT WATCHES YAML +--- +# The normal Kiali CR processing playbook +- version: v1alpha1 + group: kiali.io + kind: Kiali + playbook: playbooks/kiali-deploy.yml + reconcilePeriod: "0s" + watchDependentResources: False + watchClusterScopedResources: False + watchAnnotationsChanges: True + finalizer: + name: kiali.io/finalizer + playbook: playbooks/kiali-remove.yml +# Watching new namespaces so the operator can determine if they should be accessible to Kiali +- version: v1 + group: "" + kind: Namespace + playbook: playbooks/kiali-new-namespace-detected.yml + reconcilePeriod: "0s" + manageStatus: False + watchDependentResources: False + watchClusterScopedResources: False + watchAnnotationsChanges: False diff --git a/watches.yaml b/watches-os.yaml similarity index 97% rename from watches.yaml rename to watches-os.yaml index e30a68a7..49cd6711 100644 --- a/watches.yaml +++ b/watches-os.yaml @@ -1,3 +1,4 @@ +# OPENSHIFT WATCHES YAML --- # The normal Kiali CR processing playbook - version: v1alpha1