-
Notifications
You must be signed in to change notification settings - Fork 25
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
egress rule for postgres should not be tied to devMode #489
Comments
Wanted to add some more |
Also, instead of creating a new issue I wanted to make sure it was clear that the race condition mentioned in the additional context of this issue is also resolved as part of this. The |
Happy to dive in more and see if there's a different solution, but as @anthonywendt pointed out devMode does not allow you to use postgres currently (that was intentional, devMode is just meant to be for ephemeral dev). If the log level is the main reason you want dev mode it might be worth just moving those to a different conditional for debug mode or something similar. |
It's very unintuitive that configuring postgres connection info doesn't result in using postgres unless you know to disable the default |
@blancharda yeah agreed. There's a small note hidden in the readme that says A couple things I think we could/should do here:
|
## Description Updates the internal `keycloak` helm chart to be more explicit about using an external postgres database connection. Notable changes are: - Configures egress rule and `keycloak` env vars for postgres based on `postgresql` being populated - Defaults `postgresql.username`, `postgresql.password`, `postgresql.database`, and `postgresql.host` to an empty string - Adds option to enable debug logging via `debugMode: true` - Adds a `fail` case when `devMode` is true and `postgresql` has values defined - Adds fail cases when users do not supply required values for `postgresql` when `devMode` is `false` ## Related Issue Fixes #489 ## Type of change - [x] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Other (security config, docs update, etc) ## Checklist before merging - [ ] Test, docs, adr added or updated as needed - [ ] [Contributor Guide](https://github.com/defenseunicorns/uds-template-capability/blob/main/CONTRIBUTING.md) followed --------- Co-authored-by: Micah Nagel <micah.nagel@defenseunicorns.com>
Overview
Currently, the egress rule for postgres is conditioned on
devMode: false
.DevMode provides increased logging (among other things), and there are many reasons why you might want both. In any case, if an external database is configured, the egress rule should be created accordingly.
Environment
App version:
0.22.1-registry1
Steps to reproduce
devMode: true
Expected result
If a postgres database is configured, the egress rule should be created accordingly
Actual Result
The rule is only created when devMode is false
Additional Context
This may be a case where the race (see related gitlab issue)between pepr creating the netpol and the keycloak pods starting up may have masked the behavior on initial install.. but now that pepr is more consistent in applying rules, upgrades in our long lived environments are failing to restart keycloak pods with JDBC connection timeouts.
The text was updated successfully, but these errors were encountered: