Use kustomize for apps layer

This commit is contained in:
Khue Doan 2021-05-23 02:56:21 +07:00
parent 668580e8b1
commit 959c74c542
10 changed files with 25 additions and 7 deletions

View File

@ -3,14 +3,10 @@
KUBECONFIG = ../infra/kube_config.yaml
default: init apply
init:
kubectl create namespace argocd --dry-run=client -o yaml | kubectl apply -f -
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
default: apply
apply:
kubectl --namespace argocd apply --filename .
kubectl apply --kustomize .
delete:
kubectl --namespace argocd delete --filename .
kubectl delete --kustomize .

18
apps/kustomization.yaml Normal file
View File

@ -0,0 +1,18 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
# Prerequisites
- resources/namespace.yaml
- github.com/argoproj/argo-cd//manifests/cluster-install?ref=v2.0.2
# System
- resources/cert-manager.yaml
- resources/longhorn.yaml
- resources/metallb.yaml
- resources/nginx.yaml
- resources/prometheus.yaml
- resources/vault.yaml
# Applications
- resources/gitea.yaml
namespace: argocd

View File

@ -0,0 +1,4 @@
apiVersion: v1
kind: Namespace
metadata:
name: argocd