From e663f54ffe59ae13a1eb384f5e35f82173e7d355 Mon Sep 17 00:00:00 2001 From: Andrei Kartashov Date: Mon, 4 Sep 2023 11:24:36 +0700 Subject: [PATCH] chore: rename files, merge files --- scripts/bootstrap.sh | 8 +++----- state/gullfaxi/apps-project.yaml | 18 ----------------- .../{apps-application.yaml => apps.yaml} | 20 +++++++++++++++++++ state/gullfaxi/system-project.yaml | 18 ----------------- .../{system-application.yaml => system.yaml} | 20 +++++++++++++++++++ ...{argo-cd-application.yaml => argo-cd.yaml} | 0 6 files changed, 43 insertions(+), 41 deletions(-) delete mode 100644 state/gullfaxi/apps-project.yaml rename state/gullfaxi/{apps-application.yaml => apps.yaml} (56%) delete mode 100644 state/gullfaxi/system-project.yaml rename state/gullfaxi/{system-application.yaml => system.yaml} (60%) rename state/gullfaxi/system/{argo-cd-application.yaml => argo-cd.yaml} (100%) diff --git a/scripts/bootstrap.sh b/scripts/bootstrap.sh index 925e1cf..95d4d94 100755 --- a/scripts/bootstrap.sh +++ b/scripts/bootstrap.sh @@ -25,7 +25,7 @@ function main() { # apply manifests for crucial applications for app_file in \ - ${state_path}/system/argo-cd-application.yaml \ + ${state_path}/system/argo-cd.yaml \ ; do namespace=$(yq -e '.spec.destination.namespace' ${app_file}) ${kubectl_cmd} create ns ${namespace} || true @@ -33,10 +33,8 @@ function main() { done ${kubectl_cmd} apply -n argocd -R \ - -f ${state_path}/apps-application.yaml \ - -f ${state_path}/apps-project.yaml \ - -f ${state_path}/system-application.yaml \ - -f ${state_path}/system-project.yaml + -f ${state_path}/apps.yaml \ + -f ${state_path}/system.yaml # wait for argocd to create argocd-initial-admin-secret ${kubectl_cmd} -n argocd wait --timeout=300s \ diff --git a/state/gullfaxi/apps-project.yaml b/state/gullfaxi/apps-project.yaml deleted file mode 100644 index b7b3d83..0000000 --- a/state/gullfaxi/apps-project.yaml +++ /dev/null @@ -1,18 +0,0 @@ -apiVersion: argoproj.io/v1alpha1 -kind: AppProject -metadata: - name: apps - namespace: argocd - # Finalizer that ensures that project is not deleted until it is not referenced by any application - finalizers: - - resources-finalizer.argocd.argoproj.io -spec: - description: Project for user applications - sourceRepos: - - '*' - destinations: - - namespace: '*' - server: '*' - clusterResourceWhitelist: - - group: '*' - kind: '*' diff --git a/state/gullfaxi/apps-application.yaml b/state/gullfaxi/apps.yaml similarity index 56% rename from state/gullfaxi/apps-application.yaml rename to state/gullfaxi/apps.yaml index 19599ef..bb7b122 100644 --- a/state/gullfaxi/apps-application.yaml +++ b/state/gullfaxi/apps.yaml @@ -1,3 +1,23 @@ +--- +apiVersion: argoproj.io/v1alpha1 +kind: AppProject +metadata: + name: apps + namespace: argocd + # Finalizer that ensures that project is not deleted until it is not referenced by any application + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + description: Project for user applications + sourceRepos: + - '*' + destinations: + - namespace: '*' + server: '*' + clusterResourceWhitelist: + - group: '*' + kind: '*' +--- apiVersion: argoproj.io/v1alpha1 kind: Application metadata: diff --git a/state/gullfaxi/system-project.yaml b/state/gullfaxi/system-project.yaml deleted file mode 100644 index d20c14c..0000000 --- a/state/gullfaxi/system-project.yaml +++ /dev/null @@ -1,18 +0,0 @@ -apiVersion: argoproj.io/v1alpha1 -kind: AppProject -metadata: - name: system - namespace: argocd - # Finalizer that ensures that project is not deleted until it is not referenced by any application - finalizers: - - resources-finalizer.argocd.argoproj.io -spec: - description: Project for "system" applications - sourceRepos: - - '*' - destinations: - - namespace: '*' - server: '*' - clusterResourceWhitelist: - - group: '*' - kind: '*' diff --git a/state/gullfaxi/system-application.yaml b/state/gullfaxi/system.yaml similarity index 60% rename from state/gullfaxi/system-application.yaml rename to state/gullfaxi/system.yaml index babef71..2cba687 100644 --- a/state/gullfaxi/system-application.yaml +++ b/state/gullfaxi/system.yaml @@ -1,3 +1,23 @@ +--- +apiVersion: argoproj.io/v1alpha1 +kind: AppProject +metadata: + name: system + namespace: argocd + # Finalizer that ensures that project is not deleted until it is not referenced by any application + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + description: Project for "system" applications + sourceRepos: + - '*' + destinations: + - namespace: '*' + server: '*' + clusterResourceWhitelist: + - group: '*' + kind: '*' +--- apiVersion: argoproj.io/v1alpha1 kind: Application metadata: diff --git a/state/gullfaxi/system/argo-cd-application.yaml b/state/gullfaxi/system/argo-cd.yaml similarity index 100% rename from state/gullfaxi/system/argo-cd-application.yaml rename to state/gullfaxi/system/argo-cd.yaml