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
```
## 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:

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
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']
#---
#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']