Closed ocampeau closed 7 months ago
Hi @ocampeau. Thanks for your PR.
I'm waiting for a cert-manager member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test
on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.
Once the patch is verified, the new status will be reflected by the ok-to-test
label.
I understand the commands that are listed here.
I wonder if we need to extend the API with "new source types"; could we instead just extend the existing source configMap
and secret
types to allow either name
or selector
? Making the following bundle valid:
apiVersion: trust.cert-manager.io/v1alpha1
kind: Bundle
metadata:
name: some-bundle
spec:
sources:
- useDefaultCAs: true
- configMap:
key: ca.crt
name: my-configmap
- configMap:
key: ca.crt
selector:
matchLabels:
fruit: apple
- secret:
key: ca.crt
name: my-secret
- secret:
key: ca.crt
selector:
matchLabels:
fruit: banana
target:
configMap:
key: ca.crt
Yeah definitely! I will update my PR to reuse the existing source type like you mention. It's much better like that.
It's done. Let me know what you think.
/ok-to-test
/retest-required
@ocampeau This is an awesome new feature❤️! Thanks a lot for contributing this. /approve Can be LGTM'd once the two comments above have been resolved ^^
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: inteon
The full list of commands accepted by this bot can be found here.
The pull request process is described here
I have resolved all conversation except this one: https://github.com/cert-manager/trust-manager/pull/258#discussion_r1445222407
Let me know if this is acceptable or not.
Thanks a lot for accepting this PR by the way, it will really help us. It was a pleasure to contribute to this project.
Any ETA on when this could potentially be merged? Do you have documentation on the release velocity of this project?
Any ETA on when this could potentially be merged? Do you have documentation on the release velocity of this project?
Sorry, I have been very busy lately. Will try to review this weekend if @inteon hasn't reviewed and merged it before.
We have a couple of unreleased changes already, so I would suggest considering releasing 0.8.0 after this PR is merged. WDYT, @inteon? Sorry for the delay, @ocampeau!
/lgtm Thanks a lot for the feature. After this gets merged, we can do the v0.8.0 release. Also, @ocampeau could you create a documentation PR on the website to document this new feature?
Sure I can add documentation. I'll take a look into it
Documentation added with this PR: https://github.com/cert-manager/website/pull/1391
This PR adds support to use label selector for Secret and ConfigMap sources.
Given a
Bundle
that looks like this:this behavior will happen:
Secret
that has labelfruit: banana
and a keyca.crt
will have the value ofca.crt
included in theBundle
ConfigMap
that has labelfruit: apple
and a keyca.crt
will have the value ofca.crt
included in theBundle
Multiple
configMapLabelSelector
andsecretMapLabelSelector
are supported.In a case like this:
then:
ConfigMap
that has labelfruit: banana
and a keyca.crt
will have the value ofca.crt
included in theBundle
ConfigMap
that has labelfruit: apple
and a keyca.crt
will have the value ofca.crt
included in theBundle
fixes #256