openshift-knative / serverless-operator

Main source repository for Openshift Serverless
Apache License 2.0
43 stars 65 forks source link

Align key for features CM in KnativeEventing CR #2668

Closed creydr closed 1 month ago

creydr commented 1 month ago

Currently we use different keys for the eventing config-features configmap in the KnativeEventing CR. E.g. features (here) or config-features in #2660. This leads to patches like the following, which are problematic as only one is considered:

apiVersion: operator.knative.dev/v1beta1
kind: KnativeEventing
metadata:
  name: knative-eventing
spec:
  config:
    config-features:
      new-apiserversource-filters: "enabled"
      eventtype-auto-create: "enabled"
    logging:
      ...
    features:
      istio: "enabled"
      delivery-timeout: "enabled"

This PR addresses it and updates the key for the CM accordingly.

This should help with https://github.com/openshift-knative/eventing-istio/pull/265#issuecomment-2111972249 and https://github.com/openshift-knative/serverless-operator/pull/2659

ReToCode commented 1 month ago

I don't know how Eventing does this, but isn't the convention to remove the config- when referring to CMs? The CM is not named config-config-features, or is it?

creydr commented 1 month ago

I don't know how Eventing does this, but isn't the convention to remove the config- when referring to CMs? The CM is not named config-config-features, or is it?

I didn't know this convention. But we use everywhere else config-features (e.g. https://github.com/openshift-knative/eventing-kafka-broker/blob/4b716d32bde19ecd34b1efdb51734619c91723bf/openshift/knative-eventing.yaml#L15 or https://github.com/openshift-knative/eventing-kafka-broker/blob/4b716d32bde19ecd34b1efdb51734619c91723bf/openshift/knative-eventing-encryption-auth.yaml#L3).

And from https://github.com/knative/operator/blob/9099b1baa374fbc0ccf3093a53419fe54cf0dbf0/pkg/apis/operator/base/common.go#L224-L227 I would assume the real name.

openshift-ci[bot] commented 1 month ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: creydr, pierDipi

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/openshift-knative/serverless-operator/blob/main/OWNERS)~~ [creydr,pierDipi] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment