From 3909b5942b036e6733e0ce4f7a7a0d471854642a Mon Sep 17 00:00:00 2001 From: minkyu97 Date: Mon, 26 Jun 2023 00:49:19 +0900 Subject: [PATCH 01/12] =?UTF-8?q?server,=20worker=20initial=20yaml=20?= =?UTF-8?q?=EC=9E=91=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wacruit-judge/wacruit-judge-config.yaml | 0 .../wacruit-judge/wacruit-judge-redis.yaml | 0 .../wacruit-judge/wacruit-judge-server.yaml | 68 +++++++++++++++++++ .../wacruit-judge/wacruit-judge-worker.yaml | 36 ++++++++++ 4 files changed, 104 insertions(+) create mode 100644 apps/wacruit-dev/wacruit-judge/wacruit-judge-config.yaml create mode 100644 apps/wacruit-dev/wacruit-judge/wacruit-judge-redis.yaml create mode 100644 apps/wacruit-dev/wacruit-judge/wacruit-judge-server.yaml create mode 100644 apps/wacruit-dev/wacruit-judge/wacruit-judge-worker.yaml diff --git a/apps/wacruit-dev/wacruit-judge/wacruit-judge-config.yaml b/apps/wacruit-dev/wacruit-judge/wacruit-judge-config.yaml new file mode 100644 index 00000000..e69de29b diff --git a/apps/wacruit-dev/wacruit-judge/wacruit-judge-redis.yaml b/apps/wacruit-dev/wacruit-judge/wacruit-judge-redis.yaml new file mode 100644 index 00000000..e69de29b diff --git a/apps/wacruit-dev/wacruit-judge/wacruit-judge-server.yaml b/apps/wacruit-dev/wacruit-judge/wacruit-judge-server.yaml new file mode 100644 index 00000000..9020d3af --- /dev/null +++ b/apps/wacruit-dev/wacruit-judge/wacruit-judge-server.yaml @@ -0,0 +1,68 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: wacruit-judge-server + labels: + app: wacruit-judge-server + namespace: wacruit-dev +spec: + replicas: 1 + selector: + matchLabels: + app: wacruit-judge-server + strategy: + type: RollingUpdate + rollingUpdate: + maxSurge: 25% + maxUnavailable: 25% + revisionHistoryLimit: 4 + template: + metadata: + labels: + app: wacruit-judge-server + spec: + serviceAccountName: wacruit-judge-server + containers: + - image: 405906814034.dkr.ecr.ap-northeast-2.amazonaws.com/wacruit-dev/wacruit-judge:latest + name: wacruit-judge-server + ports: + - containerPort: 2358 +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + name: wacruit-judge-server + namespace: wacruit-dev + annotations: + eks.amazonaws.com/role-arn: arn:aws:iam::405906814034:role/wacruit-judge-dev-role +--- +apiVersion: v1 +kind: Service +metadata: + namespace: wacruit-dev + name: wacruit-judge-server +spec: + type: ClusterIP + selector: + app: wacruit-judge-server + ports: + - port: 80 + targetPort: 2358 +--- +apiVersion: networking.istio.io/v1alpha3 +kind: VirtualService +metadata: + namespace: wacruit-dev + name: wacruit-judge-server +spec: + gateways: + - istio-ingress/waffle-ingressgateway + hosts: + - wacruit-judge-dev.wafflestudio.com + http: + - match: + - uri: + exact: /docs/index.html + route: + - destination: + host: wacruit-judge-server diff --git a/apps/wacruit-dev/wacruit-judge/wacruit-judge-worker.yaml b/apps/wacruit-dev/wacruit-judge/wacruit-judge-worker.yaml new file mode 100644 index 00000000..af2e694c --- /dev/null +++ b/apps/wacruit-dev/wacruit-judge/wacruit-judge-worker.yaml @@ -0,0 +1,36 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: wacruit-judge-worder + labels: + app: wacruit-judge-worder + namespace: wacruit-dev +spec: + replicas: 1 + selector: + matchLabels: + app: wacruit-judge-worder + strategy: + type: RollingUpdate + rollingUpdate: + maxSurge: 25% + maxUnavailable: 25% + revisionHistoryLimit: 4 + template: + metadata: + labels: + app: wacruit-judge-worder + spec: + serviceAccountName: wacruit-judge-worder + containers: + - image: 405906814034.dkr.ecr.ap-northeast-2.amazonaws.com/wacruit-dev/wacruit-judge:latest + name: wacruit-judge-worder + command: ["./scripts/workers"] +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + name: wacruit-judge-worder + namespace: wacruit-dev + annotations: + eks.amazonaws.com/role-arn: arn:aws:iam::405906814034:role/wacruit-judge-dev-role From bda14dccf85a4e863925c14f381bb376b693d938 Mon Sep 17 00:00:00 2001 From: minkyu97 Date: Tue, 27 Jun 2023 01:56:00 +0900 Subject: [PATCH 02/12] =?UTF-8?q?local=20=EC=97=90=EC=84=9C=20=EC=9E=91?= =?UTF-8?q?=EB=8F=99=ED=95=98=EB=8A=94=20wacruit-judge?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wacruit-judge/wacruit-judge-config.yaml | 13 ++++ .../wacruit-judge/wacruit-judge-mysql.yaml | 61 +++++++++++++++++++ .../wacruit-judge/wacruit-judge-redis.yaml | 54 ++++++++++++++++ .../wacruit-judge/wacruit-judge-server.yaml | 53 +++++++++------- .../wacruit-judge/wacruit-judge-worker.yaml | 6 +- 5 files changed, 165 insertions(+), 22 deletions(-) create mode 100644 apps/wacruit-dev/wacruit-judge/wacruit-judge-mysql.yaml diff --git a/apps/wacruit-dev/wacruit-judge/wacruit-judge-config.yaml b/apps/wacruit-dev/wacruit-judge/wacruit-judge-config.yaml index e69de29b..9619c379 100644 --- a/apps/wacruit-dev/wacruit-judge/wacruit-judge-config.yaml +++ b/apps/wacruit-dev/wacruit-judge/wacruit-judge-config.yaml @@ -0,0 +1,13 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: wacruit-judge-config + namespace: wacruit-dev +data: + REDIS_HOST: wacruit-judge-redis.wacruit-dev.svc.cluster.local + REDIS_PASSWORD: wacruit + MYSQL_HOST: wacruit-judge-mysql.wacruit-dev.svc.cluster.local + MYSQL_PORT: "3306" + MYSQL_USER: wacruit + MYSQL_PASSWORD: wacruit + MYSQL_DATABASE: wacruit \ No newline at end of file diff --git a/apps/wacruit-dev/wacruit-judge/wacruit-judge-mysql.yaml b/apps/wacruit-dev/wacruit-judge/wacruit-judge-mysql.yaml new file mode 100644 index 00000000..f426f044 --- /dev/null +++ b/apps/wacruit-dev/wacruit-judge/wacruit-judge-mysql.yaml @@ -0,0 +1,61 @@ + +apiVersion: apps/v1 +kind: Deployment +metadata: + name: wacruit-judge-mysql + labels: + app: wacruit-judge-mysql + namespace: wacruit-dev +spec: + replicas: 1 + selector: + matchLabels: + app: wacruit-judge-mysql + strategy: + type: RollingUpdate + rollingUpdate: + maxSurge: 25% + maxUnavailable: 25% + revisionHistoryLimit: 4 + template: + metadata: + labels: + app: wacruit-judge-mysql + spec: + serviceAccountName: wacruit-judge-mysql + containers: + - image: mysql:8.0.29 + imagePullPolicy: Never + name: wacruit-judge-mysql + env: + - name: MYSQL_ROOT_PASSWORD + value: wacruit + - name: MYSQL_DATABASE + value: wacruit + - name: MYSQL_USER + value: wacruit + - name: MYSQL_PASSWORD + value: wacruit + ports: + - containerPort: 3306 +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + name: wacruit-judge-mysql + namespace: wacruit-dev + annotations: + eks.amazonaws.com/role-arn: arn:aws:iam::405906814034:role/wacruit-judge-dev-role +--- +apiVersion: v1 +kind: Service +metadata: + namespace: wacruit-dev + name: wacruit-judge-mysql +spec: + type: ClusterIP + selector: + app: wacruit-judge-mysql + ports: + - port: 3306 + targetPort: 3306 \ No newline at end of file diff --git a/apps/wacruit-dev/wacruit-judge/wacruit-judge-redis.yaml b/apps/wacruit-dev/wacruit-judge/wacruit-judge-redis.yaml index e69de29b..910dfc03 100644 --- a/apps/wacruit-dev/wacruit-judge/wacruit-judge-redis.yaml +++ b/apps/wacruit-dev/wacruit-judge/wacruit-judge-redis.yaml @@ -0,0 +1,54 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: wacruit-judge-redis + labels: + app: wacruit-judge-redis + namespace: wacruit-dev +spec: + replicas: 1 + selector: + matchLabels: + app: wacruit-judge-redis + strategy: + type: RollingUpdate + rollingUpdate: + maxSurge: 25% + maxUnavailable: 25% + revisionHistoryLimit: 4 + template: + metadata: + labels: + app: wacruit-judge-redis + spec: + serviceAccountName: wacruit-judge-redis + containers: + - image: redis:6.0 + name: wacruit-judge-redis + command: + - "bash" + - "-c" + - 'docker-entrypoint.sh --appendonly yes --requirepass "wacruit"' + ports: + - containerPort: 6379 +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + name: wacruit-judge-redis + namespace: wacruit-dev + annotations: + eks.amazonaws.com/role-arn: arn:aws:iam::405906814034:role/wacruit-judge-dev-role +--- +apiVersion: v1 +kind: Service +metadata: + namespace: wacruit-dev + name: wacruit-judge-redis +spec: + type: ClusterIP + selector: + app: wacruit-judge-redis + ports: + - port: 6379 + targetPort: 6379 \ No newline at end of file diff --git a/apps/wacruit-dev/wacruit-judge/wacruit-judge-server.yaml b/apps/wacruit-dev/wacruit-judge/wacruit-judge-server.yaml index 9020d3af..926ef7f3 100644 --- a/apps/wacruit-dev/wacruit-judge/wacruit-judge-server.yaml +++ b/apps/wacruit-dev/wacruit-judge/wacruit-judge-server.yaml @@ -23,10 +23,14 @@ spec: spec: serviceAccountName: wacruit-judge-server containers: - - image: 405906814034.dkr.ecr.ap-northeast-2.amazonaws.com/wacruit-dev/wacruit-judge:latest + - image: waffledotcom-judge:latest + imagePullPolicy: Never name: wacruit-judge-server ports: - containerPort: 2358 + envFrom: + - configMapRef: + name: wacruit-judge-config --- apiVersion: v1 kind: ServiceAccount @@ -42,27 +46,34 @@ metadata: namespace: wacruit-dev name: wacruit-judge-server spec: - type: ClusterIP + # type: ClusterIP + # selector: + # app: wacruit-judge-server + # ports: + # - port: 80 + # targetPort: 2358 + type: NodePort selector: app: wacruit-judge-server ports: - - port: 80 + - port: 2358 targetPort: 2358 ---- -apiVersion: networking.istio.io/v1alpha3 -kind: VirtualService -metadata: - namespace: wacruit-dev - name: wacruit-judge-server -spec: - gateways: - - istio-ingress/waffle-ingressgateway - hosts: - - wacruit-judge-dev.wafflestudio.com - http: - - match: - - uri: - exact: /docs/index.html - route: - - destination: - host: wacruit-judge-server + nodePort: 30000 +# --- +# apiVersion: networking.istio.io/v1alpha3 +# kind: VirtualService +# metadata: +# namespace: wacruit-dev +# name: wacruit-judge-server +# spec: +# gateways: +# - istio-ingress/waffle-ingressgateway +# hosts: +# - wacruit-judge-dev.wafflestudio.com +# http: +# - match: +# - uri: +# exact: /docs/index.html +# route: +# - destination: +# host: wacruit-judge-server diff --git a/apps/wacruit-dev/wacruit-judge/wacruit-judge-worker.yaml b/apps/wacruit-dev/wacruit-judge/wacruit-judge-worker.yaml index af2e694c..7a85eb7b 100644 --- a/apps/wacruit-dev/wacruit-judge/wacruit-judge-worker.yaml +++ b/apps/wacruit-dev/wacruit-judge/wacruit-judge-worker.yaml @@ -23,9 +23,13 @@ spec: spec: serviceAccountName: wacruit-judge-worder containers: - - image: 405906814034.dkr.ecr.ap-northeast-2.amazonaws.com/wacruit-dev/wacruit-judge:latest + - image: waffledotcom-judge:latest + imagePullPolicy: Never name: wacruit-judge-worder command: ["./scripts/workers"] + envFrom: + - configMapRef: + name: wacruit-judge-config --- apiVersion: v1 kind: ServiceAccount From b7d4384005767bbda23ac2ffd0dd754479a3ec6a Mon Sep 17 00:00:00 2001 From: minkyu97 Date: Wed, 28 Jun 2023 13:58:22 +0900 Subject: [PATCH 03/12] =?UTF-8?q?cgroup=20=EC=82=AC=EC=9A=A9=EC=9D=84=20?= =?UTF-8?q?=EC=9C=84=ED=95=9C=20securityContext=20=EC=84=A4=EC=A0=95=20/?= =?UTF-8?q?=20=EC=99=80=ED=94=8C=20rds=20=EC=97=B0=EA=B2=B0=20/=20?= =?UTF-8?q?=EB=A1=9C=EC=BB=AC=20=ED=85=8C=EC=8A=A4=ED=8A=B8=20=EC=99=84?= =?UTF-8?q?=EB=A3=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wacruit-judge/wacruit-judge-config.yaml | 8 +-- .../wacruit-judge/wacruit-judge-mysql.yaml | 61 ------------------- .../wacruit-judge/wacruit-judge-server.yaml | 52 +++++++++------- .../wacruit-judge/wacruit-judge-worker.yaml | 21 +++---- 4 files changed, 40 insertions(+), 102 deletions(-) delete mode 100644 apps/wacruit-dev/wacruit-judge/wacruit-judge-mysql.yaml diff --git a/apps/wacruit-dev/wacruit-judge/wacruit-judge-config.yaml b/apps/wacruit-dev/wacruit-judge/wacruit-judge-config.yaml index 9619c379..e800107f 100644 --- a/apps/wacruit-dev/wacruit-judge/wacruit-judge-config.yaml +++ b/apps/wacruit-dev/wacruit-judge/wacruit-judge-config.yaml @@ -6,8 +6,8 @@ metadata: data: REDIS_HOST: wacruit-judge-redis.wacruit-dev.svc.cluster.local REDIS_PASSWORD: wacruit - MYSQL_HOST: wacruit-judge-mysql.wacruit-dev.svc.cluster.local + MYSQL_HOST: wafflestudio-mysql-202107.caxwrw8c4qqq.ap-northeast-2.rds.amazonaws.com MYSQL_PORT: "3306" - MYSQL_USER: wacruit - MYSQL_PASSWORD: wacruit - MYSQL_DATABASE: wacruit \ No newline at end of file + MYSQL_DATABASE: wacruit_dev + MYSQL_USER: wacruit-dev + MYSQL_PASSWORD: q.O3mzes/r5U9eYgu,db diff --git a/apps/wacruit-dev/wacruit-judge/wacruit-judge-mysql.yaml b/apps/wacruit-dev/wacruit-judge/wacruit-judge-mysql.yaml deleted file mode 100644 index f426f044..00000000 --- a/apps/wacruit-dev/wacruit-judge/wacruit-judge-mysql.yaml +++ /dev/null @@ -1,61 +0,0 @@ - -apiVersion: apps/v1 -kind: Deployment -metadata: - name: wacruit-judge-mysql - labels: - app: wacruit-judge-mysql - namespace: wacruit-dev -spec: - replicas: 1 - selector: - matchLabels: - app: wacruit-judge-mysql - strategy: - type: RollingUpdate - rollingUpdate: - maxSurge: 25% - maxUnavailable: 25% - revisionHistoryLimit: 4 - template: - metadata: - labels: - app: wacruit-judge-mysql - spec: - serviceAccountName: wacruit-judge-mysql - containers: - - image: mysql:8.0.29 - imagePullPolicy: Never - name: wacruit-judge-mysql - env: - - name: MYSQL_ROOT_PASSWORD - value: wacruit - - name: MYSQL_DATABASE - value: wacruit - - name: MYSQL_USER - value: wacruit - - name: MYSQL_PASSWORD - value: wacruit - ports: - - containerPort: 3306 ---- -apiVersion: v1 -kind: ServiceAccount -metadata: - name: wacruit-judge-mysql - namespace: wacruit-dev - annotations: - eks.amazonaws.com/role-arn: arn:aws:iam::405906814034:role/wacruit-judge-dev-role ---- -apiVersion: v1 -kind: Service -metadata: - namespace: wacruit-dev - name: wacruit-judge-mysql -spec: - type: ClusterIP - selector: - app: wacruit-judge-mysql - ports: - - port: 3306 - targetPort: 3306 \ No newline at end of file diff --git a/apps/wacruit-dev/wacruit-judge/wacruit-judge-server.yaml b/apps/wacruit-dev/wacruit-judge/wacruit-judge-server.yaml index 926ef7f3..9e1fc4a8 100644 --- a/apps/wacruit-dev/wacruit-judge/wacruit-judge-server.yaml +++ b/apps/wacruit-dev/wacruit-judge/wacruit-judge-server.yaml @@ -46,34 +46,40 @@ metadata: namespace: wacruit-dev name: wacruit-judge-server spec: - # type: ClusterIP - # selector: - # app: wacruit-judge-server - # ports: - # - port: 80 - # targetPort: 2358 - type: NodePort + type: ClusterIP selector: app: wacruit-judge-server ports: - - port: 2358 + - port: 80 targetPort: 2358 - nodePort: 30000 -# --- -# apiVersion: networking.istio.io/v1alpha3 -# kind: VirtualService +# apiVersion: v1 +# kind: Service # metadata: # namespace: wacruit-dev # name: wacruit-judge-server # spec: -# gateways: -# - istio-ingress/waffle-ingressgateway -# hosts: -# - wacruit-judge-dev.wafflestudio.com -# http: -# - match: -# - uri: -# exact: /docs/index.html -# route: -# - destination: -# host: wacruit-judge-server + # type: NodePort + # selector: + # app: wacruit-judge-server + # ports: + # - port: 2358 + # targetPort: 2358 + # nodePort: 30001 +--- +apiVersion: networking.istio.io/v1alpha3 +kind: VirtualService +metadata: + namespace: wacruit-dev + name: wacruit-judge-server +spec: + gateways: + - istio-ingress/waffle-ingressgateway + hosts: + - wacruit-judge-dev.wafflestudio.com + http: + - match: + - uri: + exact: /docs/index.html + route: + - destination: + host: wacruit-judge-server diff --git a/apps/wacruit-dev/wacruit-judge/wacruit-judge-worker.yaml b/apps/wacruit-dev/wacruit-judge/wacruit-judge-worker.yaml index 7a85eb7b..82d5b526 100644 --- a/apps/wacruit-dev/wacruit-judge/wacruit-judge-worker.yaml +++ b/apps/wacruit-dev/wacruit-judge/wacruit-judge-worker.yaml @@ -1,15 +1,15 @@ apiVersion: apps/v1 kind: Deployment metadata: - name: wacruit-judge-worder + name: wacruit-judge-worker labels: - app: wacruit-judge-worder + app: wacruit-judge-worker namespace: wacruit-dev spec: replicas: 1 selector: matchLabels: - app: wacruit-judge-worder + app: wacruit-judge-worker strategy: type: RollingUpdate rollingUpdate: @@ -19,22 +19,15 @@ spec: template: metadata: labels: - app: wacruit-judge-worder + app: wacruit-judge-worker spec: - serviceAccountName: wacruit-judge-worder containers: - image: waffledotcom-judge:latest imagePullPolicy: Never - name: wacruit-judge-worder + name: wacruit-judge-worker command: ["./scripts/workers"] envFrom: - configMapRef: name: wacruit-judge-config ---- -apiVersion: v1 -kind: ServiceAccount -metadata: - name: wacruit-judge-worder - namespace: wacruit-dev - annotations: - eks.amazonaws.com/role-arn: arn:aws:iam::405906814034:role/wacruit-judge-dev-role + securityContext: + privileged: true \ No newline at end of file From a15b485e61caf25b5d67cbbe95658ff8afc7490e Mon Sep 17 00:00:00 2001 From: minkyu97 Date: Wed, 28 Jun 2023 14:04:22 +0900 Subject: [PATCH 04/12] =?UTF-8?q?=EC=9D=B4=EB=AF=B8=EC=A7=80=20=EA=B2=BD?= =?UTF-8?q?=EB=A1=9C=20ECR=20=EB=A1=9C=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/wacruit-dev/wacruit-judge/wacruit-judge-server.yaml | 3 ++- apps/wacruit-dev/wacruit-judge/wacruit-judge-worker.yaml | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/wacruit-dev/wacruit-judge/wacruit-judge-server.yaml b/apps/wacruit-dev/wacruit-judge/wacruit-judge-server.yaml index 9e1fc4a8..f5a85c08 100644 --- a/apps/wacruit-dev/wacruit-judge/wacruit-judge-server.yaml +++ b/apps/wacruit-dev/wacruit-judge/wacruit-judge-server.yaml @@ -23,7 +23,8 @@ spec: spec: serviceAccountName: wacruit-judge-server containers: - - image: waffledotcom-judge:latest + - image: 405906814034.dkr.ecr.ap-northeast-2.amazonaws.com/wacruit-dev/wacruit-judge:latest + # - image: waffledotcom-judge:latest imagePullPolicy: Never name: wacruit-judge-server ports: diff --git a/apps/wacruit-dev/wacruit-judge/wacruit-judge-worker.yaml b/apps/wacruit-dev/wacruit-judge/wacruit-judge-worker.yaml index 82d5b526..7456f31f 100644 --- a/apps/wacruit-dev/wacruit-judge/wacruit-judge-worker.yaml +++ b/apps/wacruit-dev/wacruit-judge/wacruit-judge-worker.yaml @@ -22,7 +22,8 @@ spec: app: wacruit-judge-worker spec: containers: - - image: waffledotcom-judge:latest + - image: 405906814034.dkr.ecr.ap-northeast-2.amazonaws.com/wacruit-dev/wacruit-judge:latest + # - image: waffledotcom-judge:latest imagePullPolicy: Never name: wacruit-judge-worker command: ["./scripts/workers"] From 53fdad3606659334ffa661ac49a1de7ad7814d1e Mon Sep 17 00:00:00 2001 From: minkyu97 Date: Wed, 28 Jun 2023 22:14:26 +0900 Subject: [PATCH 05/12] add new line --- apps/wacruit-dev/wacruit-judge/wacruit-judge-worker.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/wacruit-dev/wacruit-judge/wacruit-judge-worker.yaml b/apps/wacruit-dev/wacruit-judge/wacruit-judge-worker.yaml index 7456f31f..7192ea3b 100644 --- a/apps/wacruit-dev/wacruit-judge/wacruit-judge-worker.yaml +++ b/apps/wacruit-dev/wacruit-judge/wacruit-judge-worker.yaml @@ -31,4 +31,4 @@ spec: - configMapRef: name: wacruit-judge-config securityContext: - privileged: true \ No newline at end of file + privileged: true From fcfef521e2419663f4e015a44f0185539b1db2ae Mon Sep 17 00:00:00 2001 From: minkyu97 Date: Fri, 30 Jun 2023 21:46:39 +0900 Subject: [PATCH 06/12] =?UTF-8?q?config=20=EB=8C=80=EC=8B=A0=20secret=20?= =?UTF-8?q?=EC=82=AC=EC=9A=A9=ED=95=98=EB=8A=94=20=EA=B2=83=EC=9C=BC?= =?UTF-8?q?=EB=A1=9C=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wacruit-judge/wacruit-judge-config.yaml | 13 ----- .../wacruit-judge/wacruit-judge-redis.yaml | 54 ------------------- .../wacruit-judge/wacruit-judge-server.yaml | 18 +------ .../wacruit-judge/wacruit-judge-worker.yaml | 5 +- 4 files changed, 4 insertions(+), 86 deletions(-) delete mode 100644 apps/wacruit-dev/wacruit-judge/wacruit-judge-config.yaml delete mode 100644 apps/wacruit-dev/wacruit-judge/wacruit-judge-redis.yaml diff --git a/apps/wacruit-dev/wacruit-judge/wacruit-judge-config.yaml b/apps/wacruit-dev/wacruit-judge/wacruit-judge-config.yaml deleted file mode 100644 index e800107f..00000000 --- a/apps/wacruit-dev/wacruit-judge/wacruit-judge-config.yaml +++ /dev/null @@ -1,13 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: wacruit-judge-config - namespace: wacruit-dev -data: - REDIS_HOST: wacruit-judge-redis.wacruit-dev.svc.cluster.local - REDIS_PASSWORD: wacruit - MYSQL_HOST: wafflestudio-mysql-202107.caxwrw8c4qqq.ap-northeast-2.rds.amazonaws.com - MYSQL_PORT: "3306" - MYSQL_DATABASE: wacruit_dev - MYSQL_USER: wacruit-dev - MYSQL_PASSWORD: q.O3mzes/r5U9eYgu,db diff --git a/apps/wacruit-dev/wacruit-judge/wacruit-judge-redis.yaml b/apps/wacruit-dev/wacruit-judge/wacruit-judge-redis.yaml deleted file mode 100644 index 910dfc03..00000000 --- a/apps/wacruit-dev/wacruit-judge/wacruit-judge-redis.yaml +++ /dev/null @@ -1,54 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: wacruit-judge-redis - labels: - app: wacruit-judge-redis - namespace: wacruit-dev -spec: - replicas: 1 - selector: - matchLabels: - app: wacruit-judge-redis - strategy: - type: RollingUpdate - rollingUpdate: - maxSurge: 25% - maxUnavailable: 25% - revisionHistoryLimit: 4 - template: - metadata: - labels: - app: wacruit-judge-redis - spec: - serviceAccountName: wacruit-judge-redis - containers: - - image: redis:6.0 - name: wacruit-judge-redis - command: - - "bash" - - "-c" - - 'docker-entrypoint.sh --appendonly yes --requirepass "wacruit"' - ports: - - containerPort: 6379 ---- -apiVersion: v1 -kind: ServiceAccount -metadata: - name: wacruit-judge-redis - namespace: wacruit-dev - annotations: - eks.amazonaws.com/role-arn: arn:aws:iam::405906814034:role/wacruit-judge-dev-role ---- -apiVersion: v1 -kind: Service -metadata: - namespace: wacruit-dev - name: wacruit-judge-redis -spec: - type: ClusterIP - selector: - app: wacruit-judge-redis - ports: - - port: 6379 - targetPort: 6379 \ No newline at end of file diff --git a/apps/wacruit-dev/wacruit-judge/wacruit-judge-server.yaml b/apps/wacruit-dev/wacruit-judge/wacruit-judge-server.yaml index f5a85c08..364e7be4 100644 --- a/apps/wacruit-dev/wacruit-judge/wacruit-judge-server.yaml +++ b/apps/wacruit-dev/wacruit-judge/wacruit-judge-server.yaml @@ -24,14 +24,13 @@ spec: serviceAccountName: wacruit-judge-server containers: - image: 405906814034.dkr.ecr.ap-northeast-2.amazonaws.com/wacruit-dev/wacruit-judge:latest - # - image: waffledotcom-judge:latest imagePullPolicy: Never name: wacruit-judge-server ports: - containerPort: 2358 envFrom: - - configMapRef: - name: wacruit-judge-config + - secretRef: + name: wacruit-judge-secret --- apiVersion: v1 kind: ServiceAccount @@ -53,19 +52,6 @@ spec: ports: - port: 80 targetPort: 2358 -# apiVersion: v1 -# kind: Service -# metadata: -# namespace: wacruit-dev -# name: wacruit-judge-server -# spec: - # type: NodePort - # selector: - # app: wacruit-judge-server - # ports: - # - port: 2358 - # targetPort: 2358 - # nodePort: 30001 --- apiVersion: networking.istio.io/v1alpha3 kind: VirtualService diff --git a/apps/wacruit-dev/wacruit-judge/wacruit-judge-worker.yaml b/apps/wacruit-dev/wacruit-judge/wacruit-judge-worker.yaml index 7192ea3b..62e58beb 100644 --- a/apps/wacruit-dev/wacruit-judge/wacruit-judge-worker.yaml +++ b/apps/wacruit-dev/wacruit-judge/wacruit-judge-worker.yaml @@ -23,12 +23,11 @@ spec: spec: containers: - image: 405906814034.dkr.ecr.ap-northeast-2.amazonaws.com/wacruit-dev/wacruit-judge:latest - # - image: waffledotcom-judge:latest imagePullPolicy: Never name: wacruit-judge-worker command: ["./scripts/workers"] envFrom: - - configMapRef: - name: wacruit-judge-config + - secretRef: + name: wacruit-judge-secret securityContext: privileged: true From f9406ac01ec8bb65eafd213ed08edeef99a553d5 Mon Sep 17 00:00:00 2001 From: minkyu97 Date: Fri, 30 Jun 2023 21:52:18 +0900 Subject: [PATCH 07/12] =?UTF-8?q?=EB=A6=AC=EC=86=8C=EC=8A=A4=20=EC=A0=9C?= =?UTF-8?q?=ED=95=9C=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/wacruit-dev/wacruit-judge/wacruit-judge-server.yaml | 5 +++++ apps/wacruit-dev/wacruit-judge/wacruit-judge-worker.yaml | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/apps/wacruit-dev/wacruit-judge/wacruit-judge-server.yaml b/apps/wacruit-dev/wacruit-judge/wacruit-judge-server.yaml index 364e7be4..46ccbfee 100644 --- a/apps/wacruit-dev/wacruit-judge/wacruit-judge-server.yaml +++ b/apps/wacruit-dev/wacruit-judge/wacruit-judge-server.yaml @@ -31,6 +31,11 @@ spec: envFrom: - secretRef: name: wacruit-judge-secret + resources: + requests: + memory: 512Mi + limits: + memory: 1Gi --- apiVersion: v1 kind: ServiceAccount diff --git a/apps/wacruit-dev/wacruit-judge/wacruit-judge-worker.yaml b/apps/wacruit-dev/wacruit-judge/wacruit-judge-worker.yaml index 62e58beb..81cf1be1 100644 --- a/apps/wacruit-dev/wacruit-judge/wacruit-judge-worker.yaml +++ b/apps/wacruit-dev/wacruit-judge/wacruit-judge-worker.yaml @@ -31,3 +31,10 @@ spec: name: wacruit-judge-secret securityContext: privileged: true + resources: + requests: + cpu: 1000m + memory: 512Mi + limits: + cpu: 1000m + memory: 1Gi From 72d38576ae79463ea84bfac3a29af0b52931b1bb Mon Sep 17 00:00:00 2001 From: shinhong-park Date: Sat, 1 Jul 2023 00:20:51 +0900 Subject: [PATCH 08/12] Use aws secrets manager, fix ECR repo url --- .../wacruit-judge/wacruit-judge-server.yaml | 26 ++----------------- .../wacruit-judge/wacruit-judge-worker.yaml | 15 +++++++---- 2 files changed, 12 insertions(+), 29 deletions(-) diff --git a/apps/wacruit-dev/wacruit-judge/wacruit-judge-server.yaml b/apps/wacruit-dev/wacruit-judge/wacruit-judge-server.yaml index 46ccbfee..460b21b7 100644 --- a/apps/wacruit-dev/wacruit-judge/wacruit-judge-server.yaml +++ b/apps/wacruit-dev/wacruit-judge/wacruit-judge-server.yaml @@ -23,14 +23,10 @@ spec: spec: serviceAccountName: wacruit-judge-server containers: - - image: 405906814034.dkr.ecr.ap-northeast-2.amazonaws.com/wacruit-dev/wacruit-judge:latest - imagePullPolicy: Never + - image: 405906814034.dkr.ecr.ap-northeast-2.amazonaws.com/wacruit-dev/wacruit-judge-server:1 name: wacruit-judge-server ports: - containerPort: 2358 - envFrom: - - secretRef: - name: wacruit-judge-secret resources: requests: memory: 512Mi @@ -43,7 +39,7 @@ metadata: name: wacruit-judge-server namespace: wacruit-dev annotations: - eks.amazonaws.com/role-arn: arn:aws:iam::405906814034:role/wacruit-judge-dev-role + eks.amazonaws.com/role-arn: arn:aws:iam::405906814034:role/wacruit-dev-role --- apiVersion: v1 kind: Service @@ -57,21 +53,3 @@ spec: ports: - port: 80 targetPort: 2358 ---- -apiVersion: networking.istio.io/v1alpha3 -kind: VirtualService -metadata: - namespace: wacruit-dev - name: wacruit-judge-server -spec: - gateways: - - istio-ingress/waffle-ingressgateway - hosts: - - wacruit-judge-dev.wafflestudio.com - http: - - match: - - uri: - exact: /docs/index.html - route: - - destination: - host: wacruit-judge-server diff --git a/apps/wacruit-dev/wacruit-judge/wacruit-judge-worker.yaml b/apps/wacruit-dev/wacruit-judge/wacruit-judge-worker.yaml index 81cf1be1..8ac1f842 100644 --- a/apps/wacruit-dev/wacruit-judge/wacruit-judge-worker.yaml +++ b/apps/wacruit-dev/wacruit-judge/wacruit-judge-worker.yaml @@ -21,14 +21,11 @@ spec: labels: app: wacruit-judge-worker spec: + serviceAccountName: wacruit-judge-worker containers: - - image: 405906814034.dkr.ecr.ap-northeast-2.amazonaws.com/wacruit-dev/wacruit-judge:latest - imagePullPolicy: Never + - image: 405906814034.dkr.ecr.ap-northeast-2.amazonaws.com/wacruit-dev/wacruit-judge-server:1 name: wacruit-judge-worker command: ["./scripts/workers"] - envFrom: - - secretRef: - name: wacruit-judge-secret securityContext: privileged: true resources: @@ -38,3 +35,11 @@ spec: limits: cpu: 1000m memory: 1Gi +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + name: wacruit-judge-worker + namespace: wacruit-dev + annotations: + eks.amazonaws.com/role-arn: arn:aws:iam::405906814034:role/wacruit-dev-role From 8c0c8f6ba7bf2b14cf8d73aecc14794d4eaabbf2 Mon Sep 17 00:00:00 2001 From: shinhong-park Date: Sat, 1 Jul 2023 00:21:18 +0900 Subject: [PATCH 09/12] Add argocd app `wacruit-judge-dev` --- apps/templates/wacruit-judge-dev.yaml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 apps/templates/wacruit-judge-dev.yaml diff --git a/apps/templates/wacruit-judge-dev.yaml b/apps/templates/wacruit-judge-dev.yaml new file mode 100644 index 00000000..651c81c6 --- /dev/null +++ b/apps/templates/wacruit-judge-dev.yaml @@ -0,0 +1,19 @@ + +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + namespace: argocd + name: wacruit-judge-dev + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + project: default + source: + repoURL: {{ .Values.spec.source.repoURL }} + targetRevision: HEAD + path: apps/wacruit-dev/wacruit-judge + destination: + server: {{ .Values.spec.destination.server }} + namespace: argocd + syncPolicy: + {{- .Values.spec.syncPolicy | toYaml | nindent 4 }} From 620c3e5a2b01534d22fa7f9ccd33c71e4d957644 Mon Sep 17 00:00:00 2001 From: shinhong-park Date: Sat, 1 Jul 2023 00:27:49 +0900 Subject: [PATCH 10/12] Add wacruit-judge prod environments --- apps/templates/wacruit-judge.yaml | 19 +++++++ .../wacruit-judge/wacruit-judge-server.yaml | 55 +++++++++++++++++++ .../wacruit-judge/wacruit-judge-worker.yaml | 45 +++++++++++++++ 3 files changed, 119 insertions(+) create mode 100644 apps/templates/wacruit-judge.yaml create mode 100644 apps/wacruit-prod/wacruit-judge/wacruit-judge-server.yaml create mode 100644 apps/wacruit-prod/wacruit-judge/wacruit-judge-worker.yaml diff --git a/apps/templates/wacruit-judge.yaml b/apps/templates/wacruit-judge.yaml new file mode 100644 index 00000000..8f730e5d --- /dev/null +++ b/apps/templates/wacruit-judge.yaml @@ -0,0 +1,19 @@ + +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + namespace: argocd + name: wacruit-judge + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + project: default + source: + repoURL: {{ .Values.spec.source.repoURL }} + targetRevision: HEAD + path: apps/wacruit-prod/wacruit-judge + destination: + server: {{ .Values.spec.destination.server }} + namespace: argocd + syncPolicy: + {{- .Values.spec.syncPolicy | toYaml | nindent 4 }} diff --git a/apps/wacruit-prod/wacruit-judge/wacruit-judge-server.yaml b/apps/wacruit-prod/wacruit-judge/wacruit-judge-server.yaml new file mode 100644 index 00000000..0e6f9bc1 --- /dev/null +++ b/apps/wacruit-prod/wacruit-judge/wacruit-judge-server.yaml @@ -0,0 +1,55 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: wacruit-judge-server + labels: + app: wacruit-judge-server + namespace: wacruit-prod +spec: + replicas: 1 + selector: + matchLabels: + app: wacruit-judge-server + strategy: + type: RollingUpdate + rollingUpdate: + maxSurge: 25% + maxUnavailable: 25% + revisionHistoryLimit: 4 + template: + metadata: + labels: + app: wacruit-judge-server + spec: + serviceAccountName: wacruit-judge-server + containers: + - image: 405906814034.dkr.ecr.ap-northeast-2.amazonaws.com/wacruit-prod/wacruit-judge-server:1 + name: wacruit-judge-server + ports: + - containerPort: 2358 + resources: + requests: + memory: 512Mi + limits: + memory: 1Gi +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + name: wacruit-judge-server + namespace: wacruit-prod + annotations: + eks.amazonaws.com/role-arn: arn:aws:iam::405906814034:role/wacruit-prod-role +--- +apiVersion: v1 +kind: Service +metadata: + namespace: wacruit-prod + name: wacruit-judge-server +spec: + type: ClusterIP + selector: + app: wacruit-judge-server + ports: + - port: 80 + targetPort: 2358 diff --git a/apps/wacruit-prod/wacruit-judge/wacruit-judge-worker.yaml b/apps/wacruit-prod/wacruit-judge/wacruit-judge-worker.yaml new file mode 100644 index 00000000..74c96e47 --- /dev/null +++ b/apps/wacruit-prod/wacruit-judge/wacruit-judge-worker.yaml @@ -0,0 +1,45 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: wacruit-judge-worker + labels: + app: wacruit-judge-worker + namespace: wacruit-prod +spec: + replicas: 1 + selector: + matchLabels: + app: wacruit-judge-worker + strategy: + type: RollingUpdate + rollingUpdate: + maxSurge: 25% + maxUnavailable: 25% + revisionHistoryLimit: 4 + template: + metadata: + labels: + app: wacruit-judge-worker + spec: + serviceAccountName: wacruit-judge-worker + containers: + - image: 405906814034.dkr.ecr.ap-northeast-2.amazonaws.com/wacruit-prod/wacruit-judge-server:1 + name: wacruit-judge-worker + command: ["./scripts/workers"] + securityContext: + privileged: true + resources: + requests: + cpu: 1000m + memory: 512Mi + limits: + cpu: 1000m + memory: 1Gi +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + name: wacruit-judge-worker + namespace: wacruit-prod + annotations: + eks.amazonaws.com/role-arn: arn:aws:iam::405906814034:role/wacruit-prod-role From 1b9d7f9694abae1374e30f1d1e57417c967de93c Mon Sep 17 00:00:00 2001 From: shinhong-park Date: Sat, 8 Jul 2023 14:52:42 +0900 Subject: [PATCH 11/12] Readd virtual service --- .../wacruit-judge/wacruit-judge-server.yaml | 15 +++++++++++++++ .../wacruit-judge/wacruit-judge-server.yaml | 15 +++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/apps/wacruit-dev/wacruit-judge/wacruit-judge-server.yaml b/apps/wacruit-dev/wacruit-judge/wacruit-judge-server.yaml index 460b21b7..cdaea5e5 100644 --- a/apps/wacruit-dev/wacruit-judge/wacruit-judge-server.yaml +++ b/apps/wacruit-dev/wacruit-judge/wacruit-judge-server.yaml @@ -53,3 +53,18 @@ spec: ports: - port: 80 targetPort: 2358 +--- +apiVersion: networking.istio.io/v1alpha3 +kind: VirtualService +metadata: + namespace: wacruit-dev + name: wacruit-judge-server +spec: + gateways: + - istio-ingress/waffle-ingressgateway + hosts: + - wacruit-judge-dev.wafflestudio.com + http: + - route: + - destination: + host: wacruit-judge-server diff --git a/apps/wacruit-prod/wacruit-judge/wacruit-judge-server.yaml b/apps/wacruit-prod/wacruit-judge/wacruit-judge-server.yaml index 0e6f9bc1..8b3cb2a6 100644 --- a/apps/wacruit-prod/wacruit-judge/wacruit-judge-server.yaml +++ b/apps/wacruit-prod/wacruit-judge/wacruit-judge-server.yaml @@ -53,3 +53,18 @@ spec: ports: - port: 80 targetPort: 2358 +--- +apiVersion: networking.istio.io/v1alpha3 +kind: VirtualService +metadata: + namespace: wacruit-prod + name: wacruit-judge-server +spec: + gateways: + - istio-ingress/waffle-ingressgateway + hosts: + - wacruit-judge.wafflestudio.com + http: + - route: + - destination: + host: wacruit-judge-server From 2003610f9b52ba5bc9350ac5c84eaf364d555624 Mon Sep 17 00:00:00 2001 From: davin111 Date: Sat, 15 Jul 2023 05:53:54 +0900 Subject: [PATCH 12/12] modified --- .github/CODEOWNERS | 2 ++ apps/templates/wacruit-judge-dev.yaml | 1 - apps/templates/wacruit-judge.yaml | 1 - .../wacruit-judge/wacruit-judge-server.yaml | 15 +++++++++------ .../wacruit-judge/wacruit-judge-worker.yaml | 8 ++++---- .../wacruit-judge/wacruit-judge-server.yaml | 15 +++++++++------ .../wacruit-judge/wacruit-judge-worker.yaml | 4 ++-- misc/apps/namespace.yaml | 14 ++++++++++++++ 8 files changed, 40 insertions(+), 20 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index b3ba3778..7f562d50 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -17,6 +17,8 @@ apps/siksha-dev/ @wafflestudio/siksha apps/siksha-prod/ @wafflestudio/siksha apps/waffledotcom-dev/waffledotcom-server @wafflestudio/waffledotcom-backend apps/waffledotcom-prod/waffledotcom-server @wafflestudio/waffledotcom-backend +apps/wacruit-dev @wafflestudio/waffledotcom-backend +apps/wacruit-prod @wafflestudio/waffledotcom-backend apps/pupuri-prod/ @woohm402 apps/ggzz-dev/ @wafflestudio/ggzz apps/k8s-monitoring/ @PFCJeong diff --git a/apps/templates/wacruit-judge-dev.yaml b/apps/templates/wacruit-judge-dev.yaml index 651c81c6..ba74dba9 100644 --- a/apps/templates/wacruit-judge-dev.yaml +++ b/apps/templates/wacruit-judge-dev.yaml @@ -1,4 +1,3 @@ - apiVersion: argoproj.io/v1alpha1 kind: Application metadata: diff --git a/apps/templates/wacruit-judge.yaml b/apps/templates/wacruit-judge.yaml index 8f730e5d..bbaf7735 100644 --- a/apps/templates/wacruit-judge.yaml +++ b/apps/templates/wacruit-judge.yaml @@ -1,4 +1,3 @@ - apiVersion: argoproj.io/v1alpha1 kind: Application metadata: diff --git a/apps/wacruit-dev/wacruit-judge/wacruit-judge-server.yaml b/apps/wacruit-dev/wacruit-judge/wacruit-judge-server.yaml index cdaea5e5..16701170 100644 --- a/apps/wacruit-dev/wacruit-judge/wacruit-judge-server.yaml +++ b/apps/wacruit-dev/wacruit-judge/wacruit-judge-server.yaml @@ -23,15 +23,17 @@ spec: spec: serviceAccountName: wacruit-judge-server containers: - - image: 405906814034.dkr.ecr.ap-northeast-2.amazonaws.com/wacruit-dev/wacruit-judge-server:1 + - image: 405906814034.dkr.ecr.ap-northeast-2.amazonaws.com/wacruit-dev/wacruit-judge-server:3 name: wacruit-judge-server - ports: - - containerPort: 2358 resources: requests: - memory: 512Mi + cpu: 100m + memory: 192Mi limits: - memory: 1Gi + cpu: 200m + memory: 192Mi + ports: + - containerPort: 2358 --- apiVersion: v1 kind: ServiceAccount @@ -62,8 +64,9 @@ metadata: spec: gateways: - istio-ingress/waffle-ingressgateway + - mesh hosts: - - wacruit-judge-dev.wafflestudio.com + - wacruit-judge-server.wacruit-dev.svc.cluster.local http: - route: - destination: diff --git a/apps/wacruit-dev/wacruit-judge/wacruit-judge-worker.yaml b/apps/wacruit-dev/wacruit-judge/wacruit-judge-worker.yaml index 8ac1f842..f8dc1efd 100644 --- a/apps/wacruit-dev/wacruit-judge/wacruit-judge-worker.yaml +++ b/apps/wacruit-dev/wacruit-judge/wacruit-judge-worker.yaml @@ -23,18 +23,18 @@ spec: spec: serviceAccountName: wacruit-judge-worker containers: - - image: 405906814034.dkr.ecr.ap-northeast-2.amazonaws.com/wacruit-dev/wacruit-judge-server:1 + - image: 405906814034.dkr.ecr.ap-northeast-2.amazonaws.com/wacruit-dev/wacruit-judge-server:3 name: wacruit-judge-worker command: ["./scripts/workers"] securityContext: privileged: true resources: requests: - cpu: 1000m + cpu: 500m memory: 512Mi limits: - cpu: 1000m - memory: 1Gi + cpu: 500m + memory: 512Mi --- apiVersion: v1 kind: ServiceAccount diff --git a/apps/wacruit-prod/wacruit-judge/wacruit-judge-server.yaml b/apps/wacruit-prod/wacruit-judge/wacruit-judge-server.yaml index 8b3cb2a6..4e2cae9b 100644 --- a/apps/wacruit-prod/wacruit-judge/wacruit-judge-server.yaml +++ b/apps/wacruit-prod/wacruit-judge/wacruit-judge-server.yaml @@ -6,7 +6,7 @@ metadata: app: wacruit-judge-server namespace: wacruit-prod spec: - replicas: 1 + replicas: 0 selector: matchLabels: app: wacruit-judge-server @@ -25,13 +25,15 @@ spec: containers: - image: 405906814034.dkr.ecr.ap-northeast-2.amazonaws.com/wacruit-prod/wacruit-judge-server:1 name: wacruit-judge-server - ports: - - containerPort: 2358 resources: requests: - memory: 512Mi + cpu: 200m + memory: 256Mi limits: - memory: 1Gi + cpu: 400m + memory: 256Mi + ports: + - containerPort: 2358 --- apiVersion: v1 kind: ServiceAccount @@ -62,8 +64,9 @@ metadata: spec: gateways: - istio-ingress/waffle-ingressgateway + - mesh hosts: - - wacruit-judge.wafflestudio.com + - wacruit-judge-server.wacruit-prod.svc.cluster.local http: - route: - destination: diff --git a/apps/wacruit-prod/wacruit-judge/wacruit-judge-worker.yaml b/apps/wacruit-prod/wacruit-judge/wacruit-judge-worker.yaml index 74c96e47..02b40d06 100644 --- a/apps/wacruit-prod/wacruit-judge/wacruit-judge-worker.yaml +++ b/apps/wacruit-prod/wacruit-judge/wacruit-judge-worker.yaml @@ -6,7 +6,7 @@ metadata: app: wacruit-judge-worker namespace: wacruit-prod spec: - replicas: 1 + replicas: 0 selector: matchLabels: app: wacruit-judge-worker @@ -31,7 +31,7 @@ spec: resources: requests: cpu: 1000m - memory: 512Mi + memory: 1Gi limits: cpu: 1000m memory: 1Gi diff --git a/misc/apps/namespace.yaml b/misc/apps/namespace.yaml index 735e4e91..0606ec8e 100644 --- a/misc/apps/namespace.yaml +++ b/misc/apps/namespace.yaml @@ -116,3 +116,17 @@ metadata: name: waffledotcom-prod labels: istio-injection: enabled +--- +apiVersion: v1 +kind: Namespace +metadata: + name: wacruit-dev + labels: + istio-injection: enabled +--- +apiVersion: v1 +kind: Namespace +metadata: + name: wacruit-prod + labels: + istio-injection: enabled