From d5ce3ff73e53498a45562a2dff4a9ec596ca65b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lauri=20V=C3=B5sandi?= Date: Wed, 31 Aug 2022 07:38:35 +0300 Subject: [PATCH] argocd: Update application definitions --- argocd/README.md | 13 ------------- argocd/applications/elastic-system.yml | 23 +++++++++++++++++++++++ argocd/applications/metallb-system.yml | 5 +++++ argocd/update.sh | 9 --------- 4 files changed, 28 insertions(+), 22 deletions(-) create mode 100644 argocd/applications/elastic-system.yml delete mode 100755 argocd/update.sh diff --git a/argocd/README.md b/argocd/README.md index 5b44b25..9a7d823 100644 --- a/argocd/README.md +++ b/argocd/README.md @@ -44,16 +44,3 @@ rm -fv id_ecdsa Have Gitea admin reset password for user `argocd` and log in with that account. Add the SSH key for user `argocd` from file `id_ecdsa.pub`. Delete any other SSH keys associated with Gitea user `argocd`. - - -# Adding applications - -To add application make sure it's manifest is placed as `application.yml` in -the relevant namespace: - -``` -./update.sh -kubectl apply -n argocd -f applications --recursive -``` - -Do not manually add manifests under `applications/` diff --git a/argocd/applications/elastic-system.yml b/argocd/applications/elastic-system.yml new file mode 100644 index 0000000..0b07bda --- /dev/null +++ b/argocd/applications/elastic-system.yml @@ -0,0 +1,23 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: elastic-system + namespace: argocd +spec: + project: default + destination: + server: 'https://kubernetes.default.svc' + namespace: elastic-system + syncPolicy: + automated: {} + syncOptions: + - CreateNamespace=true + source: + repoURL: 'git@git.k-space.ee:k-space/kube.git' + path: elastic-system + targetRevision: HEAD + ignoreDifferences: + - group: admissionregistration.k8s.io + kind: ValidatingWebhookConfiguration + jqPathExpressions: + - '.webhooks[]?.clientConfig.caBundle' diff --git a/argocd/applications/metallb-system.yml b/argocd/applications/metallb-system.yml index 5ace95a..f354860 100644 --- a/argocd/applications/metallb-system.yml +++ b/argocd/applications/metallb-system.yml @@ -15,3 +15,8 @@ spec: syncPolicy: syncOptions: - CreateNamespace=true + ignoreDifferences: + - group: apiextensions.k8s.io + kind: CustomResourceDefinition + jqPathExpressions: + - '.spec.conversion.webhook.clientConfig.caBundle' diff --git a/argocd/update.sh b/argocd/update.sh deleted file mode 100755 index c52414c..0000000 --- a/argocd/update.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash -path=$(dirname $(dirname $(realpath $0))) -for j in $path/*/application.yml; do - app=$(dirname $j) - test -f "$app/values.yml" && continue - test -f "$app/values.yaml" && continue - appname=$(basename $app) - cat application.tpl | sed -e "s/foobar/$appname/g" > applications/$appname.yml -done