Skip to content

Commit

Permalink
Add kustomization
Browse files Browse the repository at this point in the history
  • Loading branch information
flawmop committed Jan 4, 2024
1 parent 98bb49a commit cc82e0f
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 0 deletions.
26 changes: 26 additions & 0 deletions k8s/deployment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: welcome-svc
labels:
app: welcome-svc
spec:
replicas: 1
selector:
matchLabels:
app: welcome-svc
template:
metadata:
labels:
app: welcome-svc
spec:
containers:
- name: welcome-svc
image: ghcr.io/flawmop/welcome-svc
imagePullPolicy: IfNotPresent
lifecycle:
preStop:
exec:
command: [ "sh", "-c", "sleep 5" ]
ports:
- containerPort: 9001
6 changes: 6 additions & 0 deletions k8s/kustomization.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- deployment.yml
- service.yml
14 changes: 14 additions & 0 deletions k8s/service.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: v1
kind: Service
metadata:
name: welcome-svc
labels:
app: welcome-svc
spec:
type: ClusterIP
selector:
app: welcome-svc
ports:
- protocol: TCP
port: 80
targetPort: 9001

0 comments on commit cc82e0f

Please sign in to comment.