Skip to content

Commit

Permalink
Add support for requestTimeout in Service Resolver spec (#2641)
Browse files Browse the repository at this point in the history
* Add support for requestTimeout in Service Resolver spec
* preserve serviceresolvers.yaml
Preserving yaml from main, only adding requesttimeout property.
* update generated.deepcopy.go
* Use latest controller-gen to generate CRDs
---------

Co-authored-by: Ashwin Venkatesh <ashwin.what@gmail.com>
  • Loading branch information
2 people authored and absolutelightning committed Aug 4, 2023
1 parent 2e50e33 commit be9b9fb
Show file tree
Hide file tree
Showing 47 changed files with 241 additions and 119 deletions.
5 changes: 2 additions & 3 deletions charts/consul/templates/crd-controlplanerequestlimits.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,15 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.10.0
creationTimestamp: null
controller-gen.kubebuilder.io/version: v0.12.0
name: controlplanerequestlimits.consul.hashicorp.com
spec:
labels:
app: {{ template "consul.name" . }}
chart: {{ template "consul.chart" . }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
component: crd
spec:
group: consul.hashicorp.com
names:
kind: ControlPlaneRequestLimit
Expand Down
5 changes: 2 additions & 3 deletions charts/consul/templates/crd-exportedservices.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,15 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.10.0
creationTimestamp: null
controller-gen.kubebuilder.io/version: v0.12.0
name: exportedservices.consul.hashicorp.com
spec:
labels:
app: {{ template "consul.name" . }}
chart: {{ template "consul.chart" . }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
component: crd
spec:
group: consul.hashicorp.com
names:
kind: ExportedServices
Expand Down
5 changes: 2 additions & 3 deletions charts/consul/templates/crd-gatewayclassconfigs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,15 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.10.0
creationTimestamp: null
controller-gen.kubebuilder.io/version: v0.12.0
name: gatewayclassconfigs.consul.hashicorp.com
spec:
labels:
app: {{ template "consul.name" . }}
chart: {{ template "consul.chart" . }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
component: crd
spec:
group: consul.hashicorp.com
names:
kind: GatewayClassConfig
Expand Down
3 changes: 2 additions & 1 deletion charts/consul/templates/crd-gatewayclasses.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0
{{- if and .Values.connectInject.enabled .Values.connectInject.apiGateway.manageExternalCRDs }}
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
Expand All @@ -6,7 +8,6 @@ metadata:
api-approved.kubernetes.io: https://github.com/kubernetes-sigs/gateway-api/pull/1538
gateway.networking.k8s.io/bundle-version: v0.6.2
gateway.networking.k8s.io/channel: experimental
creationTimestamp: null
labels:
app: {{ template "consul.name" . }}
chart: {{ template "consul.chart" . }}
Expand Down
3 changes: 2 additions & 1 deletion charts/consul/templates/crd-gateways.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0
{{- if and .Values.connectInject.enabled .Values.connectInject.apiGateway.manageExternalCRDs }}
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
Expand All @@ -6,7 +8,6 @@ metadata:
api-approved.kubernetes.io: https://github.com/kubernetes-sigs/gateway-api/pull/1538
gateway.networking.k8s.io/bundle-version: v0.6.2
gateway.networking.k8s.io/channel: experimental
creationTimestamp: null
labels:
app: {{ template "consul.name" . }}
chart: {{ template "consul.chart" . }}
Expand Down
3 changes: 2 additions & 1 deletion charts/consul/templates/crd-grpcroutes.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0
{{- if and .Values.connectInject.enabled .Values.connectInject.apiGateway.manageExternalCRDs }}
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
Expand All @@ -6,7 +8,6 @@ metadata:
api-approved.kubernetes.io: https://github.com/kubernetes-sigs/gateway-api/pull/1538
gateway.networking.k8s.io/bundle-version: v0.6.2
gateway.networking.k8s.io/channel: experimental
creationTimestamp: null
labels:
app: {{ template "consul.name" . }}
chart: {{ template "consul.chart" . }}
Expand Down
3 changes: 2 additions & 1 deletion charts/consul/templates/crd-httproutes.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0
{{- if and .Values.connectInject.enabled .Values.connectInject.apiGateway.manageExternalCRDs }}
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
Expand All @@ -6,7 +8,6 @@ metadata:
api-approved.kubernetes.io: https://github.com/kubernetes-sigs/gateway-api/pull/1538
gateway.networking.k8s.io/bundle-version: v0.6.2
gateway.networking.k8s.io/channel: experimental
creationTimestamp: null
labels:
app: {{ template "consul.name" . }}
chart: {{ template "consul.chart" . }}
Expand Down
5 changes: 2 additions & 3 deletions charts/consul/templates/crd-ingressgateways.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,15 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.10.0
creationTimestamp: null
controller-gen.kubebuilder.io/version: v0.12.0
name: ingressgateways.consul.hashicorp.com
spec:
labels:
app: {{ template "consul.name" . }}
chart: {{ template "consul.chart" . }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
component: crd
spec:
group: consul.hashicorp.com
names:
kind: IngressGateway
Expand Down
5 changes: 2 additions & 3 deletions charts/consul/templates/crd-jwtproviders.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,15 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.10.0
creationTimestamp: null
controller-gen.kubebuilder.io/version: v0.12.0
name: jwtproviders.consul.hashicorp.com
spec:
labels:
app: {{ template "consul.name" . }}
chart: {{ template "consul.chart" . }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
component: crd
spec:
group: consul.hashicorp.com
names:
kind: JWTProvider
Expand Down
5 changes: 2 additions & 3 deletions charts/consul/templates/crd-meshes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,15 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.10.0
creationTimestamp: null
controller-gen.kubebuilder.io/version: v0.12.0
name: meshes.consul.hashicorp.com
spec:
labels:
app: {{ template "consul.name" . }}
chart: {{ template "consul.chart" . }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
component: crd
spec:
group: consul.hashicorp.com
names:
kind: Mesh
Expand Down
5 changes: 2 additions & 3 deletions charts/consul/templates/crd-meshservices.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,15 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.10.0
creationTimestamp: null
controller-gen.kubebuilder.io/version: v0.12.0
name: meshservices.consul.hashicorp.com
spec:
labels:
app: {{ template "consul.name" . }}
chart: {{ template "consul.chart" . }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
component: crd
spec:
group: consul.hashicorp.com
names:
kind: MeshService
Expand Down
5 changes: 2 additions & 3 deletions charts/consul/templates/crd-peeringacceptors.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,15 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.10.0
creationTimestamp: null
controller-gen.kubebuilder.io/version: v0.12.0
name: peeringacceptors.consul.hashicorp.com
spec:
labels:
app: {{ template "consul.name" . }}
chart: {{ template "consul.chart" . }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
component: crd
spec:
group: consul.hashicorp.com
names:
kind: PeeringAcceptor
Expand Down
5 changes: 2 additions & 3 deletions charts/consul/templates/crd-peeringdialers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,15 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.10.0
creationTimestamp: null
controller-gen.kubebuilder.io/version: v0.12.0
name: peeringdialers.consul.hashicorp.com
spec:
labels:
app: {{ template "consul.name" . }}
chart: {{ template "consul.chart" . }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
component: crd
spec:
group: consul.hashicorp.com
names:
kind: PeeringDialer
Expand Down
5 changes: 2 additions & 3 deletions charts/consul/templates/crd-proxydefaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,15 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.10.0
creationTimestamp: null
controller-gen.kubebuilder.io/version: v0.12.0
name: proxydefaults.consul.hashicorp.com
spec:
labels:
app: {{ template "consul.name" . }}
chart: {{ template "consul.chart" . }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
component: crd
spec:
group: consul.hashicorp.com
names:
kind: ProxyDefaults
Expand Down
3 changes: 3 additions & 0 deletions charts/consul/templates/crd-referencegrants.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{{- if and .Values.connectInject.enabled .Values.connectInject.apiGateway.manageExternalCRDs }}
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0

apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
Expand Down
5 changes: 2 additions & 3 deletions charts/consul/templates/crd-samenessgroups.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,15 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.10.0
creationTimestamp: null
controller-gen.kubebuilder.io/version: v0.12.0
name: samenessgroups.consul.hashicorp.com
spec:
labels:
app: {{ template "consul.name" . }}
chart: {{ template "consul.chart" . }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
component: crd
spec:
group: consul.hashicorp.com
names:
kind: SamenessGroup
Expand Down
5 changes: 2 additions & 3 deletions charts/consul/templates/crd-servicedefaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,15 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.10.0
creationTimestamp: null
controller-gen.kubebuilder.io/version: v0.12.0
name: servicedefaults.consul.hashicorp.com
spec:
labels:
app: {{ template "consul.name" . }}
chart: {{ template "consul.chart" . }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
component: crd
spec:
group: consul.hashicorp.com
names:
kind: ServiceDefaults
Expand Down
5 changes: 2 additions & 3 deletions charts/consul/templates/crd-serviceintentions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,15 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.10.0
creationTimestamp: null
controller-gen.kubebuilder.io/version: v0.12.0
name: serviceintentions.consul.hashicorp.com
spec:
labels:
app: {{ template "consul.name" . }}
chart: {{ template "consul.chart" . }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
component: crd
spec:
group: consul.hashicorp.com
names:
kind: ServiceIntentions
Expand Down
18 changes: 11 additions & 7 deletions charts/consul/templates/crd-serviceresolvers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,15 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.10.0
creationTimestamp: null
controller-gen.kubebuilder.io/version: v0.12.0
name: serviceresolvers.consul.hashicorp.com
spec:
labels:
app: {{ template "consul.name" . }}
chart: {{ template "consul.chart" . }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
component: crd
spec:
group: consul.hashicorp.com
names:
kind: ServiceResolver
Expand Down Expand Up @@ -228,12 +227,13 @@ spec:
type: object
type: object
prioritizeByLocality:
description: PrioritizeByLocality contains the configuration for
locality aware routing.
description: PrioritizeByLocality controls whether the locality of
services within the local partition will be used to prioritize connectivity.
properties:
mode:
description: Mode specifies the behavior of PrioritizeByLocality
routing. Valid values are "", "none", and "failover".
description: 'Mode specifies the type of prioritization that will
be performed when selecting nodes in the local partition. Valid
values are: "" (default "none"), "none", and "failover".'
type: string
type: object
redirect:
Expand Down Expand Up @@ -275,6 +275,10 @@ spec:
If empty the default subset is used.
type: string
type: object
requestTimeout:
description: RequestTimeout is the timeout for receiving an HTTP response
from this service before the connection is terminated.
type: string
subsets:
additionalProperties:
properties:
Expand Down
5 changes: 2 additions & 3 deletions charts/consul/templates/crd-servicerouters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,15 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.10.0
creationTimestamp: null
controller-gen.kubebuilder.io/version: v0.12.0
name: servicerouters.consul.hashicorp.com
spec:
labels:
app: {{ template "consul.name" . }}
chart: {{ template "consul.chart" . }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
component: crd
spec:
group: consul.hashicorp.com
names:
kind: ServiceRouter
Expand Down
5 changes: 2 additions & 3 deletions charts/consul/templates/crd-servicesplitters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,15 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.10.0
creationTimestamp: null
controller-gen.kubebuilder.io/version: v0.12.0
name: servicesplitters.consul.hashicorp.com
spec:
labels:
app: {{ template "consul.name" . }}
chart: {{ template "consul.chart" . }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
component: crd
spec:
group: consul.hashicorp.com
names:
kind: ServiceSplitter
Expand Down
Loading

0 comments on commit be9b9fb

Please sign in to comment.