From f866c6b31866938e6b1be0ac37ddd808051e9bba Mon Sep 17 00:00:00 2001 From: Pratap2018 Date: Thu, 14 Nov 2024 17:42:31 +0530 Subject: [PATCH] cicd: deployment update --- .deploy/deployment.yaml | 63 +++++++++++++++++++++-------------------- .deploy/hpa.yaml | 25 ++++++++++++++++ 2 files changed, 58 insertions(+), 30 deletions(-) create mode 100644 .deploy/hpa.yaml diff --git a/.deploy/deployment.yaml b/.deploy/deployment.yaml index 44daae0..5d1db45 100644 --- a/.deploy/deployment.yaml +++ b/.deploy/deployment.yaml @@ -13,34 +13,37 @@ spec: app: entity-developer-dashbord-ui spec: containers: - - name: entity-developer-dashbord-ui - image: __GOOGLE_ARTIFACT_URL__/__GOOGLE_PROJECT_ID__/__GOOGLE_ARTIFACT_REPO__/entity-developer-dashbord:__LATEST_RELEASE_TAG__ - imagePullPolicy: Always - resources: - limits: - memory: "128Mi" - cpu: "500m" - ports: - - containerPort: 8080 - env: - - name: NODE_ENV - value: __NODE_ENV__ - - name: VUE_APP_DESC - value: __VUE_APP_DESC__ - - name: VUE_APP_EXPLORER_BASE_URL - value: __VUE_APP_EXPLORER_BASE_URL__ - - name: VUE_APP_NODE_SERVER_BASE_URL_REST - value: __VUE_APP_NODE_SERVER_BASE_URL_REST__ - - name: VUE_APP_STUDIO_SERVER_BASE_URL - value: __VUE_APP_STUDIO_SERVER_BASE_URL__ - - name: VUE_APP_STUDIO_SERVER_BASE_WS - value: __VUE_APP_STUDIO_SERVER_BASE_WS__ - - name: VUE_APP_TITLE - value: __VUE_APP_TITLE__ - - name: VUE_APP_VERSION - value: __VUE_APP_VERSION__ - - name: VUE_APP_WEB_WALLET_ADDRESS - value: __VUE_APP_WEB_WALLET_ADDRESS__ + - name: entity-developer-dashbord-ui + image: __GOOGLE_ARTIFACT_URL__/__GOOGLE_PROJECT_ID__/__GOOGLE_ARTIFACT_REPO__/entity-developer-dashbord:__LATEST_RELEASE_TAG__ + imagePullPolicy: Always + resources: + limits: + memory: "256Mi" + cpu: "200m" + requests: + memory: "128Mi" + cpu: "100m" + ports: + - containerPort: 8080 + env: + - name: NODE_ENV + value: __NODE_ENV__ + - name: VUE_APP_DESC + value: __VUE_APP_DESC__ + - name: VUE_APP_EXPLORER_BASE_URL + value: __VUE_APP_EXPLORER_BASE_URL__ + - name: VUE_APP_NODE_SERVER_BASE_URL_REST + value: __VUE_APP_NODE_SERVER_BASE_URL_REST__ + - name: VUE_APP_STUDIO_SERVER_BASE_URL + value: __VUE_APP_STUDIO_SERVER_BASE_URL__ + - name: VUE_APP_STUDIO_SERVER_BASE_WS + value: __VUE_APP_STUDIO_SERVER_BASE_WS__ + - name: VUE_APP_TITLE + value: __VUE_APP_TITLE__ + - name: VUE_APP_VERSION + value: __VUE_APP_VERSION__ + - name: VUE_APP_WEB_WALLET_ADDRESS + value: __VUE_APP_WEB_WALLET_ADDRESS__ --- apiVersion: v1 kind: Service @@ -53,5 +56,5 @@ spec: selector: app: entity-developer-dashbord-ui ports: - - port: 8080 - targetPort: 80 + - port: 8080 + targetPort: 80 diff --git a/.deploy/hpa.yaml b/.deploy/hpa.yaml new file mode 100644 index 0000000..8e6b4cf --- /dev/null +++ b/.deploy/hpa.yaml @@ -0,0 +1,25 @@ +apiVersion: autoscaling/v2 +kind: HorizontalPodAutoscaler +metadata: + name: entity-developer-dashbord-ui + namespace: hypermine-development +spec: + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: entity-developer-dashbord-ui + minReplicas: 1 + maxReplicas: 5 + metrics: + - type: Resource + resource: + name: cpu + target: + type: Utilization + averageUtilization: 70 + - type: Resource + resource: + name: memory + target: + type: Utilization + averageUtilization: 70