diff --git a/Bootstrap.md b/Bootstrap.md index 16ea7db..0576476 100644 --- a/Bootstrap.md +++ b/Bootstrap.md @@ -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 +``` diff --git a/apps/namespaces/argocd.yaml b/main/templates/namespace-argocd.yaml similarity index 100% rename from apps/namespaces/argocd.yaml rename to main/templates/namespace-argocd.yaml diff --git a/apps/namespaces/cert-manager.yaml b/main/templates/namespace-cert-manager.yaml similarity index 100% rename from apps/namespaces/cert-manager.yaml rename to main/templates/namespace-cert-manager.yaml diff --git a/apps/namespaces/nginx-ingress.yaml b/main/templates/namespace-nginx-ingress.yaml similarity index 100% rename from apps/namespaces/nginx-ingress.yaml rename to main/templates/namespace-nginx-ingress.yaml diff --git a/apps/namespaces/oauth2-proxy.yaml b/main/templates/namespace-oauth2-proxy.yaml similarity index 100% rename from apps/namespaces/oauth2-proxy.yaml rename to main/templates/namespace-oauth2-proxy.yaml diff --git a/apps/namespaces/prometheus-operator.yaml b/main/templates/namespace-prometheus-operator.yaml similarity index 100% rename from apps/namespaces/prometheus-operator.yaml rename to main/templates/namespace-prometheus-operator.yaml diff --git a/main/templates/namespaces.yaml b/main/templates/namespaces.yaml deleted file mode 100644 index b554f05..0000000 --- a/main/templates/namespaces.yaml +++ /dev/null @@ -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