Skip to content
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

Remove host-credentials flag and host field of PostgreSQLDatabase #91

Open
Crevil opened this issue Dec 13, 2021 · 1 comment
Open

Remove host-credentials flag and host field of PostgreSQLDatabase #91

Crevil opened this issue Dec 13, 2021 · 1 comment

Comments

@Crevil
Copy link
Member

Crevil commented Dec 13, 2021

With the implementation of PostgreSQLHostCredentails CR (#90) the existing host-credentials flag and the host field of the PostgreSQLDatabase resource becomes redundant.

I think we should remove these and only rely on the new resource to avoid the complexity in the controller and ensuring having a "single way" of setting the controller up.

Crevil added a commit that referenced this issue Dec 13, 2021
Add a new PostgreSQLHostCredentials Custom Resource that replaces the
host-credentials controller flag.

The new resource will be used to find admin credentials for instances by using a
new reference field in the PostgreSQLDatabase resource. The resource collects
credentials in a structure way opposed to the current flag and makes it possible
to reference other Kubernetes resources for providing values for eg. passwords.

The motivation for adding the resource is around the last feature. When using
the controller along with operators like Crossplane.io or Kubegres the instance
credentials are provided through Kubernetes resources like Secrets and
ConfigMaps. With the new resource it now becomes possible to reference these. It
also avoids the odd workflow of adding new instances and having to update the
controllers flags to make it possible to work with them.

The change also adds context propagation to some controller methods where it was
missing.

Closes #82 and leaves #91 for later implementation.

Co-authored-by: Bjørn <[email protected]>
@Crevil
Copy link
Member Author

Crevil commented Dec 14, 2021

We will have to do a migration for all resources before this can be rolled out so I think we should have a release with the new credentials setup after which we can then remove the flag and cut another release. That way it is possible to upgrade in two steps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant