diff --git a/apps/whoami-app.yaml b/apps/whoami-app.yaml new file mode 100644 index 0000000..3e37180 --- /dev/null +++ b/apps/whoami-app.yaml @@ -0,0 +1,22 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: whoami + namespace: argocd + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + project: default + source: + repoURL: https://git.cloud-infra.prod.openmailserver.de/stabify/gitops.git + targetRevision: HEAD + path: apps/whoami/overlays/production + destination: + server: https://kubernetes.default.svc + namespace: default + syncPolicy: + automated: + prune: true + selfHeal: true + syncOptions: + - CreateNamespace=true diff --git a/apps/whoami/base/deployment.yaml b/apps/whoami/base/deployment.yaml new file mode 100644 index 0000000..798022e --- /dev/null +++ b/apps/whoami/base/deployment.yaml @@ -0,0 +1,50 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: whoami +spec: + replicas: 1 + selector: + matchLabels: + app: whoami + template: + metadata: + labels: + app: whoami + spec: + containers: + - name: whoami + image: traefik/whoami:latest + ports: + - containerPort: 80 +--- +apiVersion: v1 +kind: Service +metadata: + name: whoami +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: whoami +--- +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: whoami + annotations: + traefik.ingress.kubernetes.io/router.entrypoints: web,websecure + traefik.ingress.kubernetes.io/router.tls: "true" +spec: + rules: + - host: whoami.k3s.stabify.de # Placeholder, wird im Overlay überschrieben + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: whoami + port: + number: 80 diff --git a/apps/whoami/base/kustomization.yaml b/apps/whoami/base/kustomization.yaml new file mode 100644 index 0000000..9c2d28b --- /dev/null +++ b/apps/whoami/base/kustomization.yaml @@ -0,0 +1,4 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - deployment.yaml diff --git a/apps/whoami/overlays/production/kustomization.yaml b/apps/whoami/overlays/production/kustomization.yaml new file mode 100644 index 0000000..effc4bc --- /dev/null +++ b/apps/whoami/overlays/production/kustomization.yaml @@ -0,0 +1,12 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - ../../base +patches: + - target: + kind: Ingress + name: whoami + patch: |- + - op: replace + path: /spec/rules/0/host + value: whoami.k3s.stabify.de diff --git a/cluster/production/whoami.yaml b/cluster/production/whoami.yaml new file mode 100644 index 0000000..3e37180 --- /dev/null +++ b/cluster/production/whoami.yaml @@ -0,0 +1,22 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: whoami + namespace: argocd + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + project: default + source: + repoURL: https://git.cloud-infra.prod.openmailserver.de/stabify/gitops.git + targetRevision: HEAD + path: apps/whoami/overlays/production + destination: + server: https://kubernetes.default.svc + namespace: default + syncPolicy: + automated: + prune: true + selfHeal: true + syncOptions: + - CreateNamespace=true diff --git a/infrastructure/traefik/application.yaml b/infrastructure/traefik-app.yaml similarity index 100% rename from infrastructure/traefik/application.yaml rename to infrastructure/traefik-app.yaml