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

🐛 update RolloutStrategy embed struct #264

Conversation

haoqing0110
Copy link
Member

@haoqing0110 haoqing0110 commented Aug 24, 2023

Summary

When I have the below code, found the timeout field will not be created/patched, always empty value, update the embed struct can fix the issue.

			ginkgo.By("update cma to rolling update with timeout")
			cma, err = hubAddonClient.AddonV1alpha1().ClusterManagementAddOns().Get(context.Background(), cma.Name, metav1.GetOptions{})
			gomega.Expect(err).ToNot(gomega.HaveOccurred())
			cma.Spec.InstallStrategy.Placements[0].RolloutStrategy = clusterv1alpha1.RolloutStrategy{
				Type:        clusterv1alpha1.Progressive,
				Progressive: &clusterv1alpha1.RolloutProgressive{MaxConcurrency: intstr.FromString("50%"), Timeout: clusterv1alpha1.Timeout{Timeout: "2s"}},
			}
			patchClusterManagementAddOn(context.Background(), cma)

Related issue(s)

Fixes #

Signed-off-by: haoqing0110 <qhao@redhat.com>
@openshift-ci openshift-ci bot requested review from deads2k and mdelder August 24, 2023 02:44
@haoqing0110
Copy link
Member Author

/assign @qiujian16

Copy link
Member

@qiujian16 qiujian16 left a comment

Choose a reason for hiding this comment

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

/approve
/lgtm

@openshift-ci openshift-ci bot added the lgtm label Aug 24, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Aug 24, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: haoqing0110, qiujian16

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

@openshift-merge-robot openshift-merge-robot merged commit d6fa12e into open-cluster-management-io:main Aug 24, 2023
11 checks passed
@haoqing0110 haoqing0110 deleted the br_placement-strategy branch August 24, 2023 08:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants