Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions apps/sample-app/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: sample-app
labels:
app: sample-app
spec:
replicas: 2
selector:
matchLabels:
app: sample-app
template:
metadata:
labels:
app: sample-app
spec:
containers:
- name: nginx
image: nginx:alpine
ports:
- containerPort: 80
resources:
limits:
cpu: 100m # Max CPU
memory: 128Mi # Max RAM
requests:
cpu: 50m # Min CPU
memory: 64Mi # Min RAM
20 changes: 20 additions & 0 deletions apps/sample-app/ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: sample-app
labels:
app: sample-app
spec:
ingressClassName: nginx
rules:
- host: sample-app.local
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: sample-app
port:
number: 80
15 changes: 15 additions & 0 deletions apps/sample-app/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
apiVersion: v1
kind: Service
metadata:
name: sample-app
labels:
app: sample-app
spec:
type: ClusterIP
ports:
- port: 80
targetPort: 80
protocol: TCP
selector:
app: sample-app
4 changes: 2 additions & 2 deletions clusters/dev/argocd-apps/apps.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ spec:
source:
repoURL: https://github.com/Kobeep/k8s-gitops-template.git
targetRevision: main
path: apps/sample-app/manifests
path: apps/sample-app
destination:
server: https://kubernetes.default.svc
namespace: dev
namespace: sample-app
syncPolicy:
automated:
prune: true
Expand Down
9 changes: 6 additions & 3 deletions clusters/prod/argocd-apps/apps.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,16 @@ spec:
source:
repoURL: https://github.com/Kobeep/k8s-gitops-template.git
targetRevision: main
path: apps/sample-app/manifests
path: apps/sample-app
helm:
valueFiles:
- values-prod.yaml
destination:
server: https://kubernetes.default.svc
namespace: prod
namespace: sample-app-prod
syncPolicy:
automated:
prune: false # Manual sync for prod
prune: false
selfHeal: true
syncOptions:
- CreateNamespace=true
Loading