Compare commits
14 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
105edf0596 | |
|
|
b629f31efd | |
|
|
3e50045bc4 | |
|
|
47ca02bdce | |
|
|
f14a49b7a7 | |
|
|
97ad965371 | |
|
|
968b53ac3c | |
|
|
2281de49f8 | |
|
|
30154a28f6 | |
|
|
7eec05482d | |
|
|
7dab2d908b | |
|
|
2253faa99f | |
|
|
6662ec7e9e | |
|
|
c7b618549d |
|
|
@ -66,4 +66,3 @@ spec:
|
|||
ports:
|
||||
- port: 5000
|
||||
targetPort: 5000
|
||||
|
||||
|
|
@ -6,4 +6,3 @@ metadata:
|
|||
data:
|
||||
DB_HOST: "mysql-app-syifa"
|
||||
DB_NAME: "datasiswa"
|
||||
|
||||
|
|
@ -66,4 +66,3 @@ spec:
|
|||
targetPort: 3000
|
||||
nodePort: 30067
|
||||
protocol: TCP
|
||||
|
||||
|
|
@ -1,6 +1,8 @@
|
|||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
namespace: intern-workspace
|
||||
|
||||
resources:
|
||||
- backend-deployment.yaml
|
||||
- frontend-deployment.yaml
|
||||
|
|
|
|||
|
|
@ -72,4 +72,3 @@ spec:
|
|||
ports:
|
||||
- port: 3306
|
||||
targetPort: 3306
|
||||
|
||||
|
|
@ -100,5 +100,3 @@ spec:
|
|||
ports:
|
||||
- protocol: UDP
|
||||
port: 53
|
||||
|
||||
|
||||
|
|
@ -104,4 +104,3 @@ roleRef:
|
|||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: Role
|
||||
name: mysql-role-syifa
|
||||
|
||||
|
|
@ -7,4 +7,3 @@ type: Opaque
|
|||
data:
|
||||
DB_USER: cm9vdA== # hasil base64 dari "root"
|
||||
DB_PASSWORD: "" # kosong, tetap valid
|
||||
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
# Referensi ke base
|
||||
resources:
|
||||
- ../../k8s
|
||||
|
||||
# Namespace & prefix untuk semua resource
|
||||
namespace: intern-workspace
|
||||
namePrefix: dev-
|
||||
|
||||
# Label tambahan untuk menandai environment
|
||||
commonLabels:
|
||||
environment: dev
|
||||
|
||||
# Gabungkan patch deployment kamu
|
||||
patchesStrategicMerge:
|
||||
- patch-deployment.yaml
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
# ==========================
|
||||
# BACKEND PATCH
|
||||
# ==========================
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: backend-app-syifa
|
||||
spec:
|
||||
replicas: 1
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: backend
|
||||
image: docker.io/syifamaulidya/backend-app:dev # <-- Jenkins nanti ganti otomatis ke vX
|
||||
|
||||
---
|
||||
# ==========================
|
||||
# FRONTEND PATCH
|
||||
# ==========================
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: frontend-app-syifa
|
||||
spec:
|
||||
replicas: 1
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: frontend
|
||||
image: docker.io/syifamaulidya/frontend-app:dev # <-- Jenkins juga ganti otomatis
|
||||
|
|
@ -1,13 +1,25 @@
|
|||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
namespace: intern-workspace
|
||||
namePrefix: prod-
|
||||
|
||||
# Ganti 'commonLabels' ke 'labels' (yang baru)
|
||||
labels:
|
||||
- pairs:
|
||||
environment: production
|
||||
|
||||
# Referensi ke base
|
||||
resources:
|
||||
- ../../k8s
|
||||
|
||||
namespace: intern-workspace
|
||||
namePrefix: prod-
|
||||
commonLabels:
|
||||
environment: production
|
||||
|
||||
patchesStrategicMerge:
|
||||
- patch-deployment.yaml
|
||||
# Ganti deprecated field
|
||||
patches:
|
||||
- path: patch-deployment.yaml
|
||||
target:
|
||||
kind: Deployment
|
||||
name: backend-app-syifa
|
||||
- path: patch-deployment.yaml
|
||||
target:
|
||||
kind: Deployment
|
||||
name: frontend-app-syifa
|
||||
|
|
@ -1,30 +1,32 @@
|
|||
# ==========================
|
||||
# BACKEND PATCH
|
||||
# PATCH UNTUK BACKEND
|
||||
# ==========================
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: backend-app-syifa
|
||||
namespace: intern-workspace
|
||||
spec:
|
||||
replicas: 3
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: backend
|
||||
image: docker.io/syifamaulidya/backend-app:production # <-- Jenkins nanti ganti otomatis ke vX
|
||||
image: docker.io/syifamaulidya/backend-app:23 # Jenkins akan update ke vX
|
||||
|
||||
---
|
||||
# ==========================
|
||||
# FRONTEND PATCH
|
||||
# PATCH UNTUK FRONTEND
|
||||
# ==========================
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: frontend-app-syifa
|
||||
namespace: intern-workspace
|
||||
spec:
|
||||
replicas: 3
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: frontend
|
||||
image: docker.io/syifamaulidya/frontend-app:production # <-- Jenkins juga ganti otomatis
|
||||
image: docker.io/syifamaulidya/frontend-app:23 # Jenkins akan update ke vX
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
resources:
|
||||
- ../../k8s
|
||||
|
||||
namespace: intern-workspace
|
||||
namePrefix: staging-
|
||||
commonLabels:
|
||||
environment: staging
|
||||
|
||||
patchesStrategicMerge:
|
||||
- patch-deployment.yaml
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
# ==========================
|
||||
# BACKEND PATCH
|
||||
# ==========================
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: backend-app-syifa
|
||||
spec:
|
||||
replicas: 2
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: backend
|
||||
image: docker.io/syifamaulidya/backend-app:staging # <-- Jenkins nanti ganti otomatis ke vX
|
||||
|
||||
---
|
||||
# ==========================
|
||||
# FRONTEND PATCH
|
||||
# ==========================
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: frontend-app-syifa
|
||||
spec:
|
||||
replicas: 2
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: frontend
|
||||
image: docker.io/syifamaulidya/frontend-app:staging # <-- Jenkins juga ganti otomatis
|
||||
Loading…
Reference in New Issue