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