-
Notifications
You must be signed in to change notification settings - Fork 77
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
V2 nonkube connector CLI #1713
V2 nonkube connector CLI #1713
Conversation
@nluaces |
fc6e23f
to
d39bbc3
Compare
af796c4
to
780e06a
Compare
Regarding the custom resource handler interface, remember to write implementations (empty if it is necessary) to all the resources that implement the interface (i.e. if you implement the List method for connectors, you also need to create the List method in sites) |
c0d88c1
to
efc303c
Compare
internal/cmd/skupper/connector/nonkube/connector_create_test.go
Outdated
Show resolved
Hide resolved
internal/cmd/skupper/connector/nonkube/connector_status_test.go
Outdated
Show resolved
Hide resolved
fbe53fe
to
4484e07
Compare
e51a57a
to
5f216e2
Compare
ed56ee1
to
b61e425
Compare
b61e425
to
2ae94e7
Compare
ca402b4
to
acdc07c
Compare
|
||
// Validate that there is already a connector with this name in the namespace | ||
if cmd.connectorName != "" { | ||
connector, err := cmd.connectorHandler.Update(cmd.connectorName) |
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.
This method is called Update
, but it is actually just retrieving a connector.
Should it be named something else?
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 missed this, I agree that Update should update a resource.
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.
will add new issue to fix
return connectors, nil | ||
} | ||
|
||
func (s *ConnectorHandler) Update(name string) (*v2alpha1.Connector, 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.
Update does not seem like an appropriate name for what this method is doing.
Maybe we could tweak the Get
signature allowing some options to be passed
that indicates if it must read from runtime first or from input only?
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.
Following the go client for kubernetes as example, the get command interface could be modified to something like this:
Get(name string, opts GetOptions) T
type GetOptions struct {
// runtimeFirst bool
// ...
}
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.
Will add a new issue to modify the Get command.
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.
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.
Other than my comments and minor suggestions above, it is working just fine.
Thank you!
acdc07c
to
1537e7a
Compare
Add Connector CLI commands for nonkube implementation
includes create, update status and delete.