Skip to content

Kubernetes Helm Chart: It should be possible to change Postgres connection of wicked's API #167

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

Closed
DonMartin76 opened this issue Feb 18, 2019 · 5 comments

Comments

@DonMartin76
Copy link
Member

The Helm Chart of wicked.haufe.io is imprecise in how it's possible to change the Postgres connection. If you do not deploy Postgres as part of the chart, but separately (which is recommended), it's tricky to set the right connection parameters for wicked to use. The Postgres connection which is described in the Chart only apply to Kong's Postgres connection, in order to change wicked's Postgres connection, you must also update the k8s.json (Environment file) using the Kickstarter to include the correct values.

The Chart should contain a possibility to also set the connection parameters for wicked's connection to Postgres separately from Kong's connection.

This means that all Postgres parameters must, by default, also be present as environment variables in default.json and k8s.json. This means that those values must be updated in an update step.

The update step must check the following:

  • If the previous values are the default ones, replace them with environment variables, in default.json, k8s.json, box.json
  • If all were set to default, replace them in globals.json as well

Then add the configuration possibility via Helm Chart:

  • Add config values for all five Postgres parameters: Host, Port, Username, Password and Database.
@DonMartin76 DonMartin76 added this to the 1.0.0 milestone Feb 18, 2019
@DonMartin76 DonMartin76 reopened this Feb 18, 2019
DonMartin76 added a commit that referenced this issue Feb 18, 2019
- Support for passing in wicked Postgres connection
@DonMartin76
Copy link
Member Author

The chart now allows passing in storage.pgHost, storage.pgPort,... works by overriding PORTAL_STORAGE_PGHOST etc. The documentation has been adapted (the Helm chart documentation).

@ehirsch
Copy link

ehirsch commented Feb 19, 2019

So there is now storage.pgHost and postgres.pgHost. The first is for wicked data and the later for kong correct? This is a little confusing don't you think?

But it's nice anyway. So thanks for the quick effort!

@DonMartin76
Copy link
Member Author

I admit this is confusing, yes. But if I change that now, things will/might break for existing deployments, so I chose not to.

@DonMartin76
Copy link
Member Author

Fixed in 1.0.0-rc.1

@ehirsch
Copy link

ehirsch commented Feb 19, 2019

I see. I did not think of that.

@DonMartin76 DonMartin76 modified the milestones: 1.0.0, 1.0.0-rc.1 Feb 21, 2019
maksimlikharev pushed a commit to clarivate/wicked.env that referenced this issue Apr 15, 2019
* Bugfix for local development env vars, udpate to target 0.12

* Merge from next (0.12.1).

* Minor adaptions to take in additional component kong-oauth2

* Adaptions for the additional components. Enhanced update step.

* Stupid little bugfix; also update kickstarter.json to add k8s env

* Fix for localhost environments, typo

* Added more subtle fixes for K8S default environment

* Typo; doesn't make sense for the /authorize end point to be called authorization instead of authorize

* Add friendlyShort and friendlyLong to standard configuration.

* Adaptions for OAuth2 support; moved to Node 8 LTS.

* Preparations for wicked 1.0.0, and move to node 8

* Fix gpg issue with IPv4 in Alpine docker image

* Bump to version 0.12.5

* Update to node:8(-alpine), pull when building base Docker image

* Update package.all.json for 0.12.5

* Rework configuration base resolution to enable relative paths

* Fix port of default auth server (3010, not 3005).

* Fix default Authorization server profile endpoint (global for all)

* Fix name of profile (OIDC conforming)

* Remove exit 1 in local npm updater

* Some optimizations to the distribution script for portal-env

* Correct redirection, didn't work like that

* Clone wicked-sdk when building via build.sh, added some build magic

* Remove duplicate JSON entries in default configuration

* Revamp wicked SDK building process for Jenkins, where npm is obviously not installed - run via docker

* Add Jenkins branch detection if running sparse checkout

* Jenkins debugging env

* Fixed retrieving branch name when running build in Jenkins

* Added a global logging component based on winston

* Add new logging component to config-updater as well; fix copy/paste error

* Also add portal-env to the other projects (for logging)

* Update step for default registration pool

* Enable logging plain text, e.g. when running tests

* Fixed a jshint warning by disabling it

* The kong adapter now also uses the portal-env (for logging),

* On non-Linux systems, default to LOG_PLAIN and LOG_LEVEL=debug

* Fix minor logging setup logic mistake

* Consolidate some properties of the default auth server (found during Kong Adapter testing)

* Better description of the name field

* Use name instead of given_name (which is not always present).

* Add "trustUsers" configuration - require email validation

* Update default authorization server configuration/auth config

* Updated dependencies

* Update dependencies and make sure modules are sorted to make diffing easier.

* Also include wicked-sdk in package.all.json

* Change default registration pool - OpenAPI compliant

* New env var PORTAL_ECHO_URL

* Add "--copy" option for only copying package file

* Fixes parts of Haufe-Lexware/wicked.haufe.io#113

Better detection of Linux/containerized or not

* Update default "enabled" property to being a boolean

* Dynamic initial configuration is no longer necessary (since long)

- This caused a bug at startup in the tests - the API detected an old version of the data (which is not true)

* Remove http_if_terminated from API configs

- This is now a part of the OAuth2 config, not supported for services or routes

* Add a delta to previous calls to logging

* Portal-auth tests also need the portal-env

* Some additional packages; move to node:10 for node-sdk build

* Build SDK needs tsc to run correctly

* Update to pg 7.4.3

* Updated dependencies

* Add a class for body.wicked-auth (default config)

* Typo in default credentials for ADFS

* Take out creating a default oauth2 auth section -> done in kickstarter

* Fix some faulty default settings (static config template)

* Add storage section for globals.json

* First name is no longer part of userinfo

* Updated dependencies

* Added Prometheus middleware standard package

* Fix label of prometheus metric

* Update step to add a "pgDatabase" property to the storage settings

Fixes Haufe-Lexware/wicked.haufe.io#118

* Add swagger-override.css.mustache file at update step 16

* Added a reusable password validator; moved code around a little

- Added update step for adding a password validation strategy

* Some tests for the password validator

* Faulty property name in default configuration for ADFS

* Allow restricting access to portal-api and echo APIs by user group.

* Missed subproperty api

* Make sure to wire also the postgres host in the standard case

* Update nodemailer and swagger-ui-dist

* Update vue.js

* Take out predefined auth methods; are only in the way

* Point "Sign up" to "login" instead, Haufe-Lexware/wicked.haufe.io#136

* Refresh packages; fix of update script for portal-env (portal-kong-adapter tests)

* Simplified gosu installation on Debian

* Updated marked to 0.5.2

* [WIP] Fix for PORTAL_STORAGE_PGHOST in helm deployments (#8)

* Create function for PORTAL_STORAGE_PGHOST updates and also update k8s and localhost envs

* Remove PGPASSWORD debug output and change PORTAL_ECHO_URL to PGPASSWORD

* Add PGHOST to localEnv and fix password value.

* Some tweaking of the PGHOST setting when updating

* Remove package-lock.json

* Rename images (skip portal-)

* Fix for renaming images (skipping portal-)

* Updates to reflect the new repo names

* Update bootstrap to 3.4.0

* Remove redis password definition; does not work.

-Wire to portal.com instead of portal.local, otherwise Google locally won't work

* Add a "box" environment for developing with the "wicked.box"

- Base implementation for Haufe-Lexware/wicked.haufe.io#161

* New package 'folder-hash'

* Specify kongProxyUrl as a default

* Also write the DOCKER_HOST to the default env

* Remove dependency ldapjs, it's not used

* Ignore build_date file

* Bump to version 1.0.0-rc.1

* Update versions, remove versioning from portal-env.tgz package name

* Fix dumb-init entrypoint (with packaged dumb-init)
- Further minor optimizations on the Dockerfiles

* Remove all build caches

* Enable parametrizing wicked's Postgres connection

Partly fixes Haufe-Lexware/wicked.haufe.io#167

* Bump to version 1.0.0-rc.2

* Update version of package.all.json

* Bump to version 1.0.0-rc.3

* Bump to 1.0.0-rc.3

* Bump to version 1.0.0-rc.4

* Update to morgan 1.9.1

* Fixed bug when porting an old config (scopes wrong)

* Update some packages (fix vulnerability warnings)

* Updates

* Upgrade request to 2.88.0

* Update async

* Ahem. Minor fix of the config-updater (was not yet released)

* Added package json-stringify-safe

* Fix typescript version for build and dev

- Build fixes

* Move back to npm install

* Add a trailing line break for writing package.json files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants