-
Notifications
You must be signed in to change notification settings - Fork 228
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
Modify to use loader and inventory client interfaces in cli-utils #3483
Conversation
5ef9973
to
844aa57
Compare
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.
Mostly looks good. Great to get rid of the fork.
@@ -45,13 +46,15 @@ func GetLiveCommand(ctx context.Context, _, version string) *cobra.Command { | |||
} | |||
|
|||
f := newFactory(liveCmd, version) | |||
invFactory := live.NewClusterClientFactory() |
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 think we can just keep this inside the cmdstatus package?
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.
@morten Do you mean the NewClusterClientFactory function and the struct related to it or you are just saying this line could be placed inside the cmdstatus?
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 think the test utilizes the FakeClusterClient which is a different one, so the invFactory needs to be an input argument, otherwise the test will fail. But I think it's ok to move the implementation of the client factory into cmdstatus.
pkg/live/fake-loader.go
Outdated
@@ -0,0 +1,61 @@ | |||
package live |
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 think we can keep this one too in the cmdstatus package. It might be that we want to reuse it in the other kpt live commands, but we can move it if that happens.
875da62
to
0df6f3b
Compare
Remove the forked status command from cli-utils by implementing the loader and inventory client interfaces and utilize the command Runner code in cli-utils