-
Notifications
You must be signed in to change notification settings - Fork 20
DESENG-811: Use Helm Charts in MET #2633
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
69 commits
Select commit
Hold shift + click to select a range
1f189f3
Add Helm chart and templates for MET API deployment
NatSquared 72864ca
DESENG-811: Update changelog
NatSquared bfab9e0
Remove unused values from values.yml
NatSquared 3bc8711
DESENG-811: Update changelog
NatSquared 58837d1
DESENG-811: Use environment-specific names for RoleBindings
NatSquared c678338
DESENG-811: Remove local keycloak deployment
NatSquared a8853af
DESENG-811: Update changelog
NatSquared dd1ec8b
DESENG-811: Fix whitespace in template (thanks, sonarcloud)
NatSquared 43cfcdb
DESENG-811: Add quotes to export syntax in vault injection
NatSquared 91086ad
DESENG-811: Move documentation from changelog to openshift README
NatSquared 2dd671d
DESENG-811: Move role bindings to separate met-rbac helm chart
NatSquared d894192
DESENG-811 Move buildconfigs to their own folder
NatSquared b23e87e
DESENG-811: Add emphasis to README
NatSquared cddada8
Merge pull request #2620 from bcgov/DESENG-811/api
NatSquared 1d34aa6
DESENG-811: Implement Helm chart for MET Web
NatSquared c8ef808
Fix quotes in JavaScript variable generation for consistency
NatSquared 5723771
DESENG-811: Recategorize changes to existing templates as bugfix in c…
NatSquared bd67585
DESENG-811: Add ENV variable to template
NatSquared ee5f2b9
DESENG-811: Fix export syntax for REACT_APP_VARS_JS in docker-entrypo…
NatSquared 20b66d4
Improvements to substitution handling in config.js, docker, and nginx
NatSquared 9ef65a3
DESENG-811: Fix typo in key in OIDC endpoint
NatSquared 38f73bd
DESENG-811: Remove trailing slashes from API URLs in configmap.yaml
NatSquared c19a540
DESENG-811: Increase ActiveDeadlineSeconds to exceed timeoutSeconds
NatSquared 9a8ed7a
DESENG-811: Update REACT_APP_API_URL to use site URL
NatSquared dfb36a9
DESENG-811: Don't uppercase environment name
NatSquared 51e7f09
DESENG-811: Update changelog
NatSquared 5c98da3
DESENG-811 - Sonarcloud: surround arg in Dockerfile with quotes
NatSquared 16b33f2
DESENG-811: Update README.md for deployment instructions and fix typos
NatSquared 55c0d9e
DESENG-811: Update route.yaml to use custom site URL
NatSquared 0474bd3
Merge pull request #2621 from bcgov/DESENG-811/met-web-helm-chart
NatSquared b7317ff
DESENG-811: Add MET Cron deployment & config to MET API helm chart
NatSquared f5006f4
DESENG-811: Added deploymentconfig for cron 🤦♀️
NatSquared 800474c
Merge pull request #2622 from bcgov/DESENG-811/met-cron
NatSquared bd40511
DESENG-811: Add notify-api Helm chart
NatSquared ddb024f
DESENG-811: Remove public route for notify-api
NatSquared 1be5243
DESENG-811: Update Changelog
NatSquared c4b8b7c
Remove unused public hosting-related configuration from notify-api
NatSquared cb0425a
DESENG-811: Change naming in documentation
NatSquared bd5d35f
DESENG-811: Change folder in documentation
NatSquared 88e130a
DESENG-811: Add missing "end" statement in Vault template
NatSquared 714c6eb
Merge pull request #2624 from bcgov/DESENG-811/notify-api
NatSquared 46d97b6
DESENG-811: Add helm charts for analytics API
NatSquared 7f33172
DESENG-811: Use helm charts for Redash/MET-Analytics
NatSquared d07b7dd
DESENG-811: Remove old analytics API template
NatSquared 55edcee
DESENG-811: Update changelog
NatSquared 916b142
Remove unneeded secret.yaml
NatSquared 3e322a1
Update changelog
NatSquared c79a8b4
Sonarcloud: Update resource limits
NatSquared 5d1413b
Fix sonarcloud complaints
NatSquared b6f906e
DESENG-811: Sonarcloud - Adjust spacing
NatSquared 1d5cbb9
DESENG-811: Remove unused config
NatSquared bc85afd
Updates to values files
NatSquared 1b81162
DESENG-811: refactor secret injection
NatSquared b21d49b
DESENG-811: Added missing config volume
NatSquared b0414ca
DESENG-811: Attempt to pacify SonarQube
NatSquared 127eb41
DESENG-811: Remove unused email configuration
NatSquared 6906c05
DESENG-811: Refactor command execution to bypass permissions error
NatSquared 6c76c1d
Merge pull request #2629 from bcgov/DESENG-811/met-analytics-redash
NatSquared d269094
Merge branch 'DESENG-811-use-helm-charts' into DESENG-811/analytics-api
NatSquared 4e2b512
Merge pull request #2628 from bcgov/DESENG-811/analytics-api
NatSquared cbf8df7
Merge branch 'omega-project' into DESENG-811-use-helm-charts
NatSquared 0adbeaf
Fix lint errors, update Makefile to install correct package versions
NatSquared 85b934d
DESENG-811: Fix more lint errors
NatSquared 31612b9
Update DEVELOPMENT.md
NatSquared 9f14d08
DESENG-811: Refactor widget listening tests and update factory scenar…
NatSquared 7f651a1
DESENG-811: Add more vault configurability to deployment templates an…
NatSquared 9d26db7
DESENG-811 (Sonarcloud): Fix spacing in templates
NatSquared ad60088
DESENG-811: fix lint issues
NatSquared 9fd58d4
DESENG-811 (Sonarcloud): specify storage requests & limits
NatSquared File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| *.yaml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,4 +3,5 @@ | |
| application = create_app() | ||
|
|
||
| if __name__ == "__main__": | ||
| application.run(debug=True, host='0.0.0.0', port=5001) | ||
| # Never set debug=True in production | ||
| application.run(debug=False, host='0.0.0.0', port=5001) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good catch |
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -67,7 +67,7 @@ SQLALCHEMY_ECHO= | |
| SQLALCHEMY_TRACK_MODIFICATIONS= | ||
|
|
||
| # Email API Configuration | ||
| NOTIFICATIONS_EMAIL_ENDPOINT=https://met-notify-api-dev.apps.gold.devops.gov.bc.ca/api/v1/notifications/email | ||
| NOTIFICATIONS_EMAIL_ENDPOINT=http://localhost:8081/api/v1/notifications/email | ||
| EMAIL_SECRET_KEY="notASecureKey" # If unset, this value is randomized | ||
| EMAIL_ENVIRONMENT= | ||
| EMAIL_FROM_ADDRESS="[email protected]" | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| """A simple endpoint to serve the OpenID Connect configuration for the web application.""" | ||
|
|
||
| from flask import jsonify | ||
| from flask_cors import cross_origin | ||
| from flask_restx import Namespace, Resource | ||
| from met_api.utils.roles import Role | ||
| from met_api.utils.util import allowedorigins, cors_preflight | ||
| from met_api.config import Config | ||
|
|
||
| API = Namespace( | ||
| 'oidc_config', | ||
| description='Endpoints for fetching OpenID Connect configuration', | ||
| ) | ||
|
|
||
| jwt_config = Config().JWT | ||
| keycloak_config = Config().KC | ||
|
|
||
| PUBLIC_CONFIG = { | ||
| # Do not overpopulate this dict with sensitive information | ||
| # as it will be intentionally exposed to the public | ||
| 'KEYCLOAK_URL': keycloak_config['BASE_URL'], | ||
| 'KEYCLOAK_REALM': keycloak_config['REALMNAME'], | ||
| 'KEYCLOAK_CLIENT': jwt_config['AUDIENCE'], | ||
| 'KEYCLOAK_ADMIN_ROLE': Role.SUPER_ADMIN.value, | ||
| } | ||
|
|
||
|
|
||
| @cors_preflight('GET,OPTIONS') | ||
| @API.route('/') | ||
| class OIDCConfigAsJson(Resource): | ||
| """Resource for OpenID Connect configuration.""" | ||
|
|
||
| @staticmethod | ||
| @cross_origin(origins=allowedorigins()) | ||
| def get(): | ||
| """Fetch OpenID Connect configuration.""" | ||
| return jsonify(PUBLIC_CONFIG), 200 | ||
|
|
||
|
|
||
| @cors_preflight('GET,OPTIONS') | ||
| @API.route('/config.js') | ||
| class OIDCConfigAsJs(Resource): | ||
| """Resource for OpenID Connect configuration in JavaScript format.""" | ||
|
|
||
| js_prefix = 'window._env_ = window._env_ || {};\n' | ||
| js_template = "window._env_.{VAR_NAME} = '{VAR_VALUE}';\n" | ||
|
|
||
| @staticmethod | ||
| @cross_origin(origins=allowedorigins()) | ||
| def get(): | ||
| """Fetch OpenID Connect configuration.""" | ||
| js_content = OIDCConfigAsJs.js_prefix | ||
| for key, value in PUBLIC_CONFIG.items(): | ||
| js_content += OIDCConfigAsJs.js_template.format( | ||
| VAR_NAME='REACT_APP_' + key, VAR_VALUE=value | ||
| ) | ||
| return js_content, 200, {'Content-Type': 'application/javascript'} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this script performing unwanted upgrades as is?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes; it was