add deployment
This commit is contained in:
parent
32ad55c5b8
commit
892436e41b
33
k8s/production/deployment.yaml
Normal file
33
k8s/production/deployment.yaml
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: ppob-backend
|
||||||
|
namespace: empatnusabangsa-production
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: ppob-backend
|
||||||
|
replicas: 1
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: ppob-backend
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: ppob-backend
|
||||||
|
image: registry-harbor.app.bangun-kreatif.com/empatnusabangsa/ppob-backend:<VERSION>
|
||||||
|
ports:
|
||||||
|
- containerPort: 5000
|
||||||
|
envFrom:
|
||||||
|
- secretRef:
|
||||||
|
name: ppob-backend-env
|
||||||
|
volumeMounts:
|
||||||
|
- name: storage
|
||||||
|
mountPath: /home/node/files
|
||||||
|
volumes:
|
||||||
|
- name: storage
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: ppob-backend-pvc
|
||||||
|
imagePullSecrets:
|
||||||
|
- name: regcred
|
||||||
|
|
24
k8s/production/ingress.yaml
Normal file
24
k8s/production/ingress.yaml
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: ppob-backend
|
||||||
|
namespace: empatnusabangsa-production
|
||||||
|
annotations:
|
||||||
|
kubernetes.io/ingress.class: "traefik"
|
||||||
|
cert-manager.io/cluster-issuer: letsencrypt-prod
|
||||||
|
spec:
|
||||||
|
rules:
|
||||||
|
- host: "ppob-backend.k3s.bangun-kreatif.com"
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- pathType: Prefix
|
||||||
|
path: /
|
||||||
|
backend:
|
||||||
|
service:
|
||||||
|
name: ppob-backend
|
||||||
|
port:
|
||||||
|
number: 5000
|
||||||
|
tls:
|
||||||
|
- hosts:
|
||||||
|
- "ppob-backend.k3s.bangun-kreatif.com"
|
||||||
|
secretName: ppob-backend-k3s-bangun-kreatif-com-tls
|
4
k8s/production/namespace.yaml
Normal file
4
k8s/production/namespace.yaml
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Namespace
|
||||||
|
metadata:
|
||||||
|
name: empatnusabangsa-production
|
13
k8s/production/pvc.yaml
Normal file
13
k8s/production/pvc.yaml
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: ppob-backend-pvc
|
||||||
|
namespace : empatnusabangsa-production
|
||||||
|
annotations:
|
||||||
|
volume.beta.kubernetes.io/storage-class: "managed-nfs-storage"
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteMany
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 10Gi
|
16
k8s/production/secret.example copy.yaml
Normal file
16
k8s/production/secret.example copy.yaml
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Secret
|
||||||
|
metadata:
|
||||||
|
name: ppob-backend-env
|
||||||
|
namespace: empatnusabangsa-production
|
||||||
|
type: Opaque
|
||||||
|
stringData:
|
||||||
|
PORT:
|
||||||
|
SECRET:
|
||||||
|
|
||||||
|
DATABASE_HOST:
|
||||||
|
DATABASE_NAME:
|
||||||
|
DATABASE_USERNAME:
|
||||||
|
DATABASE_PASSWORD:
|
||||||
|
DATABASE_PORT:
|
||||||
|
DATABASE_CLIENT:
|
13
k8s/production/service.yaml
Normal file
13
k8s/production/service.yaml
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: ppob-backend
|
||||||
|
namespace: empatnusabangsa-production
|
||||||
|
labels:
|
||||||
|
run: ppob-backend
|
||||||
|
spec:
|
||||||
|
ports:
|
||||||
|
- port: 5000
|
||||||
|
protocol: TCP
|
||||||
|
selector:
|
||||||
|
app: ppob-backend
|
Loading…
Reference in New Issue
Block a user