From a8ab93cecff33e37118f1f302e6cfa6f458feffc Mon Sep 17 00:00:00 2001 From: Jennifer Richards Date: Thu, 28 Mar 2024 20:39:59 -0300 Subject: [PATCH 1/3] ci: Get APP_API_TOKENS from env --- helm/settings_local.py | 11 ++++++----- helm/values.yaml | 6 ++++++ 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/helm/settings_local.py b/helm/settings_local.py index 92e7bce1a4..6a4dac69a8 100644 --- a/helm/settings_local.py +++ b/helm/settings_local.py @@ -3,6 +3,7 @@ from base64 import b64decode from email.utils import parseaddr +import json from ietf import __release_hash__ from ietf.settings import * # pyflakes:ignore @@ -136,11 +137,11 @@ "DATATRACKER_MEETECHO_CLIENT_ID and DATATRACKER_MEETECHO_CLIENT_SECRET must be set in production" ) -APP_API_TOKENS = { - "ietf.api.views.directauth": ["redacted",], - "ietf.api.views.email_aliases": ["redacted"], - "ietf.api.views.active_email_list": ["redacted"], -} +_APP_API_TOKENS_JSON = os.environ.get("DATATRACKER_APP_API_TOKENS_JSON", None) +if _APP_API_TOKENS_JSON is not None: + APP_API_TOKENS = json.loads(_APP_API_TOKENS_JSON) +else: + APP_API_TOKENS = {} EMAIL_COPY_TO = "" diff --git a/helm/values.yaml b/helm/values.yaml index 3eedd0e1f6..d385d8fdf9 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -593,3 +593,9 @@ env: # DATATRACKER_MATOMO_SITE_ID: "7" # must be present to enable Matomo # DATATRACKER_MATOMO_DOMAIN_PATH: "analytics.ietf.org" CELERY_PASSWORD: "this-is-a-secret" + DATATRACKER_APP_API_TOKENS_JSON: |- + { + "ietf.api.views.directauth": ["secret-for-directauth"], + "ietf.api.views.email_aliases": ["secret-for-email-aliases"], + "ietf.api.views.active_email_list": ["secret-for-active-email-list"], + } From 9ad28fd71330d86aecd932fcede05cb0607f4646 Mon Sep 17 00:00:00 2001 From: Jennifer Richards Date: Fri, 29 Mar 2024 17:09:14 -0300 Subject: [PATCH 2/3] ci: chart fixup --- helm/settings_local.py | 2 ++ helm/values.yaml | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/helm/settings_local.py b/helm/settings_local.py index 6a4dac69a8..27ac845959 100644 --- a/helm/settings_local.py +++ b/helm/settings_local.py @@ -196,6 +196,8 @@ IDSUBMIT_IDNITS_BINARY = "/usr/local/bin/idnits" # Duplicating production cache from settings.py and using it whether we're in production mode or not +MEMCACHED_HOST = os.environ.get("MEMCACHED_SERVICE_HOST", "127.0.0.1") +MEMCACHED_PORT = os.environ.get("MEMCACHED_SERVICE_PORT", "11211") from ietf import __version__ CACHES = { "default": { diff --git a/helm/values.yaml b/helm/values.yaml index d385d8fdf9..ba0d81d5c7 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -597,5 +597,5 @@ env: { "ietf.api.views.directauth": ["secret-for-directauth"], "ietf.api.views.email_aliases": ["secret-for-email-aliases"], - "ietf.api.views.active_email_list": ["secret-for-active-email-list"], + "ietf.api.views.active_email_list": ["secret-for-active-email-list"] } From d548046c6701da34896cf794d7664ad8e2a65778 Mon Sep 17 00:00:00 2001 From: Jennifer Richards Date: Fri, 29 Mar 2024 17:32:35 -0300 Subject: [PATCH 3/3] ci: Remove canned APP_API_TOKENs (setec astronomy) --- helm/values.yaml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/helm/values.yaml b/helm/values.yaml index ba0d81d5c7..d09df4d65b 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -593,9 +593,4 @@ env: # DATATRACKER_MATOMO_SITE_ID: "7" # must be present to enable Matomo # DATATRACKER_MATOMO_DOMAIN_PATH: "analytics.ietf.org" CELERY_PASSWORD: "this-is-a-secret" - DATATRACKER_APP_API_TOKENS_JSON: |- - { - "ietf.api.views.directauth": ["secret-for-directauth"], - "ietf.api.views.email_aliases": ["secret-for-email-aliases"], - "ietf.api.views.active_email_list": ["secret-for-active-email-list"] - } + # DATATRACKER_APP_API_TOKENS_JSON: ""