From b618781b21fb73e6d3f854fb402ee6912bc5ced0 Mon Sep 17 00:00:00 2001 From: Kyle Morel Date: Mon, 9 Sep 2024 11:16:39 -0700 Subject: [PATCH] Update object storage config --- .github/environments/values.dev.yaml | 3 +++ .github/environments/values.prod.yaml | 3 +++ .github/environments/values.test.yaml | 3 +++ app/config/custom-environment-variables.json | 10 +++++----- charts/pcns/Chart.yaml | 2 +- charts/pcns/README.md | 4 ++-- charts/pcns/templates/deploymentconfig.yaml | 4 ++-- charts/pcns/values.yaml | 6 +++--- 8 files changed, 22 insertions(+), 13 deletions(-) diff --git a/.github/environments/values.dev.yaml b/.github/environments/values.dev.yaml index a77bf7c5..bff79400 100644 --- a/.github/environments/values.dev.yaml +++ b/.github/environments/values.dev.yaml @@ -21,6 +21,9 @@ config: SERVER_ENV: dev # SERVER_LOGFILE: ~ SERVER_LOGLEVEL: http + SERVER_OBJECTSTORAGE_BUCKET: pcnsts + SERVER_OBJECTSTORAGE_ENDPOINT: https://nrs.objectstore.gov.bc.ca + SERVER_OBJECTSTORAGE_KEY: dev SERVER_OIDC_AUTHORITY: https://dev.loginproxy.gov.bc.ca/auth/realms/standard SERVER_OIDC_IDENTITYKEY: idir_user_guid,bceid_user_guid,github_id SERVER_OIDC_PUBLICKEY: MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuy7zfh2ZgpDV5mH/aXyLDTddZK81rGakJcTy4KvCNOkDDxt1KAhW02lmbCo8YhHCOzjNZBp1+Vi6QiMRgBqAe2GTPZYEiV70aXfROGZe3Nvwcjbtki6HoyRte3SpqLJEIPL2F+hjJkw1UPGnjPTWZkEx9p74b9i3BjuE8RnjJ0Sza2MWw83zoQUZEJRGiopSL0yuVej6t2LO2btVdVf7QuZfPt9ehkcQYlPKpVvJA+pfeqPAdnNt7OjEIeYxinjurZr8Z04hz8UhkRefcWlSbFzFQYmL7O7iArjW0bsSvq8yNUd5r0KCOQkFduwZy26yTzTxj8OLFT91fEmbBBl4rQIDAQAB diff --git a/.github/environments/values.prod.yaml b/.github/environments/values.prod.yaml index 85a5a09d..13232f32 100644 --- a/.github/environments/values.prod.yaml +++ b/.github/environments/values.prod.yaml @@ -21,6 +21,9 @@ config: SERVER_ENV: prod # SERVER_LOGFILE: ~ SERVER_LOGLEVEL: http + SERVER_OBJECTSTORAGE_BUCKET: pcnspr + SERVER_OBJECTSTORAGE_ENDPOINT: https://nrs.objectstore.gov.bc.ca + SERVER_OBJECTSTORAGE_KEY: shas SERVER_OIDC_AUTHORITY: https://loginproxy.gov.bc.ca/auth/realms/standard SERVER_OIDC_IDENTITYKEY: idir_user_guid,bceid_user_guid SERVER_OIDC_PUBLICKEY: MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAmHiuPKOkpkq4GXN1ktr23rJtDl6Vdu/Y37ZAd3PnQ8/IDfAODvy1Y81aAUZicKe9egolv+OTRANN3yOg+TAbRhkeXLE5p/473EK0aQ0NazTCuWo6Am3oDQ7Yt8x0pw56/qcLtkTuXNyo5EnVV2Z2BzCnnaL31JOhyitolku0DNT6GDoRBmT4o2ItqEVHk5nM25cf1t2zbwI2790W6if1B2qVRkxxivS8tbH7nYC61Is3XCPockKptkH22cm2ZQJmtYd5sZKuXaGsvtyzHmn8/l0Kd1xnHmUu4JNuQ67YiNZGu3hOkrF0Js3BzAk1Qm4kvYRaxbJFCs/qokLZ4Z0W9wIDAQAB diff --git a/.github/environments/values.test.yaml b/.github/environments/values.test.yaml index 3d83fffa..48ae1a40 100644 --- a/.github/environments/values.test.yaml +++ b/.github/environments/values.test.yaml @@ -21,6 +21,9 @@ config: SERVER_ENV: test # SERVER_LOGFILE: ~ SERVER_LOGLEVEL: http + SERVER_OBJECTSTORAGE_BUCKET: pcnsts + SERVER_OBJECTSTORAGE_ENDPOINT: https://nrs.objectstore.gov.bc.ca + SERVER_OBJECTSTORAGE_KEY: shas SERVER_OIDC_AUTHORITY: https://test.loginproxy.gov.bc.ca/auth/realms/standard SERVER_OIDC_IDENTITYKEY: idir_user_guid,bceid_user_guid SERVER_OIDC_PUBLICKEY: MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAiFdv9GA83uHuy8Eu9yiZHGGF9j6J8t7FkbcpaN81GDjwbjsIJ0OJO9dKRAx6BAtTC4ubJTBJMPvQER5ikOhIeBi4o25fg61jpgsU6oRZHkCXc9gX6mrjMjbsPaf3/bjjYxP5jicBDJQeD1oRa24+tiGggoQ7k6gDEN+cRYqqNpzC/GQbkUPk8YsgroncEgu8ChMh/3ERsLV2zorchMANUq76max16mHrhtWIQxrb/STpSt4JuSlUzzBV/dcXjJe5gywZHe0jAutFhNqjHzHdgyaC4RAd3eYQo+Kl/JOgy2AZrnx+CiPmvOJKe9tAW4k4H087ng8aVE40v4HW/FEbnwIDAQAB diff --git a/app/config/custom-environment-variables.json b/app/config/custom-environment-variables.json index eb00b754..c3d7dc83 100644 --- a/app/config/custom-environment-variables.json +++ b/app/config/custom-environment-variables.json @@ -63,11 +63,11 @@ "logFile": "SERVER_LOGFILE", "logLevel": "SERVER_LOGLEVEL", "objectStorage": { - "accessKeyId": "OBJECTSTORAGE_ACCESSKEYID", - "bucket": "OBJECTSTORAGE_BUCKET", - "endpoint": "OBJECTSTORAGE_ENDPOINT", - "key": "OBJECTSTORAGE_KEY", - "secretAccessKey": "OBJECTSTORAGE_SECRETACCESSKEY" + "accessKeyId": "SERVER_OBJECTSTORAGE_ACCESSKEYID", + "bucket": "SERVER_OBJECTSTORAGE_BUCKET", + "endpoint": "SERVER_OBJECTSTORAGE_ENDPOINT", + "key": "SERVER_OBJECTSTORAGE_KEY", + "secretAccessKey": "SERVER_OBJECTSTORAGE_SECRETACCESSKEY" }, "oidc": { "authority": "SERVER_OIDC_AUTHORITY", diff --git a/charts/pcns/Chart.yaml b/charts/pcns/Chart.yaml index 2942b971..d0c55c2e 100644 --- a/charts/pcns/Chart.yaml +++ b/charts/pcns/Chart.yaml @@ -3,7 +3,7 @@ name: nr-permitconnect-navigator-service # 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: 0.0.14 +version: 0.0.15 kubeVersion: ">= 1.13.0" description: PermitConnect Navigator Service # A chart can be either an 'application' or a 'library' chart. diff --git a/charts/pcns/README.md b/charts/pcns/README.md index f6a60edb..0cb36870 100644 --- a/charts/pcns/README.md +++ b/charts/pcns/README.md @@ -1,6 +1,6 @@ # nr-permitconnect-navigator-service -![Version: 0.0.14](https://img.shields.io/badge/Version-0.0.14-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.3.0](https://img.shields.io/badge/AppVersion-0.3.0-informational?style=flat-square) +![Version: 0.0.15](https://img.shields.io/badge/Version-0.0.15-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.3.0](https://img.shields.io/badge/AppVersion-0.3.0-informational?style=flat-square) PermitConnect Navigator Service @@ -35,7 +35,7 @@ Kubernetes: `>= 1.13.0` | autoscaling.targetCPUUtilizationPercentage | int | `80` | | | chesSecretOverride.password | string | `nil` | | | chesSecretOverride.username | string | `nil` | | -| config.configMap | object | `{"FRONTEND_APIPATH":"api/v1","FRONTEND_CHES_ROADMAP_BCC":null,"FRONTEND_CHES_SUBMISSION_CC":null,"FRONTEND_COMS_APIPATH":null,"FRONTEND_COMS_BUCKETID":null,"FRONTEND_GEOCODER_APIPATH":null,"FRONTEND_OIDC_AUTHORITY":null,"FRONTEND_OIDC_CLIENTID":null,"FRONTEND_OPENSTREETMAP_APIPATH":null,"FRONTEND_ORGBOOK_APIPATH":null,"OBJECTSTORAGE_BUCKET":null,"OBJECTSTORAGE_ENDPOINT":null,"OBJECTSTORAGE_KEY":null,"SERVER_APIPATH":"/api/v1","SERVER_BODYLIMIT":"30mb","SERVER_CHEFS_APIPATH":null,"SERVER_CHES_APIPATH":null,"SERVER_CHES_TOKENURL":null,"SERVER_DB_HOST":null,"SERVER_DB_POOL_MAX":"10","SERVER_DB_POOL_MIN":"2","SERVER_DB_PORT":"5432","SERVER_ENV":null,"SERVER_LOGLEVEL":"http","SERVER_OIDC_AUTHORITY":null,"SERVER_OIDC_IDENTITYKEY":null,"SERVER_OIDC_PUBLICKEY":null,"SERVER_PORT":"8080","SERVER_SSO_APIPATH":null,"SERVER_SSO_INTEGRATION":null,"SERVER_SSO_TOKENURL":null}` | These values will be wholesale added to the configmap as is; refer to the pcns documentation for what each of these values mean and whether you need them defined. Ensure that all values are represented explicitly as strings, as non-string values will not translate over as expected into container environment variables. For configuration keys named `*_ENABLED`, either leave them commented/undefined, or set them to string value "true". | +| config.configMap | object | `{"FRONTEND_APIPATH":"api/v1","FRONTEND_CHES_ROADMAP_BCC":null,"FRONTEND_CHES_SUBMISSION_CC":null,"FRONTEND_COMS_APIPATH":null,"FRONTEND_COMS_BUCKETID":null,"FRONTEND_GEOCODER_APIPATH":null,"FRONTEND_OIDC_AUTHORITY":null,"FRONTEND_OIDC_CLIENTID":null,"FRONTEND_OPENSTREETMAP_APIPATH":null,"FRONTEND_ORGBOOK_APIPATH":null,"SERVER_APIPATH":"/api/v1","SERVER_BODYLIMIT":"30mb","SERVER_CHEFS_APIPATH":null,"SERVER_CHES_APIPATH":null,"SERVER_CHES_TOKENURL":null,"SERVER_DB_HOST":null,"SERVER_DB_POOL_MAX":"10","SERVER_DB_POOL_MIN":"2","SERVER_DB_PORT":"5432","SERVER_ENV":null,"SERVER_LOGLEVEL":"http","SERVER_OBJECTSTORAGE_BUCKET":null,"SERVER_OBJECTSTORAGE_ENDPOINT":null,"SERVER_OBJECTSTORAGE_KEY":null,"SERVER_OIDC_AUTHORITY":null,"SERVER_OIDC_IDENTITYKEY":null,"SERVER_OIDC_PUBLICKEY":null,"SERVER_PORT":"8080","SERVER_SSO_APIPATH":null,"SERVER_SSO_INTEGRATION":null,"SERVER_SSO_TOKENURL":null}` | These values will be wholesale added to the configmap as is; refer to the pcns documentation for what each of these values mean and whether you need them defined. Ensure that all values are represented explicitly as strings, as non-string values will not translate over as expected into container environment variables. For configuration keys named `*_ENABLED`, either leave them commented/undefined, or set them to string value "true". | | config.enabled | bool | `false` | Set to true if you want to let Helm manage and overwrite your configmaps. | | config.releaseScoped | bool | `false` | This should be set to true if and only if you require configmaps and secrets to be release scoped. In the event you want all instances in the same namespace to share a similar configuration, this should be set to false | | dbSecretOverride.password | string | `nil` | | diff --git a/charts/pcns/templates/deploymentconfig.yaml b/charts/pcns/templates/deploymentconfig.yaml index b5342d86..54b62e92 100644 --- a/charts/pcns/templates/deploymentconfig.yaml +++ b/charts/pcns/templates/deploymentconfig.yaml @@ -150,12 +150,12 @@ spec: secretKeyRef: key: app-db-password name: {{ $dbSecretName }} - - name: OBJECTSTORAGE_ACCESSKEYID + - name: SERVER_OBJECTSTORAGE_ACCESSKEYID valueFrom: secretKeyRef: key: username name: {{ include "pcns.configname" . }}-objectstorage - - name: OBJECTSTORAGE_SECRETACCESSKEY + - name: SERVER_OBJECTSTORAGE_SECRETACCESSKEY valueFrom: secretKeyRef: key: password diff --git a/charts/pcns/values.yaml b/charts/pcns/values.yaml index b506bdb8..de0123b1 100644 --- a/charts/pcns/values.yaml +++ b/charts/pcns/values.yaml @@ -160,9 +160,9 @@ config: # SERVER_LOGFILE: ~ SERVER_LOGLEVEL: http - OBJECTSTORAGE_BUCKET: ~ - OBJECTSTORAGE_ENDPOINT: ~ - OBJECTSTORAGE_KEY: ~ + SERVER_OBJECTSTORAGE_BUCKET: ~ + SERVER_OBJECTSTORAGE_ENDPOINT: ~ + SERVER_OBJECTSTORAGE_KEY: ~ SERVER_OIDC_AUTHORITY: ~ SERVER_OIDC_IDENTITYKEY: ~