feat: restructure GitOps for multi-environment deployment

- Add apps/myapp/base with deployment, service, httproute
- Add apps/myapp/overlays/staging (1 replica, 128Mi/256Mi, staging hostname)
- Add apps/myapp/overlays/production (2 replicas, 256Mi/512Mi, prod hostname)
- Remove old apps/sample-webapp structure

Structure follows folder-per-environment pattern with Kustomize overlays.
This commit is contained in:
Multi-Environment Setup
2026-02-01 22:48:59 +01:00
parent ad75d157a7
commit fc5c6de051
12 changed files with 125 additions and 62 deletions

View File

@@ -0,0 +1,17 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: myapp
spec:
replicas: 2
template:
spec:
containers:
- name: myapp
resources:
requests:
memory: "256Mi"
cpu: "200m"
limits:
memory: "512Mi"
cpu: "500m"

View File

@@ -0,0 +1,7 @@
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: myapp-route
spec:
hostnames:
- myapp.kube2.tricnet.de

View File

@@ -0,0 +1,15 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: myapp-production
resources:
- ../../base
patches:
- path: deployment-patch.yaml
- path: httproute-patch.yaml
images:
- name: nginx
newTag: alpine