open-cluster-management-io / api

Core APIs for open cluster management
https://open-cluster-management.io
Apache License 2.0
251 stars 77 forks source link

:bug: fix default value 0 is a string type #299

Closed haoqing0110 closed 11 months ago

haoqing0110 commented 11 months ago

Summary

Fix the below error when MaxFailures field is not defined and use the default value.

E1127 07:23:43.074771       1 base_controller.go:266] "addon-configuration-controller" controller failed to sync "managed-serviceaccount", err: failed to parse the provided maxFailures: '0' is an invalid maximum threshold value: string is not a percentage

Related issue(s)

Fixes #

haoqing0110 commented 11 months ago

/assign @qiujian16 @serngawy @dhaiducek

qiujian16 commented 11 months ago

/approve /lgtm

openshift-ci[bot] commented 11 months ago

[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: - ~~[OWNERS](https://github.com/open-cluster-management-io/api/blob/main/OWNERS)~~ [qiujian16] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment