Skip to content

Switiching to apps/v1 deployment api in the examples#1084

Merged
k8s-ci-robot merged 1 commit into
kubernetes-client:masterfrom
yue9944882:refresh-patch-example-api
Jul 17, 2020
Merged

Switiching to apps/v1 deployment api in the examples#1084
k8s-ci-robot merged 1 commit into
kubernetes-client:masterfrom
yue9944882:refresh-patch-example-api

Conversation

@yue9944882

Copy link
Copy Markdown
Member

Fixes: #1075

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jul 17, 2020
@k8s-ci-robot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: yue9944882

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jul 17, 2020
@@ -102,17 +101,17 @@ public static void main(String[] args) throws IOException {
// apply-yaml a deployment, server side apply is alpha in kubernetes v1.14,
// You need to actively enable the Server Side Apply alpha feature
// https://kubernetes.io/docs/reference/using-api/api-concepts/#server-side-apply

@php-coder php-coder Jul 17, 2020

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is this comment is still needed in the lite of 1.18?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

good catch, i updated the comment to clarify that server-side-apply is enabled by default after v1.16

// https://kubernetes.io/docs/reference/using-api/api-concepts/#server-side-apply
ExtensionsV1beta1Deployment deploy4 =
V1Deployment deploy4 =
PatchUtils.patch(

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

@yue9944882 I run your version of example and for yaml apply I received an error:

{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"failed to create typed patch object: .spec.template.spec.containers[name="hello-node"].ports: element 0: associative list with keys has an element that omits key field "protocol"","code":500}

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

can you retry on my latest update? i just re'produced the error on a v1.18 cluster and fixed it.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

thank you, now it works

@yue9944882 yue9944882 force-pushed the refresh-patch-example-api branch from 7e0c10a to 215fbb2 Compare July 17, 2020 11:27
@brendandburns

Copy link
Copy Markdown
Contributor

/lgtm

Thanks!

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 17, 2020
@k8s-ci-robot k8s-ci-robot merged commit a172457 into kubernetes-client:master Jul 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update PatchExample to not use Deployment from extensions/v1beta1

5 participants