prune998/certmerge-operator

Labels

afoninsky opened this issue · 5 comments

Hello.

As I can see, your pull-request according to labels is not accepted. Is it possible to use existing seret labels generated by certmanager in CertMerge label selector? Ex.:

  - labelselector:
      matchExpressions:
        - key: certmanager.k8s.io/certificate-name
          operator: NotIn
          values:
            - non-existing

Something like k get secret --all-namespaces -l certmanager.k8s.io/certificate-name

Well, you should be able to do it, as long as you're using a label... let me have a look

Ok I changed the code to support both MatchLabels and matchExpressions.
Use image v0.0.3 and a CertMerge like :

apiVersion: certmerge.lecentre.net/v1alpha1
kind: CertMerge
metadata:
  name: certmerge-test
  namespace: istio-system
spec:
  name: test-cert
  namespace: istio-system
  selector:
  - labelselector:
      matchExpressions:
        - key: certmanager.k8s.io/certificate-name
          operator: exists
    namespace: istio-system

There may be a trigger issue if you update one of the secrets that are selected by the matchExpression ... looking into it.

@afoninsky it's OK this is fully supported !
Closing the issue !

Thank you