Skip to content

Commit c401e46

Browse files
authored
Merge pull request #201 from bcgov/email-env
Configure Environments for backend and Changes
2 parents 39dbec7 + c5e8623 commit c401e46

8 files changed

Lines changed: 73 additions & 8 deletions

File tree

.github/environments/values.dev.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,17 @@ config:
55
FRONTEND_APIPATH: api/v1
66
FRONTEND_COMS_APIPATH: https://coms-dev.api.gov.bc.ca/api/v1
77
FRONTEND_EXCLUDE_METADATA: geodrive.common.encoding,geodrive.windows.attr,geodrive.windows.secdesc,s3b-last-modified
8-
FRONTEND_NOTIFICATION_BANNER : This is the DEV environment of BCBox. Uploaded files may not persist and may be deleted from the COMS database as we continue development. Please do not upload personal or private information. Thank you for your understanding as we work to improve BCBox
8+
FRONTEND_NOTIFICATION_BANNER: This is the DEV environment of BCBox. Uploaded files may not persist and may be deleted from the COMS database as we continue development. Please do not upload personal or private information. Thank you for your understanding as we work to improve BCBox
99
FRONTEND_OIDC_AUTHORITY: https://dev.loginproxy.gov.bc.ca/auth/realms/standard
1010
FRONTEND_OIDC_CLIENTID: bc-box-4555
1111
SERVER_APIPATH: /api/v1
1212
SERVER_BODYLIMIT: 30mb
13+
SERVER_CHES_APIPATH: https://ches-dev.api.gov.bc.ca/api/v1
14+
SERVER_CHES_TOKENURL: https://dev.loginproxy.gov.bc.ca/auth/realms/comsvcauth/protocol/openid-connect/token
15+
SERVER_CHES_FROM: DoNotReply.BCBox@gov.bc.ca
1316
# SERVER_LOGFILE: ~
1417
SERVER_LOGLEVEL: http
18+
SERVER_OIDC_AUTHORITY: https://dev.loginproxy.gov.bc.ca/auth/realms/standard
19+
SERVER_OIDC_IDENTITYKEY: idir_user_guid,bceid_user_guid,github_id
20+
SERVER_OIDC_PUBLICKEY: MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuy7zfh2ZgpDV5mH/aXyLDTddZK81rGakJcTy4KvCNOkDDxt1KAhW02lmbCo8YhHCOzjNZBp1+Vi6QiMRgBqAe2GTPZYEiV70aXfROGZe3Nvwcjbtki6HoyRte3SpqLJEIPL2F+hjJkw1UPGnjPTWZkEx9p74b9i3BjuE8RnjJ0Sza2MWw83zoQUZEJRGiopSL0yuVej6t2LO2btVdVf7QuZfPt9ehkcQYlPKpVvJA+pfeqPAdnNt7OjEIeYxinjurZr8Z04hz8UhkRefcWlSbFzFQYmL7O7iArjW0bsSvq8yNUd5r0KCOQkFduwZy26yTzTxj8OLFT91fEmbBBl4rQIDAQAB
1521
SERVER_PORT: "8080"

.github/environments/values.prod.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ config:
99
FRONTEND_OIDC_CLIENTID: bc-box-4555
1010
SERVER_APIPATH: /api/v1
1111
SERVER_BODYLIMIT: 30mb
12+
SERVER_CHES_APIPATH: https://ches.api.gov.bc.ca/api/v1
13+
SERVER_CHES_TOKENURL: https://loginproxy.gov.bc.ca/auth/realms/comsvcauth/protocol/openid-connect/token
14+
SERVER_CHES_FROM: DoNotReply.BCBox@gov.bc.ca
1215
# SERVER_LOGFILE: ~
1316
SERVER_LOGLEVEL: http
17+
SERVER_OIDC_AUTHORITY: https://loginproxy.gov.bc.ca/auth/realms/standard
18+
SERVER_OIDC_IDENTITYKEY: idir_user_guid,bceid_user_guid
19+
SERVER_OIDC_PUBLICKEY: MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAmHiuPKOkpkq4GXN1ktr23rJtDl6Vdu/Y37ZAd3PnQ8/IDfAODvy1Y81aAUZicKe9egolv+OTRANN3yOg+TAbRhkeXLE5p/473EK0aQ0NazTCuWo6Am3oDQ7Yt8x0pw56/qcLtkTuXNyo5EnVV2Z2BzCnnaL31JOhyitolku0DNT6GDoRBmT4o2ItqEVHk5nM25cf1t2zbwI2790W6if1B2qVRkxxivS8tbH7nYC61Is3XCPockKptkH22cm2ZQJmtYd5sZKuXaGsvtyzHmn8/l0Kd1xnHmUu4JNuQ67YiNZGu3hOkrF0Js3BzAk1Qm4kvYRaxbJFCs/qokLZ4Z0W9wIDAQAB
1420
SERVER_PORT: "8080"

.github/environments/values.test.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ config:
1010
FRONTEND_OIDC_CLIENTID: bc-box-4555
1111
SERVER_APIPATH: /api/v1
1212
SERVER_BODYLIMIT: 30mb
13+
SERVER_CHES_APIPATH: https://ches-test.api.gov.bc.ca/api/v1
14+
SERVER_CHES_TOKENURL: https://test.loginproxy.gov.bc.ca/auth/realms/comsvcauth/protocol/openid-connect/token
15+
SERVER_CHES_FROM: DoNotReply.BCBox@gov.bc.ca
1316
# SERVER_LOGFILE: ~
1417
SERVER_LOGLEVEL: http
18+
SERVER_OIDC_AUTHORITY: https://test.loginproxy.gov.bc.ca/auth/realms/standard
19+
SERVER_OIDC_IDENTITYKEY: idir_user_guid,bceid_user_guid
20+
SERVER_OIDC_PUBLICKEY: MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAiFdv9GA83uHuy8Eu9yiZHGGF9j6J8t7FkbcpaN81GDjwbjsIJ0OJO9dKRAx6BAtTC4ubJTBJMPvQER5ikOhIeBi4o25fg61jpgsU6oRZHkCXc9gX6mrjMjbsPaf3/bjjYxP5jicBDJQeD1oRa24+tiGggoQ7k6gDEN+cRYqqNpzC/GQbkUPk8YsgroncEgu8ChMh/3ERsLV2zorchMANUq76max16mHrhtWIQxrb/STpSt4JuSlUzzBV/dcXjJe5gywZHe0jAutFhNqjHzHdgyaC4RAd3eYQo+Kl/JOgy2AZrnx+CiPmvOJKe9tAW4k4H087ng8aVE40v4HW/FEbnwIDAQAB
1521
SERVER_PORT: "8080"

app/config/custom-environment-variables.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,22 @@
1717
"server": {
1818
"apiPath": "SERVER_APIPATH",
1919
"bodyLimit": "SERVER_BODYLIMIT",
20+
"ches": {
21+
"apiPath": "SERVER_CHES_APIPATH",
22+
"clientId": "SERVER_CHES_CLIENTID",
23+
"clientSecret": "SERVER_CHES_CLIENTSECRET",
24+
"tokenUrl": "SERVER_CHES_TOKENURL",
25+
"from": "SERVER_CHES_FROM"
26+
},
2027
"logFile": "SERVER_LOGFILE",
2128
"logLevel": "SERVER_LOGLEVEL",
29+
"oidc": {
30+
"authority": "SERVER_OIDC_AUTHORITY",
31+
"clientId": "SERVER_OIDC_CLIENTID",
32+
"clientSecret": "SERVER_OIDC_CLIENTSECRET",
33+
"identityKey": "SERVER_OIDC_IDENTITYKEY",
34+
"publicKey": "SERVER_OIDC_PUBLICKEY"
35+
},
2236
"port": "SERVER_PORT"
2337
}
2438
}

charts/bcbox/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: bcbox
33
# This is the chart version. This version number should be incremented each time you make changes
44
# to the chart and its templates, including the app version.
55
# Versions are expected to follow Semantic Versioning (https://semver.org/)
6-
version: 0.0.14
6+
version: 0.0.15
77
kubeVersion: ">= 1.13.0"
88
description: A frontend UI for managing access control to S3 Objects
99
# A chart can be either an 'application' or a 'library' chart.

charts/bcbox/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# bcbox
22

3-
![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.7.0](https://img.shields.io/badge/AppVersion-0.7.0-informational?style=flat-square)
3+
![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.7.0](https://img.shields.io/badge/AppVersion-0.7.0-informational?style=flat-square)
44

55
A frontend UI for managing access control to S3 Objects
66

@@ -29,7 +29,7 @@ Kubernetes: `>= 1.13.0`
2929
| autoscaling.maxReplicas | int | `16` | |
3030
| autoscaling.minReplicas | int | `2` | |
3131
| autoscaling.targetCPUUtilizationPercentage | int | `80` | |
32-
| config.configMap | object | `{"FRONTEND_APIPATH":"api/v1","FRONTEND_COMS_APIPATH":null,"FRONTEND_OIDC_AUTHORITY":null,"FRONTEND_OIDC_CLIENTID":null,"SERVER_APIPATH":"/api/v1","SERVER_BODYLIMIT":"30mb","SERVER_LOGLEVEL":"http","SERVER_PORT":"8080"}` | These values will be wholesale added to the configmap as is; refer to the bcbox 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". |
32+
| config.configMap | object | `{"FRONTEND_APIPATH":"api/v1","FRONTEND_COMS_APIPATH":null,"FRONTEND_OIDC_AUTHORITY":null,"FRONTEND_OIDC_CLIENTID":null,"SERVER_APIPATH":"/api/v1","SERVER_BODYLIMIT":"30mb","SERVER_CHES_APIPATH":null,"SERVER_CHES_FROM":null,"SERVER_CHES_TOKENURL":null,"SERVER_LOGLEVEL":"http","SERVER_OIDC_AUTHORITY":null,"SERVER_OIDC_IDENTITYKEY":null,"SERVER_OIDC_PUBLICKEY":null,"SERVER_PORT":"8080"}` | These values will be wholesale added to the configmap as is; refer to the bcbox 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". |
3333
| config.enabled | bool | `false` | Set to true if you want to let Helm manage and overwrite your configmaps. |
3434
| 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 |
3535
| failurePolicy | string | `"Retry"` | DeploymentConfig pre-hook failure behavior |

charts/bcbox/templates/deploymentconfig.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,26 @@ spec:
5959
env:
6060
- name: NODE_ENV
6161
value: production
62+
- name: SERVER_CHES_CLIENTID
63+
valueFrom:
64+
secretKeyRef:
65+
key: username
66+
name: {{ include "bcbox.configname" . }}-ches-service-account
67+
- name: SERVER_CHES_CLIENTSECRET
68+
valueFrom:
69+
secretKeyRef:
70+
key: password
71+
name: {{ include "bcbox.configname" . }}-ches-service-account
72+
- name: SERVER_OIDC_CLIENTID
73+
valueFrom:
74+
secretKeyRef:
75+
key: username
76+
name: {{ include "bcbox.configname" . }}-keycloak
77+
- name: SERVER_OIDC_CLIENTSECRET
78+
valueFrom:
79+
secretKeyRef:
80+
key: password
81+
name: {{ include "bcbox.configname" . }}-keycloak
6282
envFrom:
6383
- configMapRef:
6484
name: {{ include "bcbox.configname" . }}-config

charts/bcbox/values.yaml

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,13 @@ failurePolicy: Retry
2727
podAnnotations: {}
2828

2929
# -- Privilege and access control settings
30-
podSecurityContext: {}
30+
podSecurityContext:
31+
{}
3132
# fsGroup: 2000
3233

3334
# -- Privilege and access control settings
34-
securityContext: {}
35+
securityContext:
36+
{}
3537
# capabilities:
3638
# drop:
3739
# - ALL
@@ -89,7 +91,8 @@ route:
8991
# -- Specifies whether a route should be created
9092
enabled: true
9193
# -- Annotations to add to the route
92-
annotations: {}
94+
annotations:
95+
{}
9396
# kubernetes.io/ingress.class: nginx
9497
# kubernetes.io/tls-acme: "true"
9598
host: chart-example.local
@@ -140,7 +143,17 @@ config:
140143
FRONTEND_OIDC_CLIENTID: ~
141144
SERVER_APIPATH: "/api/v1"
142145
SERVER_BODYLIMIT: "30mb"
143-
# SERVER_STATICFILES: ~
146+
147+
SERVER_CHES_APIPATH: ~
148+
SERVER_CHES_TOKENURL: ~
149+
SERVER_CHES_FROM: ~
150+
144151
# SERVER_LOGFILE: ~
145152
SERVER_LOGLEVEL: "http"
153+
154+
SERVER_OIDC_AUTHORITY: ~
155+
SERVER_OIDC_IDENTITYKEY: ~
156+
SERVER_OIDC_PUBLICKEY: ~
157+
146158
SERVER_PORT: "8080"
159+
# SERVER_STATICFILES: ~

0 commit comments

Comments
 (0)