From 4758a64049c986ba1c6492682eb253fc096f14d5 Mon Sep 17 00:00:00 2001 From: Manish Agrawal <85211469+manish-agrawal-ai@users.noreply.github.com> Date: Mon, 3 Oct 2022 13:20:54 +0530 Subject: [PATCH 01/10] Update values.yaml --- charts/devtron/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/devtron/values.yaml b/charts/devtron/values.yaml index 4e5215e2..aaeef4c2 100644 --- a/charts/devtron/values.yaml +++ b/charts/devtron/values.yaml @@ -1,7 +1,7 @@ installer: repo: "devtron-labs/devtron" # For Kubernetes version < 1.16, set release: legacy. You won't be able to upgrade Devtron unless you upgrade the K8s version to 1.16 or above. - release: "v0.6.0" #You can use a branch name or a release tag name as a release, for gitee as source only "main" is supported as of now + release: "resources_test" #You can use a branch name or a release tag name as a release, for gitee as source only "main" is supported as of now image: quay.io/devtron/inception tag: c62d4c30-185-9354 source: "github" # Available options are github and gitee From 0cd2355e344f554c4650722cca20386e8a18b19f Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Tue, 4 Oct 2022 12:38:55 +0000 Subject: [PATCH 02/10] changeswq q! --- charts/devtron/devtron-bom.yaml | 6 +++--- charts/devtron/templates/app-sync-job.yaml | 18 +++++++++++++++-- charts/devtron/templates/dashboard.yaml | 7 +++++++ charts/devtron/templates/devtron.yaml | 7 +++++++ charts/devtron/templates/dex.yaml | 14 +++++++++++++ charts/devtron/templates/install.yaml | 10 +++++----- charts/devtron/templates/kubelink.yaml | 9 ++++++++- charts/devtron/templates/migrator.yaml | 14 +++++++++++-- charts/devtron/templates/postgresql.yaml | 23 +++++++++++++++++++++- charts/devtron/values.yaml | 2 +- charts/rollout/values.yaml | 10 +++++----- 11 files changed, 100 insertions(+), 20 deletions(-) diff --git a/charts/devtron/devtron-bom.yaml b/charts/devtron/devtron-bom.yaml index b86e52b4..d888d103 100644 --- a/charts/devtron/devtron-bom.yaml +++ b/charts/devtron/devtron-bom.yaml @@ -19,11 +19,11 @@ components: image: "quay.io/devtron/postgres:11.9.0-debian-10-r26" migrator: - image: "quay.io/devtron/migrator:9c933d29-149-10140" + image: "quay.io/devtron/migrator:cb494756-390-10883" envVars: devtron: GIT_BRANCH: "main" - GIT_HASH: "299b90b9322f40d84ebac23a9b43d0bbe23c56ca" + GIT_HASH: "0499da447c5ade0d8b607efe03a7326aaaa3fd85" casbin: GIT_BRANCH: "main" - GIT_HASH: "299b90b9322f40d84ebac23a9b43d0bbe23c56ca" + GIT_HASH: "0499da447c5ade0d8b607efe03a7326aaaa3fd85" diff --git a/charts/devtron/templates/app-sync-job.yaml b/charts/devtron/templates/app-sync-job.yaml index 122b262b..e620077d 100644 --- a/charts/devtron/templates/app-sync-job.yaml +++ b/charts/devtron/templates/app-sync-job.yaml @@ -17,7 +17,7 @@ spec: command: ['sh', '-c', 'while [ ! $(kubectl -n devtroncd get $(kubectl -n devtroncd get job -l job=postgresql-migrate-devtron -o name) -o jsonpath="{.status.succeeded}") ]; do sleep 10; done'] containers: - name: chart-sync - image: quay.io/devtron/chart-sync:57e17953-373-10147 + image: quay.io/devtron/chart-sync:07ac8fd7-132-10782 env: - name: PG_ADDR value: postgresql-postgresql.devtroncd @@ -28,6 +28,13 @@ spec: envFrom: - secretRef: name: devtron-secret + resources: + limits: + cpu: 50m + memory: 150Mi + requests: + cpu: 50m + memory: 150Mi restartPolicy: OnFailure backoffLimit: 4 --- @@ -50,7 +57,7 @@ spec: spec: containers: - name: chart-sync - image: quay.io/devtron/chart-sync:57e17953-373-10147 + image: quay.io/devtron/chart-sync:07ac8fd7-132-10782 env: - name: PG_ADDR value: postgresql-postgresql.devtroncd @@ -61,5 +68,12 @@ spec: envFrom: - secretRef: name: devtron-secret + resources: + limits: + cpu: 50m + memory: 150Mi + requests: + cpu: 50m + memory: 150Mi restartPolicy: Never backoffLimit: 4 diff --git a/charts/devtron/templates/dashboard.yaml b/charts/devtron/templates/dashboard.yaml index 714c6275..8e80c06f 100644 --- a/charts/devtron/templates/dashboard.yaml +++ b/charts/devtron/templates/dashboard.yaml @@ -90,5 +90,12 @@ spec: - secretRef: name: devtron-dashboard-secret volumeMounts: [] + resources: + limits: + cpu: 25m + memory: 50Mi + requests: + cpu: 25m + memory: 50Mi revisionHistoryLimit: 3 {{- end }} diff --git a/charts/devtron/templates/devtron.yaml b/charts/devtron/templates/devtron.yaml index f44aa9ed..b232c279 100644 --- a/charts/devtron/templates/devtron.yaml +++ b/charts/devtron/templates/devtron.yaml @@ -108,6 +108,13 @@ spec: image: {{ $.Values.components.devtron.image }} {{- end }} imagePullPolicy: {{ .imagePullPolicy }} + resources: + limits: + cpu: 100m + memory: 200Mi + requests: + cpu: 100m + memory: 200Mi lifecycle: preStop: exec: diff --git a/charts/devtron/templates/dex.yaml b/charts/devtron/templates/dex.yaml index ffe59d08..f8a12a8b 100644 --- a/charts/devtron/templates/dex.yaml +++ b/charts/devtron/templates/dex.yaml @@ -60,6 +60,13 @@ spec: - /shared/authenticator - rundex image: {{ .image }} + resources: + limits: + cpu: 25m + memory: 50Mi + requests: + cpu: 25m + memory: 50Mi imagePullPolicy: {{ .imagePullPolicy }} name: dex ports: @@ -81,6 +88,13 @@ spec: volumeMounts: - mountPath: /shared name: static-files + resources: + limits: + cpu: 25m + memory: 50Mi + requests: + cpu: 25m + memory: 50Mi serviceAccountName: argocd-dex-server volumes: - emptyDir: {} diff --git a/charts/devtron/templates/install.yaml b/charts/devtron/templates/install.yaml index 015ddb07..f022ae67 100644 --- a/charts/devtron/templates/install.yaml +++ b/charts/devtron/templates/install.yaml @@ -96,15 +96,15 @@ spec: protocol: TCP resources: limits: - cpu: 50m - memory: 500Mi + cpu: 100m + memory: 250Mi requests: - cpu: 10m - memory: 100Mi + cpu: 100m + memory: 250Mi restartPolicy: Always serviceAccountName: installer terminationGracePeriodSeconds: 30 {{- end }} {{- end }} {{- end }} -{{- end }} \ No newline at end of file +{{- end }} diff --git a/charts/devtron/templates/kubelink.yaml b/charts/devtron/templates/kubelink.yaml index e65f4a1a..9dbfa6fb 100644 --- a/charts/devtron/templates/kubelink.yaml +++ b/charts/devtron/templates/kubelink.yaml @@ -25,6 +25,13 @@ spec: containers: - name: kubelink image: {{ .image }} + resources: + limits: + cpu: 100m + memory: 200Mi + requests: + cpu: 100m + memory: 200Mi imagePullPolicy: {{ .imagePullPolicy }} ports: - name: app @@ -58,4 +65,4 @@ spec: app: kubelink sessionAffinity: None type: ClusterIP -{{- end }} \ No newline at end of file +{{- end }} diff --git a/charts/devtron/templates/migrator.yaml b/charts/devtron/templates/migrator.yaml index acb2ea56..237bf7d9 100644 --- a/charts/devtron/templates/migrator.yaml +++ b/charts/devtron/templates/migrator.yaml @@ -41,6 +41,13 @@ spec: envFrom: - secretRef: name: postgresql-migrator + resources: + requests: + memory: "250Mi" + cpu: "100m" + limits: + memory: "250Mi" + cpu: "100m" restartPolicy: OnFailure backoffLimit: 20 activeDeadlineSeconds: 1500 @@ -91,8 +98,11 @@ spec: name: postgresql-migrator resources: requests: - cpu: 0.5 - memory: 500Mi + memory: "250Mi" + cpu: "100m" + limits: + memory: "250Mi" + cpu: "100m" restartPolicy: OnFailure backoffLimit: 20 activeDeadlineSeconds: 1500 diff --git a/charts/devtron/templates/postgresql.yaml b/charts/devtron/templates/postgresql.yaml index 4139e0c3..1065500e 100644 --- a/charts/devtron/templates/postgresql.yaml +++ b/charts/devtron/templates/postgresql.yaml @@ -117,6 +117,13 @@ spec: initContainers: - name: init-chmod-data image: "quay.io/devtron/minideb:latest" + resources: + limits: + cpu: 10m + memory: 20Mi + requests: + cpu: 10m + memory: 20Mi imagePullPolicy: "IfNotPresent" command: - /bin/sh @@ -140,6 +147,13 @@ spec: containers: - name: postgresql-postgresql image: {{ .image }} + resources: + limits: + cpu: 100m + memory: 200Mi + requests: + cpu: 100m + memory: 200Mi imagePullPolicy: {{ .imagePullPolicy }} securityContext: runAsUser: 1001 @@ -203,6 +217,13 @@ spec: subPath: - name: metrics image: quay.io/devtron/postgres_exporter:v0.4.7 + resources: + limits: + cpu: 50m + memory: 100Mi + requests: + cpu: 50m + memory: 100Mi imagePullPolicy: "IfNotPresent" env: - name: DATA_SOURCE_URI @@ -253,4 +274,4 @@ spec: resources: requests: storage: {{ .persistence.volumeSize }} -{{- end }} \ No newline at end of file +{{- end }} diff --git a/charts/devtron/values.yaml b/charts/devtron/values.yaml index aaeef4c2..0a7296b6 100644 --- a/charts/devtron/values.yaml +++ b/charts/devtron/values.yaml @@ -90,7 +90,7 @@ components: volumeSize: "20Gi" migrator: - image: "quay.io/devtron/migrator:9c933d29-149-10140" + image: "quay.io/devtron/migrator:cb494756-390-10883" envVars: devtron: GIT_BRANCH: "main" diff --git a/charts/rollout/values.yaml b/charts/rollout/values.yaml index 5a5ed63a..3322025a 100644 --- a/charts/rollout/values.yaml +++ b/charts/rollout/values.yaml @@ -2,12 +2,12 @@ rollout: image: "quay.io/devtron/rollout:v0.6.2" resources: limits: - memory: 200Mi - cpu: 250m + memory: 50Mi + cpu: 25m requests: - memory: 100Mi - cpu: 50m + memory: 50Mi + cpu: 25m tolerations: [] podLabels: {} podAnnotations: {} -replicaCount: 1 \ No newline at end of file +replicaCount: 1 From 0b7aeeb5f812821850b84888d0a6c3fc360efdcc Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Wed, 5 Oct 2022 04:30:17 +0000 Subject: [PATCH 03/10] igitsensor --- charts/gitsensor/values.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/charts/gitsensor/values.yaml b/charts/gitsensor/values.yaml index 6cf98f72..d9b12393 100644 --- a/charts/gitsensor/values.yaml +++ b/charts/gitsensor/values.yaml @@ -25,11 +25,11 @@ gitsensor: serviceName: git-sensor resources: limits: - cpu: 1 - memory: 800Mi + cpu: 50m + memory: 100Mi requests: - cpu: 1 - memory: 500Mi + cpu: 50m + memory: 100Mi template: metadata: labels: From 42e5ba1762495b049d7abd6000b37c8590956701 Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Wed, 5 Oct 2022 04:48:34 +0000 Subject: [PATCH 04/10] casbin --- charts/devtron/templates/migrator.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/charts/devtron/templates/migrator.yaml b/charts/devtron/templates/migrator.yaml index 237bf7d9..c1487554 100644 --- a/charts/devtron/templates/migrator.yaml +++ b/charts/devtron/templates/migrator.yaml @@ -69,6 +69,13 @@ spec: - name: devtron-rollout image: "quay.io/devtron/kubectl:latest" command: ['sh', '-c', 'kubectl rollout restart deployment/devtron -n devtroncd'] + resources: + requests: + memory: "50Mi" + cpu: "25m" + limits: + memory: "50Mi" + cpu: "25m" initContainers: - name: postgresql-migrate-casbin image: {{ .image }} From c7b5d24cd28ea7a6e2a3d09c0f9e3dacd4e85e71 Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Wed, 5 Oct 2022 05:34:28 +0000 Subject: [PATCH 05/10] app sync --- charts/devtron/templates/app-sync-job.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/charts/devtron/templates/app-sync-job.yaml b/charts/devtron/templates/app-sync-job.yaml index e620077d..f963a707 100644 --- a/charts/devtron/templates/app-sync-job.yaml +++ b/charts/devtron/templates/app-sync-job.yaml @@ -15,6 +15,13 @@ spec: - name: migration-wait image: "quay.io/devtron/kubectl:latest" command: ['sh', '-c', 'while [ ! $(kubectl -n devtroncd get $(kubectl -n devtroncd get job -l job=postgresql-migrate-devtron -o name) -o jsonpath="{.status.succeeded}") ]; do sleep 10; done'] + resources: + limits: + cpu: 25m + memory: 50Mi + requests: + cpu: 25m + memory: 50Mi containers: - name: chart-sync image: quay.io/devtron/chart-sync:07ac8fd7-132-10782 From 5a7aa8aebb6aae6f873a957d4a0d0c106c982eee Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Wed, 5 Oct 2022 06:40:58 +0000 Subject: [PATCH 06/10] app-sync --- charts/devtron/templates/app-sync-job.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/charts/devtron/templates/app-sync-job.yaml b/charts/devtron/templates/app-sync-job.yaml index f963a707..3c6ad6c6 100644 --- a/charts/devtron/templates/app-sync-job.yaml +++ b/charts/devtron/templates/app-sync-job.yaml @@ -38,10 +38,10 @@ spec: resources: limits: cpu: 50m - memory: 150Mi + memory: 200Mi requests: cpu: 50m - memory: 150Mi + memory: 200Mi restartPolicy: OnFailure backoffLimit: 4 --- @@ -78,9 +78,9 @@ spec: resources: limits: cpu: 50m - memory: 150Mi + memory: 200Mi requests: cpu: 50m - memory: 150Mi + memory: 200Mi restartPolicy: Never backoffLimit: 4 From be8a58366662a70feb254c7c47330e3f70f91b8e Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Wed, 5 Oct 2022 07:52:00 +0000 Subject: [PATCH 07/10] resource change --- charts/devtron/templates/devtron.yaml | 8 ++++---- charts/devtron/templates/kubelink.yaml | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/charts/devtron/templates/devtron.yaml b/charts/devtron/templates/devtron.yaml index b232c279..defc4261 100644 --- a/charts/devtron/templates/devtron.yaml +++ b/charts/devtron/templates/devtron.yaml @@ -110,11 +110,11 @@ spec: imagePullPolicy: {{ .imagePullPolicy }} resources: limits: - cpu: 100m - memory: 200Mi + cpu: 50m + memory: 100Mi requests: - cpu: 100m - memory: 200Mi + cpu: 50m + memory: 100Mi lifecycle: preStop: exec: diff --git a/charts/devtron/templates/kubelink.yaml b/charts/devtron/templates/kubelink.yaml index 9dbfa6fb..8700e9fc 100644 --- a/charts/devtron/templates/kubelink.yaml +++ b/charts/devtron/templates/kubelink.yaml @@ -27,11 +27,11 @@ spec: image: {{ .image }} resources: limits: - cpu: 100m - memory: 200Mi + cpu: 150m + memory: 300Mi requests: - cpu: 100m - memory: 200Mi + cpu: 150m + memory: 300Mi imagePullPolicy: {{ .imagePullPolicy }} ports: - name: app From 067a09a8475f149dd23b9c46646101ef77bf2cbd Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Fri, 7 Oct 2022 04:35:07 +0000 Subject: [PATCH 08/10] ichanges --- charts/devtron/templates/dex.yaml | 8 ++++---- charts/devtron/templates/postgresql.yaml | 8 ++++---- charts/devtron/templates/workflow.yaml | 9 ++++++++- charts/gitsensor/values.yaml | 8 ++++---- 4 files changed, 20 insertions(+), 13 deletions(-) diff --git a/charts/devtron/templates/dex.yaml b/charts/devtron/templates/dex.yaml index f8a12a8b..f03b576a 100644 --- a/charts/devtron/templates/dex.yaml +++ b/charts/devtron/templates/dex.yaml @@ -90,11 +90,11 @@ spec: name: static-files resources: limits: - cpu: 25m - memory: 50Mi + cpu: 10m + memory: 25Mi requests: - cpu: 25m - memory: 50Mi + cpu: 10m + memory: 25Mi serviceAccountName: argocd-dex-server volumes: - emptyDir: {} diff --git a/charts/devtron/templates/postgresql.yaml b/charts/devtron/templates/postgresql.yaml index 1065500e..2a88dfc4 100644 --- a/charts/devtron/templates/postgresql.yaml +++ b/charts/devtron/templates/postgresql.yaml @@ -219,11 +219,11 @@ spec: image: quay.io/devtron/postgres_exporter:v0.4.7 resources: limits: - cpu: 50m - memory: 100Mi + cpu: 10m + memory: 20Mi requests: - cpu: 50m - memory: 100Mi + cpu: 10m + memory: 20Mi imagePullPolicy: "IfNotPresent" env: - name: DATA_SOURCE_URI diff --git a/charts/devtron/templates/workflow.yaml b/charts/devtron/templates/workflow.yaml index 66aba224..6d88022b 100644 --- a/charts/devtron/templates/workflow.yaml +++ b/charts/devtron/templates/workflow.yaml @@ -378,7 +378,14 @@ spec: apiVersion: v1 fieldPath: metadata.name image: {{ $.Values.workflowController.image }} + resources: + limits: + cpu: 25m + memory: 50Mi + requests: + cpu: 25m + memory: 50Mi name: workflow-controller serviceAccountName: argo {{- end }} -{{- end }} \ No newline at end of file +{{- end }} diff --git a/charts/gitsensor/values.yaml b/charts/gitsensor/values.yaml index d9b12393..e3042b89 100644 --- a/charts/gitsensor/values.yaml +++ b/charts/gitsensor/values.yaml @@ -25,11 +25,11 @@ gitsensor: serviceName: git-sensor resources: limits: - cpu: 50m - memory: 100Mi + cpu: 100m + memory: 200Mi requests: - cpu: 50m - memory: 100Mi + cpu: 100m + memory: 200Mi template: metadata: labels: From b816c42e6ddbc7f378ea0407462dfb5f6e3fe880 Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Fri, 7 Oct 2022 05:23:49 +0000 Subject: [PATCH 09/10] changed gs imageY --- charts/gitsensor/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/gitsensor/values.yaml b/charts/gitsensor/values.yaml index e3042b89..d4dc4f74 100644 --- a/charts/gitsensor/values.yaml +++ b/charts/gitsensor/values.yaml @@ -6,7 +6,7 @@ gitsensor: image: pullPolicy: Always repository: quay.io/devtron/git-sensor - tag: 5d527335-200-4349 + tag: 0360b73a-198-10935 service: metadata: labels: From 2753042af18749f5da52a05bd4e51709ec5f9c9f Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Fri, 7 Oct 2022 07:28:01 +0000 Subject: [PATCH 10/10] fix --- charts/devtron/templates/dex.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/devtron/templates/dex.yaml b/charts/devtron/templates/dex.yaml index f03b576a..d856f72c 100644 --- a/charts/devtron/templates/dex.yaml +++ b/charts/devtron/templates/dex.yaml @@ -91,10 +91,10 @@ spec: resources: limits: cpu: 10m - memory: 25Mi + memory: 20Mi requests: cpu: 10m - memory: 25Mi + memory: 20Mi serviceAccountName: argocd-dex-server volumes: - emptyDir: {}