-
Notifications
You must be signed in to change notification settings - Fork 79
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
Allow Object to define a set of connectionDetails #99
Conversation
fyi @turkenh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# namespace: argocd | ||
# fieldPath: data.password | ||
# toConnectionSecretKey: argocd-password | ||
- apiVersion: v1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for taking care of this 🙌
@turkenh You mean adding another example in addition to the arguably contrived one in my original commit? provider-kubernetes/examples/in-composition/composition.yaml Lines 217 to 229 in bfaf150
|
Signed-off-by: Stev Witzel <switzel@vmware.com>
Signed-off-by: Stev Witzel <switzel@vmware.com>
Yeah, to make it more discoverable, we can create a directory under example/object named connection-details for example and put an example there. |
Great feature! Looking forward using it! Are there any plans when this will be released? |
Description of your changes
This PR introduces a new property under
Object.spec
, namedconnectionDetails
. This new property is optional and can be used to specify individual entries for a connection secret for the given resource. This essentially mirrors what we already have for provider-helm (i.e.Release.spec.connectionDetails
). As such, the changes in this PR borrow heavily from crossplane-contrib/provider-helm#73.The main difference between the implementation in
provider-helm
and this, is that here we do not require the resources referred to underconnectionDetails
to have a certain set of annotations or labels. While Helm makes sure that all resources belonging to a given release have a common set of annotations, we cannot assume the same here. This is because we're dealing with all sorts of external resources here managed by arbitrary controllers that do not share a common practice when it comes to putting a well-known set of annotations or labels on the child resources they control.This PR consists of two commits. The first one adds the new property and reconciliation logic, as well as a set of corresponding test cases and additions to the composition example. The second commit updates pre-existing parts of the example to make use of the recently introduced
Release.spec.connectionDetails[*].skipPartOfReleaseCheck
in provider-helm. This one is really just housekeeping and somewhat orthogonal to the main purpose of this PR. I'd be happy to remove it from here and submit it in a separate PR if you think that would be better. Just let me know.Fixes #15
I have:
make reviewable test
to ensure this PR is ready for review.How has this code been tested
make test