Make Kustomize manifests more modular
This commit is contained in:
43
kustomize/app/deployment.yaml
Normal file
43
kustomize/app/deployment.yaml
Normal 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
|
16
kustomize/app/ingress.yaml
Normal file
16
kustomize/app/ingress.yaml
Normal 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
|
8
kustomize/app/kustomization.yaml
Normal file
8
kustomize/app/kustomization.yaml
Normal file
@ -0,0 +1,8 @@
|
||||
---
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
namespace: toy
|
||||
resources:
|
||||
- deployment.yaml
|
||||
- services.yaml
|
||||
- ingress.yaml
|
13
kustomize/app/services.yaml
Normal file
13
kustomize/app/services.yaml
Normal file
@ -0,0 +1,13 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: toy
|
||||
|
||||
spec:
|
||||
ports:
|
||||
- name: web
|
||||
port: 80
|
||||
targetPort: web
|
||||
selector:
|
||||
app: toy
|
Reference in New Issue
Block a user