From 845edb0a5d662cf0be4a65bd4b41888b39bbc827 Mon Sep 17 00:00:00 2001 From: Nati Fridman Date: Mon, 9 Oct 2023 19:29:33 +0300 Subject: [PATCH] Update ZTP Argo CD base. - Remove `.spec.resourceCustomizations` as deprecated - Update Argo CD to `v1beta1` --- .../default/openshift-gitops-argocd.yaml | 47 ++++++++++--------- 1 file changed, 26 insertions(+), 21 deletions(-) diff --git a/components/argocd/overlays/default/openshift-gitops-argocd.yaml b/components/argocd/overlays/default/openshift-gitops-argocd.yaml index 2957918..847a861 100644 --- a/components/argocd/overlays/default/openshift-gitops-argocd.yaml +++ b/components/argocd/overlays/default/openshift-gitops-argocd.yaml @@ -1,5 +1,5 @@ --- -apiVersion: argoproj.io/v1alpha1 +apiVersion: argoproj.io/v1beta1 kind: ArgoCD metadata: name: openshift-gitops @@ -83,32 +83,37 @@ spec: cpu: 250m memory: 256Mi # yamllint disable rule:line-length - resourceCustomizations: | - bitnami.com/SealedSecret: - health.lua: | + resourceHealthChecks: + - group: bitnami.com + kind: SealedSecret + check: | hs = {} hs.status = "Healthy" hs.message = "Controller doesnt report status" return hs - route.openshift.io/Route: - ignoreDifferences: | - jsonPointers: - - /spec/host - internal.open-cluster-management.io/ManagedClusterInfo: - health.lua: | - hs = {} - if obj.status ~= nil and obj.status.conditions ~= nil then - for i, condition in ipairs(obj.status.conditions) do - if condition.status == "True" and condition.reason == "ManagedClusterInfoSynced" then - hs.status = "Healthy" - hs.message = "Managed cluster is added to hub cluster" - return hs - end + - group: internal.open-cluster-management.io + kind: ManagedClusterInfo + check: | + hs = {} + if obj.status ~= nil and obj.status.conditions ~= nil then + for i, condition in ipairs(obj.status.conditions) do + if condition.status == "True" and condition.reason == "ManagedClusterInfoSynced" then + hs.status = "Healthy" + hs.message = "Managed cluster is added to hub cluster" + return hs end end - hs.status = "Progressing" - hs.message = "Waiting for managed cluster to be deployed." - return hs + end + hs.status = "Progressing" + hs.message = "Waiting for managed cluster to be deployed." + return hs + resourceIgnoreDifferences: + resourceIdentifiers: + - group: route.openshift.io + kind: Route + customization: + jsonPointers: + - /spec/host # yamllint enable rule:line-length resourceExclusions: | - apiGroups: