initial upload
This commit is contained in:
33
repo-gitops/apps/whoami/base/deployment.yaml
Normal file
33
repo-gitops/apps/whoami/base/deployment.yaml
Normal 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
|
||||
5
repo-gitops/apps/whoami/base/kustomization.yaml
Normal file
5
repo-gitops/apps/whoami/base/kustomization.yaml
Normal file
@@ -0,0 +1,5 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
resources:
|
||||
- deployment.yaml
|
||||
@@ -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
|
||||
20
repo-gitops/bootstrap/root-app.yaml
Normal file
20
repo-gitops/bootstrap/root-app.yaml
Normal 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
|
||||
20
repo-gitops/cluster/production/whoami.yaml
Normal file
20
repo-gitops/cluster/production/whoami.yaml
Normal 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')
|
||||
Reference in New Issue
Block a user