Make Kustomize manifests more modular
All checks were successful
Gitea Actions Demo / lint (push) Successful in 1m29s
Gitea Actions Demo / test (push) Successful in 1m20s
Gitea Actions Demo / release-image (push) Successful in 1m3s

This commit is contained in:
2024-07-28 20:53:43 -05:00
parent 7fc61df477
commit c57d3303ed
6 changed files with 16 additions and 3 deletions

View File

@ -0,0 +1,43 @@
---
kind: Deployment
apiVersion: apps/v1
metadata:
name: toy
labels:
app: toy
spec:
replicas: 3
selector:
matchLabels:
app: toy
template:
metadata:
labels:
app: toy
spec:
containers:
- name: toy
image: git.kill0.net/ryanc/toy:latest
ports:
- name: web
containerPort: 4567
env:
- name: SESSION_SECRET
valueFrom:
secretKeyRef:
name: toy-session-secret
key: toy-session-secret
optional: true
livenessProbe:
httpGet:
path: /livez
port: 4567
initialDelaySeconds: 3
periodSeconds: 3
readinessProbe:
httpGet:
path: /readyz
port: 4567
initialDelaySeconds: 5
periodSeconds: 5

View File

@ -0,0 +1,16 @@
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: toy-ingress
spec:
rules:
- http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: toy
port:
name: web

View File

@ -0,0 +1,8 @@
---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: toy
resources:
- deployment.yaml
- services.yaml
- ingress.yaml

View File

@ -0,0 +1,13 @@
---
apiVersion: v1
kind: Service
metadata:
name: toy
spec:
ports:
- name: web
port: 80
targetPort: web
selector:
app: toy