kedacore / keda-olm-operator

Operator for deploying KEDA Controller on OperatorHub.io/OLM
Apache License 2.0
30 stars 23 forks source link

Add caConfigMaps field to KedaOperatorSpec #232

Closed joelsmith closed 1 month ago

joelsmith commented 1 month ago

This field causes the operator to mount any referenced configmaps and to run with --ca-dir= flags pointing to their mount points.

Checklist

Related to https://github.com/kedacore/keda/pull/5859

jkyros commented 1 month ago

Looks good to me, the deployments end up looking like this:

     containers:
      - args:
        - --leader-elect
        - --zap-log-level=error
        - --zap-encoder=json
        - --zap-time-encoding=rfc3339
        - --enable-cert-rotation=false
        - --ca-dir=/custom/ca0
        - --ca-dir=/custom/ca1
     ...
        volumeMounts:
        - mountPath: /certs
          name: certificates
          readOnly: true
        - mountPath: /custom/ca0
          name: cabundle0
        - mountPath: /custom/ca1
          name: cabundle1
    ...
      - configMap:
          defaultMode: 420
          name: keda-ocp-cabundle
        name: cabundle0
      - configMap:
          defaultMode: 420
          name: foo
        name: cabundle1

It does break compatibility with old operands because they don't understand the --ca-dir argument, and this moves the keda-ocp-bundle to use that argument, but it sounds like we plan to release this as > 2.14.0 , which should be fine because a matching > 2.14.0 operand will have https://github.com/kedacore/keda/pull/5859. (I'm just mentioning it for posterity)

Also, I'm in the middle of refactoring that functionality test, I promise. :smile:

/lgtm