Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions k8s/deployment/config-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,23 @@ spec:
spec:
imagePullSecrets:
- name: ncr-secret
topologySpreadConstraints:
- maxSkew: 1
topologyKey: "kubernetes.io/hostname"
whenUnsatisfiable: ScheduleAnyway
labelSelector:
matchLabels:
app: config-server
containers:
- name: config-server
image: pairmate-registry.kr.ncr.ntruss.com/config-server:latest
imagePullPolicy: Always
resources:
requests:
cpu: "100m"
cpu: "200m"
memory: "128Mi"
limits:
cpu: "200m"
cpu: "300m"
memory: "256Mi"
envFrom:
- secretRef:
Expand Down
7 changes: 7 additions & 0 deletions k8s/deployment/eureka-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@ spec:
spec:
imagePullSecrets:
- name: ncr-secret
topologySpreadConstraints:
- maxSkew: 1
topologyKey: "kubernetes.io/hostname"
whenUnsatisfiable: ScheduleAnyway
labelSelector:
matchLabels:
app: eureka-server
# config 실행 대기
initContainers:
- name: wait-for-config
Expand Down
7 changes: 7 additions & 0 deletions k8s/deployment/gateway-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@ spec:
spec:
imagePullSecrets:
- name: ncr-secret
topologySpreadConstraints:
- maxSkew: 1
topologyKey: "kubernetes.io/hostname"
whenUnsatisfiable: ScheduleAnyway
labelSelector:
matchLabels:
app: gateway-service
# eureka, config 대기
initContainers:
- name: wait-for-config
Expand Down
9 changes: 8 additions & 1 deletion k8s/deployment/pay-service-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ spec:
spec:
imagePullSecrets:
- name: ncr-secret
topologySpreadConstraints:
- maxSkew: 1
topologyKey: "kubernetes.io/hostname"
whenUnsatisfiable: ScheduleAnyway
labelSelector:
matchLabels:
app: pay-service
initContainers:
# Config Server, Eureka, DB가 준비될 때까지 대기
- name: wait-for-config
Expand All @@ -41,7 +48,7 @@ spec:
- containerPort: 8083
resources:
requests:
cpu: "150m"
cpu: "300m"
memory: "256Mi"
limits:
cpu: "300m"
Expand Down
14 changes: 10 additions & 4 deletions k8s/deployment/review-service-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@ spec:
spec:
imagePullSecrets:
- name: ncr-secret
topologySpreadConstraints:
- maxSkew: 1
topologyKey: "kubernetes.io/hostname"
whenUnsatisfiable: ScheduleAnyway
labelSelector:
matchLabels:
app: review-service
initContainers:
- name: wait-for-config
image: busybox
Expand All @@ -30,15 +37,14 @@ spec:
- name: wait-for-db
image: busybox
command: ['sh', '-c', 'until nc -z user-db 3306; do echo waiting db; sleep 3; done;']

containers:
- name: review-service
resources:
requests:
cpu: "100m"
memory: "192Mi"
limits:
cpu: "200m"
memory: "256Mi"
limits:
cpu: "256m"
memory: "320Mi"
image: pairmate-registry.kr.ncr.ntruss.com/review-service:latest
imagePullPolicy: Always
Expand Down
12 changes: 9 additions & 3 deletions k8s/deployment/store-service-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,13 @@ spec:
spec:
imagePullSecrets:
- name: ncr-secret

topologySpreadConstraints:
- maxSkew: 1
topologyKey: "kubernetes.io/hostname"
whenUnsatisfiable: ScheduleAnyway
labelSelector:
matchLabels:
app: store-service
initContainers:
- name: wait-for-config
image: busybox
Expand All @@ -41,8 +47,8 @@ spec:
imagePullPolicy: Always
resources:
requests:
cpu: "150m"
memory: "192Mi"
cpu: "200m"
memory: "256Mi"
limits:
cpu: "300m"
memory: "320Mi"
Expand Down
7 changes: 7 additions & 0 deletions k8s/deployment/user-service-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@ spec:
spec:
imagePullSecrets:
- name: ncr-secret
topologySpreadConstraints:
- maxSkew: 1
topologyKey: "kubernetes.io/hostname"
whenUnsatisfiable: ScheduleAnyway
labelSelector:
matchLabels:
app: user-service
initContainers:
- name: wait-for-db
image: busybox
Expand Down