Skip to content

Commit

Permalink
Drop OBJECTSTORAGE_KEY and SERVER_BODYLIMIT configurations
Browse files Browse the repository at this point in the history
In our case, json parsing for arguments do not require a body larger than
the default library length of 100kb, so we are removing the configuration
option entirely.

Signed-off-by: Jeremy Ho <jujaga@gmail.com>
jujaga committed Sep 14, 2023
1 parent b94bb30 commit 52e737b
Showing 10 changed files with 4 additions and 11 deletions.
1 change: 0 additions & 1 deletion .github/actions/deploy-to-environment/action.yaml
Original file line number Diff line number Diff line change
@@ -50,7 +50,6 @@ runs:
--set image.repository=ghcr.io/${{ github.repository_owner }}
--set image.tag=sha-$(git rev-parse --short HEAD)
--set route.host=${{ inputs.acronym }}-${{ inputs.namespace_environment }}-${{ inputs.job_name }}.apps.silver.devops.gov.bc.ca
--set config.configMap.OBJECTSTORAGE_KEY=${{ inputs.acronym }}/${{ inputs.namespace_environment }}
--timeout 10m
--wait
1 change: 0 additions & 1 deletion .github/environments/values.dev.yaml
Original file line number Diff line number Diff line change
@@ -19,7 +19,6 @@ config:
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuy7zfh2ZgpDV5mH/aXyLDTddZK81rGakJcTy4KvCNOkDDxt1KAhW02lmbCo8YhHCOzjNZBp1+Vi6QiMRgBqAe2GTPZYEiV70aXfROGZe3Nvwcjbtki6HoyRte3SpqLJEIPL2F+hjJkw1UPGnjPTWZkEx9p74b9i3BjuE8RnjJ0Sza2MWw83zoQUZEJRGiopSL0yuVej6t2LO2btVdVf7QuZfPt9ehkcQYlPKpVvJA+pfeqPAdnNt7OjEIeYxinjurZr8Z04hz8UhkRefcWlSbFzFQYmL7O7iArjW0bsSvq8yNUd5r0KCOQkFduwZy26yTzTxj8OLFT91fEmbBBl4rQIDAQAB
KC_REALM: standard
KC_SERVERURL: "https://dev.loginproxy.gov.bc.ca/auth"
SERVER_BODYLIMIT: 30mb
# SERVER_LOGFILE: ~
SERVER_LOGLEVEL: http
SERVER_PORT: "3000"
1 change: 0 additions & 1 deletion .github/environments/values.prod.yaml
Original file line number Diff line number Diff line change
@@ -19,7 +19,6 @@ config:
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAmHiuPKOkpkq4GXN1ktr23rJtDl6Vdu/Y37ZAd3PnQ8/IDfAODvy1Y81aAUZicKe9egolv+OTRANN3yOg+TAbRhkeXLE5p/473EK0aQ0NazTCuWo6Am3oDQ7Yt8x0pw56/qcLtkTuXNyo5EnVV2Z2BzCnnaL31JOhyitolku0DNT6GDoRBmT4o2ItqEVHk5nM25cf1t2zbwI2790W6if1B2qVRkxxivS8tbH7nYC61Is3XCPockKptkH22cm2ZQJmtYd5sZKuXaGsvtyzHmn8/l0Kd1xnHmUu4JNuQ67YiNZGu3hOkrF0Js3BzAk1Qm4kvYRaxbJFCs/qokLZ4Z0W9wIDAQAB
KC_REALM: standard
KC_SERVERURL: "https://loginproxy.gov.bc.ca/auth"
SERVER_BODYLIMIT: 30mb
# SERVER_LOGFILE: ~
SERVER_LOGLEVEL: http
SERVER_PORT: "3000"
1 change: 0 additions & 1 deletion .github/environments/values.test.yaml
Original file line number Diff line number Diff line change
@@ -19,7 +19,6 @@ config:
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAiFdv9GA83uHuy8Eu9yiZHGGF9j6J8t7FkbcpaN81GDjwbjsIJ0OJO9dKRAx6BAtTC4ubJTBJMPvQER5ikOhIeBi4o25fg61jpgsU6oRZHkCXc9gX6mrjMjbsPaf3/bjjYxP5jicBDJQeD1oRa24+tiGggoQ7k6gDEN+cRYqqNpzC/GQbkUPk8YsgroncEgu8ChMh/3ERsLV2zorchMANUq76max16mHrhtWIQxrb/STpSt4JuSlUzzBV/dcXjJe5gywZHe0jAutFhNqjHzHdgyaC4RAd3eYQo+Kl/JOgy2AZrnx+CiPmvOJKe9tAW4k4H087ng8aVE40v4HW/FEbnwIDAQAB
KC_REALM: standard
KC_SERVERURL: "https://test.loginproxy.gov.bc.ca/auth"
SERVER_BODYLIMIT: 30mb
# SERVER_LOGFILE: ~
SERVER_LOGLEVEL: http
SERVER_PORT: "3000"
2 changes: 1 addition & 1 deletion app/app.js
Original file line number Diff line number Diff line change
@@ -31,7 +31,7 @@ let probeId;
let queueId;

const app = express();
const jsonParser = express.json({ limit: config.get('server.bodyLimit') });
const jsonParser = express.json();
jsonParser.unless = unless;
app.use(compression());
app.use(cors(DEFAULTCORS));
1 change: 0 additions & 1 deletion app/config/custom-environment-variables.json
Original file line number Diff line number Diff line change
@@ -31,7 +31,6 @@
"secretAccessKey": "OBJECTSTORAGE_SECRETACCESSKEY"
},
"server": {
"bodyLimit": "SERVER_BODYLIMIT",
"defaultTempExpiresIn": "SERVER_TEMP_EXPIRESIN",
"hardReset": "SERVER_HARDRESET",
"logFile": "SERVER_LOGFILE",
1 change: 0 additions & 1 deletion app/config/default.json
Original file line number Diff line number Diff line change
@@ -8,7 +8,6 @@
"username": "app"
},
"server": {
"bodyLimit": "30mb",
"defaultTempExpiresIn": "300",
"logLevel": "http",
"maxRetries": "3",
2 changes: 1 addition & 1 deletion charts/coms/Chart.yaml
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@ name: common-object-management-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.18
version: 0.0.19
kubeVersion: ">= 1.13.0"
description: A microservice for managing access control to S3 Objects
# A chart can be either an 'application' or a 'library' chart.
4 changes: 2 additions & 2 deletions charts/coms/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# common-object-management-service

![Version: 0.0.18](https://img.shields.io/badge/Version-0.0.18-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.6.0](https://img.shields.io/badge/AppVersion-0.6.0-informational?style=flat-square)
![Version: 0.0.19](https://img.shields.io/badge/Version-0.0.19-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.6.0](https://img.shields.io/badge/AppVersion-0.6.0-informational?style=flat-square)

A microservice for managing access control to S3 Objects

@@ -35,7 +35,7 @@ Kubernetes: `>= 1.13.0`
| autoscaling.targetCPUUtilizationPercentage | int | `80` | |
| basicAuthSecretOverride.password | string | `nil` | |
| basicAuthSecretOverride.username | string | `nil` | |
| config.configMap | object | `{"DB_PORT":"5432","KC_IDENTITYKEY":null,"KC_PUBLICKEY":null,"KC_REALM":null,"KC_SERVERURL":null,"OBJECTSTORAGE_BUCKET":null,"OBJECTSTORAGE_ENDPOINT":null,"OBJECTSTORAGE_KEY":null,"SERVER_BODYLIMIT":"30mb","SERVER_LOGLEVEL":"http","SERVER_PORT":"3000","SERVER_TEMP_EXPIRESIN":"300"}` | These values will be wholesale added to the configmap as is; refer to the coms 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 | `{"DB_PORT":"5432","KC_IDENTITYKEY":null,"KC_PUBLICKEY":null,"KC_REALM":null,"KC_SERVERURL":null,"OBJECTSTORAGE_BUCKET":null,"OBJECTSTORAGE_ENDPOINT":null,"OBJECTSTORAGE_KEY":null,"SERVER_LOGLEVEL":"http","SERVER_PORT":"3000","SERVER_TEMP_EXPIRESIN":"300"}` | These values will be wholesale added to the configmap as is; refer to the coms 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` | |
| 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` | |
1 change: 0 additions & 1 deletion charts/coms/values.yaml
Original file line number Diff line number Diff line change
@@ -145,7 +145,6 @@ config:
OBJECTSTORAGE_ENDPOINT: ~
OBJECTSTORAGE_KEY: ~

SERVER_BODYLIMIT: "30mb"
# SERVER_HARDRESET: "true"
# SERVER_LOGFILE: ~
SERVER_LOGLEVEL: "http"

0 comments on commit 52e737b

Please sign in to comment.