Skip to content

add example to demonstrate a rolling restart of the deployment#1450

Merged
k8s-ci-robot merged 1 commit intokubernetes-client:masterfrom
Priyankasaggu11929:psaggu-deployment-rolling-restart
May 3, 2021
Merged

add example to demonstrate a rolling restart of the deployment#1450
k8s-ci-robot merged 1 commit intokubernetes-client:masterfrom
Priyankasaggu11929:psaggu-deployment-rolling-restart

Conversation

@Priyankasaggu11929
Copy link
Copy Markdown
Contributor

What type of PR is this?

/kind documentation

What this PR does / why we need it:

This PR add examples/dynamic-client/deployment_rollout-restart.py python script, to demonstrate how to perform a rolling restart on a deployment resource.

The output of the script looks like:

deployment_rolling_restart

Which issue(s) this PR fixes:

Fixes #1378

Does this PR introduce a user-facing change?

NONE

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/documentation Categorizes issue or PR as related to documentation. labels May 2, 2021
@k8s-ci-robot k8s-ci-robot requested review from roycaihw and yliaog May 2, 2021 11:08
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels May 2, 2021
@Priyankasaggu11929 Priyankasaggu11929 force-pushed the psaggu-deployment-rolling-restart branch from 1cde490 to 00a87f9 Compare May 2, 2021 11:13
)

# fetching the deployment api
api = client.resources.get(api_version="apps/v1", kind="Deployment")
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.

any reason for using dynamic client, instead of using the typed client?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

HI @yliaog, thanks for the reveiw.

No, there is no specific reason for using dynamic client. I've just replicated the same example using the typed client. If required, I can replace this example with the one using typed client.

Thank you!

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.

ok. i think typed client would benefit from such an example too.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks @yliaog. I'll add the same example using the typed client too.

@Priyankasaggu11929 Priyankasaggu11929 force-pushed the psaggu-deployment-rolling-restart branch from 00a87f9 to 83f92cc Compare May 3, 2021 09:14
@yliaog
Copy link
Copy Markdown
Contributor

yliaog commented May 3, 2021

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 3, 2021
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Priyankasaggu11929, yliaog

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 the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 3, 2021
@k8s-ci-robot k8s-ci-robot merged commit 251a1b3 into kubernetes-client:master May 3, 2021
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. kind/documentation Categorizes issue or PR as related to documentation. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

How do we do rolling restart?

3 participants