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