chore: rename files, merge files

This commit is contained in:
Andrei Kartashov 2023-09-04 11:24:36 +07:00
parent b710c3999b
commit e663f54ffe
6 changed files with 43 additions and 41 deletions

View file

@ -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 \

View file

@ -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: '*'

View file

@ -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:

View file

@ -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: '*'

View file

@ -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: