Skip to content

add updateStrategy to daemonSets #1781

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

Closed
wants to merge 7 commits into from
Closed

add updateStrategy to daemonSets #1781

wants to merge 7 commits into from

Conversation

hj-johannes-lee
Copy link
Contributor

@hj-johannes-lee hj-johannes-lee commented Jul 18, 2024

closes: #1500

@hj-johannes-lee hj-johannes-lee marked this pull request as draft July 18, 2024 16:07
@mythi
Copy link
Contributor

mythi commented Jul 22, 2024

Please review though it is a draft yet!

I'd be very careful adding this to the API. Do you think it's useful? Our priority is to make our operator 'full lifecycle' compliant and if adding safe defaults to deployments/*_plugin/base/intel-*-plugin.yaml is sufficient that's what we should start with.

@hj-johannes-lee
Copy link
Contributor Author

@mythi I think I still have no idea what makes our operator 'full cycle'..

Umm, the point that I do not understand is:
How can deployments/*_plugin/base/intel-*-plugin.yaml which has nothing to do with operator be related to making our operator full cycle?
I thought what we need to change is the operator part...

@hj-johannes-lee
Copy link
Contributor Author

Ah do you mean...
I did this

define user configurable updateStrategy settings and add to the operator (to be decided/defined based on the need)

but didn't do this?

enable default strategy in plugin daemonSets

@mythi
Copy link
Contributor

mythi commented Jul 22, 2024

How can deployments/*_plugin/base/intel-*-plugin.yaml which has nothing to do with operator

the operator uses these as the "skeleton" so changes there will add to operator automatically. See https://github.com/intel/intel-device-plugins-for-kubernetes/blob/main/deployments/daemonsets.go and

daemonSet := deployments.QATPluginDaemonSet()

@mythi
Copy link
Contributor

mythi commented Jul 23, 2024

Ah do you mean... I did this

define user configurable updateStrategy settings and add to the operator (to be decided/defined based on the need)

but didn't do this?

enable default strategy in plugin daemonSets

yes, and the first part needs more thinking if we really want/need to do it. we cannot let users to set rollingUpdate.maxSurge since only 0 works for the plugins so that'd leave rollingUpdate.maxUnavailable AFAUI.

@hj-johannes-lee
Copy link
Contributor Author

True. maxSurge should be always 0. Now I see your point.!

Then, if we can make users set only maxUnavailable, would it be good? Or, would we not need it since device plugins have already maxUnavailable value as default value (1)?

@mythi
Copy link
Contributor

mythi commented Jul 23, 2024

Then, if we can make users set only maxUnavailable, would it be good?

my feedback is we don't need it configurable right now but let's prioritize the rest of the capability criteria

@hj-johannes-lee
Copy link
Contributor Author

sure, then, let me just add other plugins' yamls with controller_test.go updated.

@hj-johannes-lee hj-johannes-lee changed the title operator: implement updateStrategy for daemonsets add updateStrategy for daemonsets of plugins Jul 23, 2024
@hj-johannes-lee hj-johannes-lee changed the title add updateStrategy for daemonsets of plugins add updateStrategy for daemonsets Jul 23, 2024
@hj-johannes-lee hj-johannes-lee changed the title add updateStrategy for daemonsets add updateStrategy for daemonSets Jul 23, 2024
@hj-johannes-lee hj-johannes-lee changed the title add updateStrategy for daemonSets add updateStrategy to daemonSets Jul 23, 2024
Signed-off-by: Hyeongju Johannes Lee <[email protected]>
Signed-off-by: Hyeongju Johannes Lee <[email protected]>
Signed-off-by: Hyeongju Johannes Lee <[email protected]>
Signed-off-by: Hyeongju Johannes Lee <[email protected]>
Signed-off-by: Hyeongju Johannes Lee <[email protected]>
Signed-off-by: Hyeongju Johannes Lee <[email protected]>
Signed-off-by: Hyeongju Johannes Lee <[email protected]>
@hj-johannes-lee hj-johannes-lee marked this pull request as ready for review July 24, 2024 10:39
@hj-johannes-lee
Copy link
Contributor Author

@mythi anything else to do?

Copy link
Contributor

@mythi mythi left a comment

Choose a reason for hiding this comment

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

The values look fine. I hope this is what the operator sdk capability expects. One minor suggestion.

One other thing: I think your repo fork is broken due to the repo incident we had. Maybe you need to create a new fork and re-create the PR from there... let me check on this

Comment on lines +38 to +41
maxUnavailable := &intstr.IntOrString{}
maxUnavailable.IntVal = 1
maxSurge := &intstr.IntOrString{}
maxSurge.IntVal = 0
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
maxUnavailable := &intstr.IntOrString{}
maxUnavailable.IntVal = 1
maxSurge := &intstr.IntOrString{}
maxSurge.IntVal = 0
maxUnavailable := intstr.FromInt(1)
maxSurge := intstr.FromInt(0)

Comment on lines +64 to +65
MaxUnavailable: maxUnavailable,
MaxSurge: maxSurge,
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
MaxUnavailable: maxUnavailable,
MaxSurge: maxSurge,
MaxUnavailable: &maxUnavailable,
MaxSurge: &maxSurge,

@hj-johannes-lee hj-johannes-lee closed this by deleting the head repository Jul 25, 2024
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.

enable updateStrategy
2 participants