From b3d7e69046a7bc0cdaef26485ca8f21afdb554f1 Mon Sep 17 00:00:00 2001 From: Hector Valcarcel Date: Tue, 4 Jun 2024 10:24:52 +0200 Subject: [PATCH 01/10] feat: add values definition for extra env var using secrets ref --- charts/budibase/values.yaml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/charts/budibase/values.yaml b/charts/budibase/values.yaml index 27037cdaa8..0b86218d2e 100644 --- a/charts/budibase/values.yaml +++ b/charts/budibase/values.yaml @@ -240,6 +240,13 @@ services: # -- Extra environment variables to set for apps pods. Takes a list of # name=value pairs. extraEnv: [] + # -- Name of the K8s Secret in the same namespace which contains the extra environment variables. + # This can be used to avoid storing sensitive information in the values.yaml file. + extraEnvFromSecret: [] + # - name: MY_SECRET_KEY + # secretName : my-secret + # secretKey: my-secret-key + # -- Startup probe configuration for apps pods. You shouldn't need to # change this, but if you want to you can find more information here: # @@ -323,6 +330,13 @@ services: # -- Extra environment variables to set for automation worker pods. Takes a list of # name=value pairs. extraEnv: [] + # -- Name of the K8s Secret in the same namespace which contains the extra environment variables. + # This can be used to avoid storing sensitive information in the values.yaml file. + extraEnvFromSecret: [] + # - name: MY_SECRET_KEY + # secretName : my-secret + # secretKey: my-secret-key + # -- Startup probe configuration for automation worker pods. You shouldn't # need to change this, but if you want to you can find more information # here: @@ -408,6 +422,13 @@ services: # -- Extra environment variables to set for worker pods. Takes a list of # name=value pairs. extraEnv: [] + # -- Name of the K8s Secret in the same namespace which contains the extra environment variables. + # This can be used to avoid storing sensitive information in the values.yaml file. + extraEnvFromSecret: [] + # - name: MY_SECRET_KEY + # secretName : my-secret + # secretKey: my-secret-key + # -- Startup probe configuration for worker pods. You shouldn't need to # change this, but if you want to you can find more information here: # From d554a8287b74c030ee0254872b869e514ce2da79 Mon Sep 17 00:00:00 2001 From: Hector Valcarcel Date: Tue, 4 Jun 2024 10:26:44 +0200 Subject: [PATCH 02/10] feat: attach env vars from 'extraEnvFromSecret' --- charts/budibase/templates/app-service-deployment.yaml | 7 +++++++ .../templates/automation-worker-service-deployment.yaml | 9 ++++++++- charts/budibase/templates/worker-service-deployment.yaml | 7 +++++++ 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/charts/budibase/templates/app-service-deployment.yaml b/charts/budibase/templates/app-service-deployment.yaml index ed7166ec5d..b764065bfc 100644 --- a/charts/budibase/templates/app-service-deployment.yaml +++ b/charts/budibase/templates/app-service-deployment.yaml @@ -202,6 +202,13 @@ spec: - name: {{ .name }} value: {{ .value | quote }} {{- end }} + {{- range .Values.services.apps.extraEnvFromSecret}} + - name: {{ .name }} + valueFrom: + secretKeyRef: + name: {{ .secretName }} + key: {{ .secretKey | quote }} + {{- end}} image: budibase/apps:{{ .Values.globals.appVersion | default .Chart.AppVersion }} imagePullPolicy: Always {{- if .Values.services.apps.startupProbe }} diff --git a/charts/budibase/templates/automation-worker-service-deployment.yaml b/charts/budibase/templates/automation-worker-service-deployment.yaml index 3c6f94ae9e..38a384626e 100644 --- a/charts/budibase/templates/automation-worker-service-deployment.yaml +++ b/charts/budibase/templates/automation-worker-service-deployment.yaml @@ -201,6 +201,13 @@ spec: - name: {{ .name }} value: {{ .value | quote }} {{- end }} + {{- range .Values.services.automationWorkers.extraEnvFromSecret}} + - name: {{ .name }} + valueFrom: + secretKeyRef: + name: {{ .secretName }} + key: {{ .secretKey | quote }} + {{- end}} image: budibase/apps:{{ .Values.globals.appVersion | default .Chart.AppVersion }} imagePullPolicy: Always @@ -272,4 +279,4 @@ spec: {{- toYaml .Values.services.automationWorkers.extraVolumes | nindent 8 }} {{ end }} status: {} -{{- end }} \ No newline at end of file +{{- end }} diff --git a/charts/budibase/templates/worker-service-deployment.yaml b/charts/budibase/templates/worker-service-deployment.yaml index 66a9bb6c14..1f9d1a8ed7 100644 --- a/charts/budibase/templates/worker-service-deployment.yaml +++ b/charts/budibase/templates/worker-service-deployment.yaml @@ -188,6 +188,13 @@ spec: - name: {{ .name }} value: {{ .value | quote }} {{- end }} + {{- range .Values.services.worker.extraEnvFromSecret}} + - name: {{ .name }} + valueFrom: + secretKeyRef: + name: {{ .secretName }} + key: {{ .secretKey | quote }} + {{- end}} image: budibase/worker:{{ .Values.globals.appVersion | default .Chart.AppVersion }} imagePullPolicy: Always {{- if .Values.services.worker.startupProbe }} From 8018d957aedcbdff91dd60353da60fbefd424c98 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Tue, 4 Jun 2024 12:58:43 +0200 Subject: [PATCH 03/10] Add PR size labeler --- .github/workflows/pr-labeler.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/pr-labeler.yml diff --git a/.github/workflows/pr-labeler.yml b/.github/workflows/pr-labeler.yml new file mode 100644 index 0000000000..1bfa79dad3 --- /dev/null +++ b/.github/workflows/pr-labeler.yml @@ -0,0 +1,25 @@ +name: PR labeler + +on: + pull_request: + types: [opened, synchronize] + +jobs: + size-labeler: + runs-on: ubuntu-latest + name: Label the PR size + steps: + - uses: codelytv/pr-size-labeler@v1 + with: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + xs_label: "xs" + xs_max_size: "10" + s_label: "s" + s_max_size: "100" + m_label: "m" + m_max_size: "500" + l_label: "l" + l_max_size: "1000" + xl_label: "xl" + fail_if_xl: "false" + files_to_ignore: "yarn.lock" From fb7411dee3fca07e30d44363bca44cfeb2d4faef Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Tue, 4 Jun 2024 13:03:30 +0200 Subject: [PATCH 04/10] Team label --- .github/workflows/pr-labeler.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/pr-labeler.yml b/.github/workflows/pr-labeler.yml index 1bfa79dad3..d10d67c4b7 100644 --- a/.github/workflows/pr-labeler.yml +++ b/.github/workflows/pr-labeler.yml @@ -23,3 +23,18 @@ jobs: xl_label: "xl" fail_if_xl: "false" files_to_ignore: "yarn.lock" + + team-labeler: + runs-on: ubuntu-latest + name: Label the PR size + steps: + - uses: rodrigoarias/auto-label-per-user@v1.0.0 + with: + git-token: ${{ secrets.GITHUB_TOKEN }} + user-team-map: | + { + "adrinr": "firestorm" + "samwho": "firestorm" + "pclmnt": "firestorm" + "mike12345567": "firestorm" + } From 9717c2bd17b89c2c435d76f0f6ff3e4d17029356 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Tue, 4 Jun 2024 14:16:29 +0200 Subject: [PATCH 05/10] Fix json --- .github/workflows/pr-labeler.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pr-labeler.yml b/.github/workflows/pr-labeler.yml index d10d67c4b7..85f664ca30 100644 --- a/.github/workflows/pr-labeler.yml +++ b/.github/workflows/pr-labeler.yml @@ -33,8 +33,8 @@ jobs: git-token: ${{ secrets.GITHUB_TOKEN }} user-team-map: | { - "adrinr": "firestorm" - "samwho": "firestorm" - "pclmnt": "firestorm" + "adrinr": "firestorm", + "samwho": "firestorm", + "pclmnt": "firestorm", "mike12345567": "firestorm" } From cbcba76309a2c418d61a1cd401a016457a94f19b Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Tue, 4 Jun 2024 14:18:47 +0200 Subject: [PATCH 06/10] Use default labels --- .github/workflows/pr-labeler.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/pr-labeler.yml b/.github/workflows/pr-labeler.yml index 85f664ca30..8a9e20c2ac 100644 --- a/.github/workflows/pr-labeler.yml +++ b/.github/workflows/pr-labeler.yml @@ -12,15 +12,10 @@ jobs: - uses: codelytv/pr-size-labeler@v1 with: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - xs_label: "xs" xs_max_size: "10" - s_label: "s" s_max_size: "100" - m_label: "m" m_max_size: "500" - l_label: "l" l_max_size: "1000" - xl_label: "xl" fail_if_xl: "false" files_to_ignore: "yarn.lock" From c17b12d4669ac3615381ddc8cad5b05a3c8d4133 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Tue, 4 Jun 2024 14:19:54 +0200 Subject: [PATCH 07/10] Add concurrency --- .github/workflows/pr-labeler.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/pr-labeler.yml b/.github/workflows/pr-labeler.yml index 8a9e20c2ac..c63e7029ba 100644 --- a/.github/workflows/pr-labeler.yml +++ b/.github/workflows/pr-labeler.yml @@ -1,5 +1,9 @@ name: PR labeler +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number }} + cancel-in-progress: true + on: pull_request: types: [opened, synchronize] From c8e68978d8eafa2308d342b05ceb51d5b2216ad6 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Tue, 4 Jun 2024 14:22:30 +0200 Subject: [PATCH 08/10] Label team only on opened --- .github/workflows/pr-labeler.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pr-labeler.yml b/.github/workflows/pr-labeler.yml index c63e7029ba..553b87d3cf 100644 --- a/.github/workflows/pr-labeler.yml +++ b/.github/workflows/pr-labeler.yml @@ -26,6 +26,7 @@ jobs: team-labeler: runs-on: ubuntu-latest name: Label the PR size + if: ${{ github.event.action == 'opened' }} steps: - uses: rodrigoarias/auto-label-per-user@v1.0.0 with: From e131835852088c92e86515b5a4bde7fb6f4582d2 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Tue, 4 Jun 2024 14:24:38 +0200 Subject: [PATCH 09/10] Use default names --- .github/workflows/pr-labeler.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/pr-labeler.yml b/.github/workflows/pr-labeler.yml index 553b87d3cf..998c95be27 100644 --- a/.github/workflows/pr-labeler.yml +++ b/.github/workflows/pr-labeler.yml @@ -11,7 +11,6 @@ on: jobs: size-labeler: runs-on: ubuntu-latest - name: Label the PR size steps: - uses: codelytv/pr-size-labeler@v1 with: @@ -25,7 +24,6 @@ jobs: team-labeler: runs-on: ubuntu-latest - name: Label the PR size if: ${{ github.event.action == 'opened' }} steps: - uses: rodrigoarias/auto-label-per-user@v1.0.0 From 4221a13fd1cdda5ef9097ae0b06483fbf4e82a61 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Tue, 4 Jun 2024 14:03:52 +0100 Subject: [PATCH 10/10] Updating pro back to correct reference. --- packages/pro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/pro b/packages/pro index d3c3077011..5189b83bea 160000 --- a/packages/pro +++ b/packages/pro @@ -1 +1 @@ -Subproject commit d3c3077011a8e20ed3c48dcd6301caca4120b6ac +Subproject commit 5189b83bea1868574ff7f4c51fe5db38a11badb8