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

Upgrade to client-go v5.0.1, kubernetes v1.8.2 #157

Merged
merged 17 commits into from
Oct 30, 2017

Conversation

ncdc
Copy link
Contributor

@ncdc ncdc commented Oct 26, 2017

Also switch to using k8s.io/code-generator

@ncdc ncdc added this to the v0.6.0 milestone Oct 26, 2017
Copy link
Contributor

@skriss skriss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally LGTM, just one question.

@@ -168,7 +168,7 @@ func NewPrinter(cmd *cobra.Command) (*printers.HumanReadablePrinter, error) {

printer := printers.NewHumanReadablePrinter(
encoder,
scheme.Codecs.UniversalDecoder(api.SchemeGroupVersion),
scheme.Codecs.UniversalDecoder(v1.SchemeGroupVersion),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

was this another instance where we were using the wrong SchemeGroupVersion? Since this is switching from core/v1 to ark/v1

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I'm wondering if it matters...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok I just read the HumanReadablePrinter code. If we specify encoder & decoder, and if the object is runtime.Unstructured or *runtime.Unknown, it attempts to encode to bytes and then immediately decode it using the decoder to an actual type. Given that we are printing our types using our real client, I think we can pass nil for encoder & decoder. WDYT?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pushed a new commit removing them

ncdc added 15 commits October 30, 2017 13:30
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
Update k8s.io/kubernetes to v1.8.
Update k8s.io/client-go to v5.0.0
Update k8s.io/apimachinery to match
Pull in k8s.io/api release-1.8 branch
Pull in k8s.io/code-generator release-1.8 branch

Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
Fix genclient tags
Add deepcopy-gen interfaces to top level types

Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
dynamicClient.Resource() now returns an interface

Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
These were for the upgrade from client-go v4.x to v5.x.

Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
The generated clientsets use this package, but there are no explicit
imports, so we have to manually require it.

Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
Remove verifying gofmt from hack/test.sh.
Make sure hack/update-fmt.sh ignores zz_generated files.
Enable code simplification for gofmt.
Add hack/verify-fmt.sh.

Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
ncdc added 2 commits October 30, 2017 13:51
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
We only need them if we've got unstructured/unknown data and we want to
convert it to typed objects.

Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
@skriss
Copy link
Contributor

skriss commented Oct 30, 2017

@ncdc this looks good to me - ready to merge?

@ncdc
Copy link
Contributor Author

ncdc commented Oct 30, 2017

Yes

@skriss skriss merged commit 93b2f30 into vmware-tanzu:master Oct 30, 2017
@ncdc ncdc deleted the client-go-5 branch December 1, 2017 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants