Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

eventing config-br-defaults set delivery spec defaults #2944

Closed
runzexia opened this issue Oct 19, 2020 · 8 comments · Fixed by #4965
Closed

eventing config-br-defaults set delivery spec defaults #2944

runzexia opened this issue Oct 19, 2020 · 8 comments · Fixed by #4965
Assignees
Labels
kind/eventing lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. priority/nice-to-have
Milestone

Comments

@runzexia
Copy link
Contributor

runzexia commented Oct 19, 2020

Describe the change you'd like to see
add docs about how to set delivery spec defaults by changing config-br-defaults

Additional context
knative/eventing#4172
knative/eventing#4328

@xtreme-sameer-vohra
Copy link
Contributor

Would it be possible to automate this based on the the schema, like this tool allows ?

@abrennan89 abrennan89 added this to the Icebox milestone Jan 26, 2021
@github-actions
Copy link

This issue is stale because it has been open for 90 days with no
activity. It will automatically close after 30 more days of
inactivity. Reopen the issue with /reopen.Mark the issue as
fresh by adding the comment /remove-lifecycle stale.

@github-actions github-actions bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Apr 26, 2021
@abrennan89 abrennan89 added Administrator guide kind/eventing and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels May 3, 2021
@abrennan89
Copy link
Contributor

abrennan89 commented Jun 25, 2021

Requires updates to the docs here: https://knative.dev/development/admin/eventing/broker-configuration/

@abrennan89 abrennan89 self-assigned this Jun 25, 2021
@abrennan89 abrennan89 modified the milestones: Icebox, v0.25.0 Jun 25, 2021
@abrennan89 abrennan89 modified the milestones: v0.25.0, v0.26.0 Jul 22, 2021
@abrennan89 abrennan89 removed their assignment Sep 9, 2021
@abrennan89 abrennan89 modified the milestones: v0.26.0, Backlog Sep 9, 2021
@pierDipi
Copy link
Member

pierDipi commented Dec 6, 2021

I'm adding more details to this issue.

On this page https://knative.dev/docs/eventing/configuration/broker-configuration/
users can configure some Broker defaults cluster-wide or per namespace.
For example:

apiVersion: v1
kind: ConfigMap
metadata:
  name: config-br-defaults
  namespace: knative-eventing
  labels:
    eventing.knative.dev/release: devel
data:
  # Configures the default for any Broker that does not specify a spec.config or Broker class.
  default-br-config: |
    clusterDefault:
      brokerClass: MTChannelBasedBroker
      apiVersion: v1
      kind: ConfigMap
      name: config-kafka-channel
      namespace: knative-eventing
    namespaceDefaults:
      namespace-1:
        apiVersion: v1
        kind: ConfigMap
        name: config-br-default-channel
        namespace: knative-eventing

With the new feature, another field called delivery can be configured as well, as follows:

apiVersion: v1
kind: ConfigMap
metadata:
  name: config-br-defaults
  namespace: knative-eventing
  labels:
    eventing.knative.dev/release: devel
data:
  # Configures the default for any Broker that does not specify a spec.config or Broker class.
  default-br-config: |
    clusterDefault:
      brokerClass: MTChannelBasedBroker
      apiVersion: v1
      kind: ConfigMap
      name: config-kafka-channel
      namespace: knative-eventing
      delivery:
        retry: 10
        backoffDelay: PT0.2S
        backoffPolicy: exponential
    namespaceDefaults:
      namespace-1:
        apiVersion: v1
        kind: ConfigMap
        name: config-br-default-channel
        namespace: knative-eventing
        delivery:
          deadLetterSink:
            ref:
              kind: Service
              namespace: example-namespace
              name: example-service
              apiVersion: v1
            uri: example-uri
          retry: 10
          backoffPolicy: exponential
          backoffDelay: "PT0.2S" 

The delivery field has the same shape as the delivery field of the broker as shown on this page https://knative.dev/docs/eventing/broker/example-mtbroker/:

# ...
 spec:
   # ...
   delivery:
     deadLetterSink:
       ref:
         kind: Service
         namespace: example-namespace
         name: example-service
         apiVersion: v1
       uri: example-uri
     retry: 10
     backoffPolicy: exponential
     backoffDelay: "PT0.2S"

@pierDipi
Copy link
Member

pierDipi commented Dec 6, 2021

let me know if the above helps!

@abrennan89
Copy link
Contributor

Thank you so much @pierDipi ! This is great!

@abrennan89 abrennan89 removed the triage/needs-eng-input Engineering input is requested label Dec 6, 2021
@github-actions
Copy link

github-actions bot commented Mar 7, 2022

This issue is stale because it has been open for 90 days with no
activity. It will automatically close after 30 more days of
inactivity. Reopen the issue with /reopen. Mark the issue as
fresh by adding the comment /remove-lifecycle stale.

@github-actions github-actions bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Mar 7, 2022
@pierDipi
Copy link
Member

pierDipi commented Mar 7, 2022

/remove-lifecycle stale

@knative-prow-robot knative-prow-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Mar 7, 2022
@abrennan89 abrennan89 added the lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. label May 19, 2022
@abrennan89 abrennan89 self-assigned this May 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/eventing lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. priority/nice-to-have
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants