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

Fix machine deployment controller revision annotation update #499

Merged

Conversation

alvaroaleman
Copy link
Member

What this PR does / why we need it:

Currently the machineDeployment controller updates the machineDeployment status instead of the machineDeployment itself after the DeploymentRevision got changed

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #

Special notes for your reviewer:

Release note:

NONE

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Sep 13, 2018
@k8s-ci-robot k8s-ci-robot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Sep 13, 2018
@xmudrii
Copy link
Member

xmudrii commented Sep 13, 2018

/ok-to-test

@k8s-ci-robot k8s-ci-robot removed the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Sep 13, 2018
@alvaroaleman
Copy link
Member Author

/assign @timothysc

@timothysc
Copy link
Member

/assign @kris-nova @roberthbailey
/unassign @timothysc

@@ -111,7 +111,7 @@ func (dc *MachineDeploymentControllerImpl) getNewMachineSet(d *v1alpha1.MachineD

Copy link
Member Author

Choose a reason for hiding this comment

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

SetDeploymentRevision one line above this comment where I can unfortunatelly not comment updates an annotation if required:

func SetDeploymentRevision(deployment *v1alpha1.MachineDeployment, revision string) bool {

Consequently we must update the MachienDeployment, not its status.

The current behaviour results in the UpdateStatus being basically a no-op, except it triggers the informer, which then triggers the sync, which triggers this UpdateStatus again etc.

@roberthbailey
Copy link
Contributor

/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 Sep 19, 2018
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: alvaroaleman, roberthbailey

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

The pull request process is described here

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 Sep 19, 2018
@k8s-ci-robot k8s-ci-robot merged commit beba44a into kubernetes-sigs:master Sep 19, 2018
@alvaroaleman alvaroaleman deleted the fix-wrong-update-status branch September 19, 2018 14:05
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/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants