Skip to content

Commit 98a1d87

Browse files
authored
Add status sync interval for work agent (#375)
Signed-off-by: zhujian <[email protected]>
1 parent 29ad7f1 commit 98a1d87

File tree

4 files changed

+21
-0
lines changed

4 files changed

+21
-0
lines changed

operator/v1/0000_00_operator.open-cluster-management.io_klusterlets.crd.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -489,6 +489,13 @@ spec:
489489
If it is set empty, use the default value: 50
490490
format: int32
491491
type: integer
492+
statusSyncInterval:
493+
description: |-
494+
StatusSyncInterval is the interval for the work agent to check the status of ManifestWorks.
495+
Larger value means less frequent status sync and less api calls to the managed cluster, vice versa.
496+
The value(x) should be: 5s <= x <= 1h.
497+
pattern: ^([0-9]+(s|m|h))+$
498+
type: string
492499
type: object
493500
workImagePullSpec:
494501
description: |-

operator/v1/types_klusterlet.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,14 @@ type WorkAgentConfiguration struct {
299299
// +kubebuilder:validation:Type=string
300300
// +kubebuilder:validation:Pattern="^([0-9]+(s|m|h))+$"
301301
AppliedManifestWorkEvictionGracePeriod *metav1.Duration `json:"appliedManifestWorkEvictionGracePeriod,omitempty"`
302+
303+
// StatusSyncInterval is the interval for the work agent to check the status of ManifestWorks.
304+
// Larger value means less frequent status sync and less api calls to the managed cluster, vice versa.
305+
// The value(x) should be: 5s <= x <= 1h.
306+
// +optional
307+
// +kubebuilder:validation:Type=string
308+
// +kubebuilder:validation:Pattern="^([0-9]+(s|m|h))+$"
309+
StatusSyncInterval *metav1.Duration `json:"statusSyncInterval,omitempty"`
302310
}
303311

304312
const (

operator/v1/zz_generated.deepcopy.go

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

operator/v1/zz_generated.swagger_doc_generated.go

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)