From e391c2fb88c829cd3c267a6afd6d615f2712acc5 Mon Sep 17 00:00:00 2001 From: Hidde Beydals Date: Thu, 3 Aug 2023 09:55:18 +0200 Subject: [PATCH] api: document jitter effect on interval fields Signed-off-by: Hidde Beydals --- api/v1/gitrepository_types.go | 4 ++- api/v1beta2/bucket_types.go | 4 ++- api/v1beta2/helmchart_types.go | 4 ++- api/v1beta2/helmrepository_types.go | 4 ++- api/v1beta2/ocirepository_types.go | 4 ++- .../source.toolkit.fluxcd.io_buckets.yaml | 4 ++- ...rce.toolkit.fluxcd.io_gitrepositories.yaml | 4 ++- .../source.toolkit.fluxcd.io_helmcharts.yaml | 5 +-- ...ce.toolkit.fluxcd.io_helmrepositories.yaml | 4 ++- ...rce.toolkit.fluxcd.io_ocirepositories.yaml | 4 ++- docs/api/v1/source.md | 8 +++-- docs/api/v1beta2/source.md | 32 ++++++++++++++----- 12 files changed, 60 insertions(+), 21 deletions(-) diff --git a/api/v1/gitrepository_types.go b/api/v1/gitrepository_types.go index f08efca2..28a610c8 100644 --- a/api/v1/gitrepository_types.go +++ b/api/v1/gitrepository_types.go @@ -55,7 +55,9 @@ type GitRepositorySpec struct { // +optional SecretRef *meta.LocalObjectReference `json:"secretRef,omitempty"` - // Interval at which to check the GitRepository for updates. + // Interval at which the GitRepository URL is checked for updates. + // This interval is approximate and may be subject to jitter to ensure + // efficient use of resources. // +kubebuilder:validation:Type=string // +kubebuilder:validation:Pattern="^([0-9]+(\\.[0-9]+)?(ms|s|m|h))+$" // +required diff --git a/api/v1beta2/bucket_types.go b/api/v1beta2/bucket_types.go index f79db57e..c9b748a5 100644 --- a/api/v1beta2/bucket_types.go +++ b/api/v1beta2/bucket_types.go @@ -78,7 +78,9 @@ type BucketSpec struct { // +optional SecretRef *meta.LocalObjectReference `json:"secretRef,omitempty"` - // Interval at which to check the Endpoint for updates. + // Interval at which the Bucket Endpoint is checked for updates. + // This interval is approximate and may be subject to jitter to ensure + // efficient use of resources. // +kubebuilder:validation:Type=string // +kubebuilder:validation:Pattern="^([0-9]+(\\.[0-9]+)?(ms|s|m|h))+$" // +required diff --git a/api/v1beta2/helmchart_types.go b/api/v1beta2/helmchart_types.go index 9a655a4e..3c5e387b 100644 --- a/api/v1beta2/helmchart_types.go +++ b/api/v1beta2/helmchart_types.go @@ -46,7 +46,9 @@ type HelmChartSpec struct { // +required SourceRef LocalHelmChartSourceReference `json:"sourceRef"` - // Interval is the interval at which to check the Source for updates. + // Interval at which the HelmChart SourceRef is checked for updates. + // This interval is approximate and may be subject to jitter to ensure + // efficient use of resources. // +kubebuilder:validation:Type=string // +kubebuilder:validation:Pattern="^([0-9]+(\\.[0-9]+)?(ms|s|m|h))+$" // +required diff --git a/api/v1beta2/helmrepository_types.go b/api/v1beta2/helmrepository_types.go index 4dcf0a45..4da992ab 100644 --- a/api/v1beta2/helmrepository_types.go +++ b/api/v1beta2/helmrepository_types.go @@ -72,7 +72,9 @@ type HelmRepositorySpec struct { // +optional PassCredentials bool `json:"passCredentials,omitempty"` - // Interval at which to check the URL for updates. + // Interval at which the HelmRepository URL is checked for updates. + // This interval is approximate and may be subject to jitter to ensure + // efficient use of resources. // +kubebuilder:validation:Type=string // +kubebuilder:validation:Pattern="^([0-9]+(\\.[0-9]+)?(ms|s|m|h))+$" // +required diff --git a/api/v1beta2/ocirepository_types.go b/api/v1beta2/ocirepository_types.go index 426c9ca6..9019da51 100644 --- a/api/v1beta2/ocirepository_types.go +++ b/api/v1beta2/ocirepository_types.go @@ -111,7 +111,9 @@ type OCIRepositorySpec struct { // +optional CertSecretRef *meta.LocalObjectReference `json:"certSecretRef,omitempty"` - // The interval at which to check for image updates. + // Interval at which the OCIRepository URL is checked for updates. + // This interval is approximate and may be subject to jitter to ensure + // efficient use of resources. // +kubebuilder:validation:Type=string // +kubebuilder:validation:Pattern="^([0-9]+(\\.[0-9]+)?(ms|s|m|h))+$" // +required diff --git a/config/crd/bases/source.toolkit.fluxcd.io_buckets.yaml b/config/crd/bases/source.toolkit.fluxcd.io_buckets.yaml index c7fa20c1..57e644a8 100644 --- a/config/crd/bases/source.toolkit.fluxcd.io_buckets.yaml +++ b/config/crd/bases/source.toolkit.fluxcd.io_buckets.yaml @@ -326,7 +326,9 @@ spec: description: Insecure allows connecting to a non-TLS HTTP Endpoint. type: boolean interval: - description: Interval at which to check the Endpoint for updates. + description: Interval at which the Bucket Endpoint is checked for + updates. This interval is approximate and may be subject to jitter + to ensure efficient use of resources. pattern: ^([0-9]+(\.[0-9]+)?(ms|s|m|h))+$ type: string provider: diff --git a/config/crd/bases/source.toolkit.fluxcd.io_gitrepositories.yaml b/config/crd/bases/source.toolkit.fluxcd.io_gitrepositories.yaml index ba19ecd0..22378799 100644 --- a/config/crd/bases/source.toolkit.fluxcd.io_gitrepositories.yaml +++ b/config/crd/bases/source.toolkit.fluxcd.io_gitrepositories.yaml @@ -87,7 +87,9 @@ spec: type: object type: array interval: - description: Interval at which to check the GitRepository for updates. + description: Interval at which the GitRepository URL is checked for + updates. This interval is approximate and may be subject to jitter + to ensure efficient use of resources. pattern: ^([0-9]+(\.[0-9]+)?(ms|s|m|h))+$ type: string proxySecretRef: diff --git a/config/crd/bases/source.toolkit.fluxcd.io_helmcharts.yaml b/config/crd/bases/source.toolkit.fluxcd.io_helmcharts.yaml index 6018c737..9448f29f 100644 --- a/config/crd/bases/source.toolkit.fluxcd.io_helmcharts.yaml +++ b/config/crd/bases/source.toolkit.fluxcd.io_helmcharts.yaml @@ -346,8 +346,9 @@ spec: at in the SourceRef. type: string interval: - description: Interval is the interval at which to check the Source - for updates. + description: Interval at which the HelmChart SourceRef is checked + for updates. This interval is approximate and may be subject to + jitter to ensure efficient use of resources. pattern: ^([0-9]+(\.[0-9]+)?(ms|s|m|h))+$ type: string reconcileStrategy: diff --git a/config/crd/bases/source.toolkit.fluxcd.io_helmrepositories.yaml b/config/crd/bases/source.toolkit.fluxcd.io_helmrepositories.yaml index 8af5734b..c9a6b3fc 100644 --- a/config/crd/bases/source.toolkit.fluxcd.io_helmrepositories.yaml +++ b/config/crd/bases/source.toolkit.fluxcd.io_helmrepositories.yaml @@ -309,7 +309,9 @@ spec: - name type: object interval: - description: Interval at which to check the URL for updates. + description: Interval at which the HelmRepository URL is checked for + updates. This interval is approximate and may be subject to jitter + to ensure efficient use of resources. pattern: ^([0-9]+(\.[0-9]+)?(ms|s|m|h))+$ type: string passCredentials: diff --git a/config/crd/bases/source.toolkit.fluxcd.io_ocirepositories.yaml b/config/crd/bases/source.toolkit.fluxcd.io_ocirepositories.yaml index 2fb3ec88..8fd16bf1 100644 --- a/config/crd/bases/source.toolkit.fluxcd.io_ocirepositories.yaml +++ b/config/crd/bases/source.toolkit.fluxcd.io_ocirepositories.yaml @@ -75,7 +75,9 @@ spec: registry. type: boolean interval: - description: The interval at which to check for image updates. + description: Interval at which the OCIRepository URL is checked for + updates. This interval is approximate and may be subject to jitter + to ensure efficient use of resources. pattern: ^([0-9]+(\.[0-9]+)?(ms|s|m|h))+$ type: string layerSelector: diff --git a/docs/api/v1/source.md b/docs/api/v1/source.md index 7e77455e..f4ccd92c 100644 --- a/docs/api/v1/source.md +++ b/docs/api/v1/source.md @@ -108,7 +108,9 @@ Kubernetes meta/v1.Duration -

Interval at which to check the GitRepository for updates.

+

Interval at which the GitRepository URL is checked for updates. +This interval is approximate and may be subject to jitter to ensure +efficient use of resources.

@@ -559,7 +561,9 @@ Kubernetes meta/v1.Duration -

Interval at which to check the GitRepository for updates.

+

Interval at which the GitRepository URL is checked for updates. +This interval is approximate and may be subject to jitter to ensure +efficient use of resources.

diff --git a/docs/api/v1beta2/source.md b/docs/api/v1beta2/source.md index 373e34e6..be0c454e 100644 --- a/docs/api/v1beta2/source.md +++ b/docs/api/v1beta2/source.md @@ -161,7 +161,9 @@ Kubernetes meta/v1.Duration -

Interval at which to check the Endpoint for updates.

+

Interval at which the Bucket Endpoint is checked for updates. +This interval is approximate and may be subject to jitter to ensure +efficient use of resources.

@@ -593,7 +595,9 @@ Kubernetes meta/v1.Duration -

Interval is the interval at which to check the Source for updates.

+

Interval at which the HelmChart SourceRef is checked for updates. +This interval is approximate and may be subject to jitter to ensure +efficient use of resources.

@@ -840,7 +844,9 @@ Kubernetes meta/v1.Duration -

Interval at which to check the URL for updates.

+

Interval at which the HelmRepository URL is checked for updates. +This interval is approximate and may be subject to jitter to ensure +efficient use of resources.

@@ -1126,7 +1132,9 @@ Kubernetes meta/v1.Duration -

The interval at which to check for image updates.

+

Interval at which the OCIRepository URL is checked for updates. +This interval is approximate and may be subject to jitter to ensure +efficient use of resources.

@@ -1424,7 +1432,9 @@ Kubernetes meta/v1.Duration -

Interval at which to check the Endpoint for updates.

+

Interval at which the Bucket Endpoint is checked for updates. +This interval is approximate and may be subject to jitter to ensure +efficient use of resources.

@@ -2214,7 +2224,9 @@ Kubernetes meta/v1.Duration -

Interval is the interval at which to check the Source for updates.

+

Interval at which the HelmChart SourceRef is checked for updates. +This interval is approximate and may be subject to jitter to ensure +efficient use of resources.

@@ -2524,7 +2536,9 @@ Kubernetes meta/v1.Duration -

Interval at which to check the URL for updates.

+

Interval at which the HelmRepository URL is checked for updates. +This interval is approximate and may be subject to jitter to ensure +efficient use of resources.

@@ -3013,7 +3027,9 @@ Kubernetes meta/v1.Duration -

The interval at which to check for image updates.

+

Interval at which the OCIRepository URL is checked for updates. +This interval is approximate and may be subject to jitter to ensure +efficient use of resources.