From f26b8495608027802fffb08faacefa923365bc98 Mon Sep 17 00:00:00 2001 From: Slim Amamou Date: Thu, 5 Dec 2024 14:13:06 +0100 Subject: [PATCH 01/30] fixed(cd): error in prod due to SMS_DSN not set it was mistakenly unset from it's default value by the github CD. Now it must be put in Github secrets --- .github/workflows/deploy.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 486ab2b..0c55cdd 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -9,9 +9,9 @@ on: payum-apikey: description: Payum API Key required: true - # sms-dsn: - # description: SMS DSN - # required: true + sms-dsn: + description: SMS DSN + required: true mailer-dsn: description: MAILER DSN storage-key: From 42e0dfa523231de3e2385112aeea27e15953fed8 Mon Sep 17 00:00:00 2001 From: Slim Amamou Date: Thu, 5 Dec 2024 14:18:23 +0100 Subject: [PATCH 02/30] fixed(cd): was complaining about required secret --- .github/workflows/cd.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 72d62f3..da457b2 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -40,3 +40,4 @@ jobs: workload-identity-provider: ${{ secrets.WORKLOAD_IDENTITY_PROVIDER }} database-url: ${{ secrets.DATABASE_URL }} mailer-dsn: ${{ secrets.MAILER_DSN }} + sms-dsn: ${{ secrets.SMS_DSN }} From 3f2a73c3ffa1942d7d0ac87f5d9acf90deb88977 Mon Sep 17 00:00:00 2001 From: ThomasSamson Date: Wed, 31 Jul 2024 13:12:30 +0200 Subject: [PATCH 03/30] Edit destination ns --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 0c55cdd..f767fcd 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -49,7 +49,7 @@ jobs: id: meta run: | set -xo pipefail - PROJECT=plateforme-ebs + PROJECT=tipimi-ebs # Tags are deployed in prod CONTEXT=prod ENVIRONMENT=prod From d8c93a44dccbb2a3ce591725df32a8aca2bca60b Mon Sep 17 00:00:00 2001 From: ThomasSamson Date: Wed, 31 Jul 2024 13:14:25 +0200 Subject: [PATCH 04/30] trigger cd From 3ad45ea139bd655476d1cfd989951803d8813db0 Mon Sep 17 00:00:00 2001 From: ThomasSamson Date: Wed, 31 Jul 2024 13:39:37 +0200 Subject: [PATCH 05/30] Fix build destination --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 52bf249..0fe6112 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,7 +15,7 @@ jobs: BUILD_CONTEXT: . BUILD_TARGET: app_php REGISTRY_JSON_KEY: ${{ secrets.GITHUB_TOKEN }} - IMAGE_REPOSITORY: ghcr.io/Apes-HDF + IMAGE_REPOSITORY: ghcr.io/Tipimi-fr build-push-caddy: # Same Dockerfile as php, with a build target which is after @@ -30,4 +30,4 @@ jobs: BUILD_CONTEXT: . BUILD_TARGET: app_caddy REGISTRY_JSON_KEY: ${{ secrets.GITHUB_TOKEN }} - IMAGE_REPOSITORY: ghcr.io/Apes-HDF + IMAGE_REPOSITORY: ghcr.io/Tipimi-fr From 776cf64b7894ae453a45bf4a724fedd83fcff57e Mon Sep 17 00:00:00 2001 From: ThomasSamson Date: Wed, 31 Jul 2024 13:39:37 +0200 Subject: [PATCH 06/30] Fix trusted host --- .github/workflows/deploy.yml | 5 +++++ helm/chart/templates/configmap.yaml | 2 +- helm/chart/values.yaml | 9 ++++++--- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index f767fcd..713abcd 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -44,6 +44,7 @@ jobs: project: ${{ steps.meta.outputs.project }} namespace: ${{ steps.meta.outputs.namespace }} storage_name: ${{ steps.meta.outputs.storage_name }} + trusted_host: ${{ steps.meta.outputs.trusted_host }} steps: - name: Generate metadata id: meta @@ -55,6 +56,9 @@ jobs: ENVIRONMENT=prod IMAGE_TAG=sha-${GITHUB_SHA::7} RELEASE_NAME=prod + TRUSTED_HOST=$(echo ${{ vars.DOMAIN }} | sed 's/\./\\\\\\\\./g') + + echo "trusted_host=${TRUSTED_HOST}" >> $GITHUB_OUTPUT echo "context=${CONTEXT}" >> $GITHUB_OUTPUT echo "environment=${ENVIRONMENT}" >> $GITHUB_OUTPUT echo "image_tag=${IMAGE_TAG}" >> $GITHUB_OUTPUT @@ -129,6 +133,7 @@ jobs: --set=php.storage.usePathStyleEndpoint=true \ --set=php.storage.key="${{ secrets.storage-key }}" \ --set=php.storage.secret="${{ secrets.storage-secret-key }}" \ + --set=php.trustedHosts[2]=${{ needs.meta.outputs.trusted_host }} \ --values ./helm/chart/values-${{ needs.meta.outputs.context }}.yml \ | sed --unbuffered '/USER-SUPPLIED VALUES/,$d' ; then echo "Deployment has failed!" diff --git a/helm/chart/templates/configmap.yaml b/helm/chart/templates/configmap.yaml index f15cbd2..67bbe47 100644 --- a/helm/chart/templates/configmap.yaml +++ b/helm/chart/templates/configmap.yaml @@ -10,7 +10,7 @@ data: php-app-env: {{ .Values.php.appEnv | quote }} php-app-debug: {{ .Values.php.appDebug | quote }} php-cors-allow-origin: {{ .Values.php.corsAllowOrigin | quote }} - php-trusted-hosts: {{ .Values.php.trustedHosts | quote }} + php-trusted-hosts: {{ join "|" .Values.php.trustedHosts | quote }} php-trusted-proxies: "{{ join "," .Values.php.trustedProxies }}" mercure-url: "http://{{ include "plateforme-ebs" . }}/.well-known/mercure" mercure-public-url: {{ .Values.mercure.publicUrl | default "http://127.0.0.1/.well-known/mercure" | quote }} diff --git a/helm/chart/values.yaml b/helm/chart/values.yaml index 5eee356..30dbabc 100644 --- a/helm/chart/values.yaml +++ b/helm/chart/values.yaml @@ -4,7 +4,7 @@ php: image: - repository: "ghcr.io/apes-hdf/plateforme-ebs-php" # CHANGE ME + repository: "ghcr.io/tipimi-fr/plateforme-ebs-php" # CHANGE ME pullPolicy: IfNotPresent # Overrides the image tag whose default is the chart appVersion. tag: "" @@ -12,7 +12,10 @@ php: appDebug: "0" appSecret: "" corsAllowOrigin: "^https?://.*?\\.chart-example\\.local$" - trustedHosts: "^127\\.0\\.0\\.1|localhost|.*\\.chart-example\\.local$" + trustedHosts: + - "^127\\.0\\.0\\.1" + - "localhost" + - ".*\\.chart-example\\.local$" trustedProxies: - "127.0.0.1" - "10.0.0.0/8" @@ -54,7 +57,7 @@ consumer: caddy: image: - repository: "ghcr.io/apes-hdf/plateforme-ebs-caddy" # CHANGE ME + repository: "ghcr.io/tipimi-fr/plateforme-ebs-caddy" # CHANGE ME pullPolicy: IfNotPresent # Overrides the image tag whose default is the chart appVersion. tag: "" From 25c90ec21223507acc76ff34ddb96d37dce8dbd3 Mon Sep 17 00:00:00 2001 From: ThomasSamson Date: Wed, 31 Jul 2024 13:47:42 +0200 Subject: [PATCH 07/30] Make image name shorter --- .github/workflows/build.yml | 4 ++-- helm/chart/values.yaml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0fe6112..b5c2653 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,7 +11,7 @@ jobs: - name: Build/Push uses: coopTilleuls/action-docker-build-push@v10 with: - IMAGE_NAME: plateforme-ebs-php + IMAGE_NAME: ebs-php BUILD_CONTEXT: . BUILD_TARGET: app_php REGISTRY_JSON_KEY: ${{ secrets.GITHUB_TOKEN }} @@ -26,7 +26,7 @@ jobs: - name: Build/Push uses: coopTilleuls/action-docker-build-push@v10 with: - IMAGE_NAME: plateforme-ebs-caddy + IMAGE_NAME: ebs-caddy BUILD_CONTEXT: . BUILD_TARGET: app_caddy REGISTRY_JSON_KEY: ${{ secrets.GITHUB_TOKEN }} diff --git a/helm/chart/values.yaml b/helm/chart/values.yaml index 30dbabc..08f2711 100644 --- a/helm/chart/values.yaml +++ b/helm/chart/values.yaml @@ -4,7 +4,7 @@ php: image: - repository: "ghcr.io/tipimi-fr/plateforme-ebs-php" # CHANGE ME + repository: "ghcr.io/tipimi-fr/ebs-php" # CHANGE ME pullPolicy: IfNotPresent # Overrides the image tag whose default is the chart appVersion. tag: "" @@ -57,7 +57,7 @@ consumer: caddy: image: - repository: "ghcr.io/tipimi-fr/plateforme-ebs-caddy" # CHANGE ME + repository: "ghcr.io/tipimi-fr/ebs-caddy" # CHANGE ME pullPolicy: IfNotPresent # Overrides the image tag whose default is the chart appVersion. tag: "" From 2009cce7c2f7d76a5536f2461ac123789046f6e1 Mon Sep 17 00:00:00 2001 From: ThomasSamson Date: Wed, 31 Jul 2024 14:25:25 +0200 Subject: [PATCH 08/30] Disable fixture --- helm/chart/templates/cronjob-fixture-reset.yaml | 2 +- helm/chart/templates/fixtures-job.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/helm/chart/templates/cronjob-fixture-reset.yaml b/helm/chart/templates/cronjob-fixture-reset.yaml index f061c69..e763fa4 100644 --- a/helm/chart/templates/cronjob-fixture-reset.yaml +++ b/helm/chart/templates/cronjob-fixture-reset.yaml @@ -200,4 +200,4 @@ spec: periodSeconds: 3 resources: {{- toYaml .Values.resources.fixtures | nindent 16 }} -{{- end }} \ No newline at end of file +{{- end }} diff --git a/helm/chart/templates/fixtures-job.yaml b/helm/chart/templates/fixtures-job.yaml index 7faa6cf..09363bb 100644 --- a/helm/chart/templates/fixtures-job.yaml +++ b/helm/chart/templates/fixtures-job.yaml @@ -1,4 +1,4 @@ -{{- if .Values.php.fixtureJob.enabled -}} +{{- if .Values.php.fixtureJob.enabled }} apiVersion: batch/v1 kind: Job metadata: From 1ff74cbd37ad22161e6881194d68d869d977d5cc Mon Sep 17 00:00:00 2001 From: ThomasSamson Date: Wed, 31 Jul 2024 15:30:08 +0200 Subject: [PATCH 09/30] Switch sym link --- fixtures/prod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fixtures/prod b/fixtures/prod index b59f7e3..63e96b8 120000 --- a/fixtures/prod +++ b/fixtures/prod @@ -1 +1 @@ -test/ \ No newline at end of file +prod-boot/ \ No newline at end of file From 1537c042599715a80e29910987231817a4ef7594 Mon Sep 17 00:00:00 2001 From: ThomasSamson Date: Wed, 7 Aug 2024 09:32:53 +0200 Subject: [PATCH 10/30] Fix sms_dns --- helm/chart/templates/secrets.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helm/chart/templates/secrets.yaml b/helm/chart/templates/secrets.yaml index 3efba32..3214a6c 100644 --- a/helm/chart/templates/secrets.yaml +++ b/helm/chart/templates/secrets.yaml @@ -21,7 +21,7 @@ data: {{- else }} mailer-dsn: {{ .Values.mailer.dsn | b64enc | quote }} {{- end }} - sms-dsn: {{ .Values.sms.dsn | b64enc | quote }} + sms-dsn: {{ .Values.sms.dsn | quote }} payum-apikey: {{ .Values.payum.apikey | b64enc | quote }} php-storage-key: {{ .Values.php.storage.key | b64enc | quote }} php-storage-secret: {{ .Values.php.storage.secret | b64enc | quote }} \ No newline at end of file From 771a64d82c2174e3dc8fafa32844bcce82d09d22 Mon Sep 17 00:00:00 2001 From: ThomasSamson Date: Wed, 7 Aug 2024 09:38:01 +0200 Subject: [PATCH 11/30] Fix deployment --- .github/workflows/deploy.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 713abcd..b5fa6b2 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -9,11 +9,6 @@ on: payum-apikey: description: Payum API Key required: true - sms-dsn: - description: SMS DSN - required: true - mailer-dsn: - description: MAILER DSN storage-key: description: storage key required: true @@ -29,6 +24,12 @@ on: database-url: description: Database URL required: true + mailer-dsn: + description: Mailer DSN + required: true + sms-dsn: + description: SMS DSN + required: true jobs: From 5557a35a9bc22e09cec38341dbcd70f433b19166 Mon Sep 17 00:00:00 2001 From: ThomasSamson Date: Wed, 7 Aug 2024 09:50:52 +0200 Subject: [PATCH 12/30] Add benc --- helm/chart/templates/secrets.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helm/chart/templates/secrets.yaml b/helm/chart/templates/secrets.yaml index 3214a6c..3efba32 100644 --- a/helm/chart/templates/secrets.yaml +++ b/helm/chart/templates/secrets.yaml @@ -21,7 +21,7 @@ data: {{- else }} mailer-dsn: {{ .Values.mailer.dsn | b64enc | quote }} {{- end }} - sms-dsn: {{ .Values.sms.dsn | quote }} + sms-dsn: {{ .Values.sms.dsn | b64enc | quote }} payum-apikey: {{ .Values.payum.apikey | b64enc | quote }} php-storage-key: {{ .Values.php.storage.key | b64enc | quote }} php-storage-secret: {{ .Values.php.storage.secret | b64enc | quote }} \ No newline at end of file From 6502f907527eac9e2d00cbf812b639a6b4188f06 Mon Sep 17 00:00:00 2001 From: ThomasSamson Date: Wed, 31 Jul 2024 13:14:25 +0200 Subject: [PATCH 13/30] trigger cd From b205a0f211a69959f5a094c7238da1eb68cb091a Mon Sep 17 00:00:00 2001 From: ThomasSamson Date: Wed, 7 Aug 2024 09:32:53 +0200 Subject: [PATCH 14/30] Fix sms_dns --- helm/chart/templates/secrets.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helm/chart/templates/secrets.yaml b/helm/chart/templates/secrets.yaml index 3efba32..3214a6c 100644 --- a/helm/chart/templates/secrets.yaml +++ b/helm/chart/templates/secrets.yaml @@ -21,7 +21,7 @@ data: {{- else }} mailer-dsn: {{ .Values.mailer.dsn | b64enc | quote }} {{- end }} - sms-dsn: {{ .Values.sms.dsn | b64enc | quote }} + sms-dsn: {{ .Values.sms.dsn | quote }} payum-apikey: {{ .Values.payum.apikey | b64enc | quote }} php-storage-key: {{ .Values.php.storage.key | b64enc | quote }} php-storage-secret: {{ .Values.php.storage.secret | b64enc | quote }} \ No newline at end of file From 391b2860ac79bfd184fbe21943a56594be9eba0f Mon Sep 17 00:00:00 2001 From: ThomasSamson Date: Wed, 7 Aug 2024 09:38:01 +0200 Subject: [PATCH 15/30] Fix deployment --- .github/workflows/deploy.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index b5fa6b2..36926b7 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -128,6 +128,7 @@ jobs: --set=sms.dsn="${{ secrets.sms-dsn }}" \ --set=payum.apikey="${{ secrets.payum-apikey }}" \ --set=mailer.dsn="${{ secrets.mailer-dsn }}" \ + --set=sms.dsn="${{ secrets.sms-dsn }}" \ --set=php.storage.bucket="${{ vars.STORAGE_BUCKET }}" \ --set=php.storage.endpoint="https://storage.googleapis.com" \ --set=php.storage.region="eu-west-1" \ From e7c4bafd66bb609bcf8b0268a3cb9564160b4af2 Mon Sep 17 00:00:00 2001 From: ThomasSamson Date: Wed, 7 Aug 2024 09:50:52 +0200 Subject: [PATCH 16/30] Add benc --- helm/chart/templates/secrets.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helm/chart/templates/secrets.yaml b/helm/chart/templates/secrets.yaml index 3214a6c..3efba32 100644 --- a/helm/chart/templates/secrets.yaml +++ b/helm/chart/templates/secrets.yaml @@ -21,7 +21,7 @@ data: {{- else }} mailer-dsn: {{ .Values.mailer.dsn | b64enc | quote }} {{- end }} - sms-dsn: {{ .Values.sms.dsn | quote }} + sms-dsn: {{ .Values.sms.dsn | b64enc | quote }} payum-apikey: {{ .Values.payum.apikey | b64enc | quote }} php-storage-key: {{ .Values.php.storage.key | b64enc | quote }} php-storage-secret: {{ .Values.php.storage.secret | b64enc | quote }} \ No newline at end of file From 2ff9d984ef6e0bbcd7534c3b9d53d9b07dde948b Mon Sep 17 00:00:00 2001 From: ThomasSamson Date: Mon, 28 Oct 2024 10:21:19 +0100 Subject: [PATCH 17/30] Disable fixture --- helm/chart/values-prod.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/helm/chart/values-prod.yml b/helm/chart/values-prod.yml index c644cc5..e810596 100644 --- a/helm/chart/values-prod.yml +++ b/helm/chart/values-prod.yml @@ -33,6 +33,6 @@ postgresql: php: fixtureJob: - enabled: true + enabled: false fixtureCron: - enabled: true + enabled: false From a3ad5c864933b8ca8b82ceb30a83d192b03f8d6c Mon Sep 17 00:00:00 2001 From: ThomasSamson Date: Mon, 28 Oct 2024 10:23:35 +0100 Subject: [PATCH 18/30] Add security on fixture disabled --- .github/workflows/deploy.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 36926b7..dceacd8 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -136,6 +136,8 @@ jobs: --set=php.storage.key="${{ secrets.storage-key }}" \ --set=php.storage.secret="${{ secrets.storage-secret-key }}" \ --set=php.trustedHosts[2]=${{ needs.meta.outputs.trusted_host }} \ + --set=php.fixtureJob=false + --set=php.fixtureCron=false --values ./helm/chart/values-${{ needs.meta.outputs.context }}.yml \ | sed --unbuffered '/USER-SUPPLIED VALUES/,$d' ; then echo "Deployment has failed!" From 8e9f71d6a12b9f552dc9be79381e422dd61156cd Mon Sep 17 00:00:00 2001 From: Slim Amamou Date: Mon, 28 Oct 2024 11:36:14 +0100 Subject: [PATCH 19/30] fix: 500 error in prod MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit │ {"message":"Uncaught PHP Exception TypeError: \"App\\Repository\\ConfigurationRepository::getServicesParameter(): Return value must be of type bool, null returned\" at ConfigurationRepository.php line 71","context":{"exception":{"class │ │ ":"TypeError","message":"App\\Repository\\ConfigurationRepository::getServicesParameter(): Return value must be of type bool, null returned","code":0,"file":"/srv/app/src/Repository/ConfigurationRepository.php:71"}},"level":500,"level_ │ │ name":"CRITICAL","channel":"request","datetime":"2024-10-28T10:38:49.791926+01:00","extra":{}} --- src/Repository/ConfigurationRepository.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Repository/ConfigurationRepository.php b/src/Repository/ConfigurationRepository.php index c2f392d..1c2ec98 100644 --- a/src/Repository/ConfigurationRepository.php +++ b/src/Repository/ConfigurationRepository.php @@ -68,6 +68,6 @@ final class ConfigurationRepository extends ServiceEntityRepository ->setMaxResults(1) ->getQuery()->getOneOrNullResult(); - return $config['configuration']['global']['globalServicesEnabled']; + return $config['configuration']['global']['globalServicesEnabled'] ?? false; } } From 1b1c809b8006f69a4c43bb182326aa54d107bc3f Mon Sep 17 00:00:00 2001 From: Slim Amamou Date: Mon, 28 Oct 2024 11:47:59 +0100 Subject: [PATCH 20/30] fix(ci): was not deploying Error: UPGRADE FAILED: template: plateforme-ebs/templates/fixtures-job.yaml:1:14: executing "plateforme-ebs/templates/fixtures-job.yaml" at <.Values.php.fixtureJob.enabled>: can't evaluate field enabled in type interface {} --- .github/workflows/deploy.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index dceacd8..22a4149 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -136,8 +136,8 @@ jobs: --set=php.storage.key="${{ secrets.storage-key }}" \ --set=php.storage.secret="${{ secrets.storage-secret-key }}" \ --set=php.trustedHosts[2]=${{ needs.meta.outputs.trusted_host }} \ - --set=php.fixtureJob=false - --set=php.fixtureCron=false + --set=php.fixtureJob.enabled=false + --set=php.fixtureCron.enabled=false --values ./helm/chart/values-${{ needs.meta.outputs.context }}.yml \ | sed --unbuffered '/USER-SUPPLIED VALUES/,$d' ; then echo "Deployment has failed!" From 702c4d18303658aa1005800c9f06b6e2e4f343da Mon Sep 17 00:00:00 2001 From: Slim Amamou Date: Mon, 28 Oct 2024 14:28:11 +0100 Subject: [PATCH 21/30] fix(cd): error when deploying cannot patch "prod-redis-master" with kind StatefulSet: StatefulSet.apps "prod-redis-master" is invalid: spec: Forbidden: updates to statefulset spec for fields other than 'replicas', 'ordinals', 'template', 'updateStrategy', 'persistentVolumeClaimRetentionPolicy' and 'minReadySeconds' are forbidden --- .github/workflows/deploy.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 22a4149..36926b7 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -136,8 +136,6 @@ jobs: --set=php.storage.key="${{ secrets.storage-key }}" \ --set=php.storage.secret="${{ secrets.storage-secret-key }}" \ --set=php.trustedHosts[2]=${{ needs.meta.outputs.trusted_host }} \ - --set=php.fixtureJob.enabled=false - --set=php.fixtureCron.enabled=false --values ./helm/chart/values-${{ needs.meta.outputs.context }}.yml \ | sed --unbuffered '/USER-SUPPLIED VALUES/,$d' ; then echo "Deployment has failed!" From 2cda347665b9feee8d3e487173930bc6a093f7af Mon Sep 17 00:00:00 2001 From: ThomasSamson Date: Mon, 28 Oct 2024 14:47:34 +0100 Subject: [PATCH 22/30] Fix syntax helm --- .github/workflows/deploy.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 36926b7..342ae3b 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -136,6 +136,8 @@ jobs: --set=php.storage.key="${{ secrets.storage-key }}" \ --set=php.storage.secret="${{ secrets.storage-secret-key }}" \ --set=php.trustedHosts[2]=${{ needs.meta.outputs.trusted_host }} \ + --set=php.fixtureJob.enabled=false \ + --set=php.fixtureCron.anabled=false \ --values ./helm/chart/values-${{ needs.meta.outputs.context }}.yml \ | sed --unbuffered '/USER-SUPPLIED VALUES/,$d' ; then echo "Deployment has failed!" From 4ff04415ec70d76152506f65ace63232f113291c Mon Sep 17 00:00:00 2001 From: ThomasSamson Date: Wed, 31 Jul 2024 13:14:25 +0200 Subject: [PATCH 23/30] trigger cd From 8e33a85559d193162bd89079f8f84d237e933c76 Mon Sep 17 00:00:00 2001 From: ThomasSamson Date: Wed, 7 Aug 2024 09:32:53 +0200 Subject: [PATCH 24/30] Fix sms_dns --- helm/chart/templates/secrets.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helm/chart/templates/secrets.yaml b/helm/chart/templates/secrets.yaml index 3efba32..3214a6c 100644 --- a/helm/chart/templates/secrets.yaml +++ b/helm/chart/templates/secrets.yaml @@ -21,7 +21,7 @@ data: {{- else }} mailer-dsn: {{ .Values.mailer.dsn | b64enc | quote }} {{- end }} - sms-dsn: {{ .Values.sms.dsn | b64enc | quote }} + sms-dsn: {{ .Values.sms.dsn | quote }} payum-apikey: {{ .Values.payum.apikey | b64enc | quote }} php-storage-key: {{ .Values.php.storage.key | b64enc | quote }} php-storage-secret: {{ .Values.php.storage.secret | b64enc | quote }} \ No newline at end of file From 4076f910d8cc39a7635774027d534a7ffbe9e006 Mon Sep 17 00:00:00 2001 From: ThomasSamson Date: Wed, 7 Aug 2024 09:50:52 +0200 Subject: [PATCH 25/30] Add benc --- helm/chart/templates/secrets.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helm/chart/templates/secrets.yaml b/helm/chart/templates/secrets.yaml index 3214a6c..3efba32 100644 --- a/helm/chart/templates/secrets.yaml +++ b/helm/chart/templates/secrets.yaml @@ -21,7 +21,7 @@ data: {{- else }} mailer-dsn: {{ .Values.mailer.dsn | b64enc | quote }} {{- end }} - sms-dsn: {{ .Values.sms.dsn | quote }} + sms-dsn: {{ .Values.sms.dsn | b64enc | quote }} payum-apikey: {{ .Values.payum.apikey | b64enc | quote }} php-storage-key: {{ .Values.php.storage.key | b64enc | quote }} php-storage-secret: {{ .Values.php.storage.secret | b64enc | quote }} \ No newline at end of file From 2d481475aedf3483b5d82bb23c0d64c5c01b0089 Mon Sep 17 00:00:00 2001 From: ThomasSamson Date: Wed, 31 Jul 2024 13:14:25 +0200 Subject: [PATCH 26/30] trigger cd From 23968d5b7be1a2b0d8acd2fa3591f0eec695c565 Mon Sep 17 00:00:00 2001 From: ThomasSamson Date: Wed, 7 Aug 2024 09:32:53 +0200 Subject: [PATCH 27/30] Fix sms_dns --- helm/chart/templates/secrets.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helm/chart/templates/secrets.yaml b/helm/chart/templates/secrets.yaml index 3efba32..3214a6c 100644 --- a/helm/chart/templates/secrets.yaml +++ b/helm/chart/templates/secrets.yaml @@ -21,7 +21,7 @@ data: {{- else }} mailer-dsn: {{ .Values.mailer.dsn | b64enc | quote }} {{- end }} - sms-dsn: {{ .Values.sms.dsn | b64enc | quote }} + sms-dsn: {{ .Values.sms.dsn | quote }} payum-apikey: {{ .Values.payum.apikey | b64enc | quote }} php-storage-key: {{ .Values.php.storage.key | b64enc | quote }} php-storage-secret: {{ .Values.php.storage.secret | b64enc | quote }} \ No newline at end of file From 85ab08db522d5a7b8f6793d8dd708ef66e890720 Mon Sep 17 00:00:00 2001 From: ThomasSamson Date: Wed, 7 Aug 2024 09:50:52 +0200 Subject: [PATCH 28/30] Add benc --- helm/chart/templates/secrets.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helm/chart/templates/secrets.yaml b/helm/chart/templates/secrets.yaml index 3214a6c..3efba32 100644 --- a/helm/chart/templates/secrets.yaml +++ b/helm/chart/templates/secrets.yaml @@ -21,7 +21,7 @@ data: {{- else }} mailer-dsn: {{ .Values.mailer.dsn | b64enc | quote }} {{- end }} - sms-dsn: {{ .Values.sms.dsn | quote }} + sms-dsn: {{ .Values.sms.dsn | b64enc | quote }} payum-apikey: {{ .Values.payum.apikey | b64enc | quote }} php-storage-key: {{ .Values.php.storage.key | b64enc | quote }} php-storage-secret: {{ .Values.php.storage.secret | b64enc | quote }} \ No newline at end of file From 85876f17c9db1efb550fc9b669f1acf030d08350 Mon Sep 17 00:00:00 2001 From: ThomasSamson Date: Mon, 28 Oct 2024 10:23:35 +0100 Subject: [PATCH 29/30] Add security on fixture disabled --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 342ae3b..e30dfa2 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -137,7 +137,7 @@ jobs: --set=php.storage.secret="${{ secrets.storage-secret-key }}" \ --set=php.trustedHosts[2]=${{ needs.meta.outputs.trusted_host }} \ --set=php.fixtureJob.enabled=false \ - --set=php.fixtureCron.anabled=false \ + --set=php.fixtureCron.enabled=false \ --values ./helm/chart/values-${{ needs.meta.outputs.context }}.yml \ | sed --unbuffered '/USER-SUPPLIED VALUES/,$d' ; then echo "Deployment has failed!" From aaa32d10813d53d9cc556237dc23a50e251abec0 Mon Sep 17 00:00:00 2001 From: Slim Amamou Date: Mon, 2 Dec 2024 17:27:04 +0100 Subject: [PATCH 30/30] Fixed(ci): phpstan complaint MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Error: Offset 'globalServicesEnabl…' on array{globalServicesEnabled: bool} on left side of ?? always exists and is not nullable. --- src/Repository/ConfigurationRepository.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Repository/ConfigurationRepository.php b/src/Repository/ConfigurationRepository.php index 1c2ec98..18ff75d 100644 --- a/src/Repository/ConfigurationRepository.php +++ b/src/Repository/ConfigurationRepository.php @@ -61,7 +61,7 @@ final class ConfigurationRepository extends ServiceEntityRepository public function getServicesParameter(): bool { - /** @var array{configuration: array{ global: array{ globalServicesEnabled: bool }}} $config */ + /** @var array{configuration: array{ global: array{ globalServicesEnabled: bool|null }}} $config */ $config = $this ->createQueryBuilder('c') ->select('c.configuration')