initial upload

This commit is contained in:
Ubuntu
2026-01-10 21:43:12 +00:00
commit c409145ced
7 changed files with 190 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: whoami
labels:
app: 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:
selector:
app: whoami
ports:
- protocol: TCP
port: 80
targetPort: 80

View File

@@ -0,0 +1,5 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- deployment.yaml

View File

@@ -0,0 +1,20 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ../../base
# Patches für Produktion
patches:
- target:
kind: Deployment
name: whoami
patch: |-
- op: replace
path: /spec/replicas
value: 2
# Hier ändern wir das Image für Produktion (Das ist die Zeile, die wir beim Release anpassen!)
images:
- name: traefik/whoami
newTag: v1.8.0

View File

@@ -0,0 +1,20 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: production-cluster
namespace: argocd
finalizers:
- resources-finalizer.argocd.argoproj.io # Löscht alle Apps, wenn diese App gelöscht wird (Vorsicht!)
spec:
project: default
source:
repoURL: https://git.stabify.de/stabify/gitops.git # URL DEINES GitOps Repos anpassen!
targetRevision: HEAD
path: cluster/production
destination:
server: https://kubernetes.default.svc
namespace: argocd
syncPolicy:
automated:
prune: true # Löscht Ressourcen, die nicht mehr im Git sind
selfHeal: true # Repariert manuelle Änderungen automatisch

View File

@@ -0,0 +1,20 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: whoami
namespace: argocd
spec:
project: default
source:
repoURL: https://git.stabify.de/stabify/gitops.git
targetRevision: HEAD
path: apps/whoami/overlays/production # Zeigt auf das Overlay, nicht die Base!
destination:
server: https://kubernetes.default.svc
namespace: default # Ziel-Namespace der App
syncPolicy:
automated:
prune: true
selfHeal: true
syncOptions:
- CreateNamespace=true # Erstellt den Namespace 'default' falls nicht vorhanden (oder 'whoami-ns')