From 5b8422146e968bd96a1d3c59f5e027e20a833916 Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Tue, 18 Apr 2023 00:11:27 +0200 Subject: [PATCH 1/4] reduce kubernetes memory limits --- deployment/src/kubernetes/templates/backend/Deployment.yaml | 4 ++-- deployment/src/kubernetes/templates/webapp/Deployment.yaml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/deployment/src/kubernetes/templates/backend/Deployment.yaml b/deployment/src/kubernetes/templates/backend/Deployment.yaml index 7125363f5..4d0f66dbc 100644 --- a/deployment/src/kubernetes/templates/backend/Deployment.yaml +++ b/deployment/src/kubernetes/templates/backend/Deployment.yaml @@ -41,9 +41,9 @@ spec: name: secret-{{ .Release.Name }}-backend resources: requests: - memory: {{ .Values.BACKEND.RESOURCE_REQUESTS_MEMORY | default "1G" | quote }} + memory: {{ .Values.BACKEND.RESOURCE_REQUESTS_MEMORY | default "500M" | quote }} limits: - memory: {{ .Values.BACKEND.RESOURCE_LIMITS_MEMORY | default "2G" | quote }} + memory: {{ .Values.BACKEND.RESOURCE_LIMITS_MEMORY | default "1G" | quote }} ports: - containerPort: 4000 protocol: TCP diff --git a/deployment/src/kubernetes/templates/webapp/Deployment.yaml b/deployment/src/kubernetes/templates/webapp/Deployment.yaml index 9dbe6aefb..41221185c 100644 --- a/deployment/src/kubernetes/templates/webapp/Deployment.yaml +++ b/deployment/src/kubernetes/templates/webapp/Deployment.yaml @@ -42,8 +42,8 @@ spec: name: secret-{{ .Release.Name }}-webapp resources: requests: - memory: {{ .Values.WEBAPP.RESOURCE_REQUESTS_MEMORY | default "1G" | quote }} + memory: {{ .Values.WEBAPP.RESOURCE_REQUESTS_MEMORY | default "500M" | quote }} limits: - memory: {{ .Values.WEBAPP.RESOURCE_LIMITS_MEMORY | default "2G" | quote }} + memory: {{ .Values.WEBAPP.RESOURCE_LIMITS_MEMORY | default "1G" | quote }} restartPolicy: {{ .Values.WEBAPP.CONTAINER_RESTART_POLICY }} terminationGracePeriodSeconds: {{ .Values.WEBAPP.CONTAINER_TERMINATION_GRACE_PERIOD_SECONDS }} \ No newline at end of file From 19cc1043eed7540cc30fa68c1a6fa3143d7ce389 Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Wed, 19 Apr 2023 13:28:00 +0200 Subject: [PATCH 2/4] dispatch build success to stage.yunite.me --- .github/workflows/publish.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index ca5e52945..624639862 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -306,4 +306,12 @@ jobs: token: ${{ secrets.OCELOT_PUBLISH_EVENT_PAT }} # this token is required to access the other repository event-type: trigger-ocelot-build-success repository: 'Ocelot-Social-Community/stage.ocelot.social' + client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}", "GITHUB_RUN_NUMBER": "${{ env.GITHUB_RUN_NUMBER }}", "VERSION": "${VERSION}", "BUILD_DATE": "${BUILD_DATE}", "BUILD_COMMIT": "${BUILD_COMMIT}", "BUILD_VERSION": "${BUILD_VERSION}"}' + + name: Repository Dispatch stage.yunite.me + uses: peter-evans/repository-dispatch@v2 + with: + token: ${{ secrets.OCELOT_PUBLISH_EVENT_PAT }} # this token is required to access the other repository + event-type: trigger-ocelot-build-success + repository: 'Yunite-Net/stage.yunite.me' client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}", "GITHUB_RUN_NUMBER": "${{ env.GITHUB_RUN_NUMBER }}", "VERSION": "${VERSION}", "BUILD_DATE": "${BUILD_DATE}", "BUILD_COMMIT": "${BUILD_COMMIT}", "BUILD_VERSION": "${BUILD_VERSION}"}' \ No newline at end of file From a4db8f385343be5ffeb4776feaed31e6913aa42b Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Wed, 19 Apr 2023 13:28:09 +0200 Subject: [PATCH 3/4] updated stage.ocelot.social ref --- deployment/configurations/stage.ocelot.social | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deployment/configurations/stage.ocelot.social b/deployment/configurations/stage.ocelot.social index 69885510c..be3ac7ad2 160000 --- a/deployment/configurations/stage.ocelot.social +++ b/deployment/configurations/stage.ocelot.social @@ -1 +1 @@ -Subproject commit 69885510ce32dc12f4ce581287e5aecdaa948ecc +Subproject commit be3ac7ad29f37d6a00fb3203db302cd91cebb9fa From 9531cf65a26df45a33fabbae82561aff57ed1529 Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Wed, 19 Apr 2023 14:07:45 +0200 Subject: [PATCH 4/4] fix typo --- .github/workflows/publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 624639862..e386b7efa 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -308,7 +308,7 @@ jobs: repository: 'Ocelot-Social-Community/stage.ocelot.social' client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}", "GITHUB_RUN_NUMBER": "${{ env.GITHUB_RUN_NUMBER }}", "VERSION": "${VERSION}", "BUILD_DATE": "${BUILD_DATE}", "BUILD_COMMIT": "${BUILD_COMMIT}", "BUILD_VERSION": "${BUILD_VERSION}"}' - name: Repository Dispatch stage.yunite.me + - name: Repository Dispatch stage.yunite.me uses: peter-evans/repository-dispatch@v2 with: token: ${{ secrets.OCELOT_PUBLISH_EVENT_PAT }} # this token is required to access the other repository