From c1e05e97dbc0e4f74dccc5ea07c918afea9d9750 Mon Sep 17 00:00:00 2001 From: Pablo Date: Tue, 7 Feb 2023 08:57:30 -0600 Subject: [PATCH 01/17] feat: update version --- values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/values.yaml b/values.yaml index f4bcd58..d04c551 100644 --- a/values.yaml +++ b/values.yaml @@ -3,7 +3,7 @@ # Declare variables to be passed into your templates. # The Diffgram Version. Whenever a new update arrives, this will be changed. -diffgramVersion: 1.12.0 +diffgramVersion: 1.17.5 # Set this to your public domain where you want diffgram to be. # This must be a domain name and not a public IP address. From b67e4e2af83b7ff1036f10f8e73ccf2f61012c1d Mon Sep 17 00:00:00 2001 From: Anthony Sarkis <18080164+anthony-sarkis@users.noreply.github.com> Date: Fri, 7 Apr 2023 16:20:10 -0700 Subject: [PATCH 02/17] Update defaults to be easier on costs --- values.yaml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/values.yaml b/values.yaml index d04c551..f146240 100644 --- a/values.yaml +++ b/values.yaml @@ -146,8 +146,8 @@ rabbitmq: autoGenerated: true resources: requests: - cpu: "1.0" - memory: "1G" + cpu: ".2" + memory: ".4G" limits: cpu: "1.0" memory: "1G" @@ -171,8 +171,8 @@ defaultService: eventHandlersService: numReplicas: 1 requests: - cpu: "1.0" - memory: "1G" + cpu: ".2" + memory: ".4G" limits: cpu: "1.0" memory: "1G" @@ -181,8 +181,8 @@ eventHandlersService: frontendService: numReplicas: 1 requests: - cpu: "1.0" - memory: "1G" + cpu: ".2" + memory: ".4G" limits: cpu: "1.0" memory: "1G" @@ -192,7 +192,7 @@ walrusService: numReplicas: 1 requests: cpu: "1.0" - memory: "1G" + memory: "2G" limits: cpu: "2.0" - memory: "2G" + memory: "4G" From 62ff77af936d6f2fd802e7dae2aad023c2aeff41 Mon Sep 17 00:00:00 2001 From: Pablo Date: Mon, 15 May 2023 07:27:20 -0600 Subject: [PATCH 03/17] feat: add action --- .github/workflows/release.yaml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/release.yaml diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..435b0c4 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,25 @@ +name: Release Charts + +on: + push: + branches: + - main + +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Configure Git + run: | + git config user.name "$GITHUB_ACTOR" + git config user.email "$GITHUB_ACTOR@users.noreply.github.com" + + - name: Run chart-releaser + uses: helm/chart-releaser-action@v1.5.0 + env: + CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" \ No newline at end of file From 51a12968586f80bd1b0d6c9b7b341f05dbb44d0b Mon Sep 17 00:00:00 2001 From: Pablo Date: Mon, 15 May 2023 08:51:02 -0600 Subject: [PATCH 04/17] feat: updgrade --- Chart.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Chart.yaml b/Chart.yaml index b3be3cb..3093d73 100644 --- a/Chart.yaml +++ b/Chart.yaml @@ -15,16 +15,16 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 1.0.0 +version: 1.7.0 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -appVersion: "0.0.1" +appVersion: "1.21.0" dependencies: - name: rabbitmq version: 11.2.2 repository: https://charts.bitnami.com/bitnami - condition: useRabbitMq \ No newline at end of file + condition: useRabbitMq From 3566b757718c1f2287ac5e68b3275d52fc304fcd Mon Sep 17 00:00:00 2001 From: Pablo Date: Wed, 17 May 2023 10:21:05 -0600 Subject: [PATCH 05/17] fix: duplicate key keycloak realm --- templates/diffgram_settings.tpl | 1 - 1 file changed, 1 deletion(-) diff --git a/templates/diffgram_settings.tpl b/templates/diffgram_settings.tpl index 5dde611..e63a5ea 100644 --- a/templates/diffgram_settings.tpl +++ b/templates/diffgram_settings.tpl @@ -52,7 +52,6 @@ KEY_CLOAK_MASTER_USER: {{.Values.diffgramSettings.KEY_CLOAK_MASTER_USER}} KEY_CLOAK_DIFFGRAM_USER: {{.Values.diffgramSettings.KEY_CLOAK_DIFFGRAM_USER}} KEYCLOAK_REALM: {{.Values.diffgramSettings.KEYCLOAK_REALM}} - KEYCLOAK_REALM: {{.Values.diffgramSettings.KEYCLOAK_REALM}} SMTP_HOST: {{.Values.diffgramSettings.SMTP_HOST}} SMTP_PORT: {{.Values.diffgramSettings.SMTP_PORT}} SMTP_USERNAME: {{.Values.diffgramSettings.SMTP_USERNAME}} From 9b42ce13248fb4fb3a237f90a8b6ad58d678be0d Mon Sep 17 00:00:00 2001 From: Pablo Date: Wed, 17 May 2023 10:25:40 -0600 Subject: [PATCH 06/17] feat: upgrade version --- Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Chart.yaml b/Chart.yaml index 3093d73..f2d96a5 100644 --- a/Chart.yaml +++ b/Chart.yaml @@ -15,7 +15,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 1.7.0 +version: 1.7.1 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to From c9b145324077595704aafd2b90de60948fd3d47e Mon Sep 17 00:00:00 2001 From: Anthony Sarkis <18080164+anthony-sarkis@users.noreply.github.com> Date: Mon, 5 Jun 2023 18:56:49 -0700 Subject: [PATCH 07/17] upgrade sqlalchmey versions --- templates/hooks/database_pre_install.yaml | 2 +- templates/hooks/database_pre_upgrade.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/hooks/database_pre_install.yaml b/templates/hooks/database_pre_install.yaml index 1f3c7fe..81377ab 100644 --- a/templates/hooks/database_pre_install.yaml +++ b/templates/hooks/database_pre_install.yaml @@ -57,4 +57,4 @@ spec: - secretRef: name: db-migrations-secret # The actual migrations command - command: ["sh","-c", "cd shared; export PYTHONPATH=/app; pip install sqlalchemy-utils==0.36.6;python /app/play_and_scripts/scripts/create_database.py; alembic upgrade head"] \ No newline at end of file + command: ["sh","-c", "cd shared; export PYTHONPATH=/app; pip install sqlalchemy-utils==0.41.1;python /app/play_and_scripts/scripts/create_database.py; alembic upgrade head"] \ No newline at end of file diff --git a/templates/hooks/database_pre_upgrade.yaml b/templates/hooks/database_pre_upgrade.yaml index 81d0c6f..f7b72c2 100644 --- a/templates/hooks/database_pre_upgrade.yaml +++ b/templates/hooks/database_pre_upgrade.yaml @@ -47,7 +47,7 @@ spec: - secretRef: name: db-migrations-secret # The actual migrations command - command: ["sh","-c", "cd shared; export PYTHONPATH=/app; pip install sqlalchemy-utils==0.36.6;python /app/play_and_scripts/scripts/create_database.py; alembic upgrade head"] + command: ["sh","-c", "cd shared; export PYTHONPATH=/app; pip install sqlalchemy-utils==0.41.1;python /app/play_and_scripts/scripts/create_database.py; alembic upgrade head"] {{ if .Values.nodeGroupLabel }} nodeSelector: From f6ee3674171569081768c0f7bbdfbdc7c3d42300 Mon Sep 17 00:00:00 2001 From: Anthony Sarkis <18080164+anthony-sarkis@users.noreply.github.com> Date: Mon, 5 Jun 2023 19:24:01 -0700 Subject: [PATCH 08/17] Update diffgrams_secrets.tpl --- templates/diffgrams_secrets.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/diffgrams_secrets.tpl b/templates/diffgrams_secrets.tpl index 76bfcd5..4429fb8 100644 --- a/templates/diffgrams_secrets.tpl +++ b/templates/diffgrams_secrets.tpl @@ -16,7 +16,7 @@ DATABASE_URL: "postgresql+psycopg2://{{ .Values.dbSettings.dbUser }}:{{ .Values.dbSettings.dbPassword }}@postgres-rds-service/{{ .Values.dbSettings.dbName }}" {{ end }} {{ if eq .Values.dbSettings.dbProvider "azure"}} - DATABASE_URL: "postgresql+psycopg2://{{ .Values.dbSettings.dbUser }}:{{ .Values.dbSettings.dbPassword }}@postgres-azure-service/{{ .Values.dbSettings.dbName }}" + DATABASE_URL: "postgresql+psycopg2://{{ .Values.dbSettings.dbUser }}:{{ .Values.dbSettings.dbPassword }}@{{ .Values.dbSettings.dbName }}" {{ end }} USER_PASSWORDS_SECRET: {{ .Values.diffgramSecrets.USER_PASSWORDS_SECRET }} DIFFGRAM_AZURE_CONNECTION_STRING: {{ .Values.diffgramSecrets.DIFFGRAM_AZURE_CONNECTION_STRING }} From 648f571f0e6416eac6dcc93750d85034aafc9d38 Mon Sep 17 00:00:00 2001 From: Anthony Sarkis <18080164+anthony-sarkis@users.noreply.github.com> Date: Mon, 5 Jun 2023 19:47:08 -0700 Subject: [PATCH 09/17] Remove create database in Upgrade context no reason to attempt to create a database in the upgrade context and can cause hard to debug errors --- templates/hooks/database_pre_upgrade.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/hooks/database_pre_upgrade.yaml b/templates/hooks/database_pre_upgrade.yaml index f7b72c2..8c955cb 100644 --- a/templates/hooks/database_pre_upgrade.yaml +++ b/templates/hooks/database_pre_upgrade.yaml @@ -47,7 +47,7 @@ spec: - secretRef: name: db-migrations-secret # The actual migrations command - command: ["sh","-c", "cd shared; export PYTHONPATH=/app; pip install sqlalchemy-utils==0.41.1;python /app/play_and_scripts/scripts/create_database.py; alembic upgrade head"] + command: ["sh","-c", "cd shared; export PYTHONPATH=/app; pip install sqlalchemy-utils==0.41.1; alembic upgrade head"] {{ if .Values.nodeGroupLabel }} nodeSelector: From 4e79427f28a814b1bb668d6b831a4f7481987b1c Mon Sep 17 00:00:00 2001 From: Anthony Sarkis <18080164+anthony-sarkis@users.noreply.github.com> Date: Mon, 5 Jun 2023 19:51:02 -0700 Subject: [PATCH 10/17] Update database_pre_upgrade.yaml --- templates/hooks/database_pre_upgrade.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/hooks/database_pre_upgrade.yaml b/templates/hooks/database_pre_upgrade.yaml index 8c955cb..97e9338 100644 --- a/templates/hooks/database_pre_upgrade.yaml +++ b/templates/hooks/database_pre_upgrade.yaml @@ -47,7 +47,7 @@ spec: - secretRef: name: db-migrations-secret # The actual migrations command - command: ["sh","-c", "cd shared; export PYTHONPATH=/app; pip install sqlalchemy-utils==0.41.1; alembic upgrade head"] + command: ["sh","-c", "cd shared; export PYTHONPATH=/app; pip install sqlalchemy-utils==0.41.1; pip install psycopg2-binary==2.9.6; alembic upgrade head"] {{ if .Values.nodeGroupLabel }} nodeSelector: From 508322a8639432868003884cdd8ae992fe2d7e69 Mon Sep 17 00:00:00 2001 From: Anthony Sarkis <18080164+anthony-sarkis@users.noreply.github.com> Date: Tue, 6 Jun 2023 11:45:59 -0700 Subject: [PATCH 11/17] remove duplicate installs These dependencies should already exist in cd shared restating them here is confusing, as it confuses what is being called and where the code is running (e.g. assuming it isolated, when it's actually using the shared dependencies already) --- templates/hooks/database_pre_upgrade.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/hooks/database_pre_upgrade.yaml b/templates/hooks/database_pre_upgrade.yaml index 97e9338..9ce104e 100644 --- a/templates/hooks/database_pre_upgrade.yaml +++ b/templates/hooks/database_pre_upgrade.yaml @@ -47,7 +47,7 @@ spec: - secretRef: name: db-migrations-secret # The actual migrations command - command: ["sh","-c", "cd shared; export PYTHONPATH=/app; pip install sqlalchemy-utils==0.41.1; pip install psycopg2-binary==2.9.6; alembic upgrade head"] + command: ["sh","-c", "cd shared; export PYTHONPATH=/app; alembic upgrade head"] {{ if .Values.nodeGroupLabel }} nodeSelector: From 34060947080499e3723cc09a8659b5fa269fe4e1 Mon Sep 17 00:00:00 2001 From: Anthony Sarkis <18080164+anthony-sarkis@users.noreply.github.com> Date: Mon, 10 Jul 2023 15:25:21 -0700 Subject: [PATCH 12/17] Update values.yaml --- values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/values.yaml b/values.yaml index f146240..26b848e 100644 --- a/values.yaml +++ b/values.yaml @@ -17,7 +17,7 @@ useCertManager: true useTls: true tlsIssuer: letsencrypt-prod # One of: "issuer-local", "letsencrypt-staging", or "letsencrypt-prod" localCaSecretName: my-local-ca-key-pair -issuerEmail: pablo.estrada@diffgram.com +issuerEmail: anthony@diffgram.com dbSettings: # Specify How the DB Service should be created From 0c912310e9d508b08f08d7b01fcf21aad2af4347 Mon Sep 17 00:00:00 2001 From: Anthony Sarkis <18080164+anthony-sarkis@users.noreply.github.com> Date: Mon, 10 Jul 2023 15:29:11 -0700 Subject: [PATCH 13/17] Remove Rabbit -> When using with a subdomain, it appears De Facto that it is not needed to have this listed here -> Rabbit has it's own Cert generated, currently using secret volume diffgram-rabbitmq-certs. -> This can break TLS generating certificate. We shouldn't expect users to have to generate A records for rabbit too, so it would better to leave this empty if that's reasonable. cert-manager/controller/challenges "msg"="propagation check failed" "error"="failed to perform self check GET request 'http://rabbitmq.app.diffgram.com/. --- templates/ingress.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/templates/ingress.yaml b/templates/ingress.yaml index 065dbce..08c9aac 100644 --- a/templates/ingress.yaml +++ b/templates/ingress.yaml @@ -38,7 +38,6 @@ spec: - hosts: - {{ .Values.diffgramDomain }} - www.{{ .Values.diffgramDomain }} - - rabbitmq.{{ .Values.diffgramDomain}} secretName: diffgram-cert-tls-{{ .Values.diffgramDomain }} {{ end }} rules: From 2cec474ece8fff2a39ae1760f6ad7657618f9d15 Mon Sep 17 00:00:00 2001 From: Anthony Sarkis <18080164+anthony-sarkis@users.noreply.github.com> Date: Mon, 10 Jul 2023 15:43:16 -0700 Subject: [PATCH 14/17] remove www --- templates/ingress.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/templates/ingress.yaml b/templates/ingress.yaml index 08c9aac..035dda7 100644 --- a/templates/ingress.yaml +++ b/templates/ingress.yaml @@ -37,7 +37,6 @@ spec: tls: - hosts: - {{ .Values.diffgramDomain }} - - www.{{ .Values.diffgramDomain }} secretName: diffgram-cert-tls-{{ .Values.diffgramDomain }} {{ end }} rules: From 0b84636fec96bd95a7dc83fe70ddeabe157bdf54 Mon Sep 17 00:00:00 2001 From: Anthony Sarkis <18080164+anthony-sarkis@users.noreply.github.com> Date: Mon, 10 Jul 2023 15:51:52 -0700 Subject: [PATCH 15/17] remove ingress class -> this was in the context of having other ingress files --- templates/ingress.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/templates/ingress.yaml b/templates/ingress.yaml index 035dda7..1e59e5b 100644 --- a/templates/ingress.yaml +++ b/templates/ingress.yaml @@ -4,8 +4,6 @@ metadata: name: diffgram-ingress namespace: {{ .Release.Namespace }} annotations: - kubernetes.io/ingress.class: "nginx" - ingressclass.kubernetes.io/is-default-class: "true" nginx.ingress.kubernetes.io/use-regex: "true" nginx.ingress.kubernetes.io/enable-cors: "true" {{ if eq .Values.useTls false}} From 3b000c1e0983bff936c904252dadc4ae4242312d Mon Sep 17 00:00:00 2001 From: Anthony Sarkis <18080164+anthony-sarkis@users.noreply.github.com> Date: Mon, 10 Jul 2023 16:21:52 -0700 Subject: [PATCH 16/17] Restore --- templates/ingress.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/templates/ingress.yaml b/templates/ingress.yaml index 1e59e5b..75b5b42 100644 --- a/templates/ingress.yaml +++ b/templates/ingress.yaml @@ -4,6 +4,7 @@ metadata: name: diffgram-ingress namespace: {{ .Release.Namespace }} annotations: + kubernetes.io/ingress.class: "nginx" nginx.ingress.kubernetes.io/use-regex: "true" nginx.ingress.kubernetes.io/enable-cors: "true" {{ if eq .Values.useTls false}} From 0c5ec108ddfd0bff9c736bf6b3e22397dea79ccf Mon Sep 17 00:00:00 2001 From: Anthony Sarkis <18080164+anthony-sarkis@users.noreply.github.com> Date: Mon, 10 Jul 2023 16:23:13 -0700 Subject: [PATCH 17/17] restore --- templates/ingress.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/templates/ingress.yaml b/templates/ingress.yaml index 75b5b42..035dda7 100644 --- a/templates/ingress.yaml +++ b/templates/ingress.yaml @@ -5,6 +5,7 @@ metadata: namespace: {{ .Release.Namespace }} annotations: kubernetes.io/ingress.class: "nginx" + ingressclass.kubernetes.io/is-default-class: "true" nginx.ingress.kubernetes.io/use-regex: "true" nginx.ingress.kubernetes.io/enable-cors: "true" {{ if eq .Values.useTls false}}