From a609877eae0732cec4fd91d18c18af80163e8480 Mon Sep 17 00:00:00 2001 From: Akshat Jain Date: Tue, 20 May 2025 16:05:01 +0530 Subject: [PATCH 01/14] Chore/add/metrics server/dependency (#105) --- .github/workflows/chart-preview.yml | 1 + .github/workflows/chart-releaser.yml | 6 +++ .gitignore | 1 + charts/plane-ce/Chart.lock | 6 +++ charts/plane-ce/Chart.yaml | 5 +++ .../templates/workloads/admin.deployment.yaml | 38 +++++++++++++++- .../templates/workloads/api.deployment.yaml | 36 ++++++++++++++++ .../workloads/beat-worker.deployment.yaml | 38 +++++++++++++++- .../templates/workloads/live.deployment.yaml | 36 ++++++++++++++++ .../templates/workloads/space.deployment.yaml | 38 +++++++++++++++- .../templates/workloads/web.deployment.yaml | 36 ++++++++++++++++ .../workloads/worker.deployment.yaml | 36 ++++++++++++++++ charts/plane-ce/values.yaml | 43 +++++++++++++++++++ 13 files changed, 317 insertions(+), 3 deletions(-) diff --git a/.github/workflows/chart-preview.yml b/.github/workflows/chart-preview.yml index 7b45d60..b76017d 100644 --- a/.github/workflows/chart-preview.yml +++ b/.github/workflows/chart-preview.yml @@ -92,6 +92,7 @@ jobs: sed -i "s/name: ${{env.CHART_REPO}}/name: ${{ env.CHART_PREFIX }}-${{env.CHART_REPO}}/" charts/${{env.CHART_REPO}}/Chart.yaml sed -i "s/description: .*/description: ${flatBranchName}/g" charts/${{env.CHART_REPO}}/Chart.yaml # sed -i "s/version: \(.*\)/version: \1-${flatBranchName}/" charts/${{env.CHART_REPO}}/Chart.yaml + helm dependency build charts/$CHART_REPO helm package --sign --key "$CR_KEY" --keyring $CR_KEYRING --passphrase-file "$CR_PASSPHRASE_FILE" charts/$CHART_REPO -u -d ${{ env.EXPORT_DIR }}/${{env.CHART_REPO}}/charts cp charts/${{env.CHART_REPO}}/README.md ${{ env.EXPORT_DIR }}/${{env.CHART_REPO}}/${{env.CHART_REPO}}.md diff --git a/.github/workflows/chart-releaser.yml b/.github/workflows/chart-releaser.yml index 5fa01ff..f4c70ab 100644 --- a/.github/workflows/chart-releaser.yml +++ b/.github/workflows/chart-releaser.yml @@ -98,6 +98,12 @@ jobs: echo "MARK_AS_PRERELASE=true" >> $GITHUB_ENV echo "PAGES_INDEX_PATH=${flatBranchName}" >> $GITHUB_ENV + - name: Build Dependencies + run: | + if [ "${{ github.event.inputs.plane-ce }}" = "true" ]; then + helm dependency build charts/${{ env.CHART_NAME_CE }} + fi + - name: Release Charts uses: mguptahub/chart-releaser-action@v1.6.2 with: diff --git a/.gitignore b/.gitignore index 3a4745c..4653df4 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ test-helm.yaml */local-values.yaml test.yaml test-*.yaml +charts/plane-ce/charts diff --git a/charts/plane-ce/Chart.lock b/charts/plane-ce/Chart.lock index e69de29..9acd48c 100644 --- a/charts/plane-ce/Chart.lock +++ b/charts/plane-ce/Chart.lock @@ -0,0 +1,6 @@ +dependencies: +- name: metrics-server + repository: https://kubernetes-sigs.github.io/metrics-server/ + version: 3.12.2 +digest: sha256:9be099fcb7bb171b96598c6135df06c9feb60535737dd4adfdc601d44e23d6bf +generated: "2025-05-20T13:23:06.095553+05:30" diff --git a/charts/plane-ce/Chart.yaml b/charts/plane-ce/Chart.yaml index f70e01a..b352b44 100644 --- a/charts/plane-ce/Chart.yaml +++ b/charts/plane-ce/Chart.yaml @@ -15,3 +15,8 @@ sources: annotations: artifacthub.io/license: AGPL-3.0 + +dependencies: + - name: metrics-server + version: 3.12.2 + repository: https://kubernetes-sigs.github.io/metrics-server/ \ No newline at end of file diff --git a/charts/plane-ce/templates/workloads/admin.deployment.yaml b/charts/plane-ce/templates/workloads/admin.deployment.yaml index be32eb6..f756783 100644 --- a/charts/plane-ce/templates/workloads/admin.deployment.yaml +++ b/charts/plane-ce/templates/workloads/admin.deployment.yaml @@ -59,4 +59,40 @@ spec: serviceAccount: {{ .Release.Name }}-srv-account serviceAccountName: {{ .Release.Name }}-srv-account ---- \ No newline at end of file +--- +{{- if .Values.admin.autoscaling.enabled }} +apiVersion: autoscaling/v2 +kind: HorizontalPodAutoscaler +metadata: + name: {{ .Release.Name }}-admin-hpa + namespace: {{ .Release.Namespace }} + labels: + app.name: {{ .Release.Namespace }}-{{ .Release.Name }}-admin-hpa +spec: + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: {{ .Release.Name }}-admin-wl + minReplicas: {{ .Values.admin.autoscaling.minReplicas }} + maxReplicas: {{ .Values.admin.autoscaling.maxReplicas }} + {{- if or .Values.admin.autoscaling.targetCPUUtilizationPercentage .Values.admin.autoscaling.targetMemoryUtilizationPercentage }} + metrics: + {{- if .Values.admin.autoscaling.targetCPUUtilizationPercentage }} + - type: Resource + resource: + name: cpu + target: + type: Utilization + averageUtilization: {{ .Values.admin.autoscaling.targetCPUUtilizationPercentage }} + {{- end }} + {{- if .Values.admin.autoscaling.targetMemoryUtilizationPercentage }} + - type: Resource + resource: + name: memory + target: + type: Utilization + averageUtilization: {{ .Values.admin.autoscaling.targetMemoryUtilizationPercentage }} + {{- end }} + {{- end }} +{{- end }} +--- diff --git a/charts/plane-ce/templates/workloads/api.deployment.yaml b/charts/plane-ce/templates/workloads/api.deployment.yaml index 2da395d..c79e25b 100644 --- a/charts/plane-ce/templates/workloads/api.deployment.yaml +++ b/charts/plane-ce/templates/workloads/api.deployment.yaml @@ -76,4 +76,40 @@ spec: serviceAccount: {{ .Release.Name }}-srv-account serviceAccountName: {{ .Release.Name }}-srv-account +--- +{{- if .Values.api.autoscaling.enabled }} +apiVersion: autoscaling/v2 +kind: HorizontalPodAutoscaler +metadata: + name: {{ .Release.Name }}-api-hpa + namespace: {{ .Release.Namespace }} + labels: + app.name: {{ .Release.Namespace }}-{{ .Release.Name }}-api-hpa +spec: + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: {{ .Release.Name }}-api-wl + minReplicas: {{ .Values.api.autoscaling.minReplicas }} + maxReplicas: {{ .Values.api.autoscaling.maxReplicas }} + {{- if or .Values.api.autoscaling.targetCPUUtilizationPercentage .Values.api.autoscaling.targetMemoryUtilizationPercentage }} + metrics: + {{- if .Values.api.autoscaling.targetCPUUtilizationPercentage }} + - type: Resource + resource: + name: cpu + target: + type: Utilization + averageUtilization: {{ .Values.api.autoscaling.targetCPUUtilizationPercentage }} + {{- end }} + {{- if .Values.api.autoscaling.targetMemoryUtilizationPercentage }} + - type: Resource + resource: + name: memory + target: + type: Utilization + averageUtilization: {{ .Values.api.autoscaling.targetMemoryUtilizationPercentage }} + {{- end }} + {{- end }} +{{- end }} --- \ No newline at end of file diff --git a/charts/plane-ce/templates/workloads/beat-worker.deployment.yaml b/charts/plane-ce/templates/workloads/beat-worker.deployment.yaml index b827fc3..ed1ed40 100644 --- a/charts/plane-ce/templates/workloads/beat-worker.deployment.yaml +++ b/charts/plane-ce/templates/workloads/beat-worker.deployment.yaml @@ -46,4 +46,40 @@ spec: serviceAccount: {{ .Release.Name }}-srv-account serviceAccountName: {{ .Release.Name }}-srv-account ---- \ No newline at end of file +--- +{{- if .Values.beatworker.autoscaling.enabled }} +apiVersion: autoscaling/v2 +kind: HorizontalPodAutoscaler +metadata: + name: {{ .Release.Name }}-beat-worker-hpa + namespace: {{ .Release.Namespace }} + labels: + app.name: {{ .Release.Namespace }}-{{ .Release.Name }}-beat-worker-hpa +spec: + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: {{ .Release.Name }}-beat-worker-wl + minReplicas: {{ .Values.beatworker.autoscaling.minReplicas }} + maxReplicas: {{ .Values.beatworker.autoscaling.maxReplicas }} + {{- if or .Values.beatworker.autoscaling.targetCPUUtilizationPercentage .Values.beatworker.autoscaling.targetMemoryUtilizationPercentage }} + metrics: + {{- if .Values.beatworker.autoscaling.targetCPUUtilizationPercentage }} + - type: Resource + resource: + name: cpu + target: + type: Utilization + averageUtilization: {{ .Values.beatworker.autoscaling.targetCPUUtilizationPercentage }} + {{- end }} + {{- if .Values.beatworker.autoscaling.targetMemoryUtilizationPercentage }} + - type: Resource + resource: + name: memory + target: + type: Utilization + averageUtilization: {{ .Values.beatworker.autoscaling.targetMemoryUtilizationPercentage }} + {{- end }} + {{- end }} +{{- end }} +--- diff --git a/charts/plane-ce/templates/workloads/live.deployment.yaml b/charts/plane-ce/templates/workloads/live.deployment.yaml index 659b14c..ffbbe6c 100644 --- a/charts/plane-ce/templates/workloads/live.deployment.yaml +++ b/charts/plane-ce/templates/workloads/live.deployment.yaml @@ -66,3 +66,39 @@ spec: serviceAccountName: {{ .Release.Name }}-srv-account --- +{{- if .Values.live.autoscaling.enabled }} +apiVersion: autoscaling/v2 +kind: HorizontalPodAutoscaler +metadata: + name: {{ .Release.Name }}-live-hpa + namespace: {{ .Release.Namespace }} + labels: + app.name: {{ .Release.Namespace }}-{{ .Release.Name }}-live-hpa +spec: + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: {{ .Release.Name }}-live-wl + minReplicas: {{ .Values.live.autoscaling.minReplicas }} + maxReplicas: {{ .Values.live.autoscaling.maxReplicas }} + {{- if or .Values.live.autoscaling.targetCPUUtilizationPercentage .Values.live.autoscaling.targetMemoryUtilizationPercentage }} + metrics: + {{- if .Values.live.autoscaling.targetCPUUtilizationPercentage }} + - type: Resource + resource: + name: cpu + target: + type: Utilization + averageUtilization: {{ .Values.live.autoscaling.targetCPUUtilizationPercentage }} + {{- end }} + {{- if .Values.live.autoscaling.targetMemoryUtilizationPercentage }} + - type: Resource + resource: + name: memory + target: + type: Utilization + averageUtilization: {{ .Values.live.autoscaling.targetMemoryUtilizationPercentage }} + {{- end }} + {{- end }} +{{- end }} +--- diff --git a/charts/plane-ce/templates/workloads/space.deployment.yaml b/charts/plane-ce/templates/workloads/space.deployment.yaml index 192fd3f..2a37fc1 100644 --- a/charts/plane-ce/templates/workloads/space.deployment.yaml +++ b/charts/plane-ce/templates/workloads/space.deployment.yaml @@ -59,4 +59,40 @@ spec: serviceAccount: {{ .Release.Name }}-srv-account serviceAccountName: {{ .Release.Name }}-srv-account ---- \ No newline at end of file +--- +{{- if .Values.space.autoscaling.enabled }} +apiVersion: autoscaling/v2 +kind: HorizontalPodAutoscaler +metadata: + name: {{ .Release.Name }}-space-hpa + namespace: {{ .Release.Namespace }} + labels: + app.name: {{ .Release.Namespace }}-{{ .Release.Name }}-space-hpa +spec: + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: {{ .Release.Name }}-space-wl + minReplicas: {{ .Values.space.autoscaling.minReplicas }} + maxReplicas: {{ .Values.space.autoscaling.maxReplicas }} + {{- if or .Values.space.autoscaling.targetCPUUtilizationPercentage .Values.space.autoscaling.targetMemoryUtilizationPercentage }} + metrics: + {{- if .Values.space.autoscaling.targetCPUUtilizationPercentage }} + - type: Resource + resource: + name: cpu + target: + type: Utilization + averageUtilization: {{ .Values.space.autoscaling.targetCPUUtilizationPercentage }} + {{- end }} + {{- if .Values.space.autoscaling.targetMemoryUtilizationPercentage }} + - type: Resource + resource: + name: memory + target: + type: Utilization + averageUtilization: {{ .Values.space.autoscaling.targetMemoryUtilizationPercentage }} + {{- end }} + {{- end }} +{{- end }} +--- diff --git a/charts/plane-ce/templates/workloads/web.deployment.yaml b/charts/plane-ce/templates/workloads/web.deployment.yaml index e4fa7c4..38687d9 100644 --- a/charts/plane-ce/templates/workloads/web.deployment.yaml +++ b/charts/plane-ce/templates/workloads/web.deployment.yaml @@ -59,4 +59,40 @@ spec: serviceAccount: {{ .Release.Name }}-srv-account serviceAccountName: {{ .Release.Name }}-srv-account +--- +{{- if .Values.web.autoscaling.enabled }} +apiVersion: autoscaling/v2 +kind: HorizontalPodAutoscaler +metadata: + name: {{ .Release.Name }}-web-hpa + namespace: {{ .Release.Namespace }} + labels: + app.name: {{ .Release.Namespace }}-{{ .Release.Name }}-web-hpa +spec: + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: {{ .Release.Name }}-web-wl + minReplicas: {{ .Values.web.autoscaling.minReplicas }} + maxReplicas: {{ .Values.web.autoscaling.maxReplicas }} + {{- if or .Values.web.autoscaling.targetCPUUtilizationPercentage .Values.web.autoscaling.targetMemoryUtilizationPercentage }} + metrics: + {{- if .Values.web.autoscaling.targetCPUUtilizationPercentage }} + - type: Resource + resource: + name: cpu + target: + type: Utilization + averageUtilization: {{ .Values.web.autoscaling.targetCPUUtilizationPercentage }} + {{- end }} + {{- if .Values.web.autoscaling.targetMemoryUtilizationPercentage }} + - type: Resource + resource: + name: memory + target: + type: Utilization + averageUtilization: {{ .Values.web.autoscaling.targetMemoryUtilizationPercentage }} + {{- end }} + {{- end }} +{{- end }} --- \ No newline at end of file diff --git a/charts/plane-ce/templates/workloads/worker.deployment.yaml b/charts/plane-ce/templates/workloads/worker.deployment.yaml index 956ccdb..48c65a0 100644 --- a/charts/plane-ce/templates/workloads/worker.deployment.yaml +++ b/charts/plane-ce/templates/workloads/worker.deployment.yaml @@ -45,4 +45,40 @@ spec: serviceAccount: {{ .Release.Name }}-srv-account serviceAccountName: {{ .Release.Name }}-srv-account +--- +{{- if .Values.worker.autoscaling.enabled }} +apiVersion: autoscaling/v2 +kind: HorizontalPodAutoscaler +metadata: + name: {{ .Release.Name }}-worker-hpa + namespace: {{ .Release.Namespace }} + labels: + app.name: {{ .Release.Namespace }}-{{ .Release.Name }}-worker-hpa +spec: + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: {{ .Release.Name }}-worker-wl + minReplicas: {{ .Values.worker.autoscaling.minReplicas }} + maxReplicas: {{ .Values.worker.autoscaling.maxReplicas }} + {{- if or .Values.worker.autoscaling.targetCPUUtilizationPercentage .Values.worker.autoscaling.targetMemoryUtilizationPercentage }} + metrics: + {{- if .Values.worker.autoscaling.targetCPUUtilizationPercentage }} + - type: Resource + resource: + name: cpu + target: + type: Utilization + averageUtilization: {{ .Values.worker.autoscaling.targetCPUUtilizationPercentage }} + {{- end }} + {{- if .Values.worker.autoscaling.targetMemoryUtilizationPercentage }} + - type: Resource + resource: + name: memory + target: + type: Utilization + averageUtilization: {{ .Values.worker.autoscaling.targetMemoryUtilizationPercentage }} + {{- end }} + {{- end }} +{{- end }} --- \ No newline at end of file diff --git a/charts/plane-ce/values.yaml b/charts/plane-ce/values.yaml index 422d2d2..6d3baa8 100644 --- a/charts/plane-ce/values.yaml +++ b/charts/plane-ce/values.yaml @@ -76,6 +76,12 @@ web: image: artifacts.plane.so/makeplane/plane-frontend pullPolicy: Always assign_cluster_ip: false + autoscaling: + enabled: true + minReplicas: 1 + maxReplicas: 3 + targetCPUUtilizationPercentage: 80 + targetMemoryUtilizationPercentage: 70 space: replicas: 1 @@ -84,6 +90,12 @@ space: image: artifacts.plane.so/makeplane/plane-space pullPolicy: Always assign_cluster_ip: false + autoscaling: + enabled: true + minReplicas: 1 + maxReplicas: 3 + targetCPUUtilizationPercentage: 80 + targetMemoryUtilizationPercentage: 70 admin: replicas: 1 @@ -92,6 +104,12 @@ admin: image: artifacts.plane.so/makeplane/plane-admin pullPolicy: Always assign_cluster_ip: false + autoscaling: + enabled: true + minReplicas: 1 + maxReplicas: 3 + targetCPUUtilizationPercentage: 80 + targetMemoryUtilizationPercentage: 70 live: replicas: 1 @@ -100,6 +118,12 @@ live: image: artifacts.plane.so/makeplane/plane-live pullPolicy: Always assign_cluster_ip: false + autoscaling: + enabled: true + minReplicas: 1 + maxReplicas: 3 + targetCPUUtilizationPercentage: 80 + targetMemoryUtilizationPercentage: 70 api: replicas: 1 @@ -108,6 +132,12 @@ api: image: artifacts.plane.so/makeplane/plane-backend pullPolicy: Always assign_cluster_ip: false + autoscaling: + enabled: true + minReplicas: 1 + maxReplicas: 3 + targetCPUUtilizationPercentage: 80 + targetMemoryUtilizationPercentage: 70 worker: replicas: 1 @@ -115,6 +145,12 @@ worker: cpuLimit: 500m image: artifacts.plane.so/makeplane/plane-backend pullPolicy: Always + autoscaling: + enabled: true + minReplicas: 1 + maxReplicas: 3 + targetCPUUtilizationPercentage: 80 + targetMemoryUtilizationPercentage: 70 beatworker: replicas: 1 @@ -122,6 +158,12 @@ beatworker: cpuLimit: 500m image: artifacts.plane.so/makeplane/plane-backend pullPolicy: Always + autoscaling: + enabled: true + minReplicas: 1 + maxReplicas: 3 + targetCPUUtilizationPercentage: 80 + targetMemoryUtilizationPercentage: 70 external_secrets: # Name of the existing Kubernetes Secret resource; see README for more details @@ -166,3 +208,4 @@ env: live_sentry_traces_sample_rate: "" api_key_rate_limit: "60/minute" + From ff6c605a8a9a5d5362c2151ce38f6a9bec8eef83 Mon Sep 17 00:00:00 2001 From: akshat5302 Date: Tue, 20 May 2025 16:23:52 +0530 Subject: [PATCH 02/14] Chore: add metrics-server as a dependency in chart-preview workflow --- .github/workflows/chart-preview.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/chart-preview.yml b/.github/workflows/chart-preview.yml index b76017d..8c586fe 100644 --- a/.github/workflows/chart-preview.yml +++ b/.github/workflows/chart-preview.yml @@ -92,6 +92,10 @@ jobs: sed -i "s/name: ${{env.CHART_REPO}}/name: ${{ env.CHART_PREFIX }}-${{env.CHART_REPO}}/" charts/${{env.CHART_REPO}}/Chart.yaml sed -i "s/description: .*/description: ${flatBranchName}/g" charts/${{env.CHART_REPO}}/Chart.yaml # sed -i "s/version: \(.*\)/version: \1-${flatBranchName}/" charts/${{env.CHART_REPO}}/Chart.yaml + + # Add required repositories and build dependencies + helm repo add metrics-server https://kubernetes-sigs.github.io/metrics-server/ + helm repo update helm dependency build charts/$CHART_REPO helm package --sign --key "$CR_KEY" --keyring $CR_KEYRING --passphrase-file "$CR_PASSPHRASE_FILE" charts/$CHART_REPO -u -d ${{ env.EXPORT_DIR }}/${{env.CHART_REPO}}/charts From 0cfc84bdf5b2c9872b36fde564ba9d4c7814e097 Mon Sep 17 00:00:00 2001 From: akshat5302 Date: Tue, 20 May 2025 16:36:02 +0530 Subject: [PATCH 03/14] Add autoscaling configuration options for web, space, admin, live, api, worker, and beatworker in questions.yml --- charts/plane-ce/questions.yml | 146 ++++++++++++++++++++++++++++++++-- 1 file changed, 140 insertions(+), 6 deletions(-) diff --git a/charts/plane-ce/questions.yml b/charts/plane-ce/questions.yml index 4074f87..93c83ae 100644 --- a/charts/plane-ce/questions.yml +++ b/charts/plane-ce/questions.yml @@ -55,6 +55,26 @@ questions: label: "Assign Cluster IP" type: boolean default: false + - variable: web.autoscaling.enabled + label: "Enable Autoscaling" + type: boolean + default: true + - variable: web.autoscaling.minReplicas + label: "Minimum Replica Count" + type: int + default: 1 + - variable: web.autoscaling.maxReplicas + label: "Maximum Replica Count" + type: int + default: 3 + - variable: web.autoscaling.targetCPUUtilizationPercentage + label: "Target CPU Utilization Percentage" + type: int + default: 80 + - variable: web.autoscaling.targetMemoryUtilizationPercentage + label: "Target Memory Utilization Percentage" + type: int + default: 70 - variable: space.image label: Space Docker Image @@ -87,7 +107,26 @@ questions: label: "Assign Cluster IP" type: boolean default: false - + - variable: space.autoscaling.enabled + label: "Enable Autoscaling" + type: boolean + default: true + - variable: space.autoscaling.minReplicas + label: "Minimum Replica Count" + type: int + default: 1 + - variable: space.autoscaling.maxReplicas + label: "Maximum Replica Count" + type: int + default: 3 + - variable: space.autoscaling.targetCPUUtilizationPercentage + label: "Target CPU Utilization Percentage" + type: int + default: 80 + - variable: space.autoscaling.targetMemoryUtilizationPercentage + label: "Target Memory Utilization Percentage" + type: int + default: 70 - variable: admin.image label: Admin Docker Image type: string @@ -119,7 +158,26 @@ questions: label: "Assign Cluster IP" type: boolean default: true - + - variable: admin.autoscaling.enabled + label: "Enable Autoscaling" + type: boolean + default: true + - variable: admin.autoscaling.minReplicas + label: "Minimum Replica Count" + type: int + default: 1 + - variable: admin.autoscaling.maxReplicas + label: "Maximum Replica Count" + type: int + default: 3 + - variable: admin.autoscaling.targetCPUUtilizationPercentage + label: "Target CPU Utilization Percentage" + type: int + default: 80 + - variable: admin.autoscaling.targetMemoryUtilizationPercentage + label: "Target Memory Utilization Percentage" + type: int + default: 70 - variable: live.image label: Live Docker Image type: string @@ -164,7 +222,26 @@ questions: label: "Live Sentry Traces Sample Rate" type: string default: "" - + - variable: live.autoscaling.enabled + label: "Enable Autoscaling" + type: boolean + default: true + - variable: live.autoscaling.minReplicas + label: "Minimum Replica Count" + type: int + default: 1 + - variable: live.autoscaling.maxReplicas + label: "Maximum Replica Count" + type: int + default: 3 + - variable: live.autoscaling.targetCPUUtilizationPercentage + label: "Target CPU Utilization Percentage" + type: int + default: 80 + - variable: live.autoscaling.targetMemoryUtilizationPercentage + label: "Target Memory Utilization Percentage" + type: int + default: 70 - variable: api.image label: Backend Docker Image type: string @@ -218,7 +295,26 @@ questions: label: "API Key Rate Limit" type: string default: "60/minute" - + - variable: api.autoscaling.enabled + label: "Enable Autoscaling" + type: boolean + default: true + - variable: api.autoscaling.minReplicas + label: "Minimum Replica Count" + type: int + default: 1 + - variable: api.autoscaling.maxReplicas + label: "Maximum Replica Count" + type: int + default: 3 + - variable: api.autoscaling.targetCPUUtilizationPercentage + label: "Target CPU Utilization Percentage" + type: int + default: 80 + - variable: api.autoscaling.targetMemoryUtilizationPercentage + label: "Target Memory Utilization Percentage" + type: int + default: 70 - variable: worker.replicas label: "Default Replica Count" type: int @@ -233,7 +329,26 @@ questions: label: "CPU Limit" type: string default: 500m - + - variable: worker.autoscaling.enabled + label: "Enable Autoscaling" + type: boolean + default: true + - variable: worker.autoscaling.minReplicas + label: "Minimum Replica Count" + type: int + default: 1 + - variable: worker.autoscaling.maxReplicas + label: "Maximum Replica Count" + type: int + default: 3 + - variable: worker.autoscaling.targetCPUUtilizationPercentage + label: "Target CPU Utilization Percentage" + type: int + default: 80 + - variable: worker.autoscaling.targetMemoryUtilizationPercentage + label: "Target Memory Utilization Percentage" + type: int + default: 70 - variable: beatworker.replicas label: "Default Replica Count" type: int @@ -248,7 +363,26 @@ questions: label: "CPU Limit" type: string default: 500m - + - variable: beatworker.autoscaling.enabled + label: "Enable Autoscaling" + type: boolean + default: true + - variable: beatworker.autoscaling.minReplicas + label: "Minimum Replica Count" + type: int + default: 1 + - variable: beatworker.autoscaling.maxReplicas + label: "Maximum Replica Count" + type: int + default: 3 + - variable: beatworker.autoscaling.targetCPUUtilizationPercentage + label: "Target CPU Utilization Percentage" + type: int + default: 80 + - variable: beatworker.autoscaling.targetMemoryUtilizationPercentage + label: "Target Memory Utilization Percentage" + type: int + default: 70 - variable: redis.local_setup label: "Install Redis" type: boolean From 35ee8f3623fe1cd89b610068cc497ac0c5f24a9b Mon Sep 17 00:00:00 2001 From: akshat5302 Date: Tue, 20 May 2025 16:44:08 +0530 Subject: [PATCH 04/14] Update questions.yml to include conditional display for autoscaling options across web, space, admin, live, api, worker, and beatworker sections. --- charts/plane-ce/questions.yml | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/charts/plane-ce/questions.yml b/charts/plane-ce/questions.yml index 93c83ae..1e12c61 100644 --- a/charts/plane-ce/questions.yml +++ b/charts/plane-ce/questions.yml @@ -63,19 +63,22 @@ questions: label: "Minimum Replica Count" type: int default: 1 + show_if: "web.autoscaling.enabled=true" - variable: web.autoscaling.maxReplicas label: "Maximum Replica Count" type: int default: 3 + show_if: "web.autoscaling.enabled=true" - variable: web.autoscaling.targetCPUUtilizationPercentage label: "Target CPU Utilization Percentage" type: int default: 80 + show_if: "web.autoscaling.enabled=true" - variable: web.autoscaling.targetMemoryUtilizationPercentage label: "Target Memory Utilization Percentage" type: int default: 70 - + show_if: "web.autoscaling.enabled=true" - variable: space.image label: Space Docker Image type: string @@ -115,18 +118,22 @@ questions: label: "Minimum Replica Count" type: int default: 1 + show_if: "space.autoscaling.enabled=true" - variable: space.autoscaling.maxReplicas label: "Maximum Replica Count" type: int default: 3 + show_if: "space.autoscaling.enabled=true" - variable: space.autoscaling.targetCPUUtilizationPercentage label: "Target CPU Utilization Percentage" type: int default: 80 + show_if: "space.autoscaling.enabled=true" - variable: space.autoscaling.targetMemoryUtilizationPercentage label: "Target Memory Utilization Percentage" type: int default: 70 + show_if: "space.autoscaling.enabled=true" - variable: admin.image label: Admin Docker Image type: string @@ -166,18 +173,22 @@ questions: label: "Minimum Replica Count" type: int default: 1 + show_if: "admin.autoscaling.enabled=true" - variable: admin.autoscaling.maxReplicas label: "Maximum Replica Count" type: int default: 3 + show_if: "admin.autoscaling.enabled=true" - variable: admin.autoscaling.targetCPUUtilizationPercentage label: "Target CPU Utilization Percentage" type: int default: 80 + show_if: "admin.autoscaling.enabled=true" - variable: admin.autoscaling.targetMemoryUtilizationPercentage label: "Target Memory Utilization Percentage" type: int default: 70 + show_if: "admin.autoscaling.enabled=true" - variable: live.image label: Live Docker Image type: string @@ -230,18 +241,22 @@ questions: label: "Minimum Replica Count" type: int default: 1 + show_if: "live.autoscaling.enabled=true" - variable: live.autoscaling.maxReplicas label: "Maximum Replica Count" type: int default: 3 + show_if: "live.autoscaling.enabled=true" - variable: live.autoscaling.targetCPUUtilizationPercentage label: "Target CPU Utilization Percentage" type: int default: 80 + show_if: "live.autoscaling.enabled=true" - variable: live.autoscaling.targetMemoryUtilizationPercentage label: "Target Memory Utilization Percentage" type: int default: 70 + show_if: "live.autoscaling.enabled=true" - variable: api.image label: Backend Docker Image type: string @@ -303,18 +318,22 @@ questions: label: "Minimum Replica Count" type: int default: 1 + show_if: "api.autoscaling.enabled=true" - variable: api.autoscaling.maxReplicas label: "Maximum Replica Count" type: int default: 3 + show_if: "api.autoscaling.enabled=true" - variable: api.autoscaling.targetCPUUtilizationPercentage label: "Target CPU Utilization Percentage" type: int default: 80 + show_if: "api.autoscaling.enabled=true" - variable: api.autoscaling.targetMemoryUtilizationPercentage label: "Target Memory Utilization Percentage" type: int default: 70 + show_if: "api.autoscaling.enabled=true" - variable: worker.replicas label: "Default Replica Count" type: int @@ -337,18 +356,22 @@ questions: label: "Minimum Replica Count" type: int default: 1 + show_if: "worker.autoscaling.enabled=true" - variable: worker.autoscaling.maxReplicas label: "Maximum Replica Count" type: int default: 3 + show_if: "worker.autoscaling.enabled=true" - variable: worker.autoscaling.targetCPUUtilizationPercentage label: "Target CPU Utilization Percentage" type: int default: 80 + show_if: "worker.autoscaling.enabled=true" - variable: worker.autoscaling.targetMemoryUtilizationPercentage label: "Target Memory Utilization Percentage" type: int default: 70 + show_if: "worker.autoscaling.enabled=true" - variable: beatworker.replicas label: "Default Replica Count" type: int @@ -371,18 +394,22 @@ questions: label: "Minimum Replica Count" type: int default: 1 + show_if: "beatworker.autoscaling.enabled=true" - variable: beatworker.autoscaling.maxReplicas label: "Maximum Replica Count" type: int default: 3 + show_if: "beatworker.autoscaling.enabled=true" - variable: beatworker.autoscaling.targetCPUUtilizationPercentage label: "Target CPU Utilization Percentage" type: int default: 80 + show_if: "beatworker.autoscaling.enabled=true" - variable: beatworker.autoscaling.targetMemoryUtilizationPercentage label: "Target Memory Utilization Percentage" type: int default: 70 + show_if: "beatworker.autoscaling.enabled=true" - variable: redis.local_setup label: "Install Redis" type: boolean From 7b50a1806cefba6113ae0acf0412ee51a064ac63 Mon Sep 17 00:00:00 2001 From: Akshat Jain Date: Thu, 29 May 2025 13:27:30 +0530 Subject: [PATCH 05/14] Add autoscaling configurations for all deployments in Plane CE, enabling HPA with specific resource utilization targets in values.yaml. Update deployment templates to reference individual autoscaling settings for each component. (#115) --- charts/plane-ce/templates/_helpers.tpl | 9 +++++++++ .../plane-ce/templates/workloads/admin.deployment.yaml | 4 ++-- charts/plane-ce/templates/workloads/api.deployment.yaml | 3 ++- .../templates/workloads/beat-worker.deployment.yaml | 2 +- charts/plane-ce/templates/workloads/live.deployment.yaml | 3 ++- .../plane-ce/templates/workloads/space.deployment.yaml | 2 +- charts/plane-ce/templates/workloads/web.deployment.yaml | 2 +- .../plane-ce/templates/workloads/worker.deployment.yaml | 2 +- 8 files changed, 19 insertions(+), 8 deletions(-) diff --git a/charts/plane-ce/templates/_helpers.tpl b/charts/plane-ce/templates/_helpers.tpl index b33a371..d510b98 100644 --- a/charts/plane-ce/templates/_helpers.tpl +++ b/charts/plane-ce/templates/_helpers.tpl @@ -1,3 +1,12 @@ {{- define "imagePullSecret" }} {{- printf "{\"auths\":{\"%s\":{\"username\":\"%s\",\"password\":\"%s\"}}}" .Values.dockerRegistry.host .Values.dockerRegistry.loginid .Values.dockerRegistry.password | b64enc }} +{{- end }} + +{{- define "enable.hpa" -}} +{{- $metrics := lookup "rbac.authorization.k8s.io/v1" "ClusterRole" "" "system:metrics-server" }} +{{- if not $metrics }} +false +{{- else }} +true +{{- end }} {{- end }} \ No newline at end of file diff --git a/charts/plane-ce/templates/workloads/admin.deployment.yaml b/charts/plane-ce/templates/workloads/admin.deployment.yaml index f756783..243f5b2 100644 --- a/charts/plane-ce/templates/workloads/admin.deployment.yaml +++ b/charts/plane-ce/templates/workloads/admin.deployment.yaml @@ -1,4 +1,3 @@ - apiVersion: v1 kind: Service metadata: @@ -60,7 +59,8 @@ spec: serviceAccountName: {{ .Release.Name }}-srv-account --- -{{- if .Values.admin.autoscaling.enabled }} + +{{- if eq (include "enable.hpa" . | trim) "true" }} apiVersion: autoscaling/v2 kind: HorizontalPodAutoscaler metadata: diff --git a/charts/plane-ce/templates/workloads/api.deployment.yaml b/charts/plane-ce/templates/workloads/api.deployment.yaml index c79e25b..7c5be57 100644 --- a/charts/plane-ce/templates/workloads/api.deployment.yaml +++ b/charts/plane-ce/templates/workloads/api.deployment.yaml @@ -77,7 +77,8 @@ spec: serviceAccountName: {{ .Release.Name }}-srv-account --- -{{- if .Values.api.autoscaling.enabled }} +{{- if eq (include "enable.hpa" . | trim) "true" }} + apiVersion: autoscaling/v2 kind: HorizontalPodAutoscaler metadata: diff --git a/charts/plane-ce/templates/workloads/beat-worker.deployment.yaml b/charts/plane-ce/templates/workloads/beat-worker.deployment.yaml index ed1ed40..cc23c03 100644 --- a/charts/plane-ce/templates/workloads/beat-worker.deployment.yaml +++ b/charts/plane-ce/templates/workloads/beat-worker.deployment.yaml @@ -47,7 +47,7 @@ spec: serviceAccountName: {{ .Release.Name }}-srv-account --- -{{- if .Values.beatworker.autoscaling.enabled }} +{{- if eq (include "enable.hpa" . | trim) "true" }} apiVersion: autoscaling/v2 kind: HorizontalPodAutoscaler metadata: diff --git a/charts/plane-ce/templates/workloads/live.deployment.yaml b/charts/plane-ce/templates/workloads/live.deployment.yaml index ffbbe6c..b431a2b 100644 --- a/charts/plane-ce/templates/workloads/live.deployment.yaml +++ b/charts/plane-ce/templates/workloads/live.deployment.yaml @@ -66,7 +66,8 @@ spec: serviceAccountName: {{ .Release.Name }}-srv-account --- -{{- if .Values.live.autoscaling.enabled }} + +{{- if eq (include "enable.hpa" . | trim) "true" }} apiVersion: autoscaling/v2 kind: HorizontalPodAutoscaler metadata: diff --git a/charts/plane-ce/templates/workloads/space.deployment.yaml b/charts/plane-ce/templates/workloads/space.deployment.yaml index 2a37fc1..85cdfa6 100644 --- a/charts/plane-ce/templates/workloads/space.deployment.yaml +++ b/charts/plane-ce/templates/workloads/space.deployment.yaml @@ -60,7 +60,7 @@ spec: serviceAccountName: {{ .Release.Name }}-srv-account --- -{{- if .Values.space.autoscaling.enabled }} +{{- if eq (include "enable.hpa" . | trim) "true" }} apiVersion: autoscaling/v2 kind: HorizontalPodAutoscaler metadata: diff --git a/charts/plane-ce/templates/workloads/web.deployment.yaml b/charts/plane-ce/templates/workloads/web.deployment.yaml index 38687d9..1fa23ef 100644 --- a/charts/plane-ce/templates/workloads/web.deployment.yaml +++ b/charts/plane-ce/templates/workloads/web.deployment.yaml @@ -60,7 +60,7 @@ spec: serviceAccountName: {{ .Release.Name }}-srv-account --- -{{- if .Values.web.autoscaling.enabled }} +{{- if eq (include "enable.hpa" . | trim) "true" }} apiVersion: autoscaling/v2 kind: HorizontalPodAutoscaler metadata: diff --git a/charts/plane-ce/templates/workloads/worker.deployment.yaml b/charts/plane-ce/templates/workloads/worker.deployment.yaml index 48c65a0..e2249f0 100644 --- a/charts/plane-ce/templates/workloads/worker.deployment.yaml +++ b/charts/plane-ce/templates/workloads/worker.deployment.yaml @@ -46,7 +46,7 @@ spec: serviceAccountName: {{ .Release.Name }}-srv-account --- -{{- if .Values.worker.autoscaling.enabled }} +{{- if eq (include "enable.hpa" . | trim) "true" }} apiVersion: autoscaling/v2 kind: HorizontalPodAutoscaler metadata: From 8b12e28a9cc8ab8d2780e3dcc3097e5795bb5560 Mon Sep 17 00:00:00 2001 From: akshat5302 Date: Thu, 29 May 2025 13:30:31 +0530 Subject: [PATCH 06/14] Remove autoscaling enabled flag from all deployment configurations in values.yaml for Plane CE. --- charts/plane-ce/values.yaml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/charts/plane-ce/values.yaml b/charts/plane-ce/values.yaml index 6d3baa8..c8db951 100644 --- a/charts/plane-ce/values.yaml +++ b/charts/plane-ce/values.yaml @@ -77,7 +77,6 @@ web: pullPolicy: Always assign_cluster_ip: false autoscaling: - enabled: true minReplicas: 1 maxReplicas: 3 targetCPUUtilizationPercentage: 80 @@ -91,7 +90,6 @@ space: pullPolicy: Always assign_cluster_ip: false autoscaling: - enabled: true minReplicas: 1 maxReplicas: 3 targetCPUUtilizationPercentage: 80 @@ -105,7 +103,6 @@ admin: pullPolicy: Always assign_cluster_ip: false autoscaling: - enabled: true minReplicas: 1 maxReplicas: 3 targetCPUUtilizationPercentage: 80 @@ -119,7 +116,6 @@ live: pullPolicy: Always assign_cluster_ip: false autoscaling: - enabled: true minReplicas: 1 maxReplicas: 3 targetCPUUtilizationPercentage: 80 @@ -133,7 +129,6 @@ api: pullPolicy: Always assign_cluster_ip: false autoscaling: - enabled: true minReplicas: 1 maxReplicas: 3 targetCPUUtilizationPercentage: 80 @@ -146,7 +141,6 @@ worker: image: artifacts.plane.so/makeplane/plane-backend pullPolicy: Always autoscaling: - enabled: true minReplicas: 1 maxReplicas: 3 targetCPUUtilizationPercentage: 80 @@ -159,7 +153,6 @@ beatworker: image: artifacts.plane.so/makeplane/plane-backend pullPolicy: Always autoscaling: - enabled: true minReplicas: 1 maxReplicas: 3 targetCPUUtilizationPercentage: 80 From a172e0204c54c3c0aabccad6f3e34294a28697ff Mon Sep 17 00:00:00 2001 From: akshat5302 Date: Thu, 29 May 2025 13:46:51 +0530 Subject: [PATCH 07/14] Remove metrics-server dependency from Plane CE Chart.yaml --- .github/workflows/chart-preview.yml | 6 ------ .github/workflows/chart-releaser.yml | 7 ------- charts/plane-ce/Chart.yaml | 5 ----- 3 files changed, 18 deletions(-) diff --git a/.github/workflows/chart-preview.yml b/.github/workflows/chart-preview.yml index 8c586fe..eabac54 100644 --- a/.github/workflows/chart-preview.yml +++ b/.github/workflows/chart-preview.yml @@ -92,12 +92,6 @@ jobs: sed -i "s/name: ${{env.CHART_REPO}}/name: ${{ env.CHART_PREFIX }}-${{env.CHART_REPO}}/" charts/${{env.CHART_REPO}}/Chart.yaml sed -i "s/description: .*/description: ${flatBranchName}/g" charts/${{env.CHART_REPO}}/Chart.yaml # sed -i "s/version: \(.*\)/version: \1-${flatBranchName}/" charts/${{env.CHART_REPO}}/Chart.yaml - - # Add required repositories and build dependencies - helm repo add metrics-server https://kubernetes-sigs.github.io/metrics-server/ - helm repo update - helm dependency build charts/$CHART_REPO - helm package --sign --key "$CR_KEY" --keyring $CR_KEYRING --passphrase-file "$CR_PASSPHRASE_FILE" charts/$CHART_REPO -u -d ${{ env.EXPORT_DIR }}/${{env.CHART_REPO}}/charts cp charts/${{env.CHART_REPO}}/README.md ${{ env.EXPORT_DIR }}/${{env.CHART_REPO}}/${{env.CHART_REPO}}.md helm repo index ${{ env.EXPORT_DIR }}/${{env.CHART_REPO}} diff --git a/.github/workflows/chart-releaser.yml b/.github/workflows/chart-releaser.yml index f4c70ab..9b8a212 100644 --- a/.github/workflows/chart-releaser.yml +++ b/.github/workflows/chart-releaser.yml @@ -98,12 +98,6 @@ jobs: echo "MARK_AS_PRERELASE=true" >> $GITHUB_ENV echo "PAGES_INDEX_PATH=${flatBranchName}" >> $GITHUB_ENV - - name: Build Dependencies - run: | - if [ "${{ github.event.inputs.plane-ce }}" = "true" ]; then - helm dependency build charts/${{ env.CHART_NAME_CE }} - fi - - name: Release Charts uses: mguptahub/chart-releaser-action@v1.6.2 with: @@ -184,4 +178,3 @@ jobs: git push fi - diff --git a/charts/plane-ce/Chart.yaml b/charts/plane-ce/Chart.yaml index b352b44..f70e01a 100644 --- a/charts/plane-ce/Chart.yaml +++ b/charts/plane-ce/Chart.yaml @@ -15,8 +15,3 @@ sources: annotations: artifacthub.io/license: AGPL-3.0 - -dependencies: - - name: metrics-server - version: 3.12.2 - repository: https://kubernetes-sigs.github.io/metrics-server/ \ No newline at end of file From 8117b83718a3ccd5af5d8a3bdb6ef4a8092d1648 Mon Sep 17 00:00:00 2001 From: akshat5302 Date: Mon, 21 Jul 2025 12:11:53 +0530 Subject: [PATCH 08/14] Refactor autoscaling configuration in questions.yml by removing the 'Enable Autoscaling' variable and its associated conditions for various components, streamlining the autoscaling settings for web, space, admin, live, api, worker, and beatworker. --- charts/plane-ce/questions.yml | 82 +++++++++++------------------------ 1 file changed, 26 insertions(+), 56 deletions(-) diff --git a/charts/plane-ce/questions.yml b/charts/plane-ce/questions.yml index 9c57d5a..9444929 100644 --- a/charts/plane-ce/questions.yml +++ b/charts/plane-ce/questions.yml @@ -55,30 +55,22 @@ questions: label: "Assign Cluster IP" type: boolean default: false - - variable: web.autoscaling.enabled - label: "Enable Autoscaling" - type: boolean - default: true - variable: web.autoscaling.minReplicas label: "Minimum Replica Count" type: int default: 1 - show_if: "web.autoscaling.enabled=true" - variable: web.autoscaling.maxReplicas label: "Maximum Replica Count" type: int default: 3 - show_if: "web.autoscaling.enabled=true" - variable: web.autoscaling.targetCPUUtilizationPercentage label: "Target CPU Utilization Percentage" type: int default: 80 - show_if: "web.autoscaling.enabled=true" - variable: web.autoscaling.targetMemoryUtilizationPercentage label: "Target Memory Utilization Percentage" type: int default: 70 - show_if: "web.autoscaling.enabled=true" - variable: space.image label: Space Docker Image type: string @@ -118,30 +110,23 @@ questions: label: "Assign Cluster IP" type: boolean default: false - - variable: space.autoscaling.enabled - label: "Enable Autoscaling" - type: boolean - default: true - variable: space.autoscaling.minReplicas label: "Minimum Replica Count" type: int default: 1 - show_if: "space.autoscaling.enabled=true" - variable: space.autoscaling.maxReplicas label: "Maximum Replica Count" type: int default: 3 - show_if: "space.autoscaling.enabled=true" - variable: space.autoscaling.targetCPUUtilizationPercentage label: "Target CPU Utilization Percentage" type: int default: 80 - show_if: "space.autoscaling.enabled=true" - variable: space.autoscaling.targetMemoryUtilizationPercentage label: "Target Memory Utilization Percentage" type: int default: 70 - show_if: "space.autoscaling.enabled=true" + - variable: admin.image label: Admin Docker Image type: string @@ -173,30 +158,27 @@ questions: label: "Assign Cluster IP" type: boolean default: true - - variable: admin.autoscaling.enabled - label: "Enable Autoscaling" - type: boolean - default: true + - variable: admin.autoscaling.minReplicas label: "Minimum Replica Count" type: int default: 1 - show_if: "admin.autoscaling.enabled=true" + - variable: admin.autoscaling.maxReplicas label: "Maximum Replica Count" type: int default: 3 - show_if: "admin.autoscaling.enabled=true" + - variable: admin.autoscaling.targetCPUUtilizationPercentage label: "Target CPU Utilization Percentage" type: int default: 80 - show_if: "admin.autoscaling.enabled=true" + - variable: admin.autoscaling.targetMemoryUtilizationPercentage label: "Target Memory Utilization Percentage" type: int default: 70 - show_if: "admin.autoscaling.enabled=true" + - variable: live.image label: Live Docker Image type: string @@ -249,30 +231,27 @@ questions: label: "Live Sentry Traces Sample Rate" type: string default: "" - - variable: live.autoscaling.enabled - label: "Enable Autoscaling" - type: boolean - default: true + - variable: live.autoscaling.minReplicas label: "Minimum Replica Count" type: int default: 1 - show_if: "live.autoscaling.enabled=true" + - variable: live.autoscaling.maxReplicas label: "Maximum Replica Count" type: int default: 3 - show_if: "live.autoscaling.enabled=true" + - variable: live.autoscaling.targetCPUUtilizationPercentage label: "Target CPU Utilization Percentage" type: int default: 80 - show_if: "live.autoscaling.enabled=true" + - variable: live.autoscaling.targetMemoryUtilizationPercentage label: "Target Memory Utilization Percentage" type: int default: 70 - show_if: "live.autoscaling.enabled=true" + - variable: api.image label: Backend Docker Image type: string @@ -334,30 +313,27 @@ questions: label: "API Key Rate Limit" type: string default: "60/minute" - - variable: api.autoscaling.enabled - label: "Enable Autoscaling" - type: boolean - default: true + - variable: api.autoscaling.minReplicas label: "Minimum Replica Count" type: int default: 1 - show_if: "api.autoscaling.enabled=true" + - variable: api.autoscaling.maxReplicas label: "Maximum Replica Count" type: int default: 3 - show_if: "api.autoscaling.enabled=true" + - variable: api.autoscaling.targetCPUUtilizationPercentage label: "Target CPU Utilization Percentage" type: int default: 80 - show_if: "api.autoscaling.enabled=true" + - variable: api.autoscaling.targetMemoryUtilizationPercentage label: "Target Memory Utilization Percentage" type: int default: 70 - show_if: "api.autoscaling.enabled=true" + - variable: worker.replicas label: "Default Replica Count" type: int @@ -372,30 +348,27 @@ questions: label: "CPU Limit" type: string default: 500m - - variable: worker.autoscaling.enabled - label: "Enable Autoscaling" - type: boolean - default: true + - variable: worker.autoscaling.minReplicas label: "Minimum Replica Count" type: int default: 1 - show_if: "worker.autoscaling.enabled=true" + - variable: worker.autoscaling.maxReplicas label: "Maximum Replica Count" type: int default: 3 - show_if: "worker.autoscaling.enabled=true" + - variable: worker.autoscaling.targetCPUUtilizationPercentage label: "Target CPU Utilization Percentage" type: int default: 80 - show_if: "worker.autoscaling.enabled=true" + - variable: worker.autoscaling.targetMemoryUtilizationPercentage label: "Target Memory Utilization Percentage" type: int default: 70 - show_if: "worker.autoscaling.enabled=true" + - variable: beatworker.replicas label: "Default Replica Count" type: int @@ -410,30 +383,27 @@ questions: label: "CPU Limit" type: string default: 500m - - variable: beatworker.autoscaling.enabled - label: "Enable Autoscaling" - type: boolean - default: true + - variable: beatworker.autoscaling.minReplicas label: "Minimum Replica Count" type: int default: 1 - show_if: "beatworker.autoscaling.enabled=true" + - variable: beatworker.autoscaling.maxReplicas label: "Maximum Replica Count" type: int default: 3 - show_if: "beatworker.autoscaling.enabled=true" + - variable: beatworker.autoscaling.targetCPUUtilizationPercentage label: "Target CPU Utilization Percentage" type: int default: 80 - show_if: "beatworker.autoscaling.enabled=true" + - variable: beatworker.autoscaling.targetMemoryUtilizationPercentage label: "Target Memory Utilization Percentage" type: int default: 70 - show_if: "beatworker.autoscaling.enabled=true" + - variable: redis.local_setup label: "Install Redis" type: boolean From ae15159c24d17001fcc4e4b0f6bd0546b2f8e595 Mon Sep 17 00:00:00 2001 From: akshat5302 Date: Mon, 21 Jul 2025 15:16:26 +0530 Subject: [PATCH 09/14] Update autoscaling configurations in deployment templates to include default values for minReplicas, maxReplicas, and averageUtilization for CPU and memory across all workloads. --- charts/plane-ce/templates/workloads/admin.deployment.yaml | 8 ++++---- charts/plane-ce/templates/workloads/api.deployment.yaml | 8 ++++---- .../templates/workloads/beat-worker.deployment.yaml | 8 ++++---- charts/plane-ce/templates/workloads/live.deployment.yaml | 8 ++++---- charts/plane-ce/templates/workloads/space.deployment.yaml | 8 ++++---- charts/plane-ce/templates/workloads/web.deployment.yaml | 8 ++++---- .../plane-ce/templates/workloads/worker.deployment.yaml | 8 ++++---- 7 files changed, 28 insertions(+), 28 deletions(-) diff --git a/charts/plane-ce/templates/workloads/admin.deployment.yaml b/charts/plane-ce/templates/workloads/admin.deployment.yaml index 6b5cdb3..dba1f98 100644 --- a/charts/plane-ce/templates/workloads/admin.deployment.yaml +++ b/charts/plane-ce/templates/workloads/admin.deployment.yaml @@ -73,8 +73,8 @@ spec: apiVersion: apps/v1 kind: Deployment name: {{ .Release.Name }}-admin-wl - minReplicas: {{ .Values.admin.autoscaling.minReplicas }} - maxReplicas: {{ .Values.admin.autoscaling.maxReplicas }} + minReplicas: {{ .Values.admin.autoscaling.minReplicas | default 1 | quote }} + maxReplicas: {{ .Values.admin.autoscaling.maxReplicas | default 3 | quote }} {{- if or .Values.admin.autoscaling.targetCPUUtilizationPercentage .Values.admin.autoscaling.targetMemoryUtilizationPercentage }} metrics: {{- if .Values.admin.autoscaling.targetCPUUtilizationPercentage }} @@ -83,7 +83,7 @@ spec: name: cpu target: type: Utilization - averageUtilization: {{ .Values.admin.autoscaling.targetCPUUtilizationPercentage }} + averageUtilization: {{ .Values.admin.autoscaling.targetCPUUtilizationPercentage | default 80 | quote }} {{- end }} {{- if .Values.admin.autoscaling.targetMemoryUtilizationPercentage }} - type: Resource @@ -91,7 +91,7 @@ spec: name: memory target: type: Utilization - averageUtilization: {{ .Values.admin.autoscaling.targetMemoryUtilizationPercentage }} + averageUtilization: {{ .Values.admin.autoscaling.targetMemoryUtilizationPercentage | default 70 | quote }} {{- end }} {{- end }} {{- end }} diff --git a/charts/plane-ce/templates/workloads/api.deployment.yaml b/charts/plane-ce/templates/workloads/api.deployment.yaml index 8c1acef..89fd0d2 100644 --- a/charts/plane-ce/templates/workloads/api.deployment.yaml +++ b/charts/plane-ce/templates/workloads/api.deployment.yaml @@ -91,8 +91,8 @@ spec: apiVersion: apps/v1 kind: Deployment name: {{ .Release.Name }}-api-wl - minReplicas: {{ .Values.api.autoscaling.minReplicas }} - maxReplicas: {{ .Values.api.autoscaling.maxReplicas }} + minReplicas: {{ .Values.api.autoscaling.minReplicas | default 1 | quote }} + maxReplicas: {{ .Values.api.autoscaling.maxReplicas | default 3 | quote }} {{- if or .Values.api.autoscaling.targetCPUUtilizationPercentage .Values.api.autoscaling.targetMemoryUtilizationPercentage }} metrics: {{- if .Values.api.autoscaling.targetCPUUtilizationPercentage }} @@ -101,7 +101,7 @@ spec: name: cpu target: type: Utilization - averageUtilization: {{ .Values.api.autoscaling.targetCPUUtilizationPercentage }} + averageUtilization: {{ .Values.api.autoscaling.targetCPUUtilizationPercentage | default 80 | quote }} {{- end }} {{- if .Values.api.autoscaling.targetMemoryUtilizationPercentage }} - type: Resource @@ -109,7 +109,7 @@ spec: name: memory target: type: Utilization - averageUtilization: {{ .Values.api.autoscaling.targetMemoryUtilizationPercentage }} + averageUtilization: {{ .Values.api.autoscaling.targetMemoryUtilizationPercentage | default 70 | quote }} {{- end }} {{- end }} {{- end }} diff --git a/charts/plane-ce/templates/workloads/beat-worker.deployment.yaml b/charts/plane-ce/templates/workloads/beat-worker.deployment.yaml index c7f5443..701a544 100644 --- a/charts/plane-ce/templates/workloads/beat-worker.deployment.yaml +++ b/charts/plane-ce/templates/workloads/beat-worker.deployment.yaml @@ -60,8 +60,8 @@ spec: apiVersion: apps/v1 kind: Deployment name: {{ .Release.Name }}-beat-worker-wl - minReplicas: {{ .Values.beatworker.autoscaling.minReplicas }} - maxReplicas: {{ .Values.beatworker.autoscaling.maxReplicas }} + minReplicas: {{ .Values.beatworker.autoscaling.minReplicas | default 1 | quote }} + maxReplicas: {{ .Values.beatworker.autoscaling.maxReplicas | default 3 | quote }} {{- if or .Values.beatworker.autoscaling.targetCPUUtilizationPercentage .Values.beatworker.autoscaling.targetMemoryUtilizationPercentage }} metrics: {{- if .Values.beatworker.autoscaling.targetCPUUtilizationPercentage }} @@ -70,7 +70,7 @@ spec: name: cpu target: type: Utilization - averageUtilization: {{ .Values.beatworker.autoscaling.targetCPUUtilizationPercentage }} + averageUtilization: {{ .Values.beatworker.autoscaling.targetCPUUtilizationPercentage | default 80 | quote }} {{- end }} {{- if .Values.beatworker.autoscaling.targetMemoryUtilizationPercentage }} - type: Resource @@ -78,7 +78,7 @@ spec: name: memory target: type: Utilization - averageUtilization: {{ .Values.beatworker.autoscaling.targetMemoryUtilizationPercentage }} + averageUtilization: {{ .Values.beatworker.autoscaling.targetMemoryUtilizationPercentage | default 70 | quote }} {{- end }} {{- end }} {{- end }} diff --git a/charts/plane-ce/templates/workloads/live.deployment.yaml b/charts/plane-ce/templates/workloads/live.deployment.yaml index f1763d7..6be8045 100644 --- a/charts/plane-ce/templates/workloads/live.deployment.yaml +++ b/charts/plane-ce/templates/workloads/live.deployment.yaml @@ -80,8 +80,8 @@ spec: apiVersion: apps/v1 kind: Deployment name: {{ .Release.Name }}-live-wl - minReplicas: {{ .Values.live.autoscaling.minReplicas }} - maxReplicas: {{ .Values.live.autoscaling.maxReplicas }} + minReplicas: {{ .Values.live.autoscaling.minReplicas | default 1 | quote }} + maxReplicas: {{ .Values.live.autoscaling.maxReplicas | default 3 | quote }} {{- if or .Values.live.autoscaling.targetCPUUtilizationPercentage .Values.live.autoscaling.targetMemoryUtilizationPercentage }} metrics: {{- if .Values.live.autoscaling.targetCPUUtilizationPercentage }} @@ -90,7 +90,7 @@ spec: name: cpu target: type: Utilization - averageUtilization: {{ .Values.live.autoscaling.targetCPUUtilizationPercentage }} + averageUtilization: {{ .Values.live.autoscaling.targetCPUUtilizationPercentage | default 80 | quote }} {{- end }} {{- if .Values.live.autoscaling.targetMemoryUtilizationPercentage }} - type: Resource @@ -98,7 +98,7 @@ spec: name: memory target: type: Utilization - averageUtilization: {{ .Values.live.autoscaling.targetMemoryUtilizationPercentage }} + averageUtilization: {{ .Values.live.autoscaling.targetMemoryUtilizationPercentage | default 70 | quote }} {{- end }} {{- end }} {{- end }} diff --git a/charts/plane-ce/templates/workloads/space.deployment.yaml b/charts/plane-ce/templates/workloads/space.deployment.yaml index 6ac7e95..bf9fe8f 100644 --- a/charts/plane-ce/templates/workloads/space.deployment.yaml +++ b/charts/plane-ce/templates/workloads/space.deployment.yaml @@ -73,8 +73,8 @@ spec: apiVersion: apps/v1 kind: Deployment name: {{ .Release.Name }}-space-wl - minReplicas: {{ .Values.space.autoscaling.minReplicas }} - maxReplicas: {{ .Values.space.autoscaling.maxReplicas }} + minReplicas: {{ .Values.space.autoscaling.minReplicas | default 1 | quote }} + maxReplicas: {{ .Values.space.autoscaling.maxReplicas | default 3 | quote }} {{- if or .Values.space.autoscaling.targetCPUUtilizationPercentage .Values.space.autoscaling.targetMemoryUtilizationPercentage }} metrics: {{- if .Values.space.autoscaling.targetCPUUtilizationPercentage }} @@ -83,7 +83,7 @@ spec: name: cpu target: type: Utilization - averageUtilization: {{ .Values.space.autoscaling.targetCPUUtilizationPercentage }} + averageUtilization: {{ .Values.space.autoscaling.targetCPUUtilizationPercentage | default 80 | quote }} {{- end }} {{- if .Values.space.autoscaling.targetMemoryUtilizationPercentage }} - type: Resource @@ -91,7 +91,7 @@ spec: name: memory target: type: Utilization - averageUtilization: {{ .Values.space.autoscaling.targetMemoryUtilizationPercentage }} + averageUtilization: {{ .Values.space.autoscaling.targetMemoryUtilizationPercentage | default 70 | quote }} {{- end }} {{- end }} {{- end }} diff --git a/charts/plane-ce/templates/workloads/web.deployment.yaml b/charts/plane-ce/templates/workloads/web.deployment.yaml index ba05f85..3ae93bc 100644 --- a/charts/plane-ce/templates/workloads/web.deployment.yaml +++ b/charts/plane-ce/templates/workloads/web.deployment.yaml @@ -73,8 +73,8 @@ spec: apiVersion: apps/v1 kind: Deployment name: {{ .Release.Name }}-web-wl - minReplicas: {{ .Values.web.autoscaling.minReplicas }} - maxReplicas: {{ .Values.web.autoscaling.maxReplicas }} + minReplicas: {{ .Values.web.autoscaling.minReplicas | default 1 | quote }} + maxReplicas: {{ .Values.web.autoscaling.maxReplicas | default 3 | quote }} {{- if or .Values.web.autoscaling.targetCPUUtilizationPercentage .Values.web.autoscaling.targetMemoryUtilizationPercentage }} metrics: {{- if .Values.web.autoscaling.targetCPUUtilizationPercentage }} @@ -83,7 +83,7 @@ spec: name: cpu target: type: Utilization - averageUtilization: {{ .Values.web.autoscaling.targetCPUUtilizationPercentage }} + averageUtilization: {{ .Values.web.autoscaling.targetCPUUtilizationPercentage | default 80 | quote }} {{- end }} {{- if .Values.web.autoscaling.targetMemoryUtilizationPercentage }} - type: Resource @@ -91,7 +91,7 @@ spec: name: memory target: type: Utilization - averageUtilization: {{ .Values.web.autoscaling.targetMemoryUtilizationPercentage }} + averageUtilization: {{ .Values.web.autoscaling.targetMemoryUtilizationPercentage | default 70 | quote }} {{- end }} {{- end }} {{- end }} diff --git a/charts/plane-ce/templates/workloads/worker.deployment.yaml b/charts/plane-ce/templates/workloads/worker.deployment.yaml index 734492e..f7bdf72 100644 --- a/charts/plane-ce/templates/workloads/worker.deployment.yaml +++ b/charts/plane-ce/templates/workloads/worker.deployment.yaml @@ -59,8 +59,8 @@ spec: apiVersion: apps/v1 kind: Deployment name: {{ .Release.Name }}-worker-wl - minReplicas: {{ .Values.worker.autoscaling.minReplicas }} - maxReplicas: {{ .Values.worker.autoscaling.maxReplicas }} + minReplicas: {{ .Values.worker.autoscaling.minReplicas | default 1 | quote }} + maxReplicas: {{ .Values.worker.autoscaling.maxReplicas | default 3 | quote }} {{- if or .Values.worker.autoscaling.targetCPUUtilizationPercentage .Values.worker.autoscaling.targetMemoryUtilizationPercentage }} metrics: {{- if .Values.worker.autoscaling.targetCPUUtilizationPercentage }} @@ -69,7 +69,7 @@ spec: name: cpu target: type: Utilization - averageUtilization: {{ .Values.worker.autoscaling.targetCPUUtilizationPercentage }} + averageUtilization: {{ .Values.worker.autoscaling.targetCPUUtilizationPercentage | default 80 | quote }} {{- end }} {{- if .Values.worker.autoscaling.targetMemoryUtilizationPercentage }} - type: Resource @@ -77,7 +77,7 @@ spec: name: memory target: type: Utilization - averageUtilization: {{ .Values.worker.autoscaling.targetMemoryUtilizationPercentage }} + averageUtilization: {{ .Values.worker.autoscaling.targetMemoryUtilizationPercentage | default 70 | quote }} {{- end }} {{- end }} {{- end }} From 81c32b7f44470a0afdfc616478803280be81766f Mon Sep 17 00:00:00 2001 From: akshat5302 Date: Mon, 21 Jul 2025 15:25:59 +0530 Subject: [PATCH 10/14] Bump Plane version to 1.2.0 in Chart.yaml and remove Chart.lock dependencies. --- charts/plane-ce/Chart.lock | 6 ------ charts/plane-ce/Chart.yaml | 2 +- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/charts/plane-ce/Chart.lock b/charts/plane-ce/Chart.lock index 9acd48c..e69de29 100644 --- a/charts/plane-ce/Chart.lock +++ b/charts/plane-ce/Chart.lock @@ -1,6 +0,0 @@ -dependencies: -- name: metrics-server - repository: https://kubernetes-sigs.github.io/metrics-server/ - version: 3.12.2 -digest: sha256:9be099fcb7bb171b96598c6135df06c9feb60535737dd4adfdc601d44e23d6bf -generated: "2025-05-20T13:23:06.095553+05:30" diff --git a/charts/plane-ce/Chart.yaml b/charts/plane-ce/Chart.yaml index db24f69..0cda048 100644 --- a/charts/plane-ce/Chart.yaml +++ b/charts/plane-ce/Chart.yaml @@ -5,7 +5,7 @@ description: Meet Plane. An open-source software development tool to manage issu type: application -version: 1.1.4 +version: 1.2.0 appVersion: "0.27.1" home: https://plane.so From ff330657835262285b51e52cc0ee7092e313a3cb Mon Sep 17 00:00:00 2001 From: akshat5302 Date: Tue, 22 Jul 2025 12:36:11 +0530 Subject: [PATCH 11/14] Update resource requests and limits for web, space, admin, live, api, worker, and beatworker deployments; adjust autoscaling settings to increase maxReplicas and target utilization percentages across all components. --- charts/plane-ce/questions.yml | 254 ++++++++++-------- .../templates/workloads/admin.deployment.yaml | 12 +- .../templates/workloads/api.deployment.yaml | 14 +- .../workloads/beat-worker.deployment.yaml | 14 +- .../templates/workloads/live.deployment.yaml | 14 +- .../templates/workloads/space.deployment.yaml | 12 +- .../templates/workloads/web.deployment.yaml | 12 +- .../workloads/worker.deployment.yaml | 14 +- charts/plane-ce/values.yaml | 92 +++---- 9 files changed, 227 insertions(+), 211 deletions(-) diff --git a/charts/plane-ce/questions.yml b/charts/plane-ce/questions.yml index 9444929..1d06713 100644 --- a/charts/plane-ce/questions.yml +++ b/charts/plane-ce/questions.yml @@ -43,14 +43,22 @@ questions: label: "Default Replica Count" type: int default: 1 - - variable: web.memoryLimit - label: "Memory Limit" + - variable: web.cpuRequest + label: "CPU Request" type: string - default: 1000Mi + default: 100m + - variable: web.memoryRequest + label: "Memory Request" + type: string + default: 200Mi - variable: web.cpuLimit label: "CPU Limit" type: string default: 500m + - variable: web.memoryLimit + label: "Memory Limit" + type: string + default: 1000Mi - variable: web.assign_cluster_ip label: "Assign Cluster IP" type: boolean @@ -62,15 +70,16 @@ questions: - variable: web.autoscaling.maxReplicas label: "Maximum Replica Count" type: int - default: 3 + default: 5 - variable: web.autoscaling.targetCPUUtilizationPercentage label: "Target CPU Utilization Percentage" type: int - default: 80 + default: 90 - variable: web.autoscaling.targetMemoryUtilizationPercentage label: "Target Memory Utilization Percentage" type: int - default: 70 + default: 90 + - variable: space.image label: Space Docker Image type: string @@ -90,26 +99,22 @@ questions: label: "Default Replica Count" type: int default: 1 - - variable: space.memoryLimit - label: "Memory Limit" + - variable: space.cpuRequest + label: "CPU Request" type: string - default: 1000Mi + default: 100m + - variable: space.memoryRequest + label: "Memory Request" + type: string + default: 200Mi - variable: space.cpuLimit label: "CPU Limit" type: string default: 500m - - variable: space.memoryRequest - label: "Memory Request" - type: string - default: 50Mi - - variable: space.cpuRequest - label: "CPU Request" + - variable: space.memoryLimit + label: "Memory Limit" type: string - default: 50m - - variable: space.assign_cluster_ip - label: "Assign Cluster IP" - type: boolean - default: false + default: 1000Mi - variable: space.autoscaling.minReplicas label: "Minimum Replica Count" type: int @@ -117,15 +122,19 @@ questions: - variable: space.autoscaling.maxReplicas label: "Maximum Replica Count" type: int - default: 3 + default: 5 - variable: space.autoscaling.targetCPUUtilizationPercentage label: "Target CPU Utilization Percentage" type: int - default: 80 + default: 90 - variable: space.autoscaling.targetMemoryUtilizationPercentage label: "Target Memory Utilization Percentage" type: int - default: 70 + default: 90 + - variable: space.assign_cluster_ip + label: "Assign Cluster IP" + type: boolean + default: false - variable: admin.image label: Admin Docker Image @@ -146,38 +155,43 @@ questions: label: "Default Replica Count" type: int default: 1 - - variable: admin.memoryLimit - label: "Memory Limit" + - variable: admin.cpuRequest + label: "CPU Request" type: string - default: 1000Mi + default: 100m + - variable: admin.memoryRequest + label: "Memory Request" + type: string + default: 200Mi - variable: admin.cpuLimit label: "CPU Limit" type: string default: 500m - - variable: admin.assign_cluster_ip - label: "Assign Cluster IP" - type: boolean - default: true - + - variable: admin.memoryLimit + label: "Memory Limit" + type: string + default: 1000Mi - variable: admin.autoscaling.minReplicas label: "Minimum Replica Count" type: int default: 1 - - variable: admin.autoscaling.maxReplicas label: "Maximum Replica Count" type: int - default: 3 - + default: 5 - variable: admin.autoscaling.targetCPUUtilizationPercentage label: "Target CPU Utilization Percentage" type: int - default: 80 - + default: 90 - variable: admin.autoscaling.targetMemoryUtilizationPercentage label: "Target Memory Utilization Percentage" type: int - default: 70 + default: 90 + - variable: admin.assign_cluster_ip + label: "Assign Cluster IP" + type: boolean + default: true + - variable: live.image label: Live Docker Image @@ -199,26 +213,42 @@ questions: label: "Default Replica Count" type: int default: 1 - - variable: live.memoryLimit - label: "Memory Limit" + - variable: live.cpuRequest + label: "CPU Request" + type: string + default: 500m + - variable: live.memoryRequest + label: "Memory Request" type: string default: 1000Mi - variable: live.cpuLimit label: "CPU Limit" type: string - default: 500m + default: 1000m + - variable: live.memoryLimit + label: "Memory Limit" + type: string + default: 2000Mi + - variable: live.autoscaling.minReplicas + label: "Minimum Replica Count" + type: int + default: 1 + - variable: live.autoscaling.maxReplicas + label: "Maximum Replica Count" + type: int + default: 5 + - variable: live.autoscaling.targetCPUUtilizationPercentage + label: "Target CPU Utilization Percentage" + type: int + default: 90 + - variable: live.autoscaling.targetMemoryUtilizationPercentage + label: "Target Memory Utilization Percentage" + type: int + default: 90 - variable: live.assign_cluster_ip label: "Assign Cluster IP" type: boolean default: false - - variable: live.memoryRequest - label: "Memory Request" - type: string - default: 50Mi - - variable: live.cpuRequest - label: "CPU Request" - type: string - default: 50m - variable: env.live_sentry_dsn label: "Live Sentry DSN" type: string @@ -232,25 +262,6 @@ questions: type: string default: "" - - variable: live.autoscaling.minReplicas - label: "Minimum Replica Count" - type: int - default: 1 - - - variable: live.autoscaling.maxReplicas - label: "Maximum Replica Count" - type: int - default: 3 - - - variable: live.autoscaling.targetCPUUtilizationPercentage - label: "Target CPU Utilization Percentage" - type: int - default: 80 - - - variable: live.autoscaling.targetMemoryUtilizationPercentage - label: "Target Memory Utilization Percentage" - type: int - default: 70 - variable: api.image label: Backend Docker Image @@ -272,26 +283,42 @@ questions: label: "Default Replica Count" type: int default: 1 - - variable: api.memoryLimit - label: "Memory Limit" + - variable: api.cpuRequest + label: "CPU Request" type: string - default: 1000Mi + default: 1000m + - variable: api.memoryRequest + label: "Memory Request" + type: string + default: 10000Mi - variable: api.cpuLimit label: "CPU Limit" type: string - default: 500m + default: 2000m + - variable: api.memoryLimit + label: "Memory Limit" + type: string + default: 2000Mi + - variable: api.autoscaling.minReplicas + label: "Minimum Replica Count" + type: int + default: 1 + - variable: api.autoscaling.maxReplicas + label: "Maximum Replica Count" + type: int + default: 5 + - variable: api.autoscaling.targetCPUUtilizationPercentage + label: "Target CPU Utilization Percentage" + type: int + default: 90 + - variable: api.autoscaling.targetMemoryUtilizationPercentage + label: "Target Memory Utilization Percentage" + type: int + default: 90 - variable: api.assign_cluster_ip label: "Assign Cluster IP" type: boolean default: false - - variable: api.memoryRequest - label: "Memory Request" - type: string - default: 50Mi - - variable: api.cpuRequest - label: "CPU Request" - type: string - default: 50m - variable: env.cors_allowed_origins label: "CORS Allowed Origins" type: string @@ -314,25 +341,6 @@ questions: type: string default: "60/minute" - - variable: api.autoscaling.minReplicas - label: "Minimum Replica Count" - type: int - default: 1 - - - variable: api.autoscaling.maxReplicas - label: "Maximum Replica Count" - type: int - default: 3 - - - variable: api.autoscaling.targetCPUUtilizationPercentage - label: "Target CPU Utilization Percentage" - type: int - default: 80 - - - variable: api.autoscaling.targetMemoryUtilizationPercentage - label: "Target Memory Utilization Percentage" - type: int - default: 70 - variable: worker.replicas label: "Default Replica Count" @@ -340,34 +348,38 @@ questions: default: 1 group: "Worker Setup" subquestions: - - variable: worker.memoryLimit - label: "Memory Limit" + - variable: worker.cpuRequest + label: "CPU Request" type: string - default: 1000Mi + default: 500m + - variable: worker.memoryRequest + label: "Memory Request" + type: string + default: 2000Mi - variable: worker.cpuLimit label: "CPU Limit" type: string - default: 500m - + default: 1000m + - variable: worker.memoryLimit + label: "Memory Limit" + type: string + default: 4000Mi - variable: worker.autoscaling.minReplicas label: "Minimum Replica Count" type: int default: 1 - - variable: worker.autoscaling.maxReplicas label: "Maximum Replica Count" type: int - default: 3 - + default: 5 - variable: worker.autoscaling.targetCPUUtilizationPercentage label: "Target CPU Utilization Percentage" type: int - default: 80 - + default: 90 - variable: worker.autoscaling.targetMemoryUtilizationPercentage label: "Target Memory Utilization Percentage" type: int - default: 70 + default: 90 - variable: beatworker.replicas label: "Default Replica Count" @@ -375,34 +387,38 @@ questions: default: 1 group: "Beat Worker Setup" subquestions: - - variable: beatworker.memoryLimit - label: "Memory Limit" + - variable: beatworker.cpuRequest + label: "CPU Request" + type: string + default: 500m + - variable: beatworker.memoryRequest + label: "Memory Request" type: string default: 1000Mi - variable: beatworker.cpuLimit label: "CPU Limit" type: string - default: 500m - + default: 1000m + - variable: beatworker.memoryLimit + label: "Memory Limit" + type: string + default: 2000Mi - variable: beatworker.autoscaling.minReplicas label: "Minimum Replica Count" type: int default: 1 - - variable: beatworker.autoscaling.maxReplicas label: "Maximum Replica Count" type: int - default: 3 - + default: 5 - variable: beatworker.autoscaling.targetCPUUtilizationPercentage label: "Target CPU Utilization Percentage" type: int - default: 80 - + default: 90 - variable: beatworker.autoscaling.targetMemoryUtilizationPercentage label: "Target Memory Utilization Percentage" type: int - default: 70 + default: 90 - variable: redis.local_setup label: "Install Redis" diff --git a/charts/plane-ce/templates/workloads/admin.deployment.yaml b/charts/plane-ce/templates/workloads/admin.deployment.yaml index dba1f98..51edb76 100644 --- a/charts/plane-ce/templates/workloads/admin.deployment.yaml +++ b/charts/plane-ce/templates/workloads/admin.deployment.yaml @@ -45,11 +45,11 @@ spec: tty: true resources: requests: - memory: {{ .Values.admin.memoryRequest | default "50Mi" | quote }} - cpu: {{ .Values.admin.cpuRequest | default "50m" | quote }} + cpu: {{ .Values.admin.cpuRequest | default "100m" | quote }} + memory: {{ .Values.admin.memoryRequest | default "200Mi" | quote }} limits: - memory: {{ .Values.admin.memoryLimit | default "1000Mi" | quote }} cpu: {{ .Values.admin.cpuLimit | default "500m" | quote}} + memory: {{ .Values.admin.memoryLimit | default "1000Mi" | quote }} command: - node args: @@ -74,7 +74,7 @@ spec: kind: Deployment name: {{ .Release.Name }}-admin-wl minReplicas: {{ .Values.admin.autoscaling.minReplicas | default 1 | quote }} - maxReplicas: {{ .Values.admin.autoscaling.maxReplicas | default 3 | quote }} + maxReplicas: {{ .Values.admin.autoscaling.maxReplicas | default 5 | quote }} {{- if or .Values.admin.autoscaling.targetCPUUtilizationPercentage .Values.admin.autoscaling.targetMemoryUtilizationPercentage }} metrics: {{- if .Values.admin.autoscaling.targetCPUUtilizationPercentage }} @@ -83,7 +83,7 @@ spec: name: cpu target: type: Utilization - averageUtilization: {{ .Values.admin.autoscaling.targetCPUUtilizationPercentage | default 80 | quote }} + averageUtilization: {{ .Values.admin.autoscaling.targetCPUUtilizationPercentage | default 90 | quote }} {{- end }} {{- if .Values.admin.autoscaling.targetMemoryUtilizationPercentage }} - type: Resource @@ -91,7 +91,7 @@ spec: name: memory target: type: Utilization - averageUtilization: {{ .Values.admin.autoscaling.targetMemoryUtilizationPercentage | default 70 | quote }} + averageUtilization: {{ .Values.admin.autoscaling.targetMemoryUtilizationPercentage | default 90 | quote }} {{- end }} {{- end }} {{- end }} diff --git a/charts/plane-ce/templates/workloads/api.deployment.yaml b/charts/plane-ce/templates/workloads/api.deployment.yaml index 89fd0d2..c94d696 100644 --- a/charts/plane-ce/templates/workloads/api.deployment.yaml +++ b/charts/plane-ce/templates/workloads/api.deployment.yaml @@ -46,11 +46,11 @@ spec: tty: true resources: requests: - memory: {{ .Values.api.memoryRequest | default "50Mi" | quote }} - cpu: {{ .Values.api.cpuRequest | default "50m" | quote }} + cpu: {{ .Values.api.cpuRequest | default "1000m" | quote }} + memory: {{ .Values.api.memoryRequest | default "10000Mi" | quote }} limits: - memory: {{ .Values.api.memoryLimit | default "1000Mi" | quote }} - cpu: {{ .Values.api.cpuLimit | default "500m" | quote}} + cpu: {{ .Values.api.cpuLimit | default "2000m" | quote}} + memory: {{ .Values.api.memoryLimit | default "2000Mi" | quote }} command: - ./bin/docker-entrypoint-api.sh envFrom: @@ -92,7 +92,7 @@ spec: kind: Deployment name: {{ .Release.Name }}-api-wl minReplicas: {{ .Values.api.autoscaling.minReplicas | default 1 | quote }} - maxReplicas: {{ .Values.api.autoscaling.maxReplicas | default 3 | quote }} + maxReplicas: {{ .Values.api.autoscaling.maxReplicas | default 5 | quote }} {{- if or .Values.api.autoscaling.targetCPUUtilizationPercentage .Values.api.autoscaling.targetMemoryUtilizationPercentage }} metrics: {{- if .Values.api.autoscaling.targetCPUUtilizationPercentage }} @@ -101,7 +101,7 @@ spec: name: cpu target: type: Utilization - averageUtilization: {{ .Values.api.autoscaling.targetCPUUtilizationPercentage | default 80 | quote }} + averageUtilization: {{ .Values.api.autoscaling.targetCPUUtilizationPercentage | default 90 | quote }} {{- end }} {{- if .Values.api.autoscaling.targetMemoryUtilizationPercentage }} - type: Resource @@ -109,7 +109,7 @@ spec: name: memory target: type: Utilization - averageUtilization: {{ .Values.api.autoscaling.targetMemoryUtilizationPercentage | default 70 | quote }} + averageUtilization: {{ .Values.api.autoscaling.targetMemoryUtilizationPercentage | default 90 | quote }} {{- end }} {{- end }} {{- end }} diff --git a/charts/plane-ce/templates/workloads/beat-worker.deployment.yaml b/charts/plane-ce/templates/workloads/beat-worker.deployment.yaml index 701a544..585f57d 100644 --- a/charts/plane-ce/templates/workloads/beat-worker.deployment.yaml +++ b/charts/plane-ce/templates/workloads/beat-worker.deployment.yaml @@ -24,11 +24,11 @@ spec: tty: true resources: requests: - memory: {{ .Values.beatworker.memoryRequest | default "50Mi" | quote }} - cpu: {{ .Values.beatworker.cpuRequest | default "50m" | quote }} + cpu: {{ .Values.beatworker.cpuRequest | default "500m" | quote }} + memory: {{ .Values.beatworker.memoryRequest | default "1000Mi" | quote }} limits: - memory: {{ .Values.beatworker.memoryLimit | default "1000Mi" | quote }} - cpu: {{ .Values.beatworker.cpuLimit | default "500m" | quote}} + cpu: {{ .Values.beatworker.cpuLimit | default "1000m" | quote}} + memory: {{ .Values.beatworker.memoryLimit | default "2000Mi" | quote }} command: - ./bin/docker-entrypoint-beat.sh envFrom: @@ -61,7 +61,7 @@ spec: kind: Deployment name: {{ .Release.Name }}-beat-worker-wl minReplicas: {{ .Values.beatworker.autoscaling.minReplicas | default 1 | quote }} - maxReplicas: {{ .Values.beatworker.autoscaling.maxReplicas | default 3 | quote }} + maxReplicas: {{ .Values.beatworker.autoscaling.maxReplicas | default 5 | quote }} {{- if or .Values.beatworker.autoscaling.targetCPUUtilizationPercentage .Values.beatworker.autoscaling.targetMemoryUtilizationPercentage }} metrics: {{- if .Values.beatworker.autoscaling.targetCPUUtilizationPercentage }} @@ -70,7 +70,7 @@ spec: name: cpu target: type: Utilization - averageUtilization: {{ .Values.beatworker.autoscaling.targetCPUUtilizationPercentage | default 80 | quote }} + averageUtilization: {{ .Values.beatworker.autoscaling.targetCPUUtilizationPercentage | default 90 | quote }} {{- end }} {{- if .Values.beatworker.autoscaling.targetMemoryUtilizationPercentage }} - type: Resource @@ -78,7 +78,7 @@ spec: name: memory target: type: Utilization - averageUtilization: {{ .Values.beatworker.autoscaling.targetMemoryUtilizationPercentage | default 70 | quote }} + averageUtilization: {{ .Values.beatworker.autoscaling.targetMemoryUtilizationPercentage | default 90 | quote }} {{- end }} {{- end }} {{- end }} diff --git a/charts/plane-ce/templates/workloads/live.deployment.yaml b/charts/plane-ce/templates/workloads/live.deployment.yaml index 6be8045..4334e11 100644 --- a/charts/plane-ce/templates/workloads/live.deployment.yaml +++ b/charts/plane-ce/templates/workloads/live.deployment.yaml @@ -46,11 +46,11 @@ spec: tty: true resources: requests: - memory: {{ .Values.live.memoryRequest | default "50Mi" | quote }} - cpu: {{ .Values.live.cpuRequest | default "50m" | quote }} + cpu: {{ .Values.live.cpuRequest | default "500m" | quote }} + memory: {{ .Values.live.memoryRequest | default "1000Mi" | quote }} limits: - memory: {{ .Values.live.memoryLimit | default "1000Mi" | quote }} - cpu: {{ .Values.live.cpuLimit | default "500m" | quote}} + cpu: {{ .Values.live.cpuLimit | default "1000m" | quote}} + memory: {{ .Values.live.memoryLimit | default "2000Mi" | quote }} command: - node args: @@ -81,7 +81,7 @@ spec: kind: Deployment name: {{ .Release.Name }}-live-wl minReplicas: {{ .Values.live.autoscaling.minReplicas | default 1 | quote }} - maxReplicas: {{ .Values.live.autoscaling.maxReplicas | default 3 | quote }} + maxReplicas: {{ .Values.live.autoscaling.maxReplicas | default 5 | quote }} {{- if or .Values.live.autoscaling.targetCPUUtilizationPercentage .Values.live.autoscaling.targetMemoryUtilizationPercentage }} metrics: {{- if .Values.live.autoscaling.targetCPUUtilizationPercentage }} @@ -90,7 +90,7 @@ spec: name: cpu target: type: Utilization - averageUtilization: {{ .Values.live.autoscaling.targetCPUUtilizationPercentage | default 80 | quote }} + averageUtilization: {{ .Values.live.autoscaling.targetCPUUtilizationPercentage | default 90 | quote }} {{- end }} {{- if .Values.live.autoscaling.targetMemoryUtilizationPercentage }} - type: Resource @@ -98,7 +98,7 @@ spec: name: memory target: type: Utilization - averageUtilization: {{ .Values.live.autoscaling.targetMemoryUtilizationPercentage | default 70 | quote }} + averageUtilization: {{ .Values.live.autoscaling.targetMemoryUtilizationPercentage | default 90 | quote }} {{- end }} {{- end }} {{- end }} diff --git a/charts/plane-ce/templates/workloads/space.deployment.yaml b/charts/plane-ce/templates/workloads/space.deployment.yaml index bf9fe8f..9091016 100644 --- a/charts/plane-ce/templates/workloads/space.deployment.yaml +++ b/charts/plane-ce/templates/workloads/space.deployment.yaml @@ -46,11 +46,11 @@ spec: tty: true resources: requests: - memory: {{ .Values.space.memoryRequest | default "50Mi" | quote }} - cpu: {{ .Values.space.cpuRequest | default "50m" | quote }} + cpu: {{ .Values.space.cpuRequest | default "100m" | quote }} + memory: {{ .Values.space.memoryRequest | default "200Mi" | quote }} limits: - memory: {{ .Values.space.memoryLimit | default "1000Mi" | quote }} cpu: {{ .Values.space.cpuLimit | default "500m" | quote}} + memory: {{ .Values.space.memoryLimit | default "1000Mi" | quote }} command: - node args: @@ -74,7 +74,7 @@ spec: kind: Deployment name: {{ .Release.Name }}-space-wl minReplicas: {{ .Values.space.autoscaling.minReplicas | default 1 | quote }} - maxReplicas: {{ .Values.space.autoscaling.maxReplicas | default 3 | quote }} + maxReplicas: {{ .Values.space.autoscaling.maxReplicas | default 5 | quote }} {{- if or .Values.space.autoscaling.targetCPUUtilizationPercentage .Values.space.autoscaling.targetMemoryUtilizationPercentage }} metrics: {{- if .Values.space.autoscaling.targetCPUUtilizationPercentage }} @@ -83,7 +83,7 @@ spec: name: cpu target: type: Utilization - averageUtilization: {{ .Values.space.autoscaling.targetCPUUtilizationPercentage | default 80 | quote }} + averageUtilization: {{ .Values.space.autoscaling.targetCPUUtilizationPercentage | default 90 | quote }} {{- end }} {{- if .Values.space.autoscaling.targetMemoryUtilizationPercentage }} - type: Resource @@ -91,7 +91,7 @@ spec: name: memory target: type: Utilization - averageUtilization: {{ .Values.space.autoscaling.targetMemoryUtilizationPercentage | default 70 | quote }} + averageUtilization: {{ .Values.space.autoscaling.targetMemoryUtilizationPercentage | default 90 | quote }} {{- end }} {{- end }} {{- end }} diff --git a/charts/plane-ce/templates/workloads/web.deployment.yaml b/charts/plane-ce/templates/workloads/web.deployment.yaml index 3ae93bc..259ebcb 100644 --- a/charts/plane-ce/templates/workloads/web.deployment.yaml +++ b/charts/plane-ce/templates/workloads/web.deployment.yaml @@ -46,11 +46,11 @@ spec: tty: true resources: requests: - memory: {{ .Values.web.memoryRequest | default "50Mi" | quote }} - cpu: {{ .Values.web.cpuRequest | default "50m" | quote }} + cpu: {{ .Values.web.cpuRequest | default "100m" | quote }} + memory: {{ .Values.web.memoryRequest | default "200Mi" | quote }} limits: - memory: {{ .Values.web.memoryLimit | default "1000Mi" | quote }} cpu: {{ .Values.web.cpuLimit | default "500m" | quote}} + memory: {{ .Values.web.memoryLimit | default "1000Mi" | quote }} command: - node args: @@ -74,7 +74,7 @@ spec: kind: Deployment name: {{ .Release.Name }}-web-wl minReplicas: {{ .Values.web.autoscaling.minReplicas | default 1 | quote }} - maxReplicas: {{ .Values.web.autoscaling.maxReplicas | default 3 | quote }} + maxReplicas: {{ .Values.web.autoscaling.maxReplicas | default 5 | quote }} {{- if or .Values.web.autoscaling.targetCPUUtilizationPercentage .Values.web.autoscaling.targetMemoryUtilizationPercentage }} metrics: {{- if .Values.web.autoscaling.targetCPUUtilizationPercentage }} @@ -83,7 +83,7 @@ spec: name: cpu target: type: Utilization - averageUtilization: {{ .Values.web.autoscaling.targetCPUUtilizationPercentage | default 80 | quote }} + averageUtilization: {{ .Values.web.autoscaling.targetCPUUtilizationPercentage | default 90 | quote }} {{- end }} {{- if .Values.web.autoscaling.targetMemoryUtilizationPercentage }} - type: Resource @@ -91,7 +91,7 @@ spec: name: memory target: type: Utilization - averageUtilization: {{ .Values.web.autoscaling.targetMemoryUtilizationPercentage | default 70 | quote }} + averageUtilization: {{ .Values.web.autoscaling.targetMemoryUtilizationPercentage | default 90 | quote }} {{- end }} {{- end }} {{- end }} diff --git a/charts/plane-ce/templates/workloads/worker.deployment.yaml b/charts/plane-ce/templates/workloads/worker.deployment.yaml index f7bdf72..5a76910 100644 --- a/charts/plane-ce/templates/workloads/worker.deployment.yaml +++ b/charts/plane-ce/templates/workloads/worker.deployment.yaml @@ -24,11 +24,11 @@ spec: tty: true resources: requests: - memory: {{ .Values.worker.memoryRequest | default "50Mi" | quote }} - cpu: {{ .Values.worker.cpuRequest | default "50m" | quote }} + cpu: {{ .Values.worker.cpuRequest | default "500m" | quote }} + memory: {{ .Values.worker.memoryRequest | default "2000Mi" | quote }} limits: - memory: {{ .Values.worker.memoryLimit | default "1000Mi" | quote }} - cpu: {{ .Values.worker.cpuLimit | default "500m" | quote}} + cpu: {{ .Values.worker.cpuLimit | default "1000m" | quote}} + memory: {{ .Values.worker.memoryLimit | default "4000Mi" | quote }} command: - ./bin/docker-entrypoint-worker.sh envFrom: @@ -60,7 +60,7 @@ spec: kind: Deployment name: {{ .Release.Name }}-worker-wl minReplicas: {{ .Values.worker.autoscaling.minReplicas | default 1 | quote }} - maxReplicas: {{ .Values.worker.autoscaling.maxReplicas | default 3 | quote }} + maxReplicas: {{ .Values.worker.autoscaling.maxReplicas | default 5 | quote }} {{- if or .Values.worker.autoscaling.targetCPUUtilizationPercentage .Values.worker.autoscaling.targetMemoryUtilizationPercentage }} metrics: {{- if .Values.worker.autoscaling.targetCPUUtilizationPercentage }} @@ -69,7 +69,7 @@ spec: name: cpu target: type: Utilization - averageUtilization: {{ .Values.worker.autoscaling.targetCPUUtilizationPercentage | default 80 | quote }} + averageUtilization: {{ .Values.worker.autoscaling.targetCPUUtilizationPercentage | default 90 | quote }} {{- end }} {{- if .Values.worker.autoscaling.targetMemoryUtilizationPercentage }} - type: Resource @@ -77,7 +77,7 @@ spec: name: memory target: type: Utilization - averageUtilization: {{ .Values.worker.autoscaling.targetMemoryUtilizationPercentage | default 70 | quote }} + averageUtilization: {{ .Values.worker.autoscaling.targetMemoryUtilizationPercentage | default 90 | quote }} {{- end }} {{- end }} {{- end }} diff --git a/charts/plane-ce/values.yaml b/charts/plane-ce/values.yaml index a93f78a..ae141cb 100644 --- a/charts/plane-ce/values.yaml +++ b/charts/plane-ce/values.yaml @@ -71,106 +71,106 @@ minio: web: replicas: 1 - memoryLimit: 1000Mi + cpuRequest: 100m + memoryRequest: 200Mi cpuLimit: 500m - cpuRequest: 50m - memoryRequest: 50Mi + memoryLimit: 1000Mi image: artifacts.plane.so/makeplane/plane-frontend pullPolicy: Always assign_cluster_ip: false autoscaling: minReplicas: 1 - maxReplicas: 3 - targetCPUUtilizationPercentage: 80 - targetMemoryUtilizationPercentage: 70 + maxReplicas: 5 + targetCPUUtilizationPercentage: 90 + targetMemoryUtilizationPercentage: 90 space: replicas: 1 - memoryLimit: 1000Mi + cpuRequest: 100m + memoryRequest: 200Mi cpuLimit: 500m - cpuRequest: 50m - memoryRequest: 50Mi + memoryLimit: 1000Mi image: artifacts.plane.so/makeplane/plane-space pullPolicy: Always assign_cluster_ip: false autoscaling: minReplicas: 1 - maxReplicas: 3 - targetCPUUtilizationPercentage: 80 - targetMemoryUtilizationPercentage: 70 + maxReplicas: 5 + targetCPUUtilizationPercentage: 90 + targetMemoryUtilizationPercentage: 90 admin: replicas: 1 - memoryLimit: 1000Mi + cpuRequest: 100m + memoryRequest: 200Mi cpuLimit: 500m - cpuRequest: 50m - memoryRequest: 50Mi + memoryLimit: 1000Mi image: artifacts.plane.so/makeplane/plane-admin pullPolicy: Always assign_cluster_ip: false autoscaling: minReplicas: 1 - maxReplicas: 3 - targetCPUUtilizationPercentage: 80 - targetMemoryUtilizationPercentage: 70 + maxReplicas: 5 + targetCPUUtilizationPercentage: 90 + targetMemoryUtilizationPercentage: 90 live: replicas: 1 - memoryLimit: 1000Mi - cpuLimit: 500m - cpuRequest: 50m - memoryRequest: 50Mi + cpuRequest: 500m + memoryRequest: 1000Mi + cpuLimit: 1000m + memoryLimit: 2000Mi image: artifacts.plane.so/makeplane/plane-live pullPolicy: Always assign_cluster_ip: false autoscaling: minReplicas: 1 - maxReplicas: 3 - targetCPUUtilizationPercentage: 80 - targetMemoryUtilizationPercentage: 70 + maxReplicas: 5 + targetCPUUtilizationPercentage: 90 + targetMemoryUtilizationPercentage: 90 api: replicas: 1 - memoryLimit: 1000Mi - cpuLimit: 500m - cpuRequest: 50m - memoryRequest: 50Mi + cpuRequest: 1000m + memoryRequest: 10000Mi + cpuLimit: 2000m + memoryLimit: 2000Mi image: artifacts.plane.so/makeplane/plane-backend pullPolicy: Always assign_cluster_ip: false autoscaling: minReplicas: 1 - maxReplicas: 3 - targetCPUUtilizationPercentage: 80 - targetMemoryUtilizationPercentage: 70 + maxReplicas: 5 + targetCPUUtilizationPercentage: 90 + targetMemoryUtilizationPercentage: 90 worker: replicas: 1 - memoryLimit: 1000Mi - cpuLimit: 500m - cpuRequest: 50m - memoryRequest: 50Mi + cpuRequest: 500m + memoryRequest: 2000Mi + cpuLimit: 1000m + memoryLimit: 4000Mi image: artifacts.plane.so/makeplane/plane-backend pullPolicy: Always autoscaling: minReplicas: 1 - maxReplicas: 3 - targetCPUUtilizationPercentage: 80 - targetMemoryUtilizationPercentage: 70 + maxReplicas: 5 + targetCPUUtilizationPercentage: 90 + targetMemoryUtilizationPercentage: 90 beatworker: replicas: 1 - memoryLimit: 1000Mi - cpuLimit: 500m - cpuRequest: 50m - memoryRequest: 50Mi + cpuRequest: 500m + memoryRequest: 1000Mi + cpuLimit: 1000m + memoryLimit: 2000Mi image: artifacts.plane.so/makeplane/plane-backend pullPolicy: Always autoscaling: minReplicas: 1 - maxReplicas: 3 - targetCPUUtilizationPercentage: 80 - targetMemoryUtilizationPercentage: 70 + maxReplicas: 5 + targetCPUUtilizationPercentage: 90 + targetMemoryUtilizationPercentage: 90 external_secrets: # Name of the existing Kubernetes Secret resource; see README for more details From 22789307c2ce3dc381dd5f1b15178e13d1c64339 Mon Sep 17 00:00:00 2001 From: akshat5302 Date: Tue, 22 Jul 2025 15:37:48 +0530 Subject: [PATCH 12/14] Refactor resource requests and limits for API deployment; update memoryRequest from 10000Mi to 1000Mi in values.yaml and deployment template. Adjust whitespace and formatting in questions.yml and README.md for consistency. --- charts/plane-ce/README.md | 78 +++++++++++++------ charts/plane-ce/questions.yml | 41 +++++----- .../templates/workloads/api.deployment.yaml | 2 +- charts/plane-ce/values.yaml | 13 ++-- 4 files changed, 79 insertions(+), 55 deletions(-) diff --git a/charts/plane-ce/README.md b/charts/plane-ce/README.md index c09656a..138947e 100644 --- a/charts/plane-ce/README.md +++ b/charts/plane-ce/README.md @@ -147,10 +147,14 @@ | Setting | Default | Required | Description | |---|:---:|:---:|---| | web.replicas | 1 | Yes | Kubernetes helps you with scaling up/down the deployments. You can run 1 or more pods for each deployment. This key helps you setting up number of replicas you want to run for this deployment. It must be >=1 | -| web.memoryLimit | 1000Mi | | Every deployment in kubernetes can be set to use maximum memory they are allowed to use. This key sets the memory limit for this deployment to use.| +| web.cpuRequest | 100m | | Every deployment in kubernetes can be set to use minimum cpu they are allowed to use. This key sets the cpu request for this deployment to use.| +| web.memoryRequest | 200Mi | | Every deployment in kubernetes can be set to use minimum memory they are allowed to use. This key sets the memory request for this deployment to use.| | web.cpuLimit | 500m | | Every deployment in kubernetes can be set to use maximum cpu they are allowed to use. This key sets the cpu limit for this deployment to use.| -| web.memoryRequest | 50Mi | | Every deployment in kubernetes can be set to use minimum memory they are allowed to use. This key sets the memory request for this deployment to use.| -| web.cpuRequest | 50m | | Every deployment in kubernetes can be set to use minimum cpu they are allowed to use. This key sets the cpu request for this deployment to use.| +| web.memoryLimit | 1000Mi | | Every deployment in kubernetes can be set to use maximum memory they are allowed to use. This key sets the memory limit for this deployment to use.| +| web.autoscaling.minReplicas | 1 | | Minimum number of replicas for the Horizontal Pod Autoscaler | +| web.autoscaling.maxReplicas | 5 | | Maximum number of replicas for the Horizontal Pod Autoscaler | +| web.autoscaling.targetCPUUtilizationPercentage | 90 | | Target CPU utilization percentage for the Horizontal Pod Autoscaler | +| web.autoscaling.targetMemoryUtilizationPercentage | 90 | | Target memory utilization percentage for the Horizontal Pod Autoscaler | | web.image| artifacts.plane.so/makeplane/plane-frontend | | This deployment needs a preconfigured docker image to function. Docker image name is provided by the owner and must not be changed for this deployment | | web.pullPolicy | Always | | Using this key, user can set the pull policy for the deployment of `web`. | | web.assign_cluster_ip | false | | Set it to `true` if you want to assign `ClusterIP` to the service | @@ -160,10 +164,14 @@ | Setting | Default | Required | Description | |---|:---:|:---:|---| | space.replicas | 1 | Yes | Kubernetes helps you with scaling up/down the deployments. You can run 1 or more pods for each deployment. This key helps you setting up number of replicas you want to run for this deployment. It must be >=1 | -| space.memoryLimit | 1000Mi | | Every deployment in kubernetes can be set to use maximum memory they are allowed to use. This key sets the memory limit for this deployment to use.| +| space.cpuRequest | 100m | | Every deployment in kubernetes can be set to use minimum cpu they are allowed to use. This key sets the cpu request for this deployment to use.| +| space.memoryRequest | 200Mi | | Every deployment in kubernetes can be set to use minimum memory they are allowed to use. This key sets the memory request for this deployment to use.| | space.cpuLimit | 500m | | Every deployment in kubernetes can be set to use maximum cpu they are allowed to use. This key sets the cpu limit for this deployment to use.| -| space.memoryRequest | 50Mi | | Every deployment in kubernetes can be set to use minimum memory they are allowed to use. This key sets the memory request for this deployment to use.| -| space.cpuRequest | 50m | | Every deployment in kubernetes can be set to use minimum cpu they are allowed to use. This key sets the cpu request for this deployment to use.| +| space.memoryLimit | 1000Mi | | Every deployment in kubernetes can be set to use maximum memory they are allowed to use. This key sets the memory limit for this deployment to use.| +| space.autoscaling.minReplicas | 1 | | Minimum number of replicas for the Horizontal Pod Autoscaler | +| space.autoscaling.maxReplicas | 5 | | Maximum number of replicas for the Horizontal Pod Autoscaler | +| space.autoscaling.targetCPUUtilizationPercentage | 90 | | Target CPU utilization percentage for the Horizontal Pod Autoscaler | +| space.autoscaling.targetMemoryUtilizationPercentage | 90 | | Target memory utilization percentage for the Horizontal Pod Autoscaler | | space.image| artifacts.plane.so/makeplane/plane-space| | This deployment needs a preconfigured docker image to function. Docker image name is provided by the owner and must not be changed for this deployment | | space.pullPolicy | Always | | Using this key, user can set the pull policy for the deployment of `space`. | | space.assign_cluster_ip | false | | Set it to `true` if you want to assign `ClusterIP` to the service | @@ -173,10 +181,14 @@ | Setting | Default | Required | Description | |---|:---:|:---:|---| | admin.replicas | 1 | Yes | Kubernetes helps you with scaling up/down the deployments. You can run 1 or more pods for each deployment. This key helps you setting up number of replicas you want to run for this deployment. It must be >=1 | -| admin.memoryLimit | 1000Mi | | Every deployment in kubernetes can be set to use maximum memory they are allowed to use. This key sets the memory limit for this deployment to use.| +| admin.cpuRequest | 100m | | Every deployment in kubernetes can be set to use minimum cpu they are allowed to use. This key sets the cpu request for this deployment to use.| +| admin.memoryRequest | 200Mi | | Every deployment in kubernetes can be set to use minimum memory they are allowed to use. This key sets the memory request for this deployment to use.| | admin.cpuLimit | 500m | | Every deployment in kubernetes can be set to use maximum cpu they are allowed to use. This key sets the cpu limit for this deployment to use.| -| admin.memoryRequest | 50Mi | | Every deployment in kubernetes can be set to use minimum memory they are allowed to use. This key sets the memory request for this deployment to use.| -| admin.cpuRequest | 50m | | Every deployment in kubernetes can be set to use minimum cpu they are allowed to use. This key sets the cpu request for this deployment to use.| +| admin.memoryLimit | 1000Mi | | Every deployment in kubernetes can be set to use maximum memory they are allowed to use. This key sets the memory limit for this deployment to use.| +| admin.autoscaling.minReplicas | 1 | | Minimum number of replicas for the Horizontal Pod Autoscaler | +| admin.autoscaling.maxReplicas | 5 | | Maximum number of replicas for the Horizontal Pod Autoscaler | +| admin.autoscaling.targetCPUUtilizationPercentage | 90 | | Target CPU utilization percentage for the Horizontal Pod Autoscaler | +| admin.autoscaling.targetMemoryUtilizationPercentage | 90 | | Target memory utilization percentage for the Horizontal Pod Autoscaler | | admin.image| artifacts.plane.so/makeplane/plane-admin | | This deployment needs a preconfigured docker image to function. Docker image name is provided by the owner and must not be changed for this deployment | | admin.pullPolicy | Always | | Using this key, user can set the pull policy for the deployment of `admin`. | | admin.assign_cluster_ip | false | | Set it to `true` if you want to assign `ClusterIP` to the service | @@ -186,10 +198,14 @@ | Setting | Default | Required | Description | |---|:---:|:---:|---| | live.replicas | 1 | Yes | Kubernetes helps you with scaling up/down the deployments. You can run 1 or more pods for each deployment. This key helps you setting up number of replicas you want to run for this deployment. It must be >=1 | -| live.memoryLimit | 1000Mi | | Every deployment in kubernetes can be set to use maximum memory they are allowed to use. This key sets the memory limit for this deployment to use.| -| live.cpuLimit | 500m | | Every deployment in kubernetes can be set to use maximum cpu they are allowed to use. This key sets the cpu limit for this deployment to use.| -| live.memoryRequest | 50Mi | | Every deployment in kubernetes can be set to use minimum memory they are allowed to use. This key sets the memory request for this deployment to use.| -| live.cpuRequest | 50m | | Every deployment in kubernetes can be set to use minimum cpu they are allowed to use. This key sets the cpu request for this deployment to use.| +| live.cpuRequest | 500m | | Every deployment in kubernetes can be set to use minimum cpu they are allowed to use. This key sets the cpu request for this deployment to use.| +| live.memoryRequest | 1000Mi | | Every deployment in kubernetes can be set to use minimum memory they are allowed to use. This key sets the memory request for this deployment to use.| +| live.cpuLimit | 1000m | | Every deployment in kubernetes can be set to use maximum cpu they are allowed to use. This key sets the cpu limit for this deployment to use.| +| live.memoryLimit | 2000Mi | | Every deployment in kubernetes can be set to use maximum memory they are allowed to use. This key sets the memory limit for this deployment to use.| +| live.autoscaling.minReplicas | 1 | | Minimum number of replicas for the Horizontal Pod Autoscaler | +| live.autoscaling.maxReplicas | 5 | | Maximum number of replicas for the Horizontal Pod Autoscaler | +| live.autoscaling.targetCPUUtilizationPercentage | 90 | | Target CPU utilization percentage for the Horizontal Pod Autoscaler | +| live.autoscaling.targetMemoryUtilizationPercentage | 90 | | Target memory utilization percentage for the Horizontal Pod Autoscaler | | live.image| artifacts.plane.so/makeplane/plane-live | | This deployment needs a preconfigured docker image to function. Docker image name is provided by the owner and must not be changed for this deployment | | live.pullPolicy | Always | | Using this key, user can set the pull policy for the deployment of `live`. | | env.live_sentry_dsn | | | (optional) Live service deployment comes with some of the preconfigured integration. Sentry is one among those. Here user can set the Sentry provided DSN for this integration.| @@ -202,10 +218,14 @@ | Setting | Default | Required | Description | |---|:---:|:---:|---| | api.replicas | 1 | Yes | Kubernetes helps you with scaling up/down the deployments. You can run 1 or more pods for each deployment. This key helps you setting up number of replicas you want to run for this deployment. It must be >=1 | -| api.memoryLimit | 1000Mi | | Every deployment in kubernetes can be set to use maximum memory they are allowed to use. This key sets the memory limit for this deployment to use.| -| api.cpuLimit | 500m | | Every deployment in kubernetes can be set to use maximum cpu they are allowed to use. This key sets the cpu limit for this deployment to use.| -| api.memoryRequest | 50Mi | | Every deployment in kubernetes can be set to use minimum memory they are allowed to use. This key sets the memory request for this deployment to use.| -| api.cpuRequest | 50m | | Every deployment in kubernetes can be set to use minimum cpu they are allowed to use. This key sets the cpu request for this deployment to use.| +| api.cpuRequest | 1000m | | Every deployment in kubernetes can be set to use minimum cpu they are allowed to use. This key sets the cpu request for this deployment to use.| +| api.memoryRequest | 1000Mi | | Every deployment in kubernetes can be set to use minimum memory they are allowed to use. This key sets the memory request for this deployment to use.| +| api.cpuLimit | 2000m | | Every deployment in kubernetes can be set to use maximum cpu they are allowed to use. This key sets the cpu limit for this deployment to use.| +| api.memoryLimit | 2000Mi | | Every deployment in kubernetes can be set to use maximum memory they are allowed to use. This key sets the memory limit for this deployment to use.| +| api.autoscaling.minReplicas | 1 | | Minimum number of replicas for the Horizontal Pod Autoscaler | +| api.autoscaling.maxReplicas | 5 | | Maximum number of replicas for the Horizontal Pod Autoscaler | +| api.autoscaling.targetCPUUtilizationPercentage | 90 | | Target CPU utilization percentage for the Horizontal Pod Autoscaler | +| api.autoscaling.targetMemoryUtilizationPercentage | 90 | | Target memory utilization percentage for the Horizontal Pod Autoscaler | | api.image| artifacts.plane.so/makeplane/plane-backend | | This deployment needs a preconfigured docker image to function. Docker image name is provided by the owner and must not be changed for this deployment | | api.pullPolicy | Always | | Using this key, user can set the pull policy for the deployment of `api`. | | env.sentry_dsn | | | (optional) API service deployment comes with some of the preconfigured integration. Sentry is one among those. Here user can set the Sentry provided DSN for this integration.| @@ -218,10 +238,14 @@ | Setting | Default | Required | Description | |---|:---:|:---:|---| | worker.replicas | 1 | Yes | Kubernetes helps you with scaling up/down the deployments. You can run 1 or more pods for each deployment. This key helps you setting up number of replicas you want to run for this deployment. It must be >=1 | -| worker.memoryLimit | 1000Mi | | Every deployment in kubernetes can be set to use maximum memory they are allowed to use. This key sets the memory limit for this deployment to use.| -| worker.cpuLimit | 500m | | Every deployment in kubernetes can be set to use maximum cpu they are allowed to use. This key sets the cpu limit for this deployment to use.| -| worker.memoryRequest | 50Mi | | Every deployment in kubernetes can be set to use minimum memory they are allowed to use. This key sets the memory request for this deployment to use.| -| worker.cpuRequest | 50m | | Every deployment in kubernetes can be set to use minimum cpu they are allowed to use. This key sets the cpu request for this deployment to use.| +| worker.cpuRequest | 500m | | Every deployment in kubernetes can be set to use minimum cpu they are allowed to use. This key sets the cpu request for this deployment to use.| +| worker.memoryRequest | 2000Mi | | Every deployment in kubernetes can be set to use minimum memory they are allowed to use. This key sets the memory request for this deployment to use.| +| worker.cpuLimit | 1000m | | Every deployment in kubernetes can be set to use maximum cpu they are allowed to use. This key sets the cpu limit for this deployment to use.| +| worker.memoryLimit | 4000Mi | | Every deployment in kubernetes can be set to use maximum memory they are allowed to use. This key sets the memory limit for this deployment to use.| +| worker.autoscaling.minReplicas | 1 | | Minimum number of replicas for the Horizontal Pod Autoscaler | +| worker.autoscaling.maxReplicas | 5 | | Maximum number of replicas for the Horizontal Pod Autoscaler | +| worker.autoscaling.targetCPUUtilizationPercentage | 90 | | Target CPU utilization percentage for the Horizontal Pod Autoscaler | +| worker.autoscaling.targetMemoryUtilizationPercentage | 90 | | Target memory utilization percentage for the Horizontal Pod Autoscaler | | worker.image| artifacts.plane.so/makeplane/plane-backend | | This deployment needs a preconfigured docker image to function. Docker image name is provided by the owner and must not be changed for this deployment | ### Beat-Worker deployment @@ -229,10 +253,14 @@ | Setting | Default | Required | Description | |---|:---:|:---:|---| | beatworker.replicas | 1 | Yes | Kubernetes helps you with scaling up/down the deployments. You can run 1 or more pods for each deployment. This key helps you setting up number of replicas you want to run for this deployment. It must be >=1 | -| beatworker.memoryLimit | 1000Mi | | Every deployment in kubernetes can be set to use maximum memory they are allowed to use. This key sets the memory limit for this deployment to use.| -| beatworker.cpuLimit | 500m | | Every deployment in kubernetes can be set to use maximum cpu they are allowed to use. This key sets the cpu limit for this deployment to use.| -| beatworker.memoryRequest | 50Mi | | Every deployment in kubernetes can be set to use minimum memory they are allowed to use. This key sets the memory request for this deployment to use.| -| beatworker.cpuRequest | 50m | | Every deployment in kubernetes can be set to use minimum cpu they are allowed to use. This key sets the cpu request for this deployment to use.| +| beatworker.cpuRequest | 500m | | Every deployment in kubernetes can be set to use minimum cpu they are allowed to use. This key sets the cpu request for this deployment to use.| +| beatworker.memoryRequest | 1000Mi | | Every deployment in kubernetes can be set to use minimum memory they are allowed to use. This key sets the memory request for this deployment to use.| +| beatworker.cpuLimit | 1000m | | Every deployment in kubernetes can be set to use maximum cpu they are allowed to use. This key sets the cpu limit for this deployment to use.| +| beatworker.memoryLimit | 2000Mi | | Every deployment in kubernetes can be set to use maximum memory they are allowed to use. This key sets the memory limit for this deployment to use.| +| beatworker.autoscaling.minReplicas | 1 | | Minimum number of replicas for the Horizontal Pod Autoscaler | +| beatworker.autoscaling.maxReplicas | 5 | | Maximum number of replicas for the Horizontal Pod Autoscaler | +| beatworker.autoscaling.targetCPUUtilizationPercentage | 90 | | Target CPU utilization percentage for the Horizontal Pod Autoscaler | +| beatworker.autoscaling.targetMemoryUtilizationPercentage | 90 | | Target memory utilization percentage for the Horizontal Pod Autoscaler | | beatworker.image| artifacts.plane.so/makeplane/plane-backend | | This deployment needs a preconfigured docker image to function. Docker image name is provided by the owner and must not be changed for this deployment | ### Ingress and SSL Setup diff --git a/charts/plane-ce/questions.yml b/charts/plane-ce/questions.yml index 1d06713..d9dfa76 100644 --- a/charts/plane-ce/questions.yml +++ b/charts/plane-ce/questions.yml @@ -16,7 +16,7 @@ questions: - variable: dockerRegistry.password label: "Password/Token" type: password - + - variable: planeVersion label: Plane Version (Docker Image Tag) type: string @@ -122,7 +122,7 @@ questions: - variable: space.autoscaling.maxReplicas label: "Maximum Replica Count" type: int - default: 5 + default: 5 - variable: space.autoscaling.targetCPUUtilizationPercentage label: "Target CPU Utilization Percentage" type: int @@ -174,7 +174,7 @@ questions: - variable: admin.autoscaling.minReplicas label: "Minimum Replica Count" type: int - default: 1 + default: 1 - variable: admin.autoscaling.maxReplicas label: "Maximum Replica Count" type: int @@ -191,8 +191,7 @@ questions: label: "Assign Cluster IP" type: boolean default: true - - + - variable: live.image label: Live Docker Image type: string @@ -236,14 +235,14 @@ questions: - variable: live.autoscaling.maxReplicas label: "Maximum Replica Count" type: int - default: 5 + default: 5 - variable: live.autoscaling.targetCPUUtilizationPercentage label: "Target CPU Utilization Percentage" type: int default: 90 - variable: live.autoscaling.targetMemoryUtilizationPercentage label: "Target Memory Utilization Percentage" - type: int + type: int default: 90 - variable: live.assign_cluster_ip label: "Assign Cluster IP" @@ -261,8 +260,7 @@ questions: label: "Live Sentry Traces Sample Rate" type: string default: "" - - + - variable: api.image label: Backend Docker Image type: string @@ -290,7 +288,7 @@ questions: - variable: api.memoryRequest label: "Memory Request" type: string - default: 10000Mi + default: 1000Mi - variable: api.cpuLimit label: "CPU Limit" type: string @@ -302,18 +300,18 @@ questions: - variable: api.autoscaling.minReplicas label: "Minimum Replica Count" type: int - default: 1 + default: 1 - variable: api.autoscaling.maxReplicas label: "Maximum Replica Count" type: int default: 5 - variable: api.autoscaling.targetCPUUtilizationPercentage label: "Target CPU Utilization Percentage" - type: int + type: int default: 90 - variable: api.autoscaling.targetMemoryUtilizationPercentage label: "Target Memory Utilization Percentage" - type: int + type: int default: 90 - variable: api.assign_cluster_ip label: "Assign Cluster IP" @@ -340,8 +338,7 @@ questions: label: "API Key Rate Limit" type: string default: "60/minute" - - + - variable: worker.replicas label: "Default Replica Count" type: int @@ -367,7 +364,7 @@ questions: - variable: worker.autoscaling.minReplicas label: "Minimum Replica Count" type: int - default: 1 + default: 1 - variable: worker.autoscaling.maxReplicas label: "Maximum Replica Count" type: int @@ -375,12 +372,12 @@ questions: - variable: worker.autoscaling.targetCPUUtilizationPercentage label: "Target CPU Utilization Percentage" type: int - default: 90 + default: 90 - variable: worker.autoscaling.targetMemoryUtilizationPercentage label: "Target Memory Utilization Percentage" - type: int + type: int default: 90 - + - variable: beatworker.replicas label: "Default Replica Count" type: int @@ -410,16 +407,16 @@ questions: - variable: beatworker.autoscaling.maxReplicas label: "Maximum Replica Count" type: int - default: 5 + default: 5 - variable: beatworker.autoscaling.targetCPUUtilizationPercentage label: "Target CPU Utilization Percentage" type: int default: 90 - variable: beatworker.autoscaling.targetMemoryUtilizationPercentage label: "Target Memory Utilization Percentage" - type: int + type: int default: 90 - + - variable: redis.local_setup label: "Install Redis" type: boolean diff --git a/charts/plane-ce/templates/workloads/api.deployment.yaml b/charts/plane-ce/templates/workloads/api.deployment.yaml index c94d696..3a690c9 100644 --- a/charts/plane-ce/templates/workloads/api.deployment.yaml +++ b/charts/plane-ce/templates/workloads/api.deployment.yaml @@ -47,7 +47,7 @@ spec: resources: requests: cpu: {{ .Values.api.cpuRequest | default "1000m" | quote }} - memory: {{ .Values.api.memoryRequest | default "10000Mi" | quote }} + memory: {{ .Values.api.memoryRequest | default "1000Mi" | quote }} limits: cpu: {{ .Values.api.cpuLimit | default "2000m" | quote}} memory: {{ .Values.api.memoryLimit | default "2000Mi" | quote }} diff --git a/charts/plane-ce/values.yaml b/charts/plane-ce/values.yaml index ae141cb..924e4ec 100644 --- a/charts/plane-ce/values.yaml +++ b/charts/plane-ce/values.yaml @@ -12,7 +12,7 @@ ingress: minioHost: "" rabbitmqHost: "" ingressClass: "nginx" - ingress_annotations: {"nginx.ingress.kubernetes.io/proxy-body-size": "5m"} + ingress_annotations: { "nginx.ingress.kubernetes.io/proxy-body-size": "5m" } # SSL Configuration - Valid only if ingress.enabled is true ssl: @@ -67,7 +67,7 @@ minio: volumeSize: 1Gi assign_cluster_ip: false env: - minio_endpoint_ssl: false + minio_endpoint_ssl: false web: replicas: 1 @@ -81,7 +81,7 @@ web: autoscaling: minReplicas: 1 maxReplicas: 5 - targetCPUUtilizationPercentage: 90 + targetCPUUtilizationPercentage: 90 targetMemoryUtilizationPercentage: 90 space: @@ -132,7 +132,7 @@ live: api: replicas: 1 cpuRequest: 1000m - memoryRequest: 10000Mi + memoryRequest: 1000Mi cpuLimit: 2000m memoryLimit: 2000Mi image: artifacts.plane.so/makeplane/plane-backend @@ -174,7 +174,7 @@ beatworker: external_secrets: # Name of the existing Kubernetes Secret resource; see README for more details - rabbitmq_existingSecret: '' + rabbitmq_existingSecret: '' pgdb_existingSecret: '' doc_store_existingSecret: '' app_env_existingSecret: '' @@ -185,7 +185,7 @@ env: # NEXT_PUBLIC_DEPLOY_URL: "" # REDIS remote_redis_url: "" #INCASE OF REMOTE REDIS ONLY - + # POSTGRES DB VALUES pgdb_username: plane pgdb_password: plane @@ -215,4 +215,3 @@ env: live_sentry_traces_sample_rate: "" api_key_rate_limit: "60/minute" - From 2da241dbb5585eb3fdb9f7f8e931550a10934cd7 Mon Sep 17 00:00:00 2001 From: akshat5302 Date: Tue, 22 Jul 2025 15:55:13 +0530 Subject: [PATCH 13/14] Refactor autoscaling configurations in deployment templates by removing unnecessary quotes around default values for minReplicas, maxReplicas, and averageUtilization for CPU and memory across all workloads. --- charts/plane-ce/templates/workloads/admin.deployment.yaml | 8 ++++---- charts/plane-ce/templates/workloads/api.deployment.yaml | 8 ++++---- .../templates/workloads/beat-worker.deployment.yaml | 8 ++++---- charts/plane-ce/templates/workloads/live.deployment.yaml | 8 ++++---- charts/plane-ce/templates/workloads/space.deployment.yaml | 8 ++++---- charts/plane-ce/templates/workloads/web.deployment.yaml | 8 ++++---- .../plane-ce/templates/workloads/worker.deployment.yaml | 8 ++++---- 7 files changed, 28 insertions(+), 28 deletions(-) diff --git a/charts/plane-ce/templates/workloads/admin.deployment.yaml b/charts/plane-ce/templates/workloads/admin.deployment.yaml index 51edb76..387b86d 100644 --- a/charts/plane-ce/templates/workloads/admin.deployment.yaml +++ b/charts/plane-ce/templates/workloads/admin.deployment.yaml @@ -73,8 +73,8 @@ spec: apiVersion: apps/v1 kind: Deployment name: {{ .Release.Name }}-admin-wl - minReplicas: {{ .Values.admin.autoscaling.minReplicas | default 1 | quote }} - maxReplicas: {{ .Values.admin.autoscaling.maxReplicas | default 5 | quote }} + minReplicas: {{ .Values.admin.autoscaling.minReplicas | default 1 }} + maxReplicas: {{ .Values.admin.autoscaling.maxReplicas | default 5 }} {{- if or .Values.admin.autoscaling.targetCPUUtilizationPercentage .Values.admin.autoscaling.targetMemoryUtilizationPercentage }} metrics: {{- if .Values.admin.autoscaling.targetCPUUtilizationPercentage }} @@ -83,7 +83,7 @@ spec: name: cpu target: type: Utilization - averageUtilization: {{ .Values.admin.autoscaling.targetCPUUtilizationPercentage | default 90 | quote }} + averageUtilization: {{ .Values.admin.autoscaling.targetCPUUtilizationPercentage | default 90 }} {{- end }} {{- if .Values.admin.autoscaling.targetMemoryUtilizationPercentage }} - type: Resource @@ -91,7 +91,7 @@ spec: name: memory target: type: Utilization - averageUtilization: {{ .Values.admin.autoscaling.targetMemoryUtilizationPercentage | default 90 | quote }} + averageUtilization: {{ .Values.admin.autoscaling.targetMemoryUtilizationPercentage | default 90 }} {{- end }} {{- end }} {{- end }} diff --git a/charts/plane-ce/templates/workloads/api.deployment.yaml b/charts/plane-ce/templates/workloads/api.deployment.yaml index 3a690c9..6f13cc3 100644 --- a/charts/plane-ce/templates/workloads/api.deployment.yaml +++ b/charts/plane-ce/templates/workloads/api.deployment.yaml @@ -91,8 +91,8 @@ spec: apiVersion: apps/v1 kind: Deployment name: {{ .Release.Name }}-api-wl - minReplicas: {{ .Values.api.autoscaling.minReplicas | default 1 | quote }} - maxReplicas: {{ .Values.api.autoscaling.maxReplicas | default 5 | quote }} + minReplicas: {{ .Values.api.autoscaling.minReplicas | default 1 }} + maxReplicas: {{ .Values.api.autoscaling.maxReplicas | default 5 }} {{- if or .Values.api.autoscaling.targetCPUUtilizationPercentage .Values.api.autoscaling.targetMemoryUtilizationPercentage }} metrics: {{- if .Values.api.autoscaling.targetCPUUtilizationPercentage }} @@ -101,7 +101,7 @@ spec: name: cpu target: type: Utilization - averageUtilization: {{ .Values.api.autoscaling.targetCPUUtilizationPercentage | default 90 | quote }} + averageUtilization: {{ .Values.api.autoscaling.targetCPUUtilizationPercentage | default 90 }} {{- end }} {{- if .Values.api.autoscaling.targetMemoryUtilizationPercentage }} - type: Resource @@ -109,7 +109,7 @@ spec: name: memory target: type: Utilization - averageUtilization: {{ .Values.api.autoscaling.targetMemoryUtilizationPercentage | default 90 | quote }} + averageUtilization: {{ .Values.api.autoscaling.targetMemoryUtilizationPercentage | default 90 }} {{- end }} {{- end }} {{- end }} diff --git a/charts/plane-ce/templates/workloads/beat-worker.deployment.yaml b/charts/plane-ce/templates/workloads/beat-worker.deployment.yaml index 585f57d..42e54cb 100644 --- a/charts/plane-ce/templates/workloads/beat-worker.deployment.yaml +++ b/charts/plane-ce/templates/workloads/beat-worker.deployment.yaml @@ -60,8 +60,8 @@ spec: apiVersion: apps/v1 kind: Deployment name: {{ .Release.Name }}-beat-worker-wl - minReplicas: {{ .Values.beatworker.autoscaling.minReplicas | default 1 | quote }} - maxReplicas: {{ .Values.beatworker.autoscaling.maxReplicas | default 5 | quote }} + minReplicas: {{ .Values.beatworker.autoscaling.minReplicas | default 1 }} + maxReplicas: {{ .Values.beatworker.autoscaling.maxReplicas | default 5 }} {{- if or .Values.beatworker.autoscaling.targetCPUUtilizationPercentage .Values.beatworker.autoscaling.targetMemoryUtilizationPercentage }} metrics: {{- if .Values.beatworker.autoscaling.targetCPUUtilizationPercentage }} @@ -70,7 +70,7 @@ spec: name: cpu target: type: Utilization - averageUtilization: {{ .Values.beatworker.autoscaling.targetCPUUtilizationPercentage | default 90 | quote }} + averageUtilization: {{ .Values.beatworker.autoscaling.targetCPUUtilizationPercentage | default 90 }} {{- end }} {{- if .Values.beatworker.autoscaling.targetMemoryUtilizationPercentage }} - type: Resource @@ -78,7 +78,7 @@ spec: name: memory target: type: Utilization - averageUtilization: {{ .Values.beatworker.autoscaling.targetMemoryUtilizationPercentage | default 90 | quote }} + averageUtilization: {{ .Values.beatworker.autoscaling.targetMemoryUtilizationPercentage | default 90 }} {{- end }} {{- end }} {{- end }} diff --git a/charts/plane-ce/templates/workloads/live.deployment.yaml b/charts/plane-ce/templates/workloads/live.deployment.yaml index 4334e11..a2bf7d1 100644 --- a/charts/plane-ce/templates/workloads/live.deployment.yaml +++ b/charts/plane-ce/templates/workloads/live.deployment.yaml @@ -80,8 +80,8 @@ spec: apiVersion: apps/v1 kind: Deployment name: {{ .Release.Name }}-live-wl - minReplicas: {{ .Values.live.autoscaling.minReplicas | default 1 | quote }} - maxReplicas: {{ .Values.live.autoscaling.maxReplicas | default 5 | quote }} + minReplicas: {{ .Values.live.autoscaling.minReplicas | default 1 }} + maxReplicas: {{ .Values.live.autoscaling.maxReplicas | default 5 }} {{- if or .Values.live.autoscaling.targetCPUUtilizationPercentage .Values.live.autoscaling.targetMemoryUtilizationPercentage }} metrics: {{- if .Values.live.autoscaling.targetCPUUtilizationPercentage }} @@ -90,7 +90,7 @@ spec: name: cpu target: type: Utilization - averageUtilization: {{ .Values.live.autoscaling.targetCPUUtilizationPercentage | default 90 | quote }} + averageUtilization: {{ .Values.live.autoscaling.targetCPUUtilizationPercentage | default 90 }} {{- end }} {{- if .Values.live.autoscaling.targetMemoryUtilizationPercentage }} - type: Resource @@ -98,7 +98,7 @@ spec: name: memory target: type: Utilization - averageUtilization: {{ .Values.live.autoscaling.targetMemoryUtilizationPercentage | default 90 | quote }} + averageUtilization: {{ .Values.live.autoscaling.targetMemoryUtilizationPercentage | default 90 }} {{- end }} {{- end }} {{- end }} diff --git a/charts/plane-ce/templates/workloads/space.deployment.yaml b/charts/plane-ce/templates/workloads/space.deployment.yaml index 9091016..51e87d7 100644 --- a/charts/plane-ce/templates/workloads/space.deployment.yaml +++ b/charts/plane-ce/templates/workloads/space.deployment.yaml @@ -73,8 +73,8 @@ spec: apiVersion: apps/v1 kind: Deployment name: {{ .Release.Name }}-space-wl - minReplicas: {{ .Values.space.autoscaling.minReplicas | default 1 | quote }} - maxReplicas: {{ .Values.space.autoscaling.maxReplicas | default 5 | quote }} + minReplicas: {{ .Values.space.autoscaling.minReplicas | default 1 }} + maxReplicas: {{ .Values.space.autoscaling.maxReplicas | default 5 }} {{- if or .Values.space.autoscaling.targetCPUUtilizationPercentage .Values.space.autoscaling.targetMemoryUtilizationPercentage }} metrics: {{- if .Values.space.autoscaling.targetCPUUtilizationPercentage }} @@ -83,7 +83,7 @@ spec: name: cpu target: type: Utilization - averageUtilization: {{ .Values.space.autoscaling.targetCPUUtilizationPercentage | default 90 | quote }} + averageUtilization: {{ .Values.space.autoscaling.targetCPUUtilizationPercentage | default 90 }} {{- end }} {{- if .Values.space.autoscaling.targetMemoryUtilizationPercentage }} - type: Resource @@ -91,7 +91,7 @@ spec: name: memory target: type: Utilization - averageUtilization: {{ .Values.space.autoscaling.targetMemoryUtilizationPercentage | default 90 | quote }} + averageUtilization: {{ .Values.space.autoscaling.targetMemoryUtilizationPercentage | default 90 }} {{- end }} {{- end }} {{- end }} diff --git a/charts/plane-ce/templates/workloads/web.deployment.yaml b/charts/plane-ce/templates/workloads/web.deployment.yaml index 259ebcb..4bd4436 100644 --- a/charts/plane-ce/templates/workloads/web.deployment.yaml +++ b/charts/plane-ce/templates/workloads/web.deployment.yaml @@ -73,8 +73,8 @@ spec: apiVersion: apps/v1 kind: Deployment name: {{ .Release.Name }}-web-wl - minReplicas: {{ .Values.web.autoscaling.minReplicas | default 1 | quote }} - maxReplicas: {{ .Values.web.autoscaling.maxReplicas | default 5 | quote }} + minReplicas: {{ .Values.web.autoscaling.minReplicas | default 1 }} + maxReplicas: {{ .Values.web.autoscaling.maxReplicas | default 5 }} {{- if or .Values.web.autoscaling.targetCPUUtilizationPercentage .Values.web.autoscaling.targetMemoryUtilizationPercentage }} metrics: {{- if .Values.web.autoscaling.targetCPUUtilizationPercentage }} @@ -83,7 +83,7 @@ spec: name: cpu target: type: Utilization - averageUtilization: {{ .Values.web.autoscaling.targetCPUUtilizationPercentage | default 90 | quote }} + averageUtilization: {{ .Values.web.autoscaling.targetCPUUtilizationPercentage | default 90 }} {{- end }} {{- if .Values.web.autoscaling.targetMemoryUtilizationPercentage }} - type: Resource @@ -91,7 +91,7 @@ spec: name: memory target: type: Utilization - averageUtilization: {{ .Values.web.autoscaling.targetMemoryUtilizationPercentage | default 90 | quote }} + averageUtilization: {{ .Values.web.autoscaling.targetMemoryUtilizationPercentage | default 90 }} {{- end }} {{- end }} {{- end }} diff --git a/charts/plane-ce/templates/workloads/worker.deployment.yaml b/charts/plane-ce/templates/workloads/worker.deployment.yaml index 5a76910..8ee29d9 100644 --- a/charts/plane-ce/templates/workloads/worker.deployment.yaml +++ b/charts/plane-ce/templates/workloads/worker.deployment.yaml @@ -59,8 +59,8 @@ spec: apiVersion: apps/v1 kind: Deployment name: {{ .Release.Name }}-worker-wl - minReplicas: {{ .Values.worker.autoscaling.minReplicas | default 1 | quote }} - maxReplicas: {{ .Values.worker.autoscaling.maxReplicas | default 5 | quote }} + minReplicas: {{ .Values.worker.autoscaling.minReplicas | default 1 }} + maxReplicas: {{ .Values.worker.autoscaling.maxReplicas | default 5 }} {{- if or .Values.worker.autoscaling.targetCPUUtilizationPercentage .Values.worker.autoscaling.targetMemoryUtilizationPercentage }} metrics: {{- if .Values.worker.autoscaling.targetCPUUtilizationPercentage }} @@ -69,7 +69,7 @@ spec: name: cpu target: type: Utilization - averageUtilization: {{ .Values.worker.autoscaling.targetCPUUtilizationPercentage | default 90 | quote }} + averageUtilization: {{ .Values.worker.autoscaling.targetCPUUtilizationPercentage | default 90 }} {{- end }} {{- if .Values.worker.autoscaling.targetMemoryUtilizationPercentage }} - type: Resource @@ -77,7 +77,7 @@ spec: name: memory target: type: Utilization - averageUtilization: {{ .Values.worker.autoscaling.targetMemoryUtilizationPercentage | default 90 | quote }} + averageUtilization: {{ .Values.worker.autoscaling.targetMemoryUtilizationPercentage | default 90 }} {{- end }} {{- end }} {{- end }} From c9add2e0590d8c8b2d5d78414efce9f8f84160e4 Mon Sep 17 00:00:00 2001 From: akshat5302 Date: Tue, 29 Jul 2025 13:59:22 +0530 Subject: [PATCH 14/14] Enhance resource management in deployment templates by adding conditional logic for HPA support. Adjust resource requests and limits for admin, api, beat-worker, live, space, web, and worker deployments based on HPA configuration, ensuring optimized performance under varying load conditions. --- .../plane-ce/templates/workloads/admin.deployment.yaml | 9 +++++++++ charts/plane-ce/templates/workloads/api.deployment.yaml | 9 +++++++++ .../templates/workloads/beat-worker.deployment.yaml | 9 +++++++++ charts/plane-ce/templates/workloads/live.deployment.yaml | 9 +++++++++ .../plane-ce/templates/workloads/space.deployment.yaml | 9 +++++++++ charts/plane-ce/templates/workloads/web.deployment.yaml | 9 +++++++++ .../plane-ce/templates/workloads/worker.deployment.yaml | 9 +++++++++ 7 files changed, 63 insertions(+) diff --git a/charts/plane-ce/templates/workloads/admin.deployment.yaml b/charts/plane-ce/templates/workloads/admin.deployment.yaml index 387b86d..004f1da 100644 --- a/charts/plane-ce/templates/workloads/admin.deployment.yaml +++ b/charts/plane-ce/templates/workloads/admin.deployment.yaml @@ -44,12 +44,21 @@ spec: stdin: true tty: true resources: + {{- if eq (include "enable.hpa" . | trim) "true" }} requests: cpu: {{ .Values.admin.cpuRequest | default "100m" | quote }} memory: {{ .Values.admin.memoryRequest | default "200Mi" | quote }} limits: cpu: {{ .Values.admin.cpuLimit | default "500m" | quote}} memory: {{ .Values.admin.memoryLimit | default "1000Mi" | quote }} + {{- else }} + requests: + cpu: {{ .Values.admin.cpuRequest | default "50m" | quote }} + memory: {{ .Values.admin.memoryRequest | default "50Mi" | quote }} + limits: + cpu: {{ .Values.admin.cpuLimit | default "500m" | quote}} + memory: {{ .Values.admin.memoryLimit | default "1000Mi" | quote }} + {{- end }} command: - node args: diff --git a/charts/plane-ce/templates/workloads/api.deployment.yaml b/charts/plane-ce/templates/workloads/api.deployment.yaml index 6f13cc3..bedb005 100644 --- a/charts/plane-ce/templates/workloads/api.deployment.yaml +++ b/charts/plane-ce/templates/workloads/api.deployment.yaml @@ -45,12 +45,21 @@ spec: stdin: true tty: true resources: + {{- if eq (include "enable.hpa" . | trim) "true" }} requests: cpu: {{ .Values.api.cpuRequest | default "1000m" | quote }} memory: {{ .Values.api.memoryRequest | default "1000Mi" | quote }} limits: cpu: {{ .Values.api.cpuLimit | default "2000m" | quote}} memory: {{ .Values.api.memoryLimit | default "2000Mi" | quote }} + {{- else }} + requests: + cpu: {{ .Values.api.cpuRequest | default "50m" | quote }} + memory: {{ .Values.api.memoryRequest | default "50Mi" | quote }} + limits: + cpu: {{ .Values.api.cpuLimit | default "500m" | quote}} + memory: {{ .Values.api.memoryLimit | default "1000Mi" | quote }} + {{- end }} command: - ./bin/docker-entrypoint-api.sh envFrom: diff --git a/charts/plane-ce/templates/workloads/beat-worker.deployment.yaml b/charts/plane-ce/templates/workloads/beat-worker.deployment.yaml index 42e54cb..9be17a2 100644 --- a/charts/plane-ce/templates/workloads/beat-worker.deployment.yaml +++ b/charts/plane-ce/templates/workloads/beat-worker.deployment.yaml @@ -23,12 +23,21 @@ spec: stdin: true tty: true resources: + {{- if eq (include "enable.hpa" . | trim) "true" }} requests: cpu: {{ .Values.beatworker.cpuRequest | default "500m" | quote }} memory: {{ .Values.beatworker.memoryRequest | default "1000Mi" | quote }} limits: cpu: {{ .Values.beatworker.cpuLimit | default "1000m" | quote}} memory: {{ .Values.beatworker.memoryLimit | default "2000Mi" | quote }} + {{- else }} + requests: + cpu: {{ .Values.beatworker.cpuRequest | default "50m" | quote }} + memory: {{ .Values.beatworker.memoryRequest | default "50Mi" | quote }} + limits: + cpu: {{ .Values.beatworker.cpuLimit | default "500m" | quote}} + memory: {{ .Values.beatworker.memoryLimit | default "1000Mi" | quote }} + {{- end }} command: - ./bin/docker-entrypoint-beat.sh envFrom: diff --git a/charts/plane-ce/templates/workloads/live.deployment.yaml b/charts/plane-ce/templates/workloads/live.deployment.yaml index a2bf7d1..24d645d 100644 --- a/charts/plane-ce/templates/workloads/live.deployment.yaml +++ b/charts/plane-ce/templates/workloads/live.deployment.yaml @@ -45,12 +45,21 @@ spec: stdin: true tty: true resources: + {{- if eq (include "enable.hpa" . | trim) "true" }} requests: cpu: {{ .Values.live.cpuRequest | default "500m" | quote }} memory: {{ .Values.live.memoryRequest | default "1000Mi" | quote }} limits: cpu: {{ .Values.live.cpuLimit | default "1000m" | quote}} memory: {{ .Values.live.memoryLimit | default "2000Mi" | quote }} + {{- else }} + requests: + cpu: {{ .Values.live.cpuRequest | default "50m" | quote }} + memory: {{ .Values.live.memoryRequest | default "50Mi" | quote }} + limits: + cpu: {{ .Values.live.cpuLimit | default "500m" | quote}} + memory: {{ .Values.live.memoryLimit | default "1000Mi" | quote }} + {{- end }} command: - node args: diff --git a/charts/plane-ce/templates/workloads/space.deployment.yaml b/charts/plane-ce/templates/workloads/space.deployment.yaml index 51e87d7..403d3d9 100644 --- a/charts/plane-ce/templates/workloads/space.deployment.yaml +++ b/charts/plane-ce/templates/workloads/space.deployment.yaml @@ -45,12 +45,21 @@ spec: stdin: true tty: true resources: + {{- if eq (include "enable.hpa" . | trim) "true" }} requests: cpu: {{ .Values.space.cpuRequest | default "100m" | quote }} memory: {{ .Values.space.memoryRequest | default "200Mi" | quote }} limits: cpu: {{ .Values.space.cpuLimit | default "500m" | quote}} memory: {{ .Values.space.memoryLimit | default "1000Mi" | quote }} + {{- else }} + requests: + cpu: {{ .Values.space.cpuRequest | default "50m" | quote }} + memory: {{ .Values.space.memoryRequest | default "50Mi" | quote }} + limits: + cpu: {{ .Values.space.cpuLimit | default "500m" | quote}} + memory: {{ .Values.space.memoryLimit | default "1000Mi" | quote }} + {{- end }} command: - node args: diff --git a/charts/plane-ce/templates/workloads/web.deployment.yaml b/charts/plane-ce/templates/workloads/web.deployment.yaml index 4bd4436..73356e5 100644 --- a/charts/plane-ce/templates/workloads/web.deployment.yaml +++ b/charts/plane-ce/templates/workloads/web.deployment.yaml @@ -45,12 +45,21 @@ spec: stdin: true tty: true resources: + {{- if eq (include "enable.hpa" . | trim) "true" }} requests: cpu: {{ .Values.web.cpuRequest | default "100m" | quote }} memory: {{ .Values.web.memoryRequest | default "200Mi" | quote }} limits: cpu: {{ .Values.web.cpuLimit | default "500m" | quote}} memory: {{ .Values.web.memoryLimit | default "1000Mi" | quote }} + {{- else }} + requests: + cpu: {{ .Values.web.cpuRequest | default "50m" | quote }} + memory: {{ .Values.web.memoryRequest | default "50Mi" | quote }} + limits: + cpu: {{ .Values.web.cpuLimit | default "500m" | quote}} + memory: {{ .Values.web.memoryLimit | default "1000Mi" | quote }} + {{- end }} command: - node args: diff --git a/charts/plane-ce/templates/workloads/worker.deployment.yaml b/charts/plane-ce/templates/workloads/worker.deployment.yaml index 8ee29d9..499f992 100644 --- a/charts/plane-ce/templates/workloads/worker.deployment.yaml +++ b/charts/plane-ce/templates/workloads/worker.deployment.yaml @@ -23,12 +23,21 @@ spec: stdin: true tty: true resources: + {{- if eq (include "enable.hpa" . | trim) "true" }} requests: cpu: {{ .Values.worker.cpuRequest | default "500m" | quote }} memory: {{ .Values.worker.memoryRequest | default "2000Mi" | quote }} limits: cpu: {{ .Values.worker.cpuLimit | default "1000m" | quote}} memory: {{ .Values.worker.memoryLimit | default "4000Mi" | quote }} + {{- else }} + requests: + cpu: {{ .Values.worker.cpuRequest | default "50m" | quote }} + memory: {{ .Values.worker.memoryRequest | default "50Mi" | quote }} + limits: + cpu: {{ .Values.worker.cpuLimit | default "500m" | quote}} + memory: {{ .Values.worker.memoryLimit | default "1000Mi" | quote }} + {{- end }} command: - ./bin/docker-entrypoint-worker.sh envFrom: