Add kustomize

This commit is contained in:
Florian RICHER 2025-03-26 16:16:41 +01:00
parent 5fc864c65d
commit d021c3e63a
9 changed files with 91 additions and 3 deletions

View file

@ -19,3 +19,10 @@ spec:
image: nginx:1.14.2
ports:
- containerPort: 80
resources:
requests:
memory: "32Mi"
cpu: 128m
limits:
memory: "64Mi"
cpu: 256m

View file

@ -7,6 +7,6 @@ spec:
selector:
app: nginx
ports:
- protocol: TCP
port: 8000
targetPort: 80
- protocol: TCP
port: 8000
targetPort: 80

View file

@ -0,0 +1,21 @@
kind: Deployment
apiVersion: apps/v1
metadata:
name: app-deployment
spec:
replicas: 1
selector:
template:
spec:
containers:
- name: nginx
image: nginx
ports:
- containerPort: 80
resources:
requests:
memory: "32Mi"
cpu: 128m
limits:
memory: "64Mi"
cpu: 256m

View file

@ -0,0 +1,3 @@
resources:
- deployment.yaml
- service.yaml

View file

@ -0,0 +1,10 @@
apiVersion: v1
kind: Service
metadata:
name: app-service
spec:
type: ClusterIP
ports:
- protocol: TCP
port: 8000
targetPort: 80

View file

@ -0,0 +1,18 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: app-ingress
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /
spec:
ingressClassName: nginx
rules:
- http:
paths:
- path: /nginx
pathType: Prefix
backend:
service:
name: app-service
port:
number: 8000

View file

@ -0,0 +1,23 @@
resources:
- ../../base
- ingress.yaml
namespace: default
labels:
- includeSelectors: true
pairs:
app: nginx
commonAnnotations:
owner: florian
namePrefix: nginx-
images:
- name: nginx
newName: nginx
newTag: 1.14.2
patches:
- path: replica.yaml

View file

@ -0,0 +1,6 @@
kind: Deployment
apiVersion: apps/v1
metadata:
name: app-deployment
spec:
replicas: 2