diff --git a/k8s/deployment/config-deployment.yaml b/k8s/deployment/config-deployment.yaml index beb9f20..22955b5 100644 --- a/k8s/deployment/config-deployment.yaml +++ b/k8s/deployment/config-deployment.yaml @@ -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: diff --git a/k8s/deployment/eureka-deployment.yaml b/k8s/deployment/eureka-deployment.yaml index 0e6c33f..c9014c0 100644 --- a/k8s/deployment/eureka-deployment.yaml +++ b/k8s/deployment/eureka-deployment.yaml @@ -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 diff --git a/k8s/deployment/gateway-deployment.yaml b/k8s/deployment/gateway-deployment.yaml index fedec02..baf344c 100644 --- a/k8s/deployment/gateway-deployment.yaml +++ b/k8s/deployment/gateway-deployment.yaml @@ -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 diff --git a/k8s/deployment/pay-service-deployment.yaml b/k8s/deployment/pay-service-deployment.yaml index 3c77922..c9b81ec 100644 --- a/k8s/deployment/pay-service-deployment.yaml +++ b/k8s/deployment/pay-service-deployment.yaml @@ -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 @@ -41,7 +48,7 @@ spec: - containerPort: 8083 resources: requests: - cpu: "150m" + cpu: "300m" memory: "256Mi" limits: cpu: "300m" diff --git a/k8s/deployment/review-service-deployment.yaml b/k8s/deployment/review-service-deployment.yaml index edf2038..b8add3e 100644 --- a/k8s/deployment/review-service-deployment.yaml +++ b/k8s/deployment/review-service-deployment.yaml @@ -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 @@ -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 diff --git a/k8s/deployment/store-service-deployment.yaml b/k8s/deployment/store-service-deployment.yaml index c822432..f92ee5d 100644 --- a/k8s/deployment/store-service-deployment.yaml +++ b/k8s/deployment/store-service-deployment.yaml @@ -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 @@ -41,8 +47,8 @@ spec: imagePullPolicy: Always resources: requests: - cpu: "150m" - memory: "192Mi" + cpu: "200m" + memory: "256Mi" limits: cpu: "300m" memory: "320Mi" diff --git a/k8s/deployment/user-service-deployment.yaml b/k8s/deployment/user-service-deployment.yaml index 48067c5..b392cf8 100644 --- a/k8s/deployment/user-service-deployment.yaml +++ b/k8s/deployment/user-service-deployment.yaml @@ -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