diff --git a/README.md b/README.md index 66f5e60..0b644b2 100644 --- a/README.md +++ b/README.md @@ -59,6 +59,17 @@ Install Ingress for Dashboard and the StorageClasses: kubectl apply -f storage/dashboard.yaml -f storage/storageclass.yaml ``` +## argo cd +Add Namespace: +``` +kubectl create namespace argocd +``` +Add Argo CD: +``` +kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml +``` + + ## tests Install Test Deployments: diff --git a/argo/ingress.yaml b/argo/ingress.yaml new file mode 100644 index 0000000..76e961f --- /dev/null +++ b/argo/ingress.yaml @@ -0,0 +1,27 @@ +--- +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: argocd-ingress + namespace: argocd + annotations: + kubernetes.io/ingress.class: "nginx" + cert-manager.io/cluster-issuer: letsencrypt-prod + acme.cert-manager.io/http01-edit-in-place: "true" + ingress.kubernetes.io/ssl-redirect: "false" +spec: + rules: + - host: "argo.apps.yolokube.de" + http: + paths: + - pathType: Prefix + path: "/" + backend: + service: + name: argocd-service + port: + number: 80 + tls: + - hosts: + - argo.apps.yolokube.de + secretName: argocd-cert \ No newline at end of file diff --git a/core-deployments.yaml b/core-deployments.yaml new file mode 100644 index 0000000..035dd1f --- /dev/null +++ b/core-deployments.yaml @@ -0,0 +1,22 @@ +--- +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: argocd-ingress + namespace: argocd +spec: + project: core + source: + repoURL: https://git.ar21.de/yolokube/core-deployments.git + targetRevision: HEAD + path: argo + destination: + server: https://kubernetes.default.svc + namespace: argocd + syncPolicy: + syncOptions: + - CreateNamespace=true + + automated: + selfHeal: true + prune: true diff --git a/tests.yaml b/tests.yaml new file mode 100644 index 0000000..fd78c06 --- /dev/null +++ b/tests.yaml @@ -0,0 +1,22 @@ +--- +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: test-deployments + namespace: argocd +spec: + project: core + source: + repoURL: https://git.ar21.de/yolokube/core-deployments.git + targetRevision: HEAD + path: tests + destination: + server: https://kubernetes.default.svc + namespace: test-deployments + syncPolicy: + syncOptions: + - CreateNamespace=true + + automated: + selfHeal: true + prune: true diff --git a/tests/test-egress.yaml b/tests/test-egress.yaml index cdb9b61..299cc5f 100644 --- a/tests/test-egress.yaml +++ b/tests/test-egress.yaml @@ -1,51 +1,51 @@ ---- -apiVersion: v1 -kind: Namespace -metadata: - name: egress ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: egress-deployment - namespace: egress - labels: - app: egress -spec: - replicas: 3 - selector: - matchLabels: - app: egress - template: - metadata: - labels: - app: egress - spec: - containers: - - name: egress - image: curlimages/curl - command: ['/usr/bin/curl'] - args: ['-s', '-L', '-4', 'ip.hetzner.com'] ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: egress6-deployment - namespace: egress - labels: - app: egress6 -spec: - replicas: 3 - selector: - matchLabels: - app: egress6 - template: - metadata: - labels: - app: egress6 - spec: - containers: - - name: egress6 - image: curlimages/curl - command: ['/usr/bin/curl'] - args: ['-s', '-L', '-6', 'ip.hetzner.com'] \ No newline at end of file +#--- +#apiVersion: v1 +#kind: Namespace +#metadata: +# name: egress +#--- +#apiVersion: apps/v1 +#kind: Deployment +#metadata: +# name: egress-deployment +# namespace: egress +# labels: +# app: egress +#spec: +# replicas: 3 +# selector: +# matchLabels: +# app: egress +# template: +# metadata: +# labels: +# app: egress +# spec: +# containers: +# - name: egress +# image: curlimages/curl +# command: ['/usr/bin/curl'] +# args: ['-s', '-L', '-4', 'ip.hetzner.com'] +#--- +#apiVersion: apps/v1 +#kind: Deployment +#metadata: +# name: egress6-deployment +# namespace: egress +# labels: +# app: egress6 +#spec: +# replicas: 3 +# selector: +# matchLabels: +# app: egress6 +# template: +# metadata: +# labels: +# app: egress6 +# spec: +# containers: +# - name: egress6 +# image: curlimages/curl +# command: ['/usr/bin/curl'] +# args: ['-s', '-L', '-6', 'ip.hetzner.com'] \ No newline at end of file