Haufe-Lexware / wicked.haufe.io

An API Management system based on Mashape Kong
http://wicked.haufe.io
Other
123 stars 37 forks source link

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

Closed DonMartin76 closed 5 years ago

DonMartin76 commented 5 years ago

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:

Then add the configuration possibility via Helm Chart:

DonMartin76 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

Fixed in 1.0.0-rc.1

ehirsch commented 5 years ago

I see. I did not think of that.