From ba230b0feaa676d930add40239058f81603ced75 Mon Sep 17 00:00:00 2001 From: John Howard Date: Mon, 15 Jul 2024 08:21:14 -0700 Subject: [PATCH] Make TTL allow duration=0s again (#3260) --- kubernetes/customresourcedefinitions.gen.yaml | 45 ------------------- networking/v1alpha3/destination_rule.pb.go | 1 + networking/v1alpha3/destination_rule.proto | 1 + 3 files changed, 2 insertions(+), 45 deletions(-) diff --git a/kubernetes/customresourcedefinitions.gen.yaml b/kubernetes/customresourcedefinitions.gen.yaml index c645ffe5bd3..5efc8b4a548 100644 --- a/kubernetes/customresourcedefinitions.gen.yaml +++ b/kubernetes/customresourcedefinitions.gen.yaml @@ -538,10 +538,6 @@ spec: ttl: description: Lifetime of the cookie. type: string - x-kubernetes-validations: - - message: must be a valid duration greater - than 1ms - rule: duration(self) >= duration('1ms') required: - name type: object @@ -885,10 +881,6 @@ spec: ttl: description: Lifetime of the cookie. type: string - x-kubernetes-validations: - - message: must be a valid duration greater - than 1ms - rule: duration(self) >= duration('1ms') required: - name type: object @@ -1389,9 +1381,6 @@ spec: ttl: description: Lifetime of the cookie. type: string - x-kubernetes-validations: - - message: must be a valid duration greater than 1ms - rule: duration(self) >= duration('1ms') required: - name type: object @@ -1729,10 +1718,6 @@ spec: ttl: description: Lifetime of the cookie. type: string - x-kubernetes-validations: - - message: must be a valid duration greater - than 1ms - rule: duration(self) >= duration('1ms') required: - name type: object @@ -2301,10 +2286,6 @@ spec: ttl: description: Lifetime of the cookie. type: string - x-kubernetes-validations: - - message: must be a valid duration greater - than 1ms - rule: duration(self) >= duration('1ms') required: - name type: object @@ -2648,10 +2629,6 @@ spec: ttl: description: Lifetime of the cookie. type: string - x-kubernetes-validations: - - message: must be a valid duration greater - than 1ms - rule: duration(self) >= duration('1ms') required: - name type: object @@ -3152,9 +3129,6 @@ spec: ttl: description: Lifetime of the cookie. type: string - x-kubernetes-validations: - - message: must be a valid duration greater than 1ms - rule: duration(self) >= duration('1ms') required: - name type: object @@ -3492,10 +3466,6 @@ spec: ttl: description: Lifetime of the cookie. type: string - x-kubernetes-validations: - - message: must be a valid duration greater - than 1ms - rule: duration(self) >= duration('1ms') required: - name type: object @@ -4064,10 +4034,6 @@ spec: ttl: description: Lifetime of the cookie. type: string - x-kubernetes-validations: - - message: must be a valid duration greater - than 1ms - rule: duration(self) >= duration('1ms') required: - name type: object @@ -4411,10 +4377,6 @@ spec: ttl: description: Lifetime of the cookie. type: string - x-kubernetes-validations: - - message: must be a valid duration greater - than 1ms - rule: duration(self) >= duration('1ms') required: - name type: object @@ -4915,9 +4877,6 @@ spec: ttl: description: Lifetime of the cookie. type: string - x-kubernetes-validations: - - message: must be a valid duration greater than 1ms - rule: duration(self) >= duration('1ms') required: - name type: object @@ -5255,10 +5214,6 @@ spec: ttl: description: Lifetime of the cookie. type: string - x-kubernetes-validations: - - message: must be a valid duration greater - than 1ms - rule: duration(self) >= duration('1ms') required: - name type: object diff --git a/networking/v1alpha3/destination_rule.pb.go b/networking/v1alpha3/destination_rule.pb.go index 4bd447f1fa6..81fe660b939 100644 --- a/networking/v1alpha3/destination_rule.pb.go +++ b/networking/v1alpha3/destination_rule.pb.go @@ -2149,6 +2149,7 @@ type LoadBalancerSettings_ConsistentHashLB_HTTPCookie struct { // Lifetime of the cookie. If specified, a cookie with the TTL will be // generated if the cookie is not present. If the TTL is present and zero, // the generated cookie will be a session cookie. + // +kubebuilder:duration-validation:none Ttl *duration.Duration `protobuf:"bytes,3,opt,name=ttl,proto3" json:"ttl,omitempty"` } diff --git a/networking/v1alpha3/destination_rule.proto b/networking/v1alpha3/destination_rule.proto index dadc379395b..6614af10d1e 100644 --- a/networking/v1alpha3/destination_rule.proto +++ b/networking/v1alpha3/destination_rule.proto @@ -456,6 +456,7 @@ message LoadBalancerSettings { // Lifetime of the cookie. If specified, a cookie with the TTL will be // generated if the cookie is not present. If the TTL is present and zero, // the generated cookie will be a session cookie. + // +kubebuilder:duration-validation:none google.protobuf.Duration ttl = 3; };