From 3771d0df41be9db6c415d3fad5e4d458096aa2bb Mon Sep 17 00:00:00 2001 From: Mans Ziesel Date: Thu, 24 Oct 2024 18:01:28 +0200 Subject: [PATCH] add go redirect --- argocd-applications/base/go-redirect.yaml | 20 +++++++++++++++++++ go-redirect/base/go-redirect-deployment.yaml | 21 ++++++++++++++++++++ go-redirect/base/go-redirect-ingress.yaml | 12 +++++++++++ go-redirect/base/go-redirect-namespace.yaml | 4 ++++ go-redirect/base/go-redirect-svc.yaml | 11 ++++++++++ go-redirect/kustomization.yaml | 10 ++++++++++ 6 files changed, 78 insertions(+) create mode 100644 argocd-applications/base/go-redirect.yaml create mode 100644 go-redirect/base/go-redirect-deployment.yaml create mode 100644 go-redirect/base/go-redirect-ingress.yaml create mode 100644 go-redirect/base/go-redirect-namespace.yaml create mode 100644 go-redirect/base/go-redirect-svc.yaml create mode 100644 go-redirect/kustomization.yaml diff --git a/argocd-applications/base/go-redirect.yaml b/argocd-applications/base/go-redirect.yaml new file mode 100644 index 0000000..abfdcfd --- /dev/null +++ b/argocd-applications/base/go-redirect.yaml @@ -0,0 +1,20 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: argo-app-go-redirect + namespace: argocd +spec: + destination: + name: '' + namespace: default + server: https://kubernetes.default.svc + source: + path: go-redirect + repoURL: https://git.mziesel.nl/mans/argocd-test + targetRevision: HEAD + sources: [] + project: default + syncPolicy: + automated: + prune: true + selfHeal: true diff --git a/go-redirect/base/go-redirect-deployment.yaml b/go-redirect/base/go-redirect-deployment.yaml new file mode 100644 index 0000000..c9d907a --- /dev/null +++ b/go-redirect/base/go-redirect-deployment.yaml @@ -0,0 +1,21 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: go-redirect + namespace: go-redirect +spec: + replicas: 3 + selector: + matchLabels: + app: go-redirect + template: + metadata: + labels: + app: go-redirect + spec: + containers: + - image: git.mziesel.nl/mans/goredir:latest + name: go-redirect + ports: + - name: web + containerPort: 80 diff --git a/go-redirect/base/go-redirect-ingress.yaml b/go-redirect/base/go-redirect-ingress.yaml new file mode 100644 index 0000000..c791cbe --- /dev/null +++ b/go-redirect/base/go-redirect-ingress.yaml @@ -0,0 +1,12 @@ +apiVersion: traefik.io/v1alpha1 +kind: IngressRoute +metadata: + name: go-redirect-ingressroute +spec: + routes: + - match: Host(`*.mzsl.nl`) + kind: Rule + services: + - name: go-redirect + port: web + tls: {} diff --git a/go-redirect/base/go-redirect-namespace.yaml b/go-redirect/base/go-redirect-namespace.yaml new file mode 100644 index 0000000..6b3ae1b --- /dev/null +++ b/go-redirect/base/go-redirect-namespace.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: go-redirect diff --git a/go-redirect/base/go-redirect-svc.yaml b/go-redirect/base/go-redirect-svc.yaml new file mode 100644 index 0000000..3dc2d4f --- /dev/null +++ b/go-redirect/base/go-redirect-svc.yaml @@ -0,0 +1,11 @@ +apiVersion: v1 +kind: Service +metadata: + name: go-redirect +spec: + ports: + - name: web + port: 80 + targetPort: web + selector: + app: go-redirect diff --git a/go-redirect/kustomization.yaml b/go-redirect/kustomization.yaml new file mode 100644 index 0000000..ba0b222 --- /dev/null +++ b/go-redirect/kustomization.yaml @@ -0,0 +1,10 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +namespace: go-redirect + +resources: + - ./base/go-redirect-namespace.yaml + - ./base/go-redirect-deployment.yaml + - ./base/go-redirect-svc.yaml + - ./base/go-redirect-ingress.yaml