cert-manager / trust-manager

trust-manager is an operator for distributing trust bundles across a Kubernetes cluster.
https://cert-manager.io/docs/projects/trust-manager/
Apache License 2.0
233 stars 64 forks source link

Add matchExpressions to Bundle's spec.target.namespaceSelector #302

Open sathieu opened 4 months ago

sathieu commented 4 months ago

Currently, bundle has:

spec:
  target:
    namespaceSelector:
      matchLabels:
        linkerd.io/inject: "enabled"

We need support for:

spec:
  target:
    namespaceSelector:
      matchExpressions:
      - key: kubitus-project.gitlab.io/inject-ca-bundle
        operator: NotIn
        values:
        - 'false'

Ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#resources-that-support-set-based-requirements

erikgb commented 4 months ago

I think this was discussed in https://github.com/cert-manager/trust-manager/pull/258 - as this new feature supports all types of selectors. It would make sense to add this IMO, and I also think it could be added non-breaking. PRs welcome! 😸

sathieu commented 4 months ago

@ocampeau Could you please take a look at this feature request :pray:?

ocampeau commented 4 months ago

I think it could be a nice addition yes. This can definitely be done in a non-breaking fashion. The Kubernetes libraries already provides the types for that.

erikgb commented 11 hours ago

/help

cert-manager-prow[bot] commented 11 hours ago

@erikgb: This request has been marked as needing help from a contributor.

Please ensure the request meets the requirements listed here.

If this request no longer meets these requirements, the label can be removed by commenting with the /remove-help command.

In response to [this](https://github.com/cert-manager/trust-manager/issues/302): >/help Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.