This repository has been archived by the owner on Jul 5, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 28
Introduce ExternalSecretBackend CRDs to configure multiple backends #15
Closed
Conversation
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
operator-sdk add api --api-version=externalsecret-operator.container-solutions.com/v1alpha1 --kind=ExternalSecretBackend operator-sdk add controller --api-version=externalsecret-operator.container-solutions.com/v1alpha1 --kind=ExternalSecretBackend
Closed because we merged #18 instead. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Extract Backend instantiation by introducing an
ExternalSecretBackend
CRD and relative controller.Backends will be instantiated by creating
ExternalSecretBackend
CR similar to the following:ExternalSecret
CR will reference theExternalSecretName
to specify which backend to use. For example, the following CR would use the Backend defined above:Backend types are now required to register themselves at startup in a:
which maps the backend type label to a function that returns a backend of that type.
This will allow the controller to instantiate backends of the correct type when reconciling the
ExternalSecretBackend
CRs. Instantiated backend are stored in a map as well:An easy way to register backend types at startup is to use the
init()
function in the module that defines the backend. For example, this is how it is done in the AWS Secret Manager backend: