-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support objects for user-provided services credentials
Previously Korifi supported plain `map[string]string` for UPSI credentials. This deviates from the CF API spec where credentials can be arbitrary objects. As credentials are stored in secrets which are glorified `map[string][]byte` we had to change the way we store the credentials object: * We marshal the credentials object into a byte array and store it under the `crdentials` key in the secret. We no longer use a secret key per every credentials value. The `CFServiceInstance.Spec.SecretName` references that credentials secret. * We introduce `CFServiceInstance.Status.Credentials` and `CFServiceInstance.Status.CredentialsObservedVersion` that aremanaged by the `CFServiceInstance` controller. Once the controller reconciles the service instance, it sets the secret name and its resource version into the new status fields. * The CFServiceBindingController reconciles the CFServiceInstance credentials secret into the flat format that is then used for the servicebinding.io binding. In case of a json object value to a key, the value is represented as a json string. * Existing bindings are not affected when upgrading Korifi. However, once the user updates the service instance credentials, the binding secret is rebuilt which causes statefulset restart. Further updates to the credentials will not cause additional restarts. fixes #2900 Co-authored-by: Danail Branekov <danailster@gmail.com>
- Loading branch information
1 parent
4a55850
commit 50f3c4e
Showing
23 changed files
with
1,266 additions
and
525 deletions.
There are no files selected for viewing
This file contains 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 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 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 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.