move namespaces to main app

This commit is contained in:
Andrey Kartashov 2019-11-15 23:21:40 +07:00
parent 49814c391e
commit a52920d835
7 changed files with 15 additions and 20 deletions

View file

@ -1,36 +1,49 @@
create namespaces
$ kubectl --context=gullfaxi apply -R apps/namespaces
```
$ kubectl --context=gullfaxi apply main/templates/namespace-*.yaml
```
install nginx-ingress
```
$ helm dep update apps/system/nginx-ingress
$ helm template --name nginx-ingress --namespace nginx-ingress apps/system/nginx-ingress | kubectl --context=gullfaxi --namespace nginx-ingress apply -f -
```
install cert-manager with cluster issuer
```
$ helm repo add jetstack https://charts.jetstack.io
$ helm dep update apps/system/cert-manager
$ helm template --name cert-manager --namespace cert-manager apps/system/cert-manager | kubectl --context=gullfaxi --namespace cert-manager apply -f -
```
install argocd
```
$ kubectl --context=gullfaxi apply -k apps/argocd
```
add dex.github.clientId and dex.github.clientSecret into argo-secret
add gitPrivateKey
```
$ kubectl --context=gullfaxi -n argocd edit secret argocd-secret
```
add argocd public key as deploy key to gf-k8s repo
log into argocd
```
$ argocd login argocd-grpc.gorilych.ru
```
create main app
```
$ argocd app create main \
--dest-namespace argocd \
--dest-server https://kubernetes.default.svc \
@ -38,3 +51,4 @@ $ argocd app create main \
--path main \
--sync-policy automated \
--self-heal --auto-prune
```

View file

@ -1,19 +0,0 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: namespaces
namespace: argocd
finalizers:
- resources-finalizer.argocd.argoproj.io
spec:
destination:
namespace: default
server: https://kubernetes.default.svc
project: default
source:
path: apps/namespaces
repoURL: git@github.com:gorilych/gf-k8s
syncPolicy:
automated:
prune: true
selfHeal: true