-
Notifications
You must be signed in to change notification settings - Fork 749
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
feat: ability to specify version in kafka trigger. Closes #990. #991
Conversation
Signed-off-by: Derek Wang <[email protected]>
Signed-off-by: Derek Wang <[email protected]>
pkg/apis/sensor/v1alpha1/types.go
Outdated
|
||
// Specify what kafka version is being connected to enables certain features in sarama, defaults to 1.0.0 | ||
// +optional | ||
Version string `json:"version" protobuf:"bytes,11,opt,name=version"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be version,omitempty
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch!
@@ -49,6 +49,16 @@ func NewKafkaTrigger(sensor *v1alpha1.Sensor, trigger *v1alpha1.Trigger, kafkaPr | |||
var err error | |||
config := sarama.NewConfig() | |||
|
|||
if kafkatrigger.Version == "" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd add a kafkatrigger.GetVersion() (string, error)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dot not want to import sarama
package into models.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good point
Signed-off-by: Derek Wang <[email protected]>
… (argoproj#991) * feat: ability to specify version in kafka trigger. Closes argoproj#990. Signed-off-by: Derek Wang <[email protected]> * upgrade slack version Signed-off-by: Derek Wang <[email protected]> * omitempty Signed-off-by: Derek Wang <[email protected]>
Also defaults Kafka version to v1.0.0 which is the same as Kafka event source.
Closes #990.
Signed-off-by: Derek Wang [email protected]
Checklist: