add argocd

This commit is contained in:
Aaron Riedel 2023-02-12 20:36:55 +01:00
parent 99622afe22
commit 992f7060ba
Signed by: aaron
GPG key ID: 643004654D40D577
5 changed files with 133 additions and 51 deletions

View file

@ -59,6 +59,17 @@ Install Ingress for Dashboard and the StorageClasses:
kubectl apply -f storage/dashboard.yaml -f storage/storageclass.yaml 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 ## tests
Install Test Deployments: Install Test Deployments:

27
argo/ingress.yaml Normal file
View file

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

22
core-deployments.yaml Normal file
View file

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

22
tests.yaml Normal file
View file

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

View file

@ -1,51 +1,51 @@
--- #---
apiVersion: v1 #apiVersion: v1
kind: Namespace #kind: Namespace
metadata: #metadata:
name: egress # name: egress
--- #---
apiVersion: apps/v1 #apiVersion: apps/v1
kind: Deployment #kind: Deployment
metadata: #metadata:
name: egress-deployment # name: egress-deployment
namespace: egress # namespace: egress
labels: # labels:
app: egress # app: egress
spec: #spec:
replicas: 3 # replicas: 3
selector: # selector:
matchLabels: # matchLabels:
app: egress # app: egress
template: # template:
metadata: # metadata:
labels: # labels:
app: egress # app: egress
spec: # spec:
containers: # containers:
- name: egress # - name: egress
image: curlimages/curl # image: curlimages/curl
command: ['/usr/bin/curl'] # command: ['/usr/bin/curl']
args: ['-s', '-L', '-4', 'ip.hetzner.com'] # args: ['-s', '-L', '-4', 'ip.hetzner.com']
--- #---
apiVersion: apps/v1 #apiVersion: apps/v1
kind: Deployment #kind: Deployment
metadata: #metadata:
name: egress6-deployment # name: egress6-deployment
namespace: egress # namespace: egress
labels: # labels:
app: egress6 # app: egress6
spec: #spec:
replicas: 3 # replicas: 3
selector: # selector:
matchLabels: # matchLabels:
app: egress6 # app: egress6
template: # template:
metadata: # metadata:
labels: # labels:
app: egress6 # app: egress6
spec: # spec:
containers: # containers:
- name: egress6 # - name: egress6
image: curlimages/curl # image: curlimages/curl
command: ['/usr/bin/curl'] # command: ['/usr/bin/curl']
args: ['-s', '-L', '-6', 'ip.hetzner.com'] # args: ['-s', '-L', '-6', 'ip.hetzner.com']