Giter Club home page Giter Club logo

Comments (6)

dsimansk avatar dsimansk commented on August 27, 2024 1

@matzew @pierDipi @rhuss I was looking at switching to v1beta2 support and kn eventtype create flags. And I was wondering.

There are 2 paths here:

  • Single --reference flag, that would parse the input for various format:
--reference "broker:<name>"
--reference "broker:<name>:<namespace>"
--reference "channel:<name>:<namespace>"

# fully qualified GVK
--reference "special.eventing.dev/v1beta3:Channel:<name>"
--reference "special.eventing.dev/v1beta3:Channel:<name>:<namespace>"

  • Multiple flags for well know and popular references (broker, channel, kafka-broker) and single --reference for complete GVK. We already have --broker flag, that I'd like to keep for backward compatibility and convenience of use. Hence the idea with other well known flags.

The issue with this approach we faced in the past is that we will have opinionated defaults, but there's N+ other brokers out there. And we need to fiddle the popularity contest. :)

--broker "<name>"
--channel "<name>"
--broker-kafka "<name>"

# Only accepts qualified GVK
--reference "special.eventing.dev/v1beta3:Channel:<name>"
--reference "special.eventing.dev/v1beta3:Channel:<name>:<namespace>"

from client.

matzew avatar matzew commented on August 27, 2024 1

I'd go single

from client.

rhuss avatar rhuss commented on August 27, 2024 1

I think it should be aligned with the syntax options that we have for --sink, i.e. allowing shortcuts and full qualified entries. Algo would be:

  • Split on :
  • Check for a well-known shortcut (that should not have any . included)
  • If found, take the latest version of the GVK as known, when kn was compiled (we could list these version in the help message where we should also list all available prefixes
  • If not found, take the part as a full GVK (and split on /). So, I would use something like special.eventing.dev/channel/v1beta3 instead of another : (so that it's clear that the first part of that expression specifies the reference type, either in shortcut form or in full form.

from client.

matzew avatar matzew commented on August 27, 2024

Perhaps also add support for reference field (and deprecation warnings for broker field).
But that can be a separate issue

from client.

dsimansk avatar dsimansk commented on August 27, 2024

This's done in PR #1831, and released in Knative v1.11.0.

/close

from client.

knative-prow avatar knative-prow commented on August 27, 2024

@dsimansk: Closing this issue.

In response to this:

This's done in PR #1831, and released in Knative v1.11.0.

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

from client.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.