Skip to content

Commit e543544

Browse files
authored
Merge pull request #549 from fluxcd/api-widen-timeout-validation
api: allow configuration of `h` unit for timeouts
2 parents 0fc4d0f + ec2eee8 commit e543544

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

api/v2beta1/helmrelease_types.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ type Install struct {
333333
// Jobs for hooks) during the performance of a Helm install action. Defaults to
334334
// 'HelmReleaseSpec.Timeout'.
335335
// +kubebuilder:validation:Type=string
336-
// +kubebuilder:validation:Pattern="^([0-9]+(\\.[0-9]+)?(ms|s|m))+$"
336+
// +kubebuilder:validation:Pattern="^([0-9]+(\\.[0-9]+)?(ms|s|m|h))+$"
337337
// +optional
338338
Timeout *metav1.Duration `json:"timeout,omitempty"`
339339

@@ -511,7 +511,7 @@ type Upgrade struct {
511511
// Jobs for hooks) during the performance of a Helm upgrade action. Defaults to
512512
// 'HelmReleaseSpec.Timeout'.
513513
// +kubebuilder:validation:Type=string
514-
// +kubebuilder:validation:Pattern="^([0-9]+(\\.[0-9]+)?(ms|s|m))+$"
514+
// +kubebuilder:validation:Pattern="^([0-9]+(\\.[0-9]+)?(ms|s|m|h))+$"
515515
// +optional
516516
Timeout *metav1.Duration `json:"timeout,omitempty"`
517517

@@ -694,7 +694,7 @@ type Test struct {
694694
// Timeout is the time to wait for any individual Kubernetes operation during
695695
// the performance of a Helm test action. Defaults to 'HelmReleaseSpec.Timeout'.
696696
// +kubebuilder:validation:Type=string
697-
// +kubebuilder:validation:Pattern="^([0-9]+(\\.[0-9]+)?(ms|s|m))+$"
697+
// +kubebuilder:validation:Pattern="^([0-9]+(\\.[0-9]+)?(ms|s|m|h))+$"
698698
// +optional
699699
Timeout *metav1.Duration `json:"timeout,omitempty"`
700700

@@ -721,7 +721,7 @@ type Rollback struct {
721721
// Jobs for hooks) during the performance of a Helm rollback action. Defaults to
722722
// 'HelmReleaseSpec.Timeout'.
723723
// +kubebuilder:validation:Type=string
724-
// +kubebuilder:validation:Pattern="^([0-9]+(\\.[0-9]+)?(ms|s|m))+$"
724+
// +kubebuilder:validation:Pattern="^([0-9]+(\\.[0-9]+)?(ms|s|m|h))+$"
725725
// +optional
726726
Timeout *metav1.Duration `json:"timeout,omitempty"`
727727

@@ -769,7 +769,7 @@ type Uninstall struct {
769769
// Jobs for hooks) during the performance of a Helm uninstall action. Defaults
770770
// to 'HelmReleaseSpec.Timeout'.
771771
// +kubebuilder:validation:Type=string
772-
// +kubebuilder:validation:Pattern="^([0-9]+(\\.[0-9]+)?(ms|s|m))+$"
772+
// +kubebuilder:validation:Pattern="^([0-9]+(\\.[0-9]+)?(ms|s|m|h))+$"
773773
// +optional
774774
Timeout *metav1.Duration `json:"timeout,omitempty"`
775775

config/crd/bases/helm.toolkit.fluxcd.io_helmreleases.yaml

+5-5
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ spec:
230230
description: Timeout is the time to wait for any individual Kubernetes
231231
operation (like Jobs for hooks) during the performance of a
232232
Helm install action. Defaults to 'HelmReleaseSpec.Timeout'.
233-
pattern: ^([0-9]+(\.[0-9]+)?(ms|s|m))+$
233+
pattern: ^([0-9]+(\.[0-9]+)?(ms|s|m|h))+$
234234
type: string
235235
type: object
236236
interval:
@@ -507,7 +507,7 @@ spec:
507507
description: Timeout is the time to wait for any individual Kubernetes
508508
operation (like Jobs for hooks) during the performance of a
509509
Helm rollback action. Defaults to 'HelmReleaseSpec.Timeout'.
510-
pattern: ^([0-9]+(\.[0-9]+)?(ms|s|m))+$
510+
pattern: ^([0-9]+(\.[0-9]+)?(ms|s|m|h))+$
511511
type: string
512512
type: object
513513
serviceAccountName:
@@ -549,7 +549,7 @@ spec:
549549
description: Timeout is the time to wait for any individual Kubernetes
550550
operation during the performance of a Helm test action. Defaults
551551
to 'HelmReleaseSpec.Timeout'.
552-
pattern: ^([0-9]+(\.[0-9]+)?(ms|s|m))+$
552+
pattern: ^([0-9]+(\.[0-9]+)?(ms|s|m|h))+$
553553
type: string
554554
type: object
555555
timeout:
@@ -578,7 +578,7 @@ spec:
578578
description: Timeout is the time to wait for any individual Kubernetes
579579
operation (like Jobs for hooks) during the performance of a
580580
Helm uninstall action. Defaults to 'HelmReleaseSpec.Timeout'.
581-
pattern: ^([0-9]+(\.[0-9]+)?(ms|s|m))+$
581+
pattern: ^([0-9]+(\.[0-9]+)?(ms|s|m|h))+$
582582
type: string
583583
type: object
584584
upgrade:
@@ -665,7 +665,7 @@ spec:
665665
description: Timeout is the time to wait for any individual Kubernetes
666666
operation (like Jobs for hooks) during the performance of a
667667
Helm upgrade action. Defaults to 'HelmReleaseSpec.Timeout'.
668-
pattern: ^([0-9]+(\.[0-9]+)?(ms|s|m))+$
668+
pattern: ^([0-9]+(\.[0-9]+)?(ms|s|m|h))+$
669669
type: string
670670
type: object
671671
values:

0 commit comments

Comments
 (0)