From 8bd65044a0a273d895aba8e5e6ab7ae57487b513 Mon Sep 17 00:00:00 2001 From: ByeonJungHun Date: Mon, 8 Apr 2024 18:27:50 +0900 Subject: [PATCH] =?UTF-8?q?hpa=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bussiness1-chl.template | 7 +++++++ bussiness1-chl.yml | 8 ++++++++ bussiness1-core.template | 9 ++++++++- bussiness1-core.yml | 8 ++++++++ bussiness1-mci.template | 9 ++++++++- bussiness1-mci.yml | 8 ++++++++ chl-hpa.yml | 17 +++++++++++++++++ core-hpa.yml | 17 +++++++++++++++++ mci-hpa.yml | 17 +++++++++++++++++ 9 files changed, 98 insertions(+), 2 deletions(-) create mode 100644 chl-hpa.yml create mode 100644 core-hpa.yml create mode 100644 mci-hpa.yml diff --git a/bussiness1-chl.template b/bussiness1-chl.template index 778607c..2d7ffcb 100644 --- a/bussiness1-chl.template +++ b/bussiness1-chl.template @@ -18,6 +18,13 @@ spec: containers: - name: bussiness1-chl image: harbor.elppa.xyz/test/intermax:{ver} + resources: + limits: + cpu: 0.5 + memory: 500Mi + requests: + cpu: 0.3 + memory: 300Mi env: - name: mci_url value: "http://mci-svc.bussiness1.svc:8080/bussiness1/mci_core.jsp" diff --git a/bussiness1-chl.yml b/bussiness1-chl.yml index 631e1db..9da9608 100644 --- a/bussiness1-chl.yml +++ b/bussiness1-chl.yml @@ -6,6 +6,7 @@ metadata: labels: app: bussiness1-chl spec: + replicas: 1 selector: matchLabels: app: bussiness1-chl @@ -17,6 +18,13 @@ spec: containers: - name: bussiness1-chl image: harbor.elppa.xyz/test/intermax:test19 + resources: + limits: + cpu: 0.5 + memory: 500Mi + requests: + cpu: 0.3 + memory: 300Mi env: - name: mci_url value: "http://mci-svc.bussiness1.svc:8080/bussiness1/mci_core.jsp" diff --git a/bussiness1-core.template b/bussiness1-core.template index 7a3fe81..34dd0b7 100644 --- a/bussiness1-core.template +++ b/bussiness1-core.template @@ -6,6 +6,7 @@ metadata: labels: app: bussiness1-core spec: + replicas: 1 selector: matchLabels: app: bussiness1-core @@ -13,11 +14,17 @@ spec: metadata: labels: app: bussiness1-core - replicas: 1 spec: containers: - name: bussiness1-core image: harbor.elppa.xyz/test/intermax:{ver} + resources: + limits: + cpu: 0.5 + memory: 500Mi + requests: + cpu: 0.3 + memory: 300Mi env: - name: agentname value: core_business1_tomcat diff --git a/bussiness1-core.yml b/bussiness1-core.yml index a79d94f..1025d4f 100644 --- a/bussiness1-core.yml +++ b/bussiness1-core.yml @@ -6,6 +6,7 @@ metadata: labels: app: bussiness1-core spec: + replicas: 1 selector: matchLabels: app: bussiness1-core @@ -17,6 +18,13 @@ spec: containers: - name: bussiness1-core image: harbor.elppa.xyz/test/intermax:test18 + resources: + limits: + cpu: 0.5 + memory: 500Mi + requests: + cpu: 0.3 + memory: 300Mi env: - name: agentname value: core_business1_tomcat diff --git a/bussiness1-mci.template b/bussiness1-mci.template index e417bbd..7c1ef19 100644 --- a/bussiness1-mci.template +++ b/bussiness1-mci.template @@ -6,6 +6,7 @@ metadata: labels: app: bussiness1-mci spec: + replicas: 1 selector: matchLabels: app: bussiness1-mci @@ -13,11 +14,17 @@ spec: metadata: labels: app: bussiness1-mci - replicas: 1 spec: containers: - name: bussiness1-mci image: harbor.elppa.xyz/test/intermax:{ver} + resources: + limits: + cpu: 0.5 + memory: 500Mi + requests: + cpu: 0.3 + memory: 300Mi env: - name: core_url value: "http://core-svc.bussiness1.svc:8080/bussiness1/core.jsp" diff --git a/bussiness1-mci.yml b/bussiness1-mci.yml index df3035b..2f37dd5 100644 --- a/bussiness1-mci.yml +++ b/bussiness1-mci.yml @@ -6,6 +6,7 @@ metadata: labels: app: bussiness1-mci spec: + replicas: 1 selector: matchLabels: app: bussiness1-mci @@ -17,6 +18,13 @@ spec: containers: - name: bussiness1-mci image: harbor.elppa.xyz/test/intermax:test19 + resources: + limits: + cpu: 0.5 + memory: 500Mi + requests: + cpu: 0.3 + memory: 300Mi env: - name: core_url value: "http://core-svc.bussiness1.svc:8080/bussiness1/core.jsp" diff --git a/chl-hpa.yml b/chl-hpa.yml new file mode 100644 index 0000000..65b3c60 --- /dev/null +++ b/chl-hpa.yml @@ -0,0 +1,17 @@ +apiVersion: autoscaling/v2beta1 +kind: HorizontalPodAutoscaler +metadata: + name: chl-hpa + namespace: bussiness1 +spec: + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: bussiness1-chl + minReplicas: 1 + maxReplicas: 10 + metrics: + - type: Resource + resource: + name: cpu + targetAverageUtilization: 30 \ No newline at end of file diff --git a/core-hpa.yml b/core-hpa.yml new file mode 100644 index 0000000..343c1d4 --- /dev/null +++ b/core-hpa.yml @@ -0,0 +1,17 @@ +apiVersion: autoscaling/v2beta1 +kind: HorizontalPodAutoscaler +metadata: + name: core-hpa + namespace: bussiness1 +spec: + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: bussiness1-core + minReplicas: 1 + maxReplicas: 10 + metrics: + - type: Resource + resource: + name: cpu + targetAverageUtilization: 30 \ No newline at end of file diff --git a/mci-hpa.yml b/mci-hpa.yml new file mode 100644 index 0000000..e829d51 --- /dev/null +++ b/mci-hpa.yml @@ -0,0 +1,17 @@ +apiVersion: autoscaling/v2beta1 +kind: HorizontalPodAutoscaler +metadata: + name: mci-hpa + namespace: bussiness1 +spec: + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: bussiness1-mci + minReplicas: 1 + maxReplicas: 10 + metrics: + - type: Resource + resource: + name: cpu + targetAverageUtilization: 30 \ No newline at end of file