From 583b8480aefaf9f069ca8316a317f9bb9eb12460 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Ho=C3=9F?= Date: Sun, 4 Feb 2024 11:59:25 +0100 Subject: [PATCH] add aws/aws-app-mesh-controller-for-k8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Sebastian Hoß --- .reuse/dep5 | 4 + code-generator/src/catalog.rs | 13 + .../v1beta2/backendgroups.yaml | 77 ++ .../v1beta2/gatewayroutes.yaml | 684 ++++++++++++ .../appmesh.k8s.aws/v1beta2/meshes.args | 0 .../appmesh.k8s.aws/v1beta2/meshes.yaml | 145 +++ .../v1beta2/virtualgateways.args | 0 .../v1beta2/virtualgateways.yaml | 587 +++++++++++ .../appmesh.k8s.aws/v1beta2/virtualnodes.args | 0 .../appmesh.k8s.aws/v1beta2/virtualnodes.yaml | 940 +++++++++++++++++ .../v1beta2/virtualrouters.args | 0 .../v1beta2/virtualrouters.yaml | 988 ++++++++++++++++++ .../v1beta2/virtualservices.yaml | 148 +++ kube-custom-resources-rs/Cargo.toml | 1 + .../src/appmesh_k8s_aws/mod.rs | 1 + .../appmesh_k8s_aws/v1beta2/backendgroups.rs | 48 + .../appmesh_k8s_aws/v1beta2/gatewayroutes.rs | 714 +++++++++++++ .../src/appmesh_k8s_aws/v1beta2/meshes.rs | 117 +++ .../src/appmesh_k8s_aws/v1beta2/mod.rs | 7 + .../v1beta2/virtualgateways.rs | 562 ++++++++++ .../appmesh_k8s_aws/v1beta2/virtualnodes.rs | 977 +++++++++++++++++ .../appmesh_k8s_aws/v1beta2/virtualrouters.rs | 913 ++++++++++++++++ .../v1beta2/virtualservices.rs | 121 +++ kube-custom-resources-rs/src/lib.rs | 14 +- 24 files changed, 7060 insertions(+), 1 deletion(-) create mode 100644 crd-catalog/aws/aws-app-mesh-controller-for-k8/appmesh.k8s.aws/v1beta2/backendgroups.yaml create mode 100644 crd-catalog/aws/aws-app-mesh-controller-for-k8/appmesh.k8s.aws/v1beta2/gatewayroutes.yaml create mode 100644 crd-catalog/aws/aws-app-mesh-controller-for-k8/appmesh.k8s.aws/v1beta2/meshes.args create mode 100644 crd-catalog/aws/aws-app-mesh-controller-for-k8/appmesh.k8s.aws/v1beta2/meshes.yaml create mode 100644 crd-catalog/aws/aws-app-mesh-controller-for-k8/appmesh.k8s.aws/v1beta2/virtualgateways.args create mode 100644 crd-catalog/aws/aws-app-mesh-controller-for-k8/appmesh.k8s.aws/v1beta2/virtualgateways.yaml create mode 100644 crd-catalog/aws/aws-app-mesh-controller-for-k8/appmesh.k8s.aws/v1beta2/virtualnodes.args create mode 100644 crd-catalog/aws/aws-app-mesh-controller-for-k8/appmesh.k8s.aws/v1beta2/virtualnodes.yaml create mode 100644 crd-catalog/aws/aws-app-mesh-controller-for-k8/appmesh.k8s.aws/v1beta2/virtualrouters.args create mode 100644 crd-catalog/aws/aws-app-mesh-controller-for-k8/appmesh.k8s.aws/v1beta2/virtualrouters.yaml create mode 100644 crd-catalog/aws/aws-app-mesh-controller-for-k8/appmesh.k8s.aws/v1beta2/virtualservices.yaml create mode 100644 kube-custom-resources-rs/src/appmesh_k8s_aws/mod.rs create mode 100644 kube-custom-resources-rs/src/appmesh_k8s_aws/v1beta2/backendgroups.rs create mode 100644 kube-custom-resources-rs/src/appmesh_k8s_aws/v1beta2/gatewayroutes.rs create mode 100644 kube-custom-resources-rs/src/appmesh_k8s_aws/v1beta2/meshes.rs create mode 100644 kube-custom-resources-rs/src/appmesh_k8s_aws/v1beta2/mod.rs create mode 100644 kube-custom-resources-rs/src/appmesh_k8s_aws/v1beta2/virtualgateways.rs create mode 100644 kube-custom-resources-rs/src/appmesh_k8s_aws/v1beta2/virtualnodes.rs create mode 100644 kube-custom-resources-rs/src/appmesh_k8s_aws/v1beta2/virtualrouters.rs create mode 100644 kube-custom-resources-rs/src/appmesh_k8s_aws/v1beta2/virtualservices.rs diff --git a/.reuse/dep5 b/.reuse/dep5 index 5977fc045..17769a6ad 100644 --- a/.reuse/dep5 +++ b/.reuse/dep5 @@ -91,6 +91,10 @@ Files: crd-catalog/aws/aws-application-networking-k8s/* Copyright: The aws/aws-application-networking-k8s Authors License: Apache-2.0 +Files: crd-catalog/aws/aws-app-mesh-controller-for-k8/* +Copyright: The aws/aws-app-mesh-controller-for-k8 Authors +License: Apache-2.0 + Files: crd-catalog/aws-controllers-k8s/apigatewayv2-controller/* Copyright: The aws-controllers-k8s/apigatewayv2-controller Authors License: Apache-2.0 diff --git a/code-generator/src/catalog.rs b/code-generator/src/catalog.rs index 44b707462..7c3063be2 100644 --- a/code-generator/src/catalog.rs +++ b/code-generator/src/catalog.rs @@ -228,6 +228,19 @@ pub const CRD_V1_SOURCES: &'static [UpstreamSource] = &[ "https://github.com/aws/aws-application-networking-k8s/blob/main/config/crds/bases/application-networking.k8s.aws_vpcassociationpolicies.yaml", ], }, + UpstreamSource { + project_name: "aws/aws-app-mesh-controller-for-k8", + license: APACHE_V2, + urls: &[ + "https://github.com/aws/aws-app-mesh-controller-for-k8s/blob/master/config/crd/bases/appmesh.k8s.aws_backendgroups.yaml", + "https://github.com/aws/aws-app-mesh-controller-for-k8s/blob/master/config/crd/bases/appmesh.k8s.aws_gatewayroutes.yaml", + "https://github.com/aws/aws-app-mesh-controller-for-k8s/blob/master/config/crd/bases/appmesh.k8s.aws_meshes.yaml", + "https://github.com/aws/aws-app-mesh-controller-for-k8s/blob/master/config/crd/bases/appmesh.k8s.aws_virtualgateways.yaml", + "https://github.com/aws/aws-app-mesh-controller-for-k8s/blob/master/config/crd/bases/appmesh.k8s.aws_virtualnodes.yaml", + "https://github.com/aws/aws-app-mesh-controller-for-k8s/blob/master/config/crd/bases/appmesh.k8s.aws_virtualrouters.yaml", + "https://github.com/aws/aws-app-mesh-controller-for-k8s/blob/master/config/crd/bases/appmesh.k8s.aws_virtualservices.yaml", + ], + }, UpstreamSource { project_name: "aws-controllers-k8s/apigatewayv2-controller", license: APACHE_V2, diff --git a/crd-catalog/aws/aws-app-mesh-controller-for-k8/appmesh.k8s.aws/v1beta2/backendgroups.yaml b/crd-catalog/aws/aws-app-mesh-controller-for-k8/appmesh.k8s.aws/v1beta2/backendgroups.yaml new file mode 100644 index 000000000..271e412b6 --- /dev/null +++ b/crd-catalog/aws/aws-app-mesh-controller-for-k8/appmesh.k8s.aws/v1beta2/backendgroups.yaml @@ -0,0 +1,77 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.4.1 + name: backendgroups.appmesh.k8s.aws +spec: + group: appmesh.k8s.aws + names: + categories: + - all + kind: BackendGroup + listKind: BackendGroupList + plural: backendgroups + singular: backendgroup + scope: Namespaced + versions: + - name: v1beta2 + schema: + openAPIV3Schema: + description: BackendGroup is the Schema for the backendgroups API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: BackendGroupSpec defines the desired state of BackendGroup + properties: + meshRef: + description: "A reference to k8s Mesh CR that this BackendGroup belongs to. The admission controller populates it using Meshes's selector, and prevents users from setting this field. \n Populated by the system. Read-only." + properties: + name: + description: Name is the name of Mesh CR + type: string + uid: + description: UID is the UID of Mesh CR + type: string + required: + - name + - uid + type: object + virtualservices: + description: VirtualServices defines the set of virtual services in this BackendGroup. + items: + description: VirtualServiceReference holds a reference to VirtualService.appmesh.k8s.aws + properties: + name: + description: Name is the name of VirtualService CR + type: string + namespace: + description: Namespace is the namespace of VirtualService CR. If unspecified, defaults to the referencing object's namespace + type: string + required: + - name + type: object + type: array + type: object + status: + description: BackendGroupStatus defines the observed state of BackendGroup + type: object + type: object + x-kubernetes-preserve-unknown-fields: true + served: true + storage: true + subresources: + status: {} +status: + acceptedNames: + kind: '' + plural: '' + conditions: [] + storedVersions: [] diff --git a/crd-catalog/aws/aws-app-mesh-controller-for-k8/appmesh.k8s.aws/v1beta2/gatewayroutes.yaml b/crd-catalog/aws/aws-app-mesh-controller-for-k8/appmesh.k8s.aws/v1beta2/gatewayroutes.yaml new file mode 100644 index 000000000..58f494901 --- /dev/null +++ b/crd-catalog/aws/aws-app-mesh-controller-for-k8/appmesh.k8s.aws/v1beta2/gatewayroutes.yaml @@ -0,0 +1,684 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.4.1 + name: gatewayroutes.appmesh.k8s.aws +spec: + group: appmesh.k8s.aws + names: + categories: + - all + kind: GatewayRoute + listKind: GatewayRouteList + plural: gatewayroutes + singular: gatewayroute + scope: Namespaced + versions: + - additionalPrinterColumns: + - description: The AppMesh GatewayRoute object's Amazon Resource Name + jsonPath: .status.gatewayRouteARN + name: ARN + type: string + - jsonPath: .metadata.creationTimestamp + name: AGE + type: date + name: v1beta2 + schema: + openAPIV3Schema: + description: GatewayRoute is the Schema for the gatewayroutes API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: GatewayRouteSpec defines the desired state of GatewayRoute refers to https://docs.aws.amazon.com/app-mesh/latest/userguide/virtual_gateways.html + properties: + awsName: + description: AWSName is the AppMesh GatewayRoute object's name. If unspecified or empty, it defaults to be "${name}_${namespace}" of k8s GatewayRoute + type: string + grpcRoute: + description: An object that represents the specification of a gRPC gatewayRoute. + properties: + action: + description: An object that represents the action to take if a match is determined. + properties: + rewrite: + description: GrpcGatewayRouteRewrite refers to https://docs.aws.amazon.com/app-mesh/latest/APIReference/API_GrpcGatewayRouteRewrite.html + properties: + hostname: + description: GatewayRouteHostnameRewrite refers to https://docs.aws.amazon.com/app-mesh/latest/APIReference/API_GatewayRouteHostnameRewrite.html ENABLE or DISABLE default behavior for Hostname rewrite + properties: + defaultTargetHostname: + enum: + - ENABLED + - DISABLED + type: string + type: object + type: object + target: + description: An object that represents the target that traffic is routed to when a request matches the route. + properties: + port: + description: Specifies the port of the gateway route target + format: int64 + minimum: 0.0 + type: integer + virtualService: + description: The virtual service to associate with the gateway route target. + properties: + virtualServiceARN: + description: Amazon Resource Name to AppMesh VirtualService object to associate with the gateway route virtual service target. Exactly one of 'virtualServiceRef' or 'virtualServiceARN' must be specified. + type: string + virtualServiceRef: + description: Reference to Kubernetes VirtualService CR in cluster to associate with the gateway route virtual service target. Exactly one of 'virtualServiceRef' or 'virtualServiceARN' must be specified. + properties: + name: + description: Name is the name of VirtualService CR + type: string + namespace: + description: Namespace is the namespace of VirtualService CR. If unspecified, defaults to the referencing object's namespace + type: string + required: + - name + type: object + type: object + required: + - virtualService + type: object + required: + - target + type: object + match: + description: An object that represents the criteria for determining a request match. + properties: + hostname: + description: The client specified Hostname to match on. + properties: + exact: + description: The value sent by the client must match the specified value exactly. + maxLength: 253 + minLength: 1 + type: string + suffix: + description: The value sent by the client must end with the specified characters. + maxLength: 253 + minLength: 1 + type: string + type: object + metadata: + description: An object that represents the data to match from the request. + items: + description: GRPCGatewayRouteMetadata refers to https://docs.aws.amazon.com/app-mesh/latest/APIReference/API_GrpcGatewayRouteMetadata.html + properties: + invert: + description: Specify True to match anything except the match criteria. The default value is False. + type: boolean + match: + description: An object that represents the data to match from the request. + properties: + exact: + description: The value sent by the client must match the specified value exactly. + maxLength: 255 + minLength: 1 + type: string + prefix: + description: The value sent by the client must begin with the specified characters. + maxLength: 255 + minLength: 1 + type: string + range: + description: An object that represents the range of values to match on + properties: + end: + description: The end of the range. + format: int64 + type: integer + start: + description: The start of the range. + format: int64 + type: integer + required: + - end + - start + type: object + regex: + description: The value sent by the client must include the specified characters. + maxLength: 255 + minLength: 1 + type: string + suffix: + description: The value sent by the client must end with the specified characters. + maxLength: 255 + minLength: 1 + type: string + type: object + name: + description: The name of the route. + maxLength: 50 + minLength: 1 + type: string + required: + - name + type: object + maxItems: 10 + minItems: 1 + type: array + port: + description: Specifies the port the request to be matched on + format: int64 + minimum: 0.0 + type: integer + serviceName: + description: Either ServiceName or Hostname must be specified. Both are allowed as well The fully qualified domain name for the service to match from the request. + type: string + type: object + required: + - action + - match + type: object + http2Route: + description: An object that represents the specification of an HTTP/2 gatewayRoute. + properties: + action: + description: An object that represents the action to take if a match is determined. + properties: + rewrite: + description: HTTPGatewayRouteRewrite refers to https://docs.aws.amazon.com/app-mesh/latest/APIReference/API_HttpGatewayRouteRewrite.html + properties: + hostname: + description: GatewayRouteHostnameRewrite refers to https://docs.aws.amazon.com/app-mesh/latest/APIReference/API_GatewayRouteHostnameRewrite.html ENABLE or DISABLE default behavior for Hostname rewrite + properties: + defaultTargetHostname: + enum: + - ENABLED + - DISABLED + type: string + type: object + path: + description: GatewayRoutePathRewrite refers to https://docs.aws.amazon.com/app-mesh/latest/APIReference/API_HttpGatewayRoutePathRewrite.html + properties: + exact: + maxLength: 255 + minLength: 1 + type: string + type: object + prefix: + description: GatewayRoutePrefixRewrite refers to https://docs.aws.amazon.com/app-mesh/latest/APIReference/API_HttpGatewayRoutePrefixRewrite.html + properties: + defaultPrefix: + enum: + - ENABLED + - DISABLED + type: string + value: + description: When DefaultPrefix is specified, Value cannot be set + maxLength: 255 + minLength: 1 + type: string + type: object + type: object + target: + description: An object that represents the target that traffic is routed to when a request matches the route. + properties: + port: + description: Specifies the port of the gateway route target + format: int64 + minimum: 0.0 + type: integer + virtualService: + description: The virtual service to associate with the gateway route target. + properties: + virtualServiceARN: + description: Amazon Resource Name to AppMesh VirtualService object to associate with the gateway route virtual service target. Exactly one of 'virtualServiceRef' or 'virtualServiceARN' must be specified. + type: string + virtualServiceRef: + description: Reference to Kubernetes VirtualService CR in cluster to associate with the gateway route virtual service target. Exactly one of 'virtualServiceRef' or 'virtualServiceARN' must be specified. + properties: + name: + description: Name is the name of VirtualService CR + type: string + namespace: + description: Namespace is the namespace of VirtualService CR. If unspecified, defaults to the referencing object's namespace + type: string + required: + - name + type: object + type: object + required: + - virtualService + type: object + required: + - target + type: object + match: + description: An object that represents the criteria for determining a request match. + properties: + headers: + description: An object that represents the client request headers to match on. + items: + description: HTTPGatewayRouteHeader refers to https://docs.aws.amazon.com/app-mesh/latest/APIReference/API_HttpGatewayRouteHeader.html + properties: + invert: + description: Specify True to match anything except the match criteria. The default value is False. + type: boolean + match: + description: The HeaderMatchMethod object. + properties: + exact: + description: The value sent by the client must match the specified value exactly. + maxLength: 255 + minLength: 1 + type: string + prefix: + description: The value sent by the client must begin with the specified characters. + maxLength: 255 + minLength: 1 + type: string + range: + description: An object that represents the range of values to match on. + properties: + end: + description: The end of the range. + format: int64 + type: integer + start: + description: The start of the range. + format: int64 + type: integer + required: + - end + - start + type: object + regex: + description: The value sent by the client must include the specified characters. + maxLength: 255 + minLength: 1 + type: string + suffix: + description: The value sent by the client must end with the specified characters. + maxLength: 255 + minLength: 1 + type: string + type: object + name: + description: A name for the HTTP header in the client request that will be matched on. + maxLength: 50 + minLength: 1 + type: string + required: + - name + type: object + maxItems: 10 + minItems: 1 + type: array + hostname: + description: The client specified Hostname to match on. + properties: + exact: + description: The value sent by the client must match the specified value exactly. + maxLength: 253 + minLength: 1 + type: string + suffix: + description: The value sent by the client must end with the specified characters. + maxLength: 253 + minLength: 1 + type: string + type: object + method: + description: The client request method to match on. + enum: + - CONNECT + - DELETE + - GET + - HEAD + - OPTIONS + - PATCH + - POST + - PUT + - TRACE + type: string + path: + description: Specified path of the request to be matched on + properties: + exact: + description: The value sent by the client must match the specified value exactly. + maxLength: 255 + minLength: 1 + type: string + regex: + description: The value sent by the client must end with the specified characters. + maxLength: 255 + minLength: 1 + type: string + type: object + port: + description: Specifies the port the request to be matched on + format: int64 + minimum: 0.0 + type: integer + prefix: + description: Either Prefix or Hostname must be specified. Both are allowed as well. Specifies the prefix to match requests with + type: string + queryParameters: + description: Client specified query parameters to match on + items: + description: HTTPQueryParameters refers to https://docs.aws.amazon.com/app-mesh/latest/APIReference/API_HttpQueryParameter.html + properties: + match: + description: The QueryMatchMethod object. + properties: + exact: + type: string + type: object + name: + type: string + required: + - name + type: object + maxItems: 10 + minItems: 1 + type: array + type: object + required: + - action + - match + type: object + httpRoute: + description: An object that represents the specification of an HTTP gatewayRoute. + properties: + action: + description: An object that represents the action to take if a match is determined. + properties: + rewrite: + description: HTTPGatewayRouteRewrite refers to https://docs.aws.amazon.com/app-mesh/latest/APIReference/API_HttpGatewayRouteRewrite.html + properties: + hostname: + description: GatewayRouteHostnameRewrite refers to https://docs.aws.amazon.com/app-mesh/latest/APIReference/API_GatewayRouteHostnameRewrite.html ENABLE or DISABLE default behavior for Hostname rewrite + properties: + defaultTargetHostname: + enum: + - ENABLED + - DISABLED + type: string + type: object + path: + description: GatewayRoutePathRewrite refers to https://docs.aws.amazon.com/app-mesh/latest/APIReference/API_HttpGatewayRoutePathRewrite.html + properties: + exact: + maxLength: 255 + minLength: 1 + type: string + type: object + prefix: + description: GatewayRoutePrefixRewrite refers to https://docs.aws.amazon.com/app-mesh/latest/APIReference/API_HttpGatewayRoutePrefixRewrite.html + properties: + defaultPrefix: + enum: + - ENABLED + - DISABLED + type: string + value: + description: When DefaultPrefix is specified, Value cannot be set + maxLength: 255 + minLength: 1 + type: string + type: object + type: object + target: + description: An object that represents the target that traffic is routed to when a request matches the route. + properties: + port: + description: Specifies the port of the gateway route target + format: int64 + minimum: 0.0 + type: integer + virtualService: + description: The virtual service to associate with the gateway route target. + properties: + virtualServiceARN: + description: Amazon Resource Name to AppMesh VirtualService object to associate with the gateway route virtual service target. Exactly one of 'virtualServiceRef' or 'virtualServiceARN' must be specified. + type: string + virtualServiceRef: + description: Reference to Kubernetes VirtualService CR in cluster to associate with the gateway route virtual service target. Exactly one of 'virtualServiceRef' or 'virtualServiceARN' must be specified. + properties: + name: + description: Name is the name of VirtualService CR + type: string + namespace: + description: Namespace is the namespace of VirtualService CR. If unspecified, defaults to the referencing object's namespace + type: string + required: + - name + type: object + type: object + required: + - virtualService + type: object + required: + - target + type: object + match: + description: An object that represents the criteria for determining a request match. + properties: + headers: + description: An object that represents the client request headers to match on. + items: + description: HTTPGatewayRouteHeader refers to https://docs.aws.amazon.com/app-mesh/latest/APIReference/API_HttpGatewayRouteHeader.html + properties: + invert: + description: Specify True to match anything except the match criteria. The default value is False. + type: boolean + match: + description: The HeaderMatchMethod object. + properties: + exact: + description: The value sent by the client must match the specified value exactly. + maxLength: 255 + minLength: 1 + type: string + prefix: + description: The value sent by the client must begin with the specified characters. + maxLength: 255 + minLength: 1 + type: string + range: + description: An object that represents the range of values to match on. + properties: + end: + description: The end of the range. + format: int64 + type: integer + start: + description: The start of the range. + format: int64 + type: integer + required: + - end + - start + type: object + regex: + description: The value sent by the client must include the specified characters. + maxLength: 255 + minLength: 1 + type: string + suffix: + description: The value sent by the client must end with the specified characters. + maxLength: 255 + minLength: 1 + type: string + type: object + name: + description: A name for the HTTP header in the client request that will be matched on. + maxLength: 50 + minLength: 1 + type: string + required: + - name + type: object + maxItems: 10 + minItems: 1 + type: array + hostname: + description: The client specified Hostname to match on. + properties: + exact: + description: The value sent by the client must match the specified value exactly. + maxLength: 253 + minLength: 1 + type: string + suffix: + description: The value sent by the client must end with the specified characters. + maxLength: 253 + minLength: 1 + type: string + type: object + method: + description: The client request method to match on. + enum: + - CONNECT + - DELETE + - GET + - HEAD + - OPTIONS + - PATCH + - POST + - PUT + - TRACE + type: string + path: + description: Specified path of the request to be matched on + properties: + exact: + description: The value sent by the client must match the specified value exactly. + maxLength: 255 + minLength: 1 + type: string + regex: + description: The value sent by the client must end with the specified characters. + maxLength: 255 + minLength: 1 + type: string + type: object + port: + description: Specifies the port the request to be matched on + format: int64 + minimum: 0.0 + type: integer + prefix: + description: Either Prefix or Hostname must be specified. Both are allowed as well. Specifies the prefix to match requests with + type: string + queryParameters: + description: Client specified query parameters to match on + items: + description: HTTPQueryParameters refers to https://docs.aws.amazon.com/app-mesh/latest/APIReference/API_HttpQueryParameter.html + properties: + match: + description: The QueryMatchMethod object. + properties: + exact: + type: string + type: object + name: + type: string + required: + - name + type: object + maxItems: 10 + minItems: 1 + type: array + type: object + required: + - action + - match + type: object + meshRef: + description: "A reference to k8s Mesh CR that this GatewayRoute belongs to. The admission controller populates it using Meshes's selector, and prevents users from setting this field. \n Populated by the system. Read-only." + properties: + name: + description: Name is the name of Mesh CR + type: string + uid: + description: UID is the UID of Mesh CR + type: string + required: + - name + - uid + type: object + priority: + description: Priority for the gatewayroute. Default Priority is 1000 which is lowest priority + format: int64 + maximum: 1000.0 + minimum: 0.0 + type: integer + virtualGatewayRef: + description: "A reference to k8s VirtualGateway CR that this GatewayRoute belongs to. The admission controller populates it using VirtualGateway's selector, and prevents users from setting this field. \n Populated by the system. Read-only." + properties: + name: + description: Name is the name of VirtualGateway CR + type: string + namespace: + description: Namespace is the namespace of VirtualGateway CR. If unspecified, defaults to the referencing object's namespace + type: string + uid: + description: UID is the UID of VirtualGateway CR + type: string + required: + - name + - uid + type: object + type: object + status: + description: GatewayRouteStatus defines the observed state of GatewayRoute + properties: + conditions: + description: The current GatewayRoute status. + items: + properties: + lastTransitionTime: + description: Last time the condition transitioned from one status to another. + format: date-time + type: string + message: + description: A human readable message indicating details about the transition. + type: string + reason: + description: The reason for the condition's last transition. + type: string + status: + description: Status of the condition, one of True, False, Unknown. + type: string + type: + description: Type of GatewayRoute condition. + type: string + required: + - status + - type + type: object + type: array + gatewayRouteARN: + description: GatewayRouteARN is the AppMesh GatewayRoute object's Amazon Resource Name + type: string + observedGeneration: + description: The generation observed by the GatewayRoute controller. + format: int64 + type: integer + type: object + type: object + x-kubernetes-preserve-unknown-fields: true + served: true + storage: true + subresources: + status: {} +status: + acceptedNames: + kind: '' + plural: '' + conditions: [] + storedVersions: [] diff --git a/crd-catalog/aws/aws-app-mesh-controller-for-k8/appmesh.k8s.aws/v1beta2/meshes.args b/crd-catalog/aws/aws-app-mesh-controller-for-k8/appmesh.k8s.aws/v1beta2/meshes.args new file mode 100644 index 000000000..e69de29bb diff --git a/crd-catalog/aws/aws-app-mesh-controller-for-k8/appmesh.k8s.aws/v1beta2/meshes.yaml b/crd-catalog/aws/aws-app-mesh-controller-for-k8/appmesh.k8s.aws/v1beta2/meshes.yaml new file mode 100644 index 000000000..529ed48b6 --- /dev/null +++ b/crd-catalog/aws/aws-app-mesh-controller-for-k8/appmesh.k8s.aws/v1beta2/meshes.yaml @@ -0,0 +1,145 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.4.1 + name: meshes.appmesh.k8s.aws +spec: + group: appmesh.k8s.aws + names: + kind: Mesh + listKind: MeshList + plural: meshes + singular: mesh + scope: Cluster + versions: + - additionalPrinterColumns: + - description: The AppMesh Mesh object's Amazon Resource Name + jsonPath: .status.meshARN + name: ARN + type: string + - jsonPath: .metadata.creationTimestamp + name: AGE + type: date + name: v1beta2 + schema: + openAPIV3Schema: + description: Mesh is the Schema for the meshes API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: MeshSpec defines the desired state of Mesh refers to https://docs.aws.amazon.com/app-mesh/latest/APIReference/API_MeshSpec.html + properties: + awsName: + description: AWSName is the AppMesh Mesh object's name. If unspecified or empty, it defaults to be "${name}" of k8s Mesh + type: string + egressFilter: + description: The egress filter rules for the service mesh. If unspecified, default settings from AWS API will be applied. Refer to AWS Docs for default settings. + properties: + type: + description: The egress filter type. + enum: + - ALLOW_ALL + - DROP_ALL + type: string + required: + - type + type: object + meshOwner: + description: The AWS IAM account ID of the service mesh owner. Required if the account ID is not your own. + type: string + meshServiceDiscovery: + properties: + ipPreference: + description: The ipPreference for the mesh. + enum: + - IPv6_ONLY + - IPv4_ONLY + type: string + type: object + namespaceSelector: + description: "NamespaceSelector selects Namespaces using labels to designate mesh membership. This field follows standard label selector semantics: \tif present but empty, it selects all namespaces. \tif absent, it selects no namespace." + properties: + matchExpressions: + description: matchExpressions is a list of label selector requirements. The requirements are ANDed. + items: + description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. + properties: + key: + description: key is the label key that the selector applies to. + type: string + operator: + description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + type: object + type: object + type: object + status: + description: MeshStatus defines the observed state of Mesh + properties: + conditions: + description: The current Mesh status. + items: + properties: + lastTransitionTime: + description: Last time the condition transitioned from one status to another. + format: date-time + type: string + message: + description: A human readable message indicating details about the transition. + type: string + reason: + description: The reason for the condition's last transition. + type: string + status: + description: Status of the condition, one of True, False, Unknown. + type: string + type: + description: Type of mesh condition. + type: string + required: + - status + - type + type: object + type: array + meshARN: + description: MeshARN is the AppMesh Mesh object's Amazon Resource Name + type: string + observedGeneration: + description: The generation observed by the Mesh controller. + format: int64 + type: integer + type: object + type: object + x-kubernetes-preserve-unknown-fields: true + served: true + storage: true + subresources: + status: {} +status: + acceptedNames: + kind: '' + plural: '' + conditions: [] + storedVersions: [] diff --git a/crd-catalog/aws/aws-app-mesh-controller-for-k8/appmesh.k8s.aws/v1beta2/virtualgateways.args b/crd-catalog/aws/aws-app-mesh-controller-for-k8/appmesh.k8s.aws/v1beta2/virtualgateways.args new file mode 100644 index 000000000..e69de29bb diff --git a/crd-catalog/aws/aws-app-mesh-controller-for-k8/appmesh.k8s.aws/v1beta2/virtualgateways.yaml b/crd-catalog/aws/aws-app-mesh-controller-for-k8/appmesh.k8s.aws/v1beta2/virtualgateways.yaml new file mode 100644 index 000000000..66f355d31 --- /dev/null +++ b/crd-catalog/aws/aws-app-mesh-controller-for-k8/appmesh.k8s.aws/v1beta2/virtualgateways.yaml @@ -0,0 +1,587 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.4.1 + name: virtualgateways.appmesh.k8s.aws +spec: + group: appmesh.k8s.aws + names: + categories: + - all + kind: VirtualGateway + listKind: VirtualGatewayList + plural: virtualgateways + singular: virtualgateway + scope: Namespaced + versions: + - additionalPrinterColumns: + - description: The AppMesh VirtualGateway object's Amazon Resource Name + jsonPath: .status.virtualGatewayARN + name: ARN + type: string + - jsonPath: .metadata.creationTimestamp + name: AGE + type: date + name: v1beta2 + schema: + openAPIV3Schema: + description: VirtualGateway is the Schema for the virtualgateways API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: VirtualGatewaySpec defines the desired state of VirtualGateway refers to https://docs.aws.amazon.com/app-mesh/latest/userguide/virtual_gateways.html + properties: + awsName: + description: AWSName is the AppMesh VirtualGateway object's name. If unspecified or empty, it defaults to be "${name}_${namespace}" of k8s VirtualGateway + type: string + backendDefaults: + description: A reference to an object that represents the defaults for backend GatewayRoutes. + properties: + clientPolicy: + description: A reference to an object that represents a client policy. + properties: + tls: + description: A reference to an object that represents a Transport Layer Security (TLS) client policy. + properties: + certificate: + description: A reference to an object that represents TLS certificate. + properties: + file: + description: An object that represents a TLS cert via a local file + properties: + certificateChain: + description: The certificate chain for the certificate. + maxLength: 255 + minLength: 1 + type: string + privateKey: + description: The private key for a certificate stored on the file system of the virtual Gateway. + maxLength: 255 + minLength: 1 + type: string + required: + - certificateChain + - privateKey + type: object + sds: + description: An object that represents a TLS cert via SDS entry + properties: + secretName: + description: The certificate trust chain for a certificate issued via SDS cluster + type: string + required: + - secretName + type: object + type: object + enforce: + description: Whether the policy is enforced. If unspecified, default settings from AWS API will be applied. Refer to AWS Docs for default settings. + type: boolean + ports: + description: The range of ports that the policy is enforced for. + items: + format: int64 + maximum: 65535.0 + minimum: 1.0 + type: integer + type: array + validation: + description: A reference to an object that represents a TLS validation context. + properties: + subjectAlternativeNames: + description: Possible alternative names to consider + properties: + match: + description: Match is a required field + properties: + exact: + description: Exact is a required field + items: + type: string + type: array + required: + - exact + type: object + required: + - match + type: object + trust: + description: A reference to an object that represents a TLS validation context trust + properties: + acm: + description: A reference to an object that represents a TLS validation context trust for an AWS Certicate Manager (ACM) certificate. + properties: + certificateAuthorityARNs: + description: One or more ACM Amazon Resource Name (ARN)s. + items: + type: string + maxItems: 3 + minItems: 1 + type: array + required: + - certificateAuthorityARNs + type: object + file: + description: An object that represents a TLS validation context trust for a local file. + properties: + certificateChain: + description: The certificate trust chain for a certificate stored on the file system of the virtual Gateway. + maxLength: 255 + minLength: 1 + type: string + required: + - certificateChain + type: object + sds: + description: An object that represents a TLS validation context trust for a SDS certificate + properties: + secretName: + description: The certificate trust chain for a certificate issued via SDS. + type: string + required: + - secretName + type: object + type: object + required: + - trust + type: object + required: + - validation + type: object + type: object + type: object + gatewayRouteSelector: + description: GatewayRouteSelector selects GatewayRoutes using labels to designate GatewayRoute membership. If not specified it selects all GatewayRoutes in that namespace. + properties: + matchExpressions: + description: matchExpressions is a list of label selector requirements. The requirements are ANDed. + items: + description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. + properties: + key: + description: key is the label key that the selector applies to. + type: string + operator: + description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + type: object + type: object + listeners: + description: The listener that the virtual gateway is expected to receive inbound traffic from + items: + description: VirtualGatewayListener refers to https://docs.aws.amazon.com/app-mesh/latest/userguide/virtual_gateways.html + properties: + connectionPool: + description: The connection pool settings for the listener + properties: + grpc: + description: Specifies grpc connection pool settings for the virtual gateway listener + properties: + maxRequests: + description: Represents the maximum number of inflight requests that an envoy can concurrently support across all the hosts in the upstream cluster + format: int64 + minimum: 1.0 + type: integer + required: + - maxRequests + type: object + http: + description: Specifies http connection pool settings for the virtual gateway listener + properties: + maxConnections: + description: Represents the maximum number of outbound TCP connections the envoy can establish concurrently with all the hosts in the upstream cluster. + format: int64 + minimum: 1.0 + type: integer + maxPendingRequests: + description: Represents the number of overflowing requests after max_connections that an envoy will queue to an upstream cluster. + format: int64 + minimum: 1.0 + type: integer + required: + - maxConnections + type: object + http2: + description: Specifies http2 connection pool settings for the virtual gateway listener + properties: + maxRequests: + description: Represents the maximum number of inflight requests that an envoy can concurrently support across all the hosts in the upstream cluster + format: int64 + minimum: 1.0 + type: integer + required: + - maxRequests + type: object + type: object + healthCheck: + description: The health check information for the listener. + properties: + healthyThreshold: + description: The number of consecutive successful health checks that must occur before declaring listener healthy. + format: int64 + maximum: 10.0 + minimum: 2.0 + type: integer + intervalMillis: + description: The time period in milliseconds between each health check execution. + format: int64 + maximum: 300000.0 + minimum: 5000.0 + type: integer + path: + description: The destination path for the health check request. This value is only used if the specified protocol is http or http2. For any other protocol, this value is ignored. + type: string + port: + description: The destination port for the health check request. + format: int64 + maximum: 65535.0 + minimum: 1.0 + type: integer + protocol: + description: The protocol for the health check request + enum: + - grpc + - http + - http2 + type: string + timeoutMillis: + description: The amount of time to wait when receiving a response from the health check, in milliseconds. + format: int64 + maximum: 60000.0 + minimum: 2000.0 + type: integer + unhealthyThreshold: + description: The number of consecutive failed health checks that must occur before declaring a virtual Gateway unhealthy. + format: int64 + maximum: 10.0 + minimum: 2.0 + type: integer + required: + - intervalMillis + - protocol + - timeoutMillis + - unhealthyThreshold + type: object + portMapping: + description: The port mapping information for the listener. + properties: + port: + description: The port used for the port mapping. + format: int64 + maximum: 65535.0 + minimum: 1.0 + type: integer + protocol: + description: The protocol used for the port mapping. + enum: + - grpc + - http + - http2 + type: string + required: + - port + - protocol + type: object + tls: + description: A reference to an object that represents the Transport Layer Security (TLS) properties for a listener. + properties: + certificate: + description: A reference to an object that represents a listener's TLS certificate. + properties: + acm: + description: A reference to an object that represents an AWS Certificate Manager (ACM) certificate. + properties: + certificateARN: + description: The Amazon Resource Name (ARN) for the certificate. + type: string + required: + - certificateARN + type: object + file: + description: A reference to an object that represents a local file certificate. + properties: + certificateChain: + description: The certificate chain for the certificate. + maxLength: 255 + minLength: 1 + type: string + privateKey: + description: The private key for a certificate stored on the file system of the virtual Gateway. + maxLength: 255 + minLength: 1 + type: string + required: + - certificateChain + - privateKey + type: object + sds: + description: A reference to an object that represents an SDS issued certificate + properties: + secretName: + description: The certificate trust chain for a certificate issued via SDS cluster + type: string + required: + - secretName + type: object + type: object + mode: + description: ListenerTLS mode + enum: + - DISABLED + - PERMISSIVE + - STRICT + type: string + validation: + description: A reference to an object that represents Validation context + properties: + subjectAlternativeNames: + description: Possible alternate names to consider + properties: + match: + description: Match is a required field + properties: + exact: + description: Exact is a required field + items: + type: string + type: array + required: + - exact + type: object + required: + - match + type: object + trust: + properties: + acm: + description: A reference to an object that represents a TLS validation context trust for an AWS Certicate Manager (ACM) certificate. + properties: + certificateAuthorityARNs: + description: One or more ACM Amazon Resource Name (ARN)s. + items: + type: string + maxItems: 3 + minItems: 1 + type: array + required: + - certificateAuthorityARNs + type: object + file: + description: An object that represents a TLS validation context trust for a local file. + properties: + certificateChain: + description: The certificate trust chain for a certificate stored on the file system of the virtual Gateway. + maxLength: 255 + minLength: 1 + type: string + required: + - certificateChain + type: object + sds: + description: An object that represents a TLS validation context trust for an SDS system + properties: + secretName: + description: The certificate trust chain for a certificate issued via SDS. + type: string + required: + - secretName + type: object + type: object + required: + - trust + type: object + required: + - certificate + - mode + type: object + required: + - portMapping + type: object + minItems: 0 + type: array + logging: + description: The inbound and outbound access logging information for the virtual gateway. + properties: + accessLog: + description: The access log configuration for a virtual Gateway. + properties: + file: + description: The file object to send virtual gateway access logs to. + properties: + format: + description: Structured access log output format + properties: + json: + description: Output specified fields as a JSON object + items: + properties: + key: + description: The name of the field in the JSON object + minLength: 1 + type: string + value: + description: The format string + minLength: 1 + type: string + required: + - key + - value + type: object + type: array + text: + description: Custom format string + type: string + type: object + path: + description: The file path to write access logs to. + maxLength: 255 + minLength: 1 + type: string + required: + - path + type: object + type: object + type: object + meshRef: + description: "A reference to k8s Mesh CR that this VirtualGateway belongs to. The admission controller populates it using Meshes's selector, and prevents users from setting this field. \n Populated by the system. Read-only." + properties: + name: + description: Name is the name of Mesh CR + type: string + uid: + description: UID is the UID of Mesh CR + type: string + required: + - name + - uid + type: object + namespaceSelector: + description: NamespaceSelector selects Namespaces using labels to designate GatewayRoute membership. This field follows standard label selector semantics; if present but empty, it selects all namespaces. + properties: + matchExpressions: + description: matchExpressions is a list of label selector requirements. The requirements are ANDed. + items: + description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. + properties: + key: + description: key is the label key that the selector applies to. + type: string + operator: + description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + type: object + type: object + podSelector: + description: "PodSelector selects Pods using labels to designate VirtualGateway membership. This field follows standard label selector semantics: \tif present but empty, it selects all pods within namespace. \tif absent, it selects no pod." + properties: + matchExpressions: + description: matchExpressions is a list of label selector requirements. The requirements are ANDed. + items: + description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. + properties: + key: + description: key is the label key that the selector applies to. + type: string + operator: + description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + type: object + type: object + type: object + status: + description: VirtualGatewayStatus defines the observed state of VirtualGateway + properties: + conditions: + description: The current VirtualGateway status. + items: + properties: + lastTransitionTime: + description: Last time the condition transitioned from one status to another. + format: date-time + type: string + message: + description: A human readable message indicating details about the transition. + type: string + reason: + description: The reason for the condition's last transition. + type: string + status: + description: Status of the condition, one of True, False, Unknown. + type: string + type: + description: Type of VirtualGateway condition. + type: string + required: + - status + - type + type: object + type: array + observedGeneration: + description: The generation observed by the VirtualGateway controller. + format: int64 + type: integer + virtualGatewayARN: + description: VirtualGatewayARN is the AppMesh VirtualGateway object's Amazon Resource Name + type: string + type: object + type: object + x-kubernetes-preserve-unknown-fields: true + served: true + storage: true + subresources: + status: {} +status: + acceptedNames: + kind: '' + plural: '' + conditions: [] + storedVersions: [] diff --git a/crd-catalog/aws/aws-app-mesh-controller-for-k8/appmesh.k8s.aws/v1beta2/virtualnodes.args b/crd-catalog/aws/aws-app-mesh-controller-for-k8/appmesh.k8s.aws/v1beta2/virtualnodes.args new file mode 100644 index 000000000..e69de29bb diff --git a/crd-catalog/aws/aws-app-mesh-controller-for-k8/appmesh.k8s.aws/v1beta2/virtualnodes.yaml b/crd-catalog/aws/aws-app-mesh-controller-for-k8/appmesh.k8s.aws/v1beta2/virtualnodes.yaml new file mode 100644 index 000000000..760fc4bfd --- /dev/null +++ b/crd-catalog/aws/aws-app-mesh-controller-for-k8/appmesh.k8s.aws/v1beta2/virtualnodes.yaml @@ -0,0 +1,940 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.4.1 + name: virtualnodes.appmesh.k8s.aws +spec: + group: appmesh.k8s.aws + names: + categories: + - all + kind: VirtualNode + listKind: VirtualNodeList + plural: virtualnodes + singular: virtualnode + scope: Namespaced + versions: + - additionalPrinterColumns: + - description: The AppMesh VirtualNode object's Amazon Resource Name + jsonPath: .status.virtualNodeARN + name: ARN + type: string + - jsonPath: .metadata.creationTimestamp + name: AGE + type: date + name: v1beta2 + schema: + openAPIV3Schema: + description: VirtualNode is the Schema for the virtualnodes API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: VirtualNodeSpec defines the desired state of VirtualNode refers to https://docs.aws.amazon.com/app-mesh/latest/APIReference/API_VirtualNodeSpec.html + properties: + awsName: + description: AWSName is the AppMesh VirtualNode object's name. If unspecified or empty, it defaults to be "${name}_${namespace}" of k8s VirtualNode + type: string + backendDefaults: + description: A reference to an object that represents the defaults for backends. + properties: + clientPolicy: + description: A reference to an object that represents a client policy. + properties: + tls: + description: A reference to an object that represents a Transport Layer Security (TLS) client policy. + properties: + certificate: + description: A reference to an object that represents TLS certificate. + properties: + file: + description: An object that represents a TLS cert via a local file + properties: + certificateChain: + description: The certificate chain for the certificate. + maxLength: 255 + minLength: 1 + type: string + privateKey: + description: The private key for a certificate stored on the file system of the virtual node that the proxy is running on. + maxLength: 255 + minLength: 1 + type: string + required: + - certificateChain + - privateKey + type: object + sds: + description: An object that represents a TLS cert via SDS entry + properties: + secretName: + description: The certificate trust chain for a certificate issued via SDS cluster + type: string + required: + - secretName + type: object + type: object + enforce: + description: Whether the policy is enforced. If unspecified, default settings from AWS API will be applied. Refer to AWS Docs for default settings. + type: boolean + ports: + description: The range of ports that the policy is enforced for. + items: + format: int64 + maximum: 65535.0 + minimum: 1.0 + type: integer + type: array + validation: + description: A reference to an object that represents a TLS validation context. + properties: + subjectAlternativeNames: + description: Possible Alternative names to consider + properties: + match: + description: Match is a required field + properties: + exact: + description: Exact is a required field + items: + type: string + type: array + required: + - exact + type: object + required: + - match + type: object + trust: + description: A reference to an object that represents a TLS validation context trust + properties: + acm: + description: A reference to an object that represents a TLS validation context trust for an AWS Certicate Manager (ACM) certificate. + properties: + certificateAuthorityARNs: + description: One or more ACM Amazon Resource Name (ARN)s. + items: + type: string + maxItems: 3 + minItems: 1 + type: array + required: + - certificateAuthorityARNs + type: object + file: + description: An object that represents a TLS validation context trust for a local file. + properties: + certificateChain: + description: The certificate trust chain for a certificate stored on the file system of the virtual node that the proxy is running on. + maxLength: 255 + minLength: 1 + type: string + required: + - certificateChain + type: object + sds: + description: An object that represents a TLS validation context trust for a SDS. + properties: + secretName: + description: The certificate trust chain for a certificate obtained via SDS + type: string + required: + - secretName + type: object + type: object + required: + - trust + type: object + required: + - validation + type: object + type: object + type: object + backendGroups: + description: BackendGroups that define a set of backends the virtual node is expected to send outbound traffic to. + items: + description: BackendGroupReference holds a reference to BackendGroup.appmesh.k8s.aws + properties: + name: + description: Name is the name of BackendGroup CR + type: string + namespace: + description: Namespace is the namespace of BackendGroup CR. If unspecified, defaults to the referencing object's namespace + type: string + required: + - name + type: object + type: array + backends: + description: The backends that the virtual node is expected to send outbound traffic to. + items: + description: Backend refers to https://docs.aws.amazon.com/app-mesh/latest/APIReference/API_Backend.html + properties: + virtualService: + description: Specifies a virtual service to use as a backend for a virtual node. + properties: + clientPolicy: + description: A reference to an object that represents the client policy for a backend. + properties: + tls: + description: A reference to an object that represents a Transport Layer Security (TLS) client policy. + properties: + certificate: + description: A reference to an object that represents TLS certificate. + properties: + file: + description: An object that represents a TLS cert via a local file + properties: + certificateChain: + description: The certificate chain for the certificate. + maxLength: 255 + minLength: 1 + type: string + privateKey: + description: The private key for a certificate stored on the file system of the virtual node that the proxy is running on. + maxLength: 255 + minLength: 1 + type: string + required: + - certificateChain + - privateKey + type: object + sds: + description: An object that represents a TLS cert via SDS entry + properties: + secretName: + description: The certificate trust chain for a certificate issued via SDS cluster + type: string + required: + - secretName + type: object + type: object + enforce: + description: Whether the policy is enforced. If unspecified, default settings from AWS API will be applied. Refer to AWS Docs for default settings. + type: boolean + ports: + description: The range of ports that the policy is enforced for. + items: + format: int64 + maximum: 65535.0 + minimum: 1.0 + type: integer + type: array + validation: + description: A reference to an object that represents a TLS validation context. + properties: + subjectAlternativeNames: + description: Possible Alternative names to consider + properties: + match: + description: Match is a required field + properties: + exact: + description: Exact is a required field + items: + type: string + type: array + required: + - exact + type: object + required: + - match + type: object + trust: + description: A reference to an object that represents a TLS validation context trust + properties: + acm: + description: A reference to an object that represents a TLS validation context trust for an AWS Certicate Manager (ACM) certificate. + properties: + certificateAuthorityARNs: + description: One or more ACM Amazon Resource Name (ARN)s. + items: + type: string + maxItems: 3 + minItems: 1 + type: array + required: + - certificateAuthorityARNs + type: object + file: + description: An object that represents a TLS validation context trust for a local file. + properties: + certificateChain: + description: The certificate trust chain for a certificate stored on the file system of the virtual node that the proxy is running on. + maxLength: 255 + minLength: 1 + type: string + required: + - certificateChain + type: object + sds: + description: An object that represents a TLS validation context trust for a SDS. + properties: + secretName: + description: The certificate trust chain for a certificate obtained via SDS + type: string + required: + - secretName + type: object + type: object + required: + - trust + type: object + required: + - validation + type: object + type: object + virtualServiceARN: + description: Amazon Resource Name to AppMesh VirtualService object that is acting as a virtual node backend. Exactly one of 'virtualServiceRef' or 'virtualServiceARN' must be specified. + type: string + virtualServiceRef: + description: Reference to Kubernetes VirtualService CR in cluster that is acting as a virtual node backend. Exactly one of 'virtualServiceRef' or 'virtualServiceARN' must be specified. + properties: + name: + description: Name is the name of VirtualService CR + type: string + namespace: + description: Namespace is the namespace of VirtualService CR. If unspecified, defaults to the referencing object's namespace + type: string + required: + - name + type: object + type: object + required: + - virtualService + type: object + type: array + listeners: + description: The listener that the virtual node is expected to receive inbound traffic from + items: + description: Listener refers to https://docs.aws.amazon.com/app-mesh/latest/APIReference/API_Listener.html + properties: + connectionPool: + description: The connection pool settings for the listener + properties: + grpc: + description: Specifies grpc connection pool settings for the virtual node listener + properties: + maxRequests: + description: Represents the maximum number of inflight requests that an envoy can concurrently support across all the hosts in the upstream cluster + format: int64 + minimum: 1.0 + type: integer + required: + - maxRequests + type: object + http: + description: Specifies http connection pool settings for the virtual node listener + properties: + maxConnections: + description: Represents the maximum number of outbound TCP connections the envoy can establish concurrently with all the hosts in the upstream cluster. + format: int64 + minimum: 1.0 + type: integer + maxPendingRequests: + description: Represents the number of overflowing requests after max_connections that an envoy will queue to an upstream cluster. + format: int64 + minimum: 1.0 + type: integer + required: + - maxConnections + type: object + http2: + description: Specifies http2 connection pool settings for the virtual node listener + properties: + maxRequests: + description: Represents the maximum number of inflight requests that an envoy can concurrently support across all the hosts in the upstream cluster + format: int64 + minimum: 1.0 + type: integer + required: + - maxRequests + type: object + tcp: + description: Specifies tcp connection pool settings for the virtual node listener + properties: + maxConnections: + description: Represents the maximum number of outbound TCP connections the envoy can establish concurrently with all the hosts in the upstream cluster. + format: int64 + minimum: 1.0 + type: integer + required: + - maxConnections + type: object + type: object + healthCheck: + description: The health check information for the listener. + properties: + healthyThreshold: + description: The number of consecutive successful health checks that must occur before declaring listener healthy. + format: int64 + maximum: 10.0 + minimum: 2.0 + type: integer + intervalMillis: + description: The time period in milliseconds between each health check execution. + format: int64 + maximum: 300000.0 + minimum: 5000.0 + type: integer + path: + description: The destination path for the health check request. This value is only used if the specified protocol is http or http2. For any other protocol, this value is ignored. + type: string + port: + description: The destination port for the health check request. + format: int64 + maximum: 65535.0 + minimum: 1.0 + type: integer + protocol: + description: The protocol for the health check request + enum: + - grpc + - http + - http2 + - tcp + type: string + timeoutMillis: + description: The amount of time to wait when receiving a response from the health check, in milliseconds. + format: int64 + maximum: 60000.0 + minimum: 2000.0 + type: integer + unhealthyThreshold: + description: The number of consecutive failed health checks that must occur before declaring a virtual node unhealthy. + format: int64 + maximum: 10.0 + minimum: 2.0 + type: integer + required: + - healthyThreshold + - intervalMillis + - protocol + - timeoutMillis + - unhealthyThreshold + type: object + outlierDetection: + description: The outlier detection for the listener + properties: + baseEjectionDuration: + description: The base time that a host is ejected for. The real time is equal to the base time multiplied by the number of times the host has been ejected + properties: + unit: + description: A unit of time. + enum: + - s + - ms + type: string + value: + description: A number of time units. + format: int64 + minimum: 0.0 + type: integer + required: + - unit + - value + type: object + interval: + description: The time interval between ejection analysis sweeps. This can result in both new ejections as well as hosts being returned to service + properties: + unit: + description: A unit of time. + enum: + - s + - ms + type: string + value: + description: A number of time units. + format: int64 + minimum: 0.0 + type: integer + required: + - unit + - value + type: object + maxEjectionPercent: + description: The threshold for the max percentage of outlier hosts that can be ejected from the load balancing set. maxEjectionPercent=100 means outlier detection can potentially eject all of the hosts from the upstream service if they are all considered outliers, leaving the load balancing set with zero hosts + format: int64 + maximum: 100.0 + minimum: 0.0 + type: integer + maxServerErrors: + description: The threshold for the number of server errors returned by a given host during an outlier detection interval. If the server error count meets/exceeds this threshold the host is ejected. A server error is defined as any HTTP 5xx response (or the equivalent for gRPC and TCP connections) + format: int64 + minimum: 1.0 + type: integer + required: + - baseEjectionDuration + - interval + - maxEjectionPercent + - maxServerErrors + type: object + portMapping: + description: The port mapping information for the listener. + properties: + port: + description: The port used for the port mapping. + format: int64 + maximum: 65535.0 + minimum: 1.0 + type: integer + protocol: + description: The protocol used for the port mapping. + enum: + - grpc + - http + - http2 + - tcp + type: string + required: + - port + - protocol + type: object + timeout: + description: A reference to an object that represents + properties: + grpc: + description: Specifies grpc timeout information for the virtual node. + properties: + idle: + description: An object that represents idle timeout duration. + properties: + unit: + description: A unit of time. + enum: + - s + - ms + type: string + value: + description: A number of time units. + format: int64 + minimum: 0.0 + type: integer + required: + - unit + - value + type: object + perRequest: + description: An object that represents per request timeout duration. + properties: + unit: + description: A unit of time. + enum: + - s + - ms + type: string + value: + description: A number of time units. + format: int64 + minimum: 0.0 + type: integer + required: + - unit + - value + type: object + type: object + http: + description: Specifies http timeout information for the virtual node. + properties: + idle: + description: An object that represents idle timeout duration. + properties: + unit: + description: A unit of time. + enum: + - s + - ms + type: string + value: + description: A number of time units. + format: int64 + minimum: 0.0 + type: integer + required: + - unit + - value + type: object + perRequest: + description: An object that represents per request timeout duration. + properties: + unit: + description: A unit of time. + enum: + - s + - ms + type: string + value: + description: A number of time units. + format: int64 + minimum: 0.0 + type: integer + required: + - unit + - value + type: object + type: object + http2: + description: Specifies http2 information for the virtual node. + properties: + idle: + description: An object that represents idle timeout duration. + properties: + unit: + description: A unit of time. + enum: + - s + - ms + type: string + value: + description: A number of time units. + format: int64 + minimum: 0.0 + type: integer + required: + - unit + - value + type: object + perRequest: + description: An object that represents per request timeout duration. + properties: + unit: + description: A unit of time. + enum: + - s + - ms + type: string + value: + description: A number of time units. + format: int64 + minimum: 0.0 + type: integer + required: + - unit + - value + type: object + type: object + tcp: + description: Specifies tcp timeout information for the virtual node. + properties: + idle: + description: An object that represents idle timeout duration. + properties: + unit: + description: A unit of time. + enum: + - s + - ms + type: string + value: + description: A number of time units. + format: int64 + minimum: 0.0 + type: integer + required: + - unit + - value + type: object + type: object + type: object + tls: + description: A reference to an object that represents the Transport Layer Security (TLS) properties for a listener. + properties: + certificate: + description: A reference to an object that represents a listener's TLS certificate. + properties: + acm: + description: A reference to an object that represents an AWS Certificate Manager (ACM) certificate. + properties: + certificateARN: + description: The Amazon Resource Name (ARN) for the certificate. + type: string + required: + - certificateARN + type: object + file: + description: A reference to an object that represents a local file certificate. + properties: + certificateChain: + description: The certificate chain for the certificate. + maxLength: 255 + minLength: 1 + type: string + privateKey: + description: The private key for a certificate stored on the file system of the virtual node that the proxy is running on. + maxLength: 255 + minLength: 1 + type: string + required: + - certificateChain + - privateKey + type: object + sds: + description: A reference to an object that represents an SDS certificate. + properties: + secretName: + description: The certificate trust chain for a certificate issued via SDS cluster + type: string + required: + - secretName + type: object + type: object + mode: + description: ListenerTLS mode + enum: + - DISABLED + - PERMISSIVE + - STRICT + type: string + validation: + description: A reference to an object that represents an SDS Trust Domain + properties: + subjectAlternativeNames: + description: Possible alternative names to consider + properties: + match: + description: Match is a required field + properties: + exact: + description: Exact is a required field + items: + type: string + type: array + required: + - exact + type: object + required: + - match + type: object + trust: + properties: + file: + description: An object that represents a TLS validation context trust for a local file. + properties: + certificateChain: + description: The certificate trust chain for a certificate stored on the file system of the virtual node that the proxy is running on. + maxLength: 255 + minLength: 1 + type: string + required: + - certificateChain + type: object + sds: + description: An object that represents a TLS validation context trust for an SDS server + properties: + secretName: + description: The certificate trust chain for a certificate obtained via SDS + type: string + required: + - secretName + type: object + type: object + required: + - trust + type: object + required: + - certificate + - mode + type: object + required: + - portMapping + type: object + minItems: 0 + type: array + logging: + description: The inbound and outbound access logging information for the virtual node. + properties: + accessLog: + description: The access log configuration for a virtual node. + properties: + file: + description: The file object to send virtual node access logs to. + properties: + format: + description: Structured access log output format + properties: + json: + description: Output specified fields as a JSON object + items: + properties: + key: + description: The name of the field in the JSON object + minLength: 1 + type: string + value: + description: The format string + minLength: 1 + type: string + required: + - key + - value + type: object + type: array + text: + description: Custom format string + type: string + type: object + path: + description: The file path to write access logs to. + maxLength: 255 + minLength: 1 + type: string + required: + - path + type: object + type: object + type: object + meshRef: + description: "A reference to k8s Mesh CR that this VirtualNode belongs to. The admission controller populates it using Meshes's selector, and prevents users from setting this field. \n Populated by the system. Read-only." + properties: + name: + description: Name is the name of Mesh CR + type: string + uid: + description: UID is the UID of Mesh CR + type: string + required: + - name + - uid + type: object + podSelector: + description: "PodSelector selects Pods using labels to designate VirtualNode membership. This field follows standard label selector semantics: \tif present but empty, it selects all pods within namespace. \tif absent, it selects no pod." + properties: + matchExpressions: + description: matchExpressions is a list of label selector requirements. The requirements are ANDed. + items: + description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. + properties: + key: + description: key is the label key that the selector applies to. + type: string + operator: + description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + type: object + type: object + serviceDiscovery: + description: The service discovery information for the virtual node. Optional if there is no inbound traffic(no listeners). Mandatory if a listener is specified. + properties: + awsCloudMap: + description: Specifies any AWS Cloud Map information for the virtual node. + properties: + attributes: + description: A string map that contains attributes with values that you can use to filter instances by any custom attribute that you specified when you registered the instance + items: + description: AWSCloudMapInstanceAttribute refers to https://docs.aws.amazon.com/app-mesh/latest/APIReference/API_AwsCloudMapInstanceAttribute.html + properties: + key: + description: The name of an AWS Cloud Map service instance attribute key. + maxLength: 255 + minLength: 1 + type: string + value: + description: The value of an AWS Cloud Map service instance attribute key. + maxLength: 1024 + minLength: 1 + type: string + required: + - key + - value + type: object + type: array + namespaceName: + description: The name of the AWS Cloud Map namespace to use. + maxLength: 1024 + minLength: 1 + type: string + serviceName: + description: The name of the AWS Cloud Map service to use. + maxLength: 1024 + minLength: 1 + type: string + required: + - namespaceName + - serviceName + type: object + dns: + description: Specifies the DNS information for the virtual node. + properties: + hostname: + description: Specifies the DNS service discovery hostname for the virtual node. + type: string + responseType: + description: Choose between ENDPOINTS (strict DNS) and LOADBALANCER (logical DNS) mode in Envoy sidecar + enum: + - ENDPOINTS + - LOADBALANCER + type: string + required: + - hostname + type: object + type: object + type: object + status: + description: VirtualNodeStatus defines the observed state of VirtualNode + properties: + conditions: + description: The current VirtualNode status. + items: + properties: + lastTransitionTime: + description: Last time the condition transitioned from one status to another. + format: date-time + type: string + message: + description: A human readable message indicating details about the transition. + type: string + reason: + description: The reason for the condition's last transition. + type: string + status: + description: Status of the condition, one of True, False, Unknown. + type: string + type: + description: Type of VirtualNode condition. + type: string + required: + - status + - type + type: object + type: array + observedGeneration: + description: The generation observed by the VirtualNode controller. + format: int64 + type: integer + virtualNodeARN: + description: VirtualNodeARN is the AppMesh VirtualNode object's Amazon Resource Name + type: string + type: object + type: object + x-kubernetes-preserve-unknown-fields: true + served: true + storage: true + subresources: + status: {} +status: + acceptedNames: + kind: '' + plural: '' + conditions: [] + storedVersions: [] diff --git a/crd-catalog/aws/aws-app-mesh-controller-for-k8/appmesh.k8s.aws/v1beta2/virtualrouters.args b/crd-catalog/aws/aws-app-mesh-controller-for-k8/appmesh.k8s.aws/v1beta2/virtualrouters.args new file mode 100644 index 000000000..e69de29bb diff --git a/crd-catalog/aws/aws-app-mesh-controller-for-k8/appmesh.k8s.aws/v1beta2/virtualrouters.yaml b/crd-catalog/aws/aws-app-mesh-controller-for-k8/appmesh.k8s.aws/v1beta2/virtualrouters.yaml new file mode 100644 index 000000000..d7e6378c4 --- /dev/null +++ b/crd-catalog/aws/aws-app-mesh-controller-for-k8/appmesh.k8s.aws/v1beta2/virtualrouters.yaml @@ -0,0 +1,988 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.4.1 + name: virtualrouters.appmesh.k8s.aws +spec: + group: appmesh.k8s.aws + names: + categories: + - all + kind: VirtualRouter + listKind: VirtualRouterList + plural: virtualrouters + singular: virtualrouter + scope: Namespaced + versions: + - additionalPrinterColumns: + - description: The AppMesh VirtualRouter object's Amazon Resource Name + jsonPath: .status.virtualRouterARN + name: ARN + type: string + - jsonPath: .metadata.creationTimestamp + name: AGE + type: date + name: v1beta2 + schema: + openAPIV3Schema: + description: VirtualRouter is the Schema for the virtualrouters API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: VirtualRouterSpec defines the desired state of VirtualRouter refers to https://docs.aws.amazon.com/app-mesh/latest/APIReference/API_VirtualRouterSpec.html + properties: + awsName: + description: AWSName is the AppMesh VirtualRouter object's name. If unspecified or empty, it defaults to be "${name}_${namespace}" of k8s VirtualRouter + type: string + listeners: + description: The listeners that the virtual router is expected to receive inbound traffic from + items: + description: VirtualRouterListener refers to https://docs.aws.amazon.com/app-mesh/latest/APIReference/API_VirtualRouterListener.html + properties: + portMapping: + description: The port mapping information for the listener. + properties: + port: + description: The port used for the port mapping. + format: int64 + maximum: 65535.0 + minimum: 1.0 + type: integer + protocol: + description: The protocol used for the port mapping. + enum: + - grpc + - http + - http2 + - tcp + type: string + required: + - port + - protocol + type: object + required: + - portMapping + type: object + minItems: 1 + type: array + meshRef: + description: "A reference to k8s Mesh CR that this VirtualRouter belongs to. The admission controller populates it using Meshes's selector, and prevents users from setting this field. \n Populated by the system. Read-only." + properties: + name: + description: Name is the name of Mesh CR + type: string + uid: + description: UID is the UID of Mesh CR + type: string + required: + - name + - uid + type: object + routes: + description: The routes associated with VirtualRouter + items: + description: Route refers to https://docs.aws.amazon.com/app-mesh/latest/APIReference/API_RouteSpec.html + properties: + grpcRoute: + description: An object that represents the specification of a gRPC route. + properties: + action: + description: An object that represents the action to take if a match is determined. + properties: + weightedTargets: + description: An object that represents the targets that traffic is routed to when a request matches the route. + items: + description: WeightedTarget refers to https://docs.aws.amazon.com/app-mesh/latest/APIReference/API_WeightedTarget.html + properties: + port: + description: Specifies the targeted port of the weighted object + format: int64 + minimum: 0.0 + type: integer + virtualNodeARN: + description: Amazon Resource Name to AppMesh VirtualNode object to associate with the weighted target. Exactly one of 'virtualNodeRef' or 'virtualNodeARN' must be specified. + type: string + virtualNodeRef: + description: Reference to Kubernetes VirtualNode CR in cluster to associate with the weighted target. Exactly one of 'virtualNodeRef' or 'virtualNodeARN' must be specified. + properties: + name: + description: Name is the name of VirtualNode CR + type: string + namespace: + description: Namespace is the namespace of VirtualNode CR. If unspecified, defaults to the referencing object's namespace + type: string + required: + - name + type: object + weight: + description: The relative weight of the weighted target. + format: int64 + maximum: 100.0 + minimum: 0.0 + type: integer + required: + - weight + type: object + maxItems: 10 + minItems: 1 + type: array + required: + - weightedTargets + type: object + match: + description: An object that represents the criteria for determining a request match. + properties: + metadata: + description: An object that represents the data to match from the request. + items: + description: GRPCRouteMetadata refers to https://docs.aws.amazon.com/app-mesh/latest/APIReference/API_GrpcRouteMetadata.html + properties: + invert: + description: Specify True to match anything except the match criteria. The default value is False. + type: boolean + match: + description: An object that represents the data to match from the request. + properties: + exact: + description: The value sent by the client must match the specified value exactly. + maxLength: 255 + minLength: 1 + type: string + prefix: + description: The value sent by the client must begin with the specified characters. + maxLength: 255 + minLength: 1 + type: string + range: + description: An object that represents the range of values to match on + properties: + end: + description: The end of the range. + format: int64 + type: integer + start: + description: The start of the range. + format: int64 + type: integer + required: + - end + - start + type: object + regex: + description: The value sent by the client must include the specified characters. + maxLength: 255 + minLength: 1 + type: string + suffix: + description: The value sent by the client must end with the specified characters. + maxLength: 255 + minLength: 1 + type: string + type: object + name: + description: The name of the route. + maxLength: 50 + minLength: 1 + type: string + required: + - name + type: object + maxItems: 10 + minItems: 1 + type: array + methodName: + description: The method name to match from the request. If you specify a name, you must also specify a serviceName. + maxLength: 50 + minLength: 1 + type: string + port: + description: Specifies the port to match requests with + format: int64 + minimum: 0.0 + type: integer + serviceName: + description: The fully qualified domain name for the service to match from the request. + type: string + type: object + retryPolicy: + description: An object that represents a retry policy. + properties: + grpcRetryEvents: + items: + enum: + - cancelled + - deadline-exceeded + - internal + - resource-exhausted + - unavailable + type: string + maxItems: 5 + minItems: 1 + type: array + httpRetryEvents: + items: + enum: + - server-error + - gateway-error + - client-error + - stream-error + type: string + maxItems: 25 + minItems: 1 + type: array + maxRetries: + description: The maximum number of retry attempts. + format: int64 + minimum: 0.0 + type: integer + perRetryTimeout: + description: An object that represents a duration of time. + properties: + unit: + description: A unit of time. + enum: + - s + - ms + type: string + value: + description: A number of time units. + format: int64 + minimum: 0.0 + type: integer + required: + - unit + - value + type: object + tcpRetryEvents: + items: + enum: + - connection-error + type: string + maxItems: 1 + minItems: 1 + type: array + required: + - maxRetries + - perRetryTimeout + type: object + timeout: + description: An object that represents a grpc timeout. + properties: + idle: + description: An object that represents idle timeout duration. + properties: + unit: + description: A unit of time. + enum: + - s + - ms + type: string + value: + description: A number of time units. + format: int64 + minimum: 0.0 + type: integer + required: + - unit + - value + type: object + perRequest: + description: An object that represents per request timeout duration. + properties: + unit: + description: A unit of time. + enum: + - s + - ms + type: string + value: + description: A number of time units. + format: int64 + minimum: 0.0 + type: integer + required: + - unit + - value + type: object + type: object + required: + - action + - match + type: object + http2Route: + description: An object that represents the specification of an HTTP/2 route. + properties: + action: + description: An object that represents the action to take if a match is determined. + properties: + weightedTargets: + description: An object that represents the targets that traffic is routed to when a request matches the route. + items: + description: WeightedTarget refers to https://docs.aws.amazon.com/app-mesh/latest/APIReference/API_WeightedTarget.html + properties: + port: + description: Specifies the targeted port of the weighted object + format: int64 + minimum: 0.0 + type: integer + virtualNodeARN: + description: Amazon Resource Name to AppMesh VirtualNode object to associate with the weighted target. Exactly one of 'virtualNodeRef' or 'virtualNodeARN' must be specified. + type: string + virtualNodeRef: + description: Reference to Kubernetes VirtualNode CR in cluster to associate with the weighted target. Exactly one of 'virtualNodeRef' or 'virtualNodeARN' must be specified. + properties: + name: + description: Name is the name of VirtualNode CR + type: string + namespace: + description: Namespace is the namespace of VirtualNode CR. If unspecified, defaults to the referencing object's namespace + type: string + required: + - name + type: object + weight: + description: The relative weight of the weighted target. + format: int64 + maximum: 100.0 + minimum: 0.0 + type: integer + required: + - weight + type: object + maxItems: 10 + minItems: 1 + type: array + required: + - weightedTargets + type: object + match: + description: An object that represents the criteria for determining a request match. + properties: + headers: + description: An object that represents the client request headers to match on. + items: + description: HTTPRouteHeader refers to https://docs.aws.amazon.com/app-mesh/latest/APIReference/API_HttpRouteHeader.html + properties: + invert: + description: Specify True to match anything except the match criteria. The default value is False. + type: boolean + match: + description: The HeaderMatchMethod object. + properties: + exact: + description: The value sent by the client must match the specified value exactly. + maxLength: 255 + minLength: 1 + type: string + prefix: + description: The value sent by the client must begin with the specified characters. + maxLength: 255 + minLength: 1 + type: string + range: + description: An object that represents the range of values to match on. + properties: + end: + description: The end of the range. + format: int64 + type: integer + start: + description: The start of the range. + format: int64 + type: integer + required: + - end + - start + type: object + regex: + description: The value sent by the client must include the specified characters. + maxLength: 255 + minLength: 1 + type: string + suffix: + description: The value sent by the client must end with the specified characters. + maxLength: 255 + minLength: 1 + type: string + type: object + name: + description: A name for the HTTP header in the client request that will be matched on. + maxLength: 50 + minLength: 1 + type: string + required: + - name + type: object + maxItems: 10 + minItems: 1 + type: array + method: + description: The client request method to match on. + enum: + - CONNECT + - DELETE + - GET + - HEAD + - OPTIONS + - PATCH + - POST + - PUT + - TRACE + type: string + path: + description: The client specified Path to match on. + properties: + exact: + description: The value sent by the client must match the specified value exactly. + maxLength: 255 + minLength: 1 + type: string + regex: + description: The value sent by the client must end with the specified characters. + maxLength: 255 + minLength: 1 + type: string + type: object + port: + description: Specifies the port to match requests with + format: int64 + minimum: 0.0 + type: integer + prefix: + description: Specifies the prefix to match requests with + type: string + queryParameters: + description: The client specified queryParameters to match on + items: + description: HTTPQueryParameters refers to https://docs.aws.amazon.com/app-mesh/latest/APIReference/API_HttpQueryParameter.html + properties: + match: + description: The QueryMatchMethod object. + properties: + exact: + type: string + type: object + name: + type: string + required: + - name + type: object + maxItems: 10 + minItems: 1 + type: array + scheme: + description: The client request scheme to match on + enum: + - http + - https + type: string + type: object + retryPolicy: + description: An object that represents a retry policy. + properties: + httpRetryEvents: + items: + enum: + - server-error + - gateway-error + - client-error + - stream-error + type: string + maxItems: 25 + minItems: 1 + type: array + maxRetries: + description: The maximum number of retry attempts. + format: int64 + minimum: 0.0 + type: integer + perRetryTimeout: + description: An object that represents a duration of time + properties: + unit: + description: A unit of time. + enum: + - s + - ms + type: string + value: + description: A number of time units. + format: int64 + minimum: 0.0 + type: integer + required: + - unit + - value + type: object + tcpRetryEvents: + items: + enum: + - connection-error + type: string + maxItems: 1 + minItems: 1 + type: array + required: + - maxRetries + - perRetryTimeout + type: object + timeout: + description: An object that represents a http timeout. + properties: + idle: + description: An object that represents idle timeout duration. + properties: + unit: + description: A unit of time. + enum: + - s + - ms + type: string + value: + description: A number of time units. + format: int64 + minimum: 0.0 + type: integer + required: + - unit + - value + type: object + perRequest: + description: An object that represents per request timeout duration. + properties: + unit: + description: A unit of time. + enum: + - s + - ms + type: string + value: + description: A number of time units. + format: int64 + minimum: 0.0 + type: integer + required: + - unit + - value + type: object + type: object + required: + - action + - match + type: object + httpRoute: + description: An object that represents the specification of an HTTP route. + properties: + action: + description: An object that represents the action to take if a match is determined. + properties: + weightedTargets: + description: An object that represents the targets that traffic is routed to when a request matches the route. + items: + description: WeightedTarget refers to https://docs.aws.amazon.com/app-mesh/latest/APIReference/API_WeightedTarget.html + properties: + port: + description: Specifies the targeted port of the weighted object + format: int64 + minimum: 0.0 + type: integer + virtualNodeARN: + description: Amazon Resource Name to AppMesh VirtualNode object to associate with the weighted target. Exactly one of 'virtualNodeRef' or 'virtualNodeARN' must be specified. + type: string + virtualNodeRef: + description: Reference to Kubernetes VirtualNode CR in cluster to associate with the weighted target. Exactly one of 'virtualNodeRef' or 'virtualNodeARN' must be specified. + properties: + name: + description: Name is the name of VirtualNode CR + type: string + namespace: + description: Namespace is the namespace of VirtualNode CR. If unspecified, defaults to the referencing object's namespace + type: string + required: + - name + type: object + weight: + description: The relative weight of the weighted target. + format: int64 + maximum: 100.0 + minimum: 0.0 + type: integer + required: + - weight + type: object + maxItems: 10 + minItems: 1 + type: array + required: + - weightedTargets + type: object + match: + description: An object that represents the criteria for determining a request match. + properties: + headers: + description: An object that represents the client request headers to match on. + items: + description: HTTPRouteHeader refers to https://docs.aws.amazon.com/app-mesh/latest/APIReference/API_HttpRouteHeader.html + properties: + invert: + description: Specify True to match anything except the match criteria. The default value is False. + type: boolean + match: + description: The HeaderMatchMethod object. + properties: + exact: + description: The value sent by the client must match the specified value exactly. + maxLength: 255 + minLength: 1 + type: string + prefix: + description: The value sent by the client must begin with the specified characters. + maxLength: 255 + minLength: 1 + type: string + range: + description: An object that represents the range of values to match on. + properties: + end: + description: The end of the range. + format: int64 + type: integer + start: + description: The start of the range. + format: int64 + type: integer + required: + - end + - start + type: object + regex: + description: The value sent by the client must include the specified characters. + maxLength: 255 + minLength: 1 + type: string + suffix: + description: The value sent by the client must end with the specified characters. + maxLength: 255 + minLength: 1 + type: string + type: object + name: + description: A name for the HTTP header in the client request that will be matched on. + maxLength: 50 + minLength: 1 + type: string + required: + - name + type: object + maxItems: 10 + minItems: 1 + type: array + method: + description: The client request method to match on. + enum: + - CONNECT + - DELETE + - GET + - HEAD + - OPTIONS + - PATCH + - POST + - PUT + - TRACE + type: string + path: + description: The client specified Path to match on. + properties: + exact: + description: The value sent by the client must match the specified value exactly. + maxLength: 255 + minLength: 1 + type: string + regex: + description: The value sent by the client must end with the specified characters. + maxLength: 255 + minLength: 1 + type: string + type: object + port: + description: Specifies the port to match requests with + format: int64 + minimum: 0.0 + type: integer + prefix: + description: Specifies the prefix to match requests with + type: string + queryParameters: + description: The client specified queryParameters to match on + items: + description: HTTPQueryParameters refers to https://docs.aws.amazon.com/app-mesh/latest/APIReference/API_HttpQueryParameter.html + properties: + match: + description: The QueryMatchMethod object. + properties: + exact: + type: string + type: object + name: + type: string + required: + - name + type: object + maxItems: 10 + minItems: 1 + type: array + scheme: + description: The client request scheme to match on + enum: + - http + - https + type: string + type: object + retryPolicy: + description: An object that represents a retry policy. + properties: + httpRetryEvents: + items: + enum: + - server-error + - gateway-error + - client-error + - stream-error + type: string + maxItems: 25 + minItems: 1 + type: array + maxRetries: + description: The maximum number of retry attempts. + format: int64 + minimum: 0.0 + type: integer + perRetryTimeout: + description: An object that represents a duration of time + properties: + unit: + description: A unit of time. + enum: + - s + - ms + type: string + value: + description: A number of time units. + format: int64 + minimum: 0.0 + type: integer + required: + - unit + - value + type: object + tcpRetryEvents: + items: + enum: + - connection-error + type: string + maxItems: 1 + minItems: 1 + type: array + required: + - maxRetries + - perRetryTimeout + type: object + timeout: + description: An object that represents a http timeout. + properties: + idle: + description: An object that represents idle timeout duration. + properties: + unit: + description: A unit of time. + enum: + - s + - ms + type: string + value: + description: A number of time units. + format: int64 + minimum: 0.0 + type: integer + required: + - unit + - value + type: object + perRequest: + description: An object that represents per request timeout duration. + properties: + unit: + description: A unit of time. + enum: + - s + - ms + type: string + value: + description: A number of time units. + format: int64 + minimum: 0.0 + type: integer + required: + - unit + - value + type: object + type: object + required: + - action + - match + type: object + name: + description: Route's name + type: string + priority: + description: The priority for the route. + format: int64 + maximum: 1000.0 + minimum: 0.0 + type: integer + tcpRoute: + description: An object that represents the specification of a TCP route. + properties: + action: + description: The action to take if a match is determined. + properties: + weightedTargets: + description: An object that represents the targets that traffic is routed to when a request matches the route. + items: + description: WeightedTarget refers to https://docs.aws.amazon.com/app-mesh/latest/APIReference/API_WeightedTarget.html + properties: + port: + description: Specifies the targeted port of the weighted object + format: int64 + minimum: 0.0 + type: integer + virtualNodeARN: + description: Amazon Resource Name to AppMesh VirtualNode object to associate with the weighted target. Exactly one of 'virtualNodeRef' or 'virtualNodeARN' must be specified. + type: string + virtualNodeRef: + description: Reference to Kubernetes VirtualNode CR in cluster to associate with the weighted target. Exactly one of 'virtualNodeRef' or 'virtualNodeARN' must be specified. + properties: + name: + description: Name is the name of VirtualNode CR + type: string + namespace: + description: Namespace is the namespace of VirtualNode CR. If unspecified, defaults to the referencing object's namespace + type: string + required: + - name + type: object + weight: + description: The relative weight of the weighted target. + format: int64 + maximum: 100.0 + minimum: 0.0 + type: integer + required: + - weight + type: object + maxItems: 10 + minItems: 1 + type: array + required: + - weightedTargets + type: object + match: + description: An object that represents the criteria for determining a request match. + properties: + port: + description: Specifies the port to match requests with + format: int64 + minimum: 0.0 + type: integer + type: object + timeout: + description: An object that represents a tcp timeout. + properties: + idle: + description: An object that represents idle timeout duration. + properties: + unit: + description: A unit of time. + enum: + - s + - ms + type: string + value: + description: A number of time units. + format: int64 + minimum: 0.0 + type: integer + required: + - unit + - value + type: object + type: object + required: + - action + type: object + required: + - name + type: object + type: array + type: object + status: + description: VirtualRouterStatus defines the observed state of VirtualRouter + properties: + conditions: + description: The current VirtualRouter status. + items: + properties: + lastTransitionTime: + description: Last time the condition transitioned from one status to another. + format: date-time + type: string + message: + description: A human readable message indicating details about the transition. + type: string + reason: + description: The reason for the condition's last transition. + type: string + status: + description: Status of the condition, one of True, False, Unknown. + type: string + type: + description: Type of VirtualRouter condition. + type: string + required: + - status + - type + type: object + type: array + observedGeneration: + description: The generation observed by the VirtualRouter controller. + format: int64 + type: integer + routeARNs: + additionalProperties: + type: string + description: RouteARNs is a map of AppMesh Route objects' Amazon Resource Names, indexed by route name. + type: object + virtualRouterARN: + description: VirtualRouterARN is the AppMesh VirtualRouter object's Amazon Resource Name. + type: string + type: object + type: object + x-kubernetes-preserve-unknown-fields: true + served: true + storage: true + subresources: + status: {} +status: + acceptedNames: + kind: '' + plural: '' + conditions: [] + storedVersions: [] diff --git a/crd-catalog/aws/aws-app-mesh-controller-for-k8/appmesh.k8s.aws/v1beta2/virtualservices.yaml b/crd-catalog/aws/aws-app-mesh-controller-for-k8/appmesh.k8s.aws/v1beta2/virtualservices.yaml new file mode 100644 index 000000000..cff9e404d --- /dev/null +++ b/crd-catalog/aws/aws-app-mesh-controller-for-k8/appmesh.k8s.aws/v1beta2/virtualservices.yaml @@ -0,0 +1,148 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.4.1 + name: virtualservices.appmesh.k8s.aws +spec: + group: appmesh.k8s.aws + names: + categories: + - all + kind: VirtualService + listKind: VirtualServiceList + plural: virtualservices + singular: virtualservice + scope: Namespaced + versions: + - additionalPrinterColumns: + - description: The AppMesh VirtualService object's Amazon Resource Name + jsonPath: .status.virtualServiceARN + name: ARN + type: string + - jsonPath: .metadata.creationTimestamp + name: AGE + type: date + name: v1beta2 + schema: + openAPIV3Schema: + description: VirtualService is the Schema for the virtualservices API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: VirtualServiceSpec defines the desired state of VirtualService refers to https://docs.aws.amazon.com/app-mesh/latest/APIReference/API_VirtualServiceSpec.html + properties: + awsName: + description: AWSName is the AppMesh VirtualService object's name. If unspecified or empty, it defaults to be "${name}.${namespace}" of k8s VirtualService + type: string + meshRef: + description: "A reference to k8s Mesh CR that this VirtualService belongs to. The admission controller populates it using Meshes's selector, and prevents users from setting this field. \n Populated by the system. Read-only." + properties: + name: + description: Name is the name of Mesh CR + type: string + uid: + description: UID is the UID of Mesh CR + type: string + required: + - name + - uid + type: object + provider: + description: The provider for virtual services. You can specify a single virtual node or virtual router. + properties: + virtualNode: + description: The virtual node associated with a virtual service. + properties: + virtualNodeARN: + description: Amazon Resource Name to AppMesh VirtualNode object that is acting as a service provider. Exactly one of 'virtualNodeRef' or 'virtualNodeARN' must be specified. + type: string + virtualNodeRef: + description: Reference to Kubernetes VirtualNode CR in cluster that is acting as a service provider. Exactly one of 'virtualNodeRef' or 'virtualNodeARN' must be specified. + properties: + name: + description: Name is the name of VirtualNode CR + type: string + namespace: + description: Namespace is the namespace of VirtualNode CR. If unspecified, defaults to the referencing object's namespace + type: string + required: + - name + type: object + type: object + virtualRouter: + description: The virtual router associated with a virtual service. + properties: + virtualRouterARN: + description: Amazon Resource Name to AppMesh VirtualRouter object that is acting as a service provider. Exactly one of 'virtualRouterRef' or 'virtualRouterARN' must be specified. + type: string + virtualRouterRef: + description: Reference to Kubernetes VirtualRouter CR in cluster that is acting as a service provider. Exactly one of 'virtualRouterRef' or 'virtualRouterARN' must be specified. + properties: + name: + description: Name is the name of VirtualRouter CR + type: string + namespace: + description: Namespace is the namespace of VirtualRouter CR. If unspecified, defaults to the referencing object's namespace + type: string + required: + - name + type: object + type: object + type: object + type: object + status: + description: VirtualServiceStatus defines the observed state of VirtualService + properties: + conditions: + description: The current VirtualService status. + items: + properties: + lastTransitionTime: + description: Last time the condition transitioned from one status to another. + format: date-time + type: string + message: + description: A human readable message indicating details about the transition. + type: string + reason: + description: The reason for the condition's last transition. + type: string + status: + description: Status of the condition, one of True, False, Unknown. + type: string + type: + description: Type of VirtualService condition. + type: string + required: + - status + - type + type: object + type: array + observedGeneration: + description: The generation observed by the VirtualService controller. + format: int64 + type: integer + virtualServiceARN: + description: VirtualServiceARN is the AppMesh VirtualService object's Amazon Resource Name. + type: string + type: object + type: object + x-kubernetes-preserve-unknown-fields: true + served: true + storage: true + subresources: + status: {} +status: + acceptedNames: + kind: '' + plural: '' + conditions: [] + storedVersions: [] diff --git a/kube-custom-resources-rs/Cargo.toml b/kube-custom-resources-rs/Cargo.toml index f1fc17fb8..0ace9054f 100644 --- a/kube-custom-resources-rs/Cargo.toml +++ b/kube-custom-resources-rs/Cargo.toml @@ -41,6 +41,7 @@ app_redislabs_com = [] app_terraform_io = [] application_networking_k8s_aws = [] applicationautoscaling_services_k8s_aws = [] +appmesh_k8s_aws = [] appprotect_f5_com = [] appprotectdos_f5_com = [] apps_3scale_net = [] diff --git a/kube-custom-resources-rs/src/appmesh_k8s_aws/mod.rs b/kube-custom-resources-rs/src/appmesh_k8s_aws/mod.rs new file mode 100644 index 000000000..ebf5f7d2c --- /dev/null +++ b/kube-custom-resources-rs/src/appmesh_k8s_aws/mod.rs @@ -0,0 +1 @@ +pub mod v1beta2; diff --git a/kube-custom-resources-rs/src/appmesh_k8s_aws/v1beta2/backendgroups.rs b/kube-custom-resources-rs/src/appmesh_k8s_aws/v1beta2/backendgroups.rs new file mode 100644 index 000000000..0b91573d3 --- /dev/null +++ b/kube-custom-resources-rs/src/appmesh_k8s_aws/v1beta2/backendgroups.rs @@ -0,0 +1,48 @@ +// WARNING: generated by kopium - manual changes will be overwritten +// kopium command: kopium --docs --filename=./crd-catalog/aws/aws-app-mesh-controller-for-k8/appmesh.k8s.aws/v1beta2/backendgroups.yaml --derive=Default --derive=PartialEq +// kopium version: 0.16.5 + +use kube::CustomResource; +use serde::{Serialize, Deserialize}; + +/// BackendGroupSpec defines the desired state of BackendGroup +#[derive(CustomResource, Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +#[kube(group = "appmesh.k8s.aws", version = "v1beta2", kind = "BackendGroup", plural = "backendgroups")] +#[kube(namespaced)] +#[kube(status = "BackendGroupStatus")] +#[kube(schema = "disabled")] +pub struct BackendGroupSpec { + /// A reference to k8s Mesh CR that this BackendGroup belongs to. The admission controller populates it using Meshes's selector, and prevents users from setting this field. + /// Populated by the system. Read-only. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "meshRef")] + pub mesh_ref: Option, + /// VirtualServices defines the set of virtual services in this BackendGroup. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub virtualservices: Option>, +} + +/// A reference to k8s Mesh CR that this BackendGroup belongs to. The admission controller populates it using Meshes's selector, and prevents users from setting this field. +/// Populated by the system. Read-only. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct BackendGroupMeshRef { + /// Name is the name of Mesh CR + pub name: String, + /// UID is the UID of Mesh CR + pub uid: String, +} + +/// VirtualServiceReference holds a reference to VirtualService.appmesh.k8s.aws +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct BackendGroupVirtualservices { + /// Name is the name of VirtualService CR + pub name: String, + /// Namespace is the namespace of VirtualService CR. If unspecified, defaults to the referencing object's namespace + #[serde(default, skip_serializing_if = "Option::is_none")] + pub namespace: Option, +} + +/// BackendGroupStatus defines the observed state of BackendGroup +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct BackendGroupStatus { +} + diff --git a/kube-custom-resources-rs/src/appmesh_k8s_aws/v1beta2/gatewayroutes.rs b/kube-custom-resources-rs/src/appmesh_k8s_aws/v1beta2/gatewayroutes.rs new file mode 100644 index 000000000..bb69579a6 --- /dev/null +++ b/kube-custom-resources-rs/src/appmesh_k8s_aws/v1beta2/gatewayroutes.rs @@ -0,0 +1,714 @@ +// WARNING: generated by kopium - manual changes will be overwritten +// kopium command: kopium --docs --filename=./crd-catalog/aws/aws-app-mesh-controller-for-k8/appmesh.k8s.aws/v1beta2/gatewayroutes.yaml --derive=Default --derive=PartialEq +// kopium version: 0.16.5 + +use kube::CustomResource; +use serde::{Serialize, Deserialize}; + +/// GatewayRouteSpec defines the desired state of GatewayRoute refers to https://docs.aws.amazon.com/app-mesh/latest/userguide/virtual_gateways.html +#[derive(CustomResource, Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +#[kube(group = "appmesh.k8s.aws", version = "v1beta2", kind = "GatewayRoute", plural = "gatewayroutes")] +#[kube(namespaced)] +#[kube(status = "GatewayRouteStatus")] +#[kube(schema = "disabled")] +pub struct GatewayRouteSpec { + /// AWSName is the AppMesh GatewayRoute object's name. If unspecified or empty, it defaults to be "${name}_${namespace}" of k8s GatewayRoute + #[serde(default, skip_serializing_if = "Option::is_none", rename = "awsName")] + pub aws_name: Option, + /// An object that represents the specification of a gRPC gatewayRoute. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "grpcRoute")] + pub grpc_route: Option, + /// An object that represents the specification of an HTTP/2 gatewayRoute. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "http2Route")] + pub http2_route: Option, + /// An object that represents the specification of an HTTP gatewayRoute. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "httpRoute")] + pub http_route: Option, + /// A reference to k8s Mesh CR that this GatewayRoute belongs to. The admission controller populates it using Meshes's selector, and prevents users from setting this field. + /// Populated by the system. Read-only. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "meshRef")] + pub mesh_ref: Option, + /// Priority for the gatewayroute. Default Priority is 1000 which is lowest priority + #[serde(default, skip_serializing_if = "Option::is_none")] + pub priority: Option, + /// A reference to k8s VirtualGateway CR that this GatewayRoute belongs to. The admission controller populates it using VirtualGateway's selector, and prevents users from setting this field. + /// Populated by the system. Read-only. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "virtualGatewayRef")] + pub virtual_gateway_ref: Option, +} + +/// An object that represents the specification of a gRPC gatewayRoute. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct GatewayRouteGrpcRoute { + /// An object that represents the action to take if a match is determined. + pub action: GatewayRouteGrpcRouteAction, + /// An object that represents the criteria for determining a request match. + #[serde(rename = "match")] + pub r#match: GatewayRouteGrpcRouteMatch, +} + +/// An object that represents the action to take if a match is determined. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct GatewayRouteGrpcRouteAction { + /// GrpcGatewayRouteRewrite refers to https://docs.aws.amazon.com/app-mesh/latest/APIReference/API_GrpcGatewayRouteRewrite.html + #[serde(default, skip_serializing_if = "Option::is_none")] + pub rewrite: Option, + /// An object that represents the target that traffic is routed to when a request matches the route. + pub target: GatewayRouteGrpcRouteActionTarget, +} + +/// GrpcGatewayRouteRewrite refers to https://docs.aws.amazon.com/app-mesh/latest/APIReference/API_GrpcGatewayRouteRewrite.html +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct GatewayRouteGrpcRouteActionRewrite { + /// GatewayRouteHostnameRewrite refers to https://docs.aws.amazon.com/app-mesh/latest/APIReference/API_GatewayRouteHostnameRewrite.html ENABLE or DISABLE default behavior for Hostname rewrite + #[serde(default, skip_serializing_if = "Option::is_none")] + pub hostname: Option, +} + +/// GatewayRouteHostnameRewrite refers to https://docs.aws.amazon.com/app-mesh/latest/APIReference/API_GatewayRouteHostnameRewrite.html ENABLE or DISABLE default behavior for Hostname rewrite +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct GatewayRouteGrpcRouteActionRewriteHostname { + #[serde(default, skip_serializing_if = "Option::is_none", rename = "defaultTargetHostname")] + pub default_target_hostname: Option, +} + +/// GatewayRouteHostnameRewrite refers to https://docs.aws.amazon.com/app-mesh/latest/APIReference/API_GatewayRouteHostnameRewrite.html ENABLE or DISABLE default behavior for Hostname rewrite +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] +pub enum GatewayRouteGrpcRouteActionRewriteHostnameDefaultTargetHostname { + #[serde(rename = "ENABLED")] + Enabled, + #[serde(rename = "DISABLED")] + Disabled, +} + +/// An object that represents the target that traffic is routed to when a request matches the route. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct GatewayRouteGrpcRouteActionTarget { + /// Specifies the port of the gateway route target + #[serde(default, skip_serializing_if = "Option::is_none")] + pub port: Option, + /// The virtual service to associate with the gateway route target. + #[serde(rename = "virtualService")] + pub virtual_service: GatewayRouteGrpcRouteActionTargetVirtualService, +} + +/// The virtual service to associate with the gateway route target. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct GatewayRouteGrpcRouteActionTargetVirtualService { + /// Amazon Resource Name to AppMesh VirtualService object to associate with the gateway route virtual service target. Exactly one of 'virtualServiceRef' or 'virtualServiceARN' must be specified. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "virtualServiceARN")] + pub virtual_service_arn: Option, + /// Reference to Kubernetes VirtualService CR in cluster to associate with the gateway route virtual service target. Exactly one of 'virtualServiceRef' or 'virtualServiceARN' must be specified. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "virtualServiceRef")] + pub virtual_service_ref: Option, +} + +/// Reference to Kubernetes VirtualService CR in cluster to associate with the gateway route virtual service target. Exactly one of 'virtualServiceRef' or 'virtualServiceARN' must be specified. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct GatewayRouteGrpcRouteActionTargetVirtualServiceVirtualServiceRef { + /// Name is the name of VirtualService CR + pub name: String, + /// Namespace is the namespace of VirtualService CR. If unspecified, defaults to the referencing object's namespace + #[serde(default, skip_serializing_if = "Option::is_none")] + pub namespace: Option, +} + +/// An object that represents the criteria for determining a request match. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct GatewayRouteGrpcRouteMatch { + /// The client specified Hostname to match on. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub hostname: Option, + /// An object that represents the data to match from the request. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub metadata: Option>, + /// Specifies the port the request to be matched on + #[serde(default, skip_serializing_if = "Option::is_none")] + pub port: Option, + /// Either ServiceName or Hostname must be specified. Both are allowed as well The fully qualified domain name for the service to match from the request. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "serviceName")] + pub service_name: Option, +} + +/// The client specified Hostname to match on. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct GatewayRouteGrpcRouteMatchHostname { + /// The value sent by the client must match the specified value exactly. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub exact: Option, + /// The value sent by the client must end with the specified characters. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub suffix: Option, +} + +/// GRPCGatewayRouteMetadata refers to https://docs.aws.amazon.com/app-mesh/latest/APIReference/API_GrpcGatewayRouteMetadata.html +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct GatewayRouteGrpcRouteMatchMetadata { + /// Specify True to match anything except the match criteria. The default value is False. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub invert: Option, + /// An object that represents the data to match from the request. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "match")] + pub r#match: Option, + /// The name of the route. + pub name: String, +} + +/// An object that represents the data to match from the request. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct GatewayRouteGrpcRouteMatchMetadataMatch { + /// The value sent by the client must match the specified value exactly. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub exact: Option, + /// The value sent by the client must begin with the specified characters. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub prefix: Option, + /// An object that represents the range of values to match on + #[serde(default, skip_serializing_if = "Option::is_none")] + pub range: Option, + /// The value sent by the client must include the specified characters. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub regex: Option, + /// The value sent by the client must end with the specified characters. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub suffix: Option, +} + +/// An object that represents the range of values to match on +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct GatewayRouteGrpcRouteMatchMetadataMatchRange { + /// The end of the range. + pub end: i64, + /// The start of the range. + pub start: i64, +} + +/// An object that represents the specification of an HTTP/2 gatewayRoute. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct GatewayRouteHttp2Route { + /// An object that represents the action to take if a match is determined. + pub action: GatewayRouteHttp2RouteAction, + /// An object that represents the criteria for determining a request match. + #[serde(rename = "match")] + pub r#match: GatewayRouteHttp2RouteMatch, +} + +/// An object that represents the action to take if a match is determined. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct GatewayRouteHttp2RouteAction { + /// HTTPGatewayRouteRewrite refers to https://docs.aws.amazon.com/app-mesh/latest/APIReference/API_HttpGatewayRouteRewrite.html + #[serde(default, skip_serializing_if = "Option::is_none")] + pub rewrite: Option, + /// An object that represents the target that traffic is routed to when a request matches the route. + pub target: GatewayRouteHttp2RouteActionTarget, +} + +/// HTTPGatewayRouteRewrite refers to https://docs.aws.amazon.com/app-mesh/latest/APIReference/API_HttpGatewayRouteRewrite.html +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct GatewayRouteHttp2RouteActionRewrite { + /// GatewayRouteHostnameRewrite refers to https://docs.aws.amazon.com/app-mesh/latest/APIReference/API_GatewayRouteHostnameRewrite.html ENABLE or DISABLE default behavior for Hostname rewrite + #[serde(default, skip_serializing_if = "Option::is_none")] + pub hostname: Option, + /// GatewayRoutePathRewrite refers to https://docs.aws.amazon.com/app-mesh/latest/APIReference/API_HttpGatewayRoutePathRewrite.html + #[serde(default, skip_serializing_if = "Option::is_none")] + pub path: Option, + /// GatewayRoutePrefixRewrite refers to https://docs.aws.amazon.com/app-mesh/latest/APIReference/API_HttpGatewayRoutePrefixRewrite.html + #[serde(default, skip_serializing_if = "Option::is_none")] + pub prefix: Option, +} + +/// GatewayRouteHostnameRewrite refers to https://docs.aws.amazon.com/app-mesh/latest/APIReference/API_GatewayRouteHostnameRewrite.html ENABLE or DISABLE default behavior for Hostname rewrite +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct GatewayRouteHttp2RouteActionRewriteHostname { + #[serde(default, skip_serializing_if = "Option::is_none", rename = "defaultTargetHostname")] + pub default_target_hostname: Option, +} + +/// GatewayRouteHostnameRewrite refers to https://docs.aws.amazon.com/app-mesh/latest/APIReference/API_GatewayRouteHostnameRewrite.html ENABLE or DISABLE default behavior for Hostname rewrite +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] +pub enum GatewayRouteHttp2RouteActionRewriteHostnameDefaultTargetHostname { + #[serde(rename = "ENABLED")] + Enabled, + #[serde(rename = "DISABLED")] + Disabled, +} + +/// GatewayRoutePathRewrite refers to https://docs.aws.amazon.com/app-mesh/latest/APIReference/API_HttpGatewayRoutePathRewrite.html +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct GatewayRouteHttp2RouteActionRewritePath { + #[serde(default, skip_serializing_if = "Option::is_none")] + pub exact: Option, +} + +/// GatewayRoutePrefixRewrite refers to https://docs.aws.amazon.com/app-mesh/latest/APIReference/API_HttpGatewayRoutePrefixRewrite.html +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct GatewayRouteHttp2RouteActionRewritePrefix { + #[serde(default, skip_serializing_if = "Option::is_none", rename = "defaultPrefix")] + pub default_prefix: Option, + /// When DefaultPrefix is specified, Value cannot be set + #[serde(default, skip_serializing_if = "Option::is_none")] + pub value: Option, +} + +/// GatewayRoutePrefixRewrite refers to https://docs.aws.amazon.com/app-mesh/latest/APIReference/API_HttpGatewayRoutePrefixRewrite.html +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] +pub enum GatewayRouteHttp2RouteActionRewritePrefixDefaultPrefix { + #[serde(rename = "ENABLED")] + Enabled, + #[serde(rename = "DISABLED")] + Disabled, +} + +/// An object that represents the target that traffic is routed to when a request matches the route. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct GatewayRouteHttp2RouteActionTarget { + /// Specifies the port of the gateway route target + #[serde(default, skip_serializing_if = "Option::is_none")] + pub port: Option, + /// The virtual service to associate with the gateway route target. + #[serde(rename = "virtualService")] + pub virtual_service: GatewayRouteHttp2RouteActionTargetVirtualService, +} + +/// The virtual service to associate with the gateway route target. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct GatewayRouteHttp2RouteActionTargetVirtualService { + /// Amazon Resource Name to AppMesh VirtualService object to associate with the gateway route virtual service target. Exactly one of 'virtualServiceRef' or 'virtualServiceARN' must be specified. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "virtualServiceARN")] + pub virtual_service_arn: Option, + /// Reference to Kubernetes VirtualService CR in cluster to associate with the gateway route virtual service target. Exactly one of 'virtualServiceRef' or 'virtualServiceARN' must be specified. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "virtualServiceRef")] + pub virtual_service_ref: Option, +} + +/// Reference to Kubernetes VirtualService CR in cluster to associate with the gateway route virtual service target. Exactly one of 'virtualServiceRef' or 'virtualServiceARN' must be specified. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct GatewayRouteHttp2RouteActionTargetVirtualServiceVirtualServiceRef { + /// Name is the name of VirtualService CR + pub name: String, + /// Namespace is the namespace of VirtualService CR. If unspecified, defaults to the referencing object's namespace + #[serde(default, skip_serializing_if = "Option::is_none")] + pub namespace: Option, +} + +/// An object that represents the criteria for determining a request match. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct GatewayRouteHttp2RouteMatch { + /// An object that represents the client request headers to match on. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub headers: Option>, + /// The client specified Hostname to match on. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub hostname: Option, + /// The client request method to match on. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub method: Option, + /// Specified path of the request to be matched on + #[serde(default, skip_serializing_if = "Option::is_none")] + pub path: Option, + /// Specifies the port the request to be matched on + #[serde(default, skip_serializing_if = "Option::is_none")] + pub port: Option, + /// Either Prefix or Hostname must be specified. Both are allowed as well. Specifies the prefix to match requests with + #[serde(default, skip_serializing_if = "Option::is_none")] + pub prefix: Option, + /// Client specified query parameters to match on + #[serde(default, skip_serializing_if = "Option::is_none", rename = "queryParameters")] + pub query_parameters: Option>, +} + +/// HTTPGatewayRouteHeader refers to https://docs.aws.amazon.com/app-mesh/latest/APIReference/API_HttpGatewayRouteHeader.html +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct GatewayRouteHttp2RouteMatchHeaders { + /// Specify True to match anything except the match criteria. The default value is False. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub invert: Option, + /// The HeaderMatchMethod object. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "match")] + pub r#match: Option, + /// A name for the HTTP header in the client request that will be matched on. + pub name: String, +} + +/// The HeaderMatchMethod object. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct GatewayRouteHttp2RouteMatchHeadersMatch { + /// The value sent by the client must match the specified value exactly. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub exact: Option, + /// The value sent by the client must begin with the specified characters. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub prefix: Option, + /// An object that represents the range of values to match on. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub range: Option, + /// The value sent by the client must include the specified characters. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub regex: Option, + /// The value sent by the client must end with the specified characters. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub suffix: Option, +} + +/// An object that represents the range of values to match on. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct GatewayRouteHttp2RouteMatchHeadersMatchRange { + /// The end of the range. + pub end: i64, + /// The start of the range. + pub start: i64, +} + +/// The client specified Hostname to match on. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct GatewayRouteHttp2RouteMatchHostname { + /// The value sent by the client must match the specified value exactly. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub exact: Option, + /// The value sent by the client must end with the specified characters. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub suffix: Option, +} + +/// An object that represents the criteria for determining a request match. +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] +pub enum GatewayRouteHttp2RouteMatchMethod { + #[serde(rename = "CONNECT")] + Connect, + #[serde(rename = "DELETE")] + Delete, + #[serde(rename = "GET")] + Get, + #[serde(rename = "HEAD")] + Head, + #[serde(rename = "OPTIONS")] + Options, + #[serde(rename = "PATCH")] + Patch, + #[serde(rename = "POST")] + Post, + #[serde(rename = "PUT")] + Put, + #[serde(rename = "TRACE")] + Trace, +} + +/// Specified path of the request to be matched on +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct GatewayRouteHttp2RouteMatchPath { + /// The value sent by the client must match the specified value exactly. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub exact: Option, + /// The value sent by the client must end with the specified characters. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub regex: Option, +} + +/// HTTPQueryParameters refers to https://docs.aws.amazon.com/app-mesh/latest/APIReference/API_HttpQueryParameter.html +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct GatewayRouteHttp2RouteMatchQueryParameters { + /// The QueryMatchMethod object. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "match")] + pub r#match: Option, + pub name: String, +} + +/// The QueryMatchMethod object. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct GatewayRouteHttp2RouteMatchQueryParametersMatch { + #[serde(default, skip_serializing_if = "Option::is_none")] + pub exact: Option, +} + +/// An object that represents the specification of an HTTP gatewayRoute. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct GatewayRouteHttpRoute { + /// An object that represents the action to take if a match is determined. + pub action: GatewayRouteHttpRouteAction, + /// An object that represents the criteria for determining a request match. + #[serde(rename = "match")] + pub r#match: GatewayRouteHttpRouteMatch, +} + +/// An object that represents the action to take if a match is determined. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct GatewayRouteHttpRouteAction { + /// HTTPGatewayRouteRewrite refers to https://docs.aws.amazon.com/app-mesh/latest/APIReference/API_HttpGatewayRouteRewrite.html + #[serde(default, skip_serializing_if = "Option::is_none")] + pub rewrite: Option, + /// An object that represents the target that traffic is routed to when a request matches the route. + pub target: GatewayRouteHttpRouteActionTarget, +} + +/// HTTPGatewayRouteRewrite refers to https://docs.aws.amazon.com/app-mesh/latest/APIReference/API_HttpGatewayRouteRewrite.html +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct GatewayRouteHttpRouteActionRewrite { + /// GatewayRouteHostnameRewrite refers to https://docs.aws.amazon.com/app-mesh/latest/APIReference/API_GatewayRouteHostnameRewrite.html ENABLE or DISABLE default behavior for Hostname rewrite + #[serde(default, skip_serializing_if = "Option::is_none")] + pub hostname: Option, + /// GatewayRoutePathRewrite refers to https://docs.aws.amazon.com/app-mesh/latest/APIReference/API_HttpGatewayRoutePathRewrite.html + #[serde(default, skip_serializing_if = "Option::is_none")] + pub path: Option, + /// GatewayRoutePrefixRewrite refers to https://docs.aws.amazon.com/app-mesh/latest/APIReference/API_HttpGatewayRoutePrefixRewrite.html + #[serde(default, skip_serializing_if = "Option::is_none")] + pub prefix: Option, +} + +/// GatewayRouteHostnameRewrite refers to https://docs.aws.amazon.com/app-mesh/latest/APIReference/API_GatewayRouteHostnameRewrite.html ENABLE or DISABLE default behavior for Hostname rewrite +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct GatewayRouteHttpRouteActionRewriteHostname { + #[serde(default, skip_serializing_if = "Option::is_none", rename = "defaultTargetHostname")] + pub default_target_hostname: Option, +} + +/// GatewayRouteHostnameRewrite refers to https://docs.aws.amazon.com/app-mesh/latest/APIReference/API_GatewayRouteHostnameRewrite.html ENABLE or DISABLE default behavior for Hostname rewrite +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] +pub enum GatewayRouteHttpRouteActionRewriteHostnameDefaultTargetHostname { + #[serde(rename = "ENABLED")] + Enabled, + #[serde(rename = "DISABLED")] + Disabled, +} + +/// GatewayRoutePathRewrite refers to https://docs.aws.amazon.com/app-mesh/latest/APIReference/API_HttpGatewayRoutePathRewrite.html +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct GatewayRouteHttpRouteActionRewritePath { + #[serde(default, skip_serializing_if = "Option::is_none")] + pub exact: Option, +} + +/// GatewayRoutePrefixRewrite refers to https://docs.aws.amazon.com/app-mesh/latest/APIReference/API_HttpGatewayRoutePrefixRewrite.html +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct GatewayRouteHttpRouteActionRewritePrefix { + #[serde(default, skip_serializing_if = "Option::is_none", rename = "defaultPrefix")] + pub default_prefix: Option, + /// When DefaultPrefix is specified, Value cannot be set + #[serde(default, skip_serializing_if = "Option::is_none")] + pub value: Option, +} + +/// GatewayRoutePrefixRewrite refers to https://docs.aws.amazon.com/app-mesh/latest/APIReference/API_HttpGatewayRoutePrefixRewrite.html +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] +pub enum GatewayRouteHttpRouteActionRewritePrefixDefaultPrefix { + #[serde(rename = "ENABLED")] + Enabled, + #[serde(rename = "DISABLED")] + Disabled, +} + +/// An object that represents the target that traffic is routed to when a request matches the route. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct GatewayRouteHttpRouteActionTarget { + /// Specifies the port of the gateway route target + #[serde(default, skip_serializing_if = "Option::is_none")] + pub port: Option, + /// The virtual service to associate with the gateway route target. + #[serde(rename = "virtualService")] + pub virtual_service: GatewayRouteHttpRouteActionTargetVirtualService, +} + +/// The virtual service to associate with the gateway route target. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct GatewayRouteHttpRouteActionTargetVirtualService { + /// Amazon Resource Name to AppMesh VirtualService object to associate with the gateway route virtual service target. Exactly one of 'virtualServiceRef' or 'virtualServiceARN' must be specified. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "virtualServiceARN")] + pub virtual_service_arn: Option, + /// Reference to Kubernetes VirtualService CR in cluster to associate with the gateway route virtual service target. Exactly one of 'virtualServiceRef' or 'virtualServiceARN' must be specified. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "virtualServiceRef")] + pub virtual_service_ref: Option, +} + +/// Reference to Kubernetes VirtualService CR in cluster to associate with the gateway route virtual service target. Exactly one of 'virtualServiceRef' or 'virtualServiceARN' must be specified. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct GatewayRouteHttpRouteActionTargetVirtualServiceVirtualServiceRef { + /// Name is the name of VirtualService CR + pub name: String, + /// Namespace is the namespace of VirtualService CR. If unspecified, defaults to the referencing object's namespace + #[serde(default, skip_serializing_if = "Option::is_none")] + pub namespace: Option, +} + +/// An object that represents the criteria for determining a request match. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct GatewayRouteHttpRouteMatch { + /// An object that represents the client request headers to match on. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub headers: Option>, + /// The client specified Hostname to match on. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub hostname: Option, + /// The client request method to match on. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub method: Option, + /// Specified path of the request to be matched on + #[serde(default, skip_serializing_if = "Option::is_none")] + pub path: Option, + /// Specifies the port the request to be matched on + #[serde(default, skip_serializing_if = "Option::is_none")] + pub port: Option, + /// Either Prefix or Hostname must be specified. Both are allowed as well. Specifies the prefix to match requests with + #[serde(default, skip_serializing_if = "Option::is_none")] + pub prefix: Option, + /// Client specified query parameters to match on + #[serde(default, skip_serializing_if = "Option::is_none", rename = "queryParameters")] + pub query_parameters: Option>, +} + +/// HTTPGatewayRouteHeader refers to https://docs.aws.amazon.com/app-mesh/latest/APIReference/API_HttpGatewayRouteHeader.html +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct GatewayRouteHttpRouteMatchHeaders { + /// Specify True to match anything except the match criteria. The default value is False. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub invert: Option, + /// The HeaderMatchMethod object. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "match")] + pub r#match: Option, + /// A name for the HTTP header in the client request that will be matched on. + pub name: String, +} + +/// The HeaderMatchMethod object. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct GatewayRouteHttpRouteMatchHeadersMatch { + /// The value sent by the client must match the specified value exactly. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub exact: Option, + /// The value sent by the client must begin with the specified characters. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub prefix: Option, + /// An object that represents the range of values to match on. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub range: Option, + /// The value sent by the client must include the specified characters. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub regex: Option, + /// The value sent by the client must end with the specified characters. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub suffix: Option, +} + +/// An object that represents the range of values to match on. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct GatewayRouteHttpRouteMatchHeadersMatchRange { + /// The end of the range. + pub end: i64, + /// The start of the range. + pub start: i64, +} + +/// The client specified Hostname to match on. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct GatewayRouteHttpRouteMatchHostname { + /// The value sent by the client must match the specified value exactly. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub exact: Option, + /// The value sent by the client must end with the specified characters. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub suffix: Option, +} + +/// An object that represents the criteria for determining a request match. +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] +pub enum GatewayRouteHttpRouteMatchMethod { + #[serde(rename = "CONNECT")] + Connect, + #[serde(rename = "DELETE")] + Delete, + #[serde(rename = "GET")] + Get, + #[serde(rename = "HEAD")] + Head, + #[serde(rename = "OPTIONS")] + Options, + #[serde(rename = "PATCH")] + Patch, + #[serde(rename = "POST")] + Post, + #[serde(rename = "PUT")] + Put, + #[serde(rename = "TRACE")] + Trace, +} + +/// Specified path of the request to be matched on +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct GatewayRouteHttpRouteMatchPath { + /// The value sent by the client must match the specified value exactly. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub exact: Option, + /// The value sent by the client must end with the specified characters. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub regex: Option, +} + +/// HTTPQueryParameters refers to https://docs.aws.amazon.com/app-mesh/latest/APIReference/API_HttpQueryParameter.html +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct GatewayRouteHttpRouteMatchQueryParameters { + /// The QueryMatchMethod object. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "match")] + pub r#match: Option, + pub name: String, +} + +/// The QueryMatchMethod object. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct GatewayRouteHttpRouteMatchQueryParametersMatch { + #[serde(default, skip_serializing_if = "Option::is_none")] + pub exact: Option, +} + +/// A reference to k8s Mesh CR that this GatewayRoute belongs to. The admission controller populates it using Meshes's selector, and prevents users from setting this field. +/// Populated by the system. Read-only. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct GatewayRouteMeshRef { + /// Name is the name of Mesh CR + pub name: String, + /// UID is the UID of Mesh CR + pub uid: String, +} + +/// A reference to k8s VirtualGateway CR that this GatewayRoute belongs to. The admission controller populates it using VirtualGateway's selector, and prevents users from setting this field. +/// Populated by the system. Read-only. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct GatewayRouteVirtualGatewayRef { + /// Name is the name of VirtualGateway CR + pub name: String, + /// Namespace is the namespace of VirtualGateway CR. If unspecified, defaults to the referencing object's namespace + #[serde(default, skip_serializing_if = "Option::is_none")] + pub namespace: Option, + /// UID is the UID of VirtualGateway CR + pub uid: String, +} + +/// GatewayRouteStatus defines the observed state of GatewayRoute +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct GatewayRouteStatus { + /// The current GatewayRoute status. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub conditions: Option>, + /// GatewayRouteARN is the AppMesh GatewayRoute object's Amazon Resource Name + #[serde(default, skip_serializing_if = "Option::is_none", rename = "gatewayRouteARN")] + pub gateway_route_arn: Option, + /// The generation observed by the GatewayRoute controller. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "observedGeneration")] + pub observed_generation: Option, +} + +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct GatewayRouteStatusConditions { + /// Last time the condition transitioned from one status to another. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "lastTransitionTime")] + pub last_transition_time: Option, + /// A human readable message indicating details about the transition. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub message: Option, + /// The reason for the condition's last transition. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub reason: Option, + /// Status of the condition, one of True, False, Unknown. + pub status: String, + /// Type of GatewayRoute condition. + #[serde(rename = "type")] + pub r#type: String, +} + diff --git a/kube-custom-resources-rs/src/appmesh_k8s_aws/v1beta2/meshes.rs b/kube-custom-resources-rs/src/appmesh_k8s_aws/v1beta2/meshes.rs new file mode 100644 index 000000000..b6ae98ad8 --- /dev/null +++ b/kube-custom-resources-rs/src/appmesh_k8s_aws/v1beta2/meshes.rs @@ -0,0 +1,117 @@ +// WARNING: generated by kopium - manual changes will be overwritten +// kopium command: kopium --docs --filename=./crd-catalog/aws/aws-app-mesh-controller-for-k8/appmesh.k8s.aws/v1beta2/meshes.yaml +// kopium version: 0.16.5 + +use kube::CustomResource; +use serde::{Serialize, Deserialize}; +use std::collections::BTreeMap; + +/// MeshSpec defines the desired state of Mesh refers to https://docs.aws.amazon.com/app-mesh/latest/APIReference/API_MeshSpec.html +#[derive(CustomResource, Serialize, Deserialize, Clone, Debug)] +#[kube(group = "appmesh.k8s.aws", version = "v1beta2", kind = "Mesh", plural = "meshes")] +#[kube(status = "MeshStatus")] +#[kube(schema = "disabled")] +pub struct MeshSpec { + /// AWSName is the AppMesh Mesh object's name. If unspecified or empty, it defaults to be "${name}" of k8s Mesh + #[serde(default, skip_serializing_if = "Option::is_none", rename = "awsName")] + pub aws_name: Option, + /// The egress filter rules for the service mesh. If unspecified, default settings from AWS API will be applied. Refer to AWS Docs for default settings. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "egressFilter")] + pub egress_filter: Option, + /// The AWS IAM account ID of the service mesh owner. Required if the account ID is not your own. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "meshOwner")] + pub mesh_owner: Option, + #[serde(default, skip_serializing_if = "Option::is_none", rename = "meshServiceDiscovery")] + pub mesh_service_discovery: Option, + /// NamespaceSelector selects Namespaces using labels to designate mesh membership. This field follows standard label selector semantics: if present but empty, it selects all namespaces. if absent, it selects no namespace. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "namespaceSelector")] + pub namespace_selector: Option, +} + +/// The egress filter rules for the service mesh. If unspecified, default settings from AWS API will be applied. Refer to AWS Docs for default settings. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct MeshEgressFilter { + /// The egress filter type. + #[serde(rename = "type")] + pub r#type: MeshEgressFilterType, +} + +/// The egress filter rules for the service mesh. If unspecified, default settings from AWS API will be applied. Refer to AWS Docs for default settings. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub enum MeshEgressFilterType { + #[serde(rename = "ALLOW_ALL")] + AllowAll, + #[serde(rename = "DROP_ALL")] + DropAll, +} + +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct MeshMeshServiceDiscovery { + /// The ipPreference for the mesh. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "ipPreference")] + pub ip_preference: Option, +} + +#[derive(Serialize, Deserialize, Clone, Debug)] +pub enum MeshMeshServiceDiscoveryIpPreference { + #[serde(rename = "IPv6_ONLY")] + IPv6Only, + #[serde(rename = "IPv4_ONLY")] + IPv4Only, +} + +/// NamespaceSelector selects Namespaces using labels to designate mesh membership. This field follows standard label selector semantics: if present but empty, it selects all namespaces. if absent, it selects no namespace. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct MeshNamespaceSelector { + /// matchExpressions is a list of label selector requirements. The requirements are ANDed. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchExpressions")] + pub match_expressions: Option>, + /// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchLabels")] + pub match_labels: Option>, +} + +/// A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct MeshNamespaceSelectorMatchExpressions { + /// key is the label key that the selector applies to. + pub key: String, + /// operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. + pub operator: String, + /// values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub values: Option>, +} + +/// MeshStatus defines the observed state of Mesh +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct MeshStatus { + /// The current Mesh status. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub conditions: Option>, + /// MeshARN is the AppMesh Mesh object's Amazon Resource Name + #[serde(default, skip_serializing_if = "Option::is_none", rename = "meshARN")] + pub mesh_arn: Option, + /// The generation observed by the Mesh controller. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "observedGeneration")] + pub observed_generation: Option, +} + +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct MeshStatusConditions { + /// Last time the condition transitioned from one status to another. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "lastTransitionTime")] + pub last_transition_time: Option, + /// A human readable message indicating details about the transition. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub message: Option, + /// The reason for the condition's last transition. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub reason: Option, + /// Status of the condition, one of True, False, Unknown. + pub status: String, + /// Type of mesh condition. + #[serde(rename = "type")] + pub r#type: String, +} + diff --git a/kube-custom-resources-rs/src/appmesh_k8s_aws/v1beta2/mod.rs b/kube-custom-resources-rs/src/appmesh_k8s_aws/v1beta2/mod.rs new file mode 100644 index 000000000..c53ba4002 --- /dev/null +++ b/kube-custom-resources-rs/src/appmesh_k8s_aws/v1beta2/mod.rs @@ -0,0 +1,7 @@ +pub mod backendgroups; +pub mod gatewayroutes; +pub mod meshes; +pub mod virtualgateways; +pub mod virtualnodes; +pub mod virtualrouters; +pub mod virtualservices; diff --git a/kube-custom-resources-rs/src/appmesh_k8s_aws/v1beta2/virtualgateways.rs b/kube-custom-resources-rs/src/appmesh_k8s_aws/v1beta2/virtualgateways.rs new file mode 100644 index 000000000..d0d0939f3 --- /dev/null +++ b/kube-custom-resources-rs/src/appmesh_k8s_aws/v1beta2/virtualgateways.rs @@ -0,0 +1,562 @@ +// WARNING: generated by kopium - manual changes will be overwritten +// kopium command: kopium --docs --filename=./crd-catalog/aws/aws-app-mesh-controller-for-k8/appmesh.k8s.aws/v1beta2/virtualgateways.yaml +// kopium version: 0.16.5 + +use kube::CustomResource; +use serde::{Serialize, Deserialize}; +use std::collections::BTreeMap; + +/// VirtualGatewaySpec defines the desired state of VirtualGateway refers to https://docs.aws.amazon.com/app-mesh/latest/userguide/virtual_gateways.html +#[derive(CustomResource, Serialize, Deserialize, Clone, Debug)] +#[kube(group = "appmesh.k8s.aws", version = "v1beta2", kind = "VirtualGateway", plural = "virtualgateways")] +#[kube(namespaced)] +#[kube(status = "VirtualGatewayStatus")] +#[kube(schema = "disabled")] +pub struct VirtualGatewaySpec { + /// AWSName is the AppMesh VirtualGateway object's name. If unspecified or empty, it defaults to be "${name}_${namespace}" of k8s VirtualGateway + #[serde(default, skip_serializing_if = "Option::is_none", rename = "awsName")] + pub aws_name: Option, + /// A reference to an object that represents the defaults for backend GatewayRoutes. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "backendDefaults")] + pub backend_defaults: Option, + /// GatewayRouteSelector selects GatewayRoutes using labels to designate GatewayRoute membership. If not specified it selects all GatewayRoutes in that namespace. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "gatewayRouteSelector")] + pub gateway_route_selector: Option, + /// The listener that the virtual gateway is expected to receive inbound traffic from + #[serde(default, skip_serializing_if = "Option::is_none")] + pub listeners: Option>, + /// The inbound and outbound access logging information for the virtual gateway. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub logging: Option, + /// A reference to k8s Mesh CR that this VirtualGateway belongs to. The admission controller populates it using Meshes's selector, and prevents users from setting this field. + /// Populated by the system. Read-only. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "meshRef")] + pub mesh_ref: Option, + /// NamespaceSelector selects Namespaces using labels to designate GatewayRoute membership. This field follows standard label selector semantics; if present but empty, it selects all namespaces. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "namespaceSelector")] + pub namespace_selector: Option, + /// PodSelector selects Pods using labels to designate VirtualGateway membership. This field follows standard label selector semantics: if present but empty, it selects all pods within namespace. if absent, it selects no pod. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "podSelector")] + pub pod_selector: Option, +} + +/// A reference to an object that represents the defaults for backend GatewayRoutes. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualGatewayBackendDefaults { + /// A reference to an object that represents a client policy. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "clientPolicy")] + pub client_policy: Option, +} + +/// A reference to an object that represents a client policy. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualGatewayBackendDefaultsClientPolicy { + /// A reference to an object that represents a Transport Layer Security (TLS) client policy. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub tls: Option, +} + +/// A reference to an object that represents a Transport Layer Security (TLS) client policy. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualGatewayBackendDefaultsClientPolicyTls { + /// A reference to an object that represents TLS certificate. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub certificate: Option, + /// Whether the policy is enforced. If unspecified, default settings from AWS API will be applied. Refer to AWS Docs for default settings. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub enforce: Option, + /// The range of ports that the policy is enforced for. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub ports: Option>, + /// A reference to an object that represents a TLS validation context. + pub validation: VirtualGatewayBackendDefaultsClientPolicyTlsValidation, +} + +/// A reference to an object that represents TLS certificate. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualGatewayBackendDefaultsClientPolicyTlsCertificate { + /// An object that represents a TLS cert via a local file + #[serde(default, skip_serializing_if = "Option::is_none")] + pub file: Option, + /// An object that represents a TLS cert via SDS entry + #[serde(default, skip_serializing_if = "Option::is_none")] + pub sds: Option, +} + +/// An object that represents a TLS cert via a local file +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualGatewayBackendDefaultsClientPolicyTlsCertificateFile { + /// The certificate chain for the certificate. + #[serde(rename = "certificateChain")] + pub certificate_chain: String, + /// The private key for a certificate stored on the file system of the virtual Gateway. + #[serde(rename = "privateKey")] + pub private_key: String, +} + +/// An object that represents a TLS cert via SDS entry +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualGatewayBackendDefaultsClientPolicyTlsCertificateSds { + /// The certificate trust chain for a certificate issued via SDS cluster + #[serde(rename = "secretName")] + pub secret_name: String, +} + +/// A reference to an object that represents a TLS validation context. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualGatewayBackendDefaultsClientPolicyTlsValidation { + /// Possible alternative names to consider + #[serde(default, skip_serializing_if = "Option::is_none", rename = "subjectAlternativeNames")] + pub subject_alternative_names: Option, + /// A reference to an object that represents a TLS validation context trust + pub trust: VirtualGatewayBackendDefaultsClientPolicyTlsValidationTrust, +} + +/// Possible alternative names to consider +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualGatewayBackendDefaultsClientPolicyTlsValidationSubjectAlternativeNames { + /// Match is a required field + #[serde(rename = "match")] + pub r#match: VirtualGatewayBackendDefaultsClientPolicyTlsValidationSubjectAlternativeNamesMatch, +} + +/// Match is a required field +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualGatewayBackendDefaultsClientPolicyTlsValidationSubjectAlternativeNamesMatch { + /// Exact is a required field + pub exact: Vec, +} + +/// A reference to an object that represents a TLS validation context trust +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualGatewayBackendDefaultsClientPolicyTlsValidationTrust { + /// A reference to an object that represents a TLS validation context trust for an AWS Certicate Manager (ACM) certificate. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub acm: Option, + /// An object that represents a TLS validation context trust for a local file. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub file: Option, + /// An object that represents a TLS validation context trust for a SDS certificate + #[serde(default, skip_serializing_if = "Option::is_none")] + pub sds: Option, +} + +/// A reference to an object that represents a TLS validation context trust for an AWS Certicate Manager (ACM) certificate. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualGatewayBackendDefaultsClientPolicyTlsValidationTrustAcm { + /// One or more ACM Amazon Resource Name (ARN)s. + #[serde(rename = "certificateAuthorityARNs")] + pub certificate_authority_ar_ns: Vec, +} + +/// An object that represents a TLS validation context trust for a local file. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualGatewayBackendDefaultsClientPolicyTlsValidationTrustFile { + /// The certificate trust chain for a certificate stored on the file system of the virtual Gateway. + #[serde(rename = "certificateChain")] + pub certificate_chain: String, +} + +/// An object that represents a TLS validation context trust for a SDS certificate +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualGatewayBackendDefaultsClientPolicyTlsValidationTrustSds { + /// The certificate trust chain for a certificate issued via SDS. + #[serde(rename = "secretName")] + pub secret_name: String, +} + +/// GatewayRouteSelector selects GatewayRoutes using labels to designate GatewayRoute membership. If not specified it selects all GatewayRoutes in that namespace. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualGatewayGatewayRouteSelector { + /// matchExpressions is a list of label selector requirements. The requirements are ANDed. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchExpressions")] + pub match_expressions: Option>, + /// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchLabels")] + pub match_labels: Option>, +} + +/// A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualGatewayGatewayRouteSelectorMatchExpressions { + /// key is the label key that the selector applies to. + pub key: String, + /// operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. + pub operator: String, + /// values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub values: Option>, +} + +/// VirtualGatewayListener refers to https://docs.aws.amazon.com/app-mesh/latest/userguide/virtual_gateways.html +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualGatewayListeners { + /// The connection pool settings for the listener + #[serde(default, skip_serializing_if = "Option::is_none", rename = "connectionPool")] + pub connection_pool: Option, + /// The health check information for the listener. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "healthCheck")] + pub health_check: Option, + /// The port mapping information for the listener. + #[serde(rename = "portMapping")] + pub port_mapping: VirtualGatewayListenersPortMapping, + /// A reference to an object that represents the Transport Layer Security (TLS) properties for a listener. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub tls: Option, +} + +/// The connection pool settings for the listener +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualGatewayListenersConnectionPool { + /// Specifies grpc connection pool settings for the virtual gateway listener + #[serde(default, skip_serializing_if = "Option::is_none")] + pub grpc: Option, + /// Specifies http connection pool settings for the virtual gateway listener + #[serde(default, skip_serializing_if = "Option::is_none")] + pub http: Option, + /// Specifies http2 connection pool settings for the virtual gateway listener + #[serde(default, skip_serializing_if = "Option::is_none")] + pub http2: Option, +} + +/// Specifies grpc connection pool settings for the virtual gateway listener +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualGatewayListenersConnectionPoolGrpc { + /// Represents the maximum number of inflight requests that an envoy can concurrently support across all the hosts in the upstream cluster + #[serde(rename = "maxRequests")] + pub max_requests: i64, +} + +/// Specifies http connection pool settings for the virtual gateway listener +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualGatewayListenersConnectionPoolHttp { + /// Represents the maximum number of outbound TCP connections the envoy can establish concurrently with all the hosts in the upstream cluster. + #[serde(rename = "maxConnections")] + pub max_connections: i64, + /// Represents the number of overflowing requests after max_connections that an envoy will queue to an upstream cluster. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "maxPendingRequests")] + pub max_pending_requests: Option, +} + +/// Specifies http2 connection pool settings for the virtual gateway listener +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualGatewayListenersConnectionPoolHttp2 { + /// Represents the maximum number of inflight requests that an envoy can concurrently support across all the hosts in the upstream cluster + #[serde(rename = "maxRequests")] + pub max_requests: i64, +} + +/// The health check information for the listener. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualGatewayListenersHealthCheck { + /// The number of consecutive successful health checks that must occur before declaring listener healthy. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "healthyThreshold")] + pub healthy_threshold: Option, + /// The time period in milliseconds between each health check execution. + #[serde(rename = "intervalMillis")] + pub interval_millis: i64, + /// The destination path for the health check request. This value is only used if the specified protocol is http or http2. For any other protocol, this value is ignored. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub path: Option, + /// The destination port for the health check request. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub port: Option, + /// The protocol for the health check request + pub protocol: VirtualGatewayListenersHealthCheckProtocol, + /// The amount of time to wait when receiving a response from the health check, in milliseconds. + #[serde(rename = "timeoutMillis")] + pub timeout_millis: i64, + /// The number of consecutive failed health checks that must occur before declaring a virtual Gateway unhealthy. + #[serde(rename = "unhealthyThreshold")] + pub unhealthy_threshold: i64, +} + +/// The health check information for the listener. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub enum VirtualGatewayListenersHealthCheckProtocol { + #[serde(rename = "grpc")] + Grpc, + #[serde(rename = "http")] + Http, + #[serde(rename = "http2")] + Http2, +} + +/// The port mapping information for the listener. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualGatewayListenersPortMapping { + /// The port used for the port mapping. + pub port: i64, + /// The protocol used for the port mapping. + pub protocol: VirtualGatewayListenersPortMappingProtocol, +} + +/// The port mapping information for the listener. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub enum VirtualGatewayListenersPortMappingProtocol { + #[serde(rename = "grpc")] + Grpc, + #[serde(rename = "http")] + Http, + #[serde(rename = "http2")] + Http2, +} + +/// A reference to an object that represents the Transport Layer Security (TLS) properties for a listener. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualGatewayListenersTls { + /// A reference to an object that represents a listener's TLS certificate. + pub certificate: VirtualGatewayListenersTlsCertificate, + /// ListenerTLS mode + pub mode: VirtualGatewayListenersTlsMode, + /// A reference to an object that represents Validation context + #[serde(default, skip_serializing_if = "Option::is_none")] + pub validation: Option, +} + +/// A reference to an object that represents a listener's TLS certificate. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualGatewayListenersTlsCertificate { + /// A reference to an object that represents an AWS Certificate Manager (ACM) certificate. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub acm: Option, + /// A reference to an object that represents a local file certificate. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub file: Option, + /// A reference to an object that represents an SDS issued certificate + #[serde(default, skip_serializing_if = "Option::is_none")] + pub sds: Option, +} + +/// A reference to an object that represents an AWS Certificate Manager (ACM) certificate. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualGatewayListenersTlsCertificateAcm { + /// The Amazon Resource Name (ARN) for the certificate. + #[serde(rename = "certificateARN")] + pub certificate_arn: String, +} + +/// A reference to an object that represents a local file certificate. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualGatewayListenersTlsCertificateFile { + /// The certificate chain for the certificate. + #[serde(rename = "certificateChain")] + pub certificate_chain: String, + /// The private key for a certificate stored on the file system of the virtual Gateway. + #[serde(rename = "privateKey")] + pub private_key: String, +} + +/// A reference to an object that represents an SDS issued certificate +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualGatewayListenersTlsCertificateSds { + /// The certificate trust chain for a certificate issued via SDS cluster + #[serde(rename = "secretName")] + pub secret_name: String, +} + +/// A reference to an object that represents the Transport Layer Security (TLS) properties for a listener. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub enum VirtualGatewayListenersTlsMode { + #[serde(rename = "DISABLED")] + Disabled, + #[serde(rename = "PERMISSIVE")] + Permissive, + #[serde(rename = "STRICT")] + Strict, +} + +/// A reference to an object that represents Validation context +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualGatewayListenersTlsValidation { + /// Possible alternate names to consider + #[serde(default, skip_serializing_if = "Option::is_none", rename = "subjectAlternativeNames")] + pub subject_alternative_names: Option, + pub trust: VirtualGatewayListenersTlsValidationTrust, +} + +/// Possible alternate names to consider +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualGatewayListenersTlsValidationSubjectAlternativeNames { + /// Match is a required field + #[serde(rename = "match")] + pub r#match: VirtualGatewayListenersTlsValidationSubjectAlternativeNamesMatch, +} + +/// Match is a required field +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualGatewayListenersTlsValidationSubjectAlternativeNamesMatch { + /// Exact is a required field + pub exact: Vec, +} + +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualGatewayListenersTlsValidationTrust { + /// A reference to an object that represents a TLS validation context trust for an AWS Certicate Manager (ACM) certificate. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub acm: Option, + /// An object that represents a TLS validation context trust for a local file. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub file: Option, + /// An object that represents a TLS validation context trust for an SDS system + #[serde(default, skip_serializing_if = "Option::is_none")] + pub sds: Option, +} + +/// A reference to an object that represents a TLS validation context trust for an AWS Certicate Manager (ACM) certificate. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualGatewayListenersTlsValidationTrustAcm { + /// One or more ACM Amazon Resource Name (ARN)s. + #[serde(rename = "certificateAuthorityARNs")] + pub certificate_authority_ar_ns: Vec, +} + +/// An object that represents a TLS validation context trust for a local file. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualGatewayListenersTlsValidationTrustFile { + /// The certificate trust chain for a certificate stored on the file system of the virtual Gateway. + #[serde(rename = "certificateChain")] + pub certificate_chain: String, +} + +/// An object that represents a TLS validation context trust for an SDS system +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualGatewayListenersTlsValidationTrustSds { + /// The certificate trust chain for a certificate issued via SDS. + #[serde(rename = "secretName")] + pub secret_name: String, +} + +/// The inbound and outbound access logging information for the virtual gateway. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualGatewayLogging { + /// The access log configuration for a virtual Gateway. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "accessLog")] + pub access_log: Option, +} + +/// The access log configuration for a virtual Gateway. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualGatewayLoggingAccessLog { + /// The file object to send virtual gateway access logs to. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub file: Option, +} + +/// The file object to send virtual gateway access logs to. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualGatewayLoggingAccessLogFile { + /// Structured access log output format + #[serde(default, skip_serializing_if = "Option::is_none")] + pub format: Option, + /// The file path to write access logs to. + pub path: String, +} + +/// Structured access log output format +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualGatewayLoggingAccessLogFileFormat { + /// Output specified fields as a JSON object + #[serde(default, skip_serializing_if = "Option::is_none")] + pub json: Option>, + /// Custom format string + #[serde(default, skip_serializing_if = "Option::is_none")] + pub text: Option, +} + +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualGatewayLoggingAccessLogFileFormatJson { + /// The name of the field in the JSON object + pub key: String, + /// The format string + pub value: String, +} + +/// A reference to k8s Mesh CR that this VirtualGateway belongs to. The admission controller populates it using Meshes's selector, and prevents users from setting this field. +/// Populated by the system. Read-only. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualGatewayMeshRef { + /// Name is the name of Mesh CR + pub name: String, + /// UID is the UID of Mesh CR + pub uid: String, +} + +/// NamespaceSelector selects Namespaces using labels to designate GatewayRoute membership. This field follows standard label selector semantics; if present but empty, it selects all namespaces. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualGatewayNamespaceSelector { + /// matchExpressions is a list of label selector requirements. The requirements are ANDed. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchExpressions")] + pub match_expressions: Option>, + /// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchLabels")] + pub match_labels: Option>, +} + +/// A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualGatewayNamespaceSelectorMatchExpressions { + /// key is the label key that the selector applies to. + pub key: String, + /// operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. + pub operator: String, + /// values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub values: Option>, +} + +/// PodSelector selects Pods using labels to designate VirtualGateway membership. This field follows standard label selector semantics: if present but empty, it selects all pods within namespace. if absent, it selects no pod. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualGatewayPodSelector { + /// matchExpressions is a list of label selector requirements. The requirements are ANDed. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchExpressions")] + pub match_expressions: Option>, + /// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchLabels")] + pub match_labels: Option>, +} + +/// A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualGatewayPodSelectorMatchExpressions { + /// key is the label key that the selector applies to. + pub key: String, + /// operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. + pub operator: String, + /// values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub values: Option>, +} + +/// VirtualGatewayStatus defines the observed state of VirtualGateway +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualGatewayStatus { + /// The current VirtualGateway status. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub conditions: Option>, + /// The generation observed by the VirtualGateway controller. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "observedGeneration")] + pub observed_generation: Option, + /// VirtualGatewayARN is the AppMesh VirtualGateway object's Amazon Resource Name + #[serde(default, skip_serializing_if = "Option::is_none", rename = "virtualGatewayARN")] + pub virtual_gateway_arn: Option, +} + +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualGatewayStatusConditions { + /// Last time the condition transitioned from one status to another. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "lastTransitionTime")] + pub last_transition_time: Option, + /// A human readable message indicating details about the transition. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub message: Option, + /// The reason for the condition's last transition. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub reason: Option, + /// Status of the condition, one of True, False, Unknown. + pub status: String, + /// Type of VirtualGateway condition. + #[serde(rename = "type")] + pub r#type: String, +} + diff --git a/kube-custom-resources-rs/src/appmesh_k8s_aws/v1beta2/virtualnodes.rs b/kube-custom-resources-rs/src/appmesh_k8s_aws/v1beta2/virtualnodes.rs new file mode 100644 index 000000000..361a7a3b1 --- /dev/null +++ b/kube-custom-resources-rs/src/appmesh_k8s_aws/v1beta2/virtualnodes.rs @@ -0,0 +1,977 @@ +// WARNING: generated by kopium - manual changes will be overwritten +// kopium command: kopium --docs --filename=./crd-catalog/aws/aws-app-mesh-controller-for-k8/appmesh.k8s.aws/v1beta2/virtualnodes.yaml +// kopium version: 0.16.5 + +use kube::CustomResource; +use serde::{Serialize, Deserialize}; +use std::collections::BTreeMap; + +/// VirtualNodeSpec defines the desired state of VirtualNode refers to https://docs.aws.amazon.com/app-mesh/latest/APIReference/API_VirtualNodeSpec.html +#[derive(CustomResource, Serialize, Deserialize, Clone, Debug)] +#[kube(group = "appmesh.k8s.aws", version = "v1beta2", kind = "VirtualNode", plural = "virtualnodes")] +#[kube(namespaced)] +#[kube(status = "VirtualNodeStatus")] +#[kube(schema = "disabled")] +pub struct VirtualNodeSpec { + /// AWSName is the AppMesh VirtualNode object's name. If unspecified or empty, it defaults to be "${name}_${namespace}" of k8s VirtualNode + #[serde(default, skip_serializing_if = "Option::is_none", rename = "awsName")] + pub aws_name: Option, + /// A reference to an object that represents the defaults for backends. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "backendDefaults")] + pub backend_defaults: Option, + /// BackendGroups that define a set of backends the virtual node is expected to send outbound traffic to. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "backendGroups")] + pub backend_groups: Option>, + /// The backends that the virtual node is expected to send outbound traffic to. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub backends: Option>, + /// The listener that the virtual node is expected to receive inbound traffic from + #[serde(default, skip_serializing_if = "Option::is_none")] + pub listeners: Option>, + /// The inbound and outbound access logging information for the virtual node. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub logging: Option, + /// A reference to k8s Mesh CR that this VirtualNode belongs to. The admission controller populates it using Meshes's selector, and prevents users from setting this field. + /// Populated by the system. Read-only. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "meshRef")] + pub mesh_ref: Option, + /// PodSelector selects Pods using labels to designate VirtualNode membership. This field follows standard label selector semantics: if present but empty, it selects all pods within namespace. if absent, it selects no pod. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "podSelector")] + pub pod_selector: Option, + /// The service discovery information for the virtual node. Optional if there is no inbound traffic(no listeners). Mandatory if a listener is specified. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "serviceDiscovery")] + pub service_discovery: Option, +} + +/// A reference to an object that represents the defaults for backends. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualNodeBackendDefaults { + /// A reference to an object that represents a client policy. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "clientPolicy")] + pub client_policy: Option, +} + +/// A reference to an object that represents a client policy. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualNodeBackendDefaultsClientPolicy { + /// A reference to an object that represents a Transport Layer Security (TLS) client policy. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub tls: Option, +} + +/// A reference to an object that represents a Transport Layer Security (TLS) client policy. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualNodeBackendDefaultsClientPolicyTls { + /// A reference to an object that represents TLS certificate. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub certificate: Option, + /// Whether the policy is enforced. If unspecified, default settings from AWS API will be applied. Refer to AWS Docs for default settings. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub enforce: Option, + /// The range of ports that the policy is enforced for. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub ports: Option>, + /// A reference to an object that represents a TLS validation context. + pub validation: VirtualNodeBackendDefaultsClientPolicyTlsValidation, +} + +/// A reference to an object that represents TLS certificate. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualNodeBackendDefaultsClientPolicyTlsCertificate { + /// An object that represents a TLS cert via a local file + #[serde(default, skip_serializing_if = "Option::is_none")] + pub file: Option, + /// An object that represents a TLS cert via SDS entry + #[serde(default, skip_serializing_if = "Option::is_none")] + pub sds: Option, +} + +/// An object that represents a TLS cert via a local file +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualNodeBackendDefaultsClientPolicyTlsCertificateFile { + /// The certificate chain for the certificate. + #[serde(rename = "certificateChain")] + pub certificate_chain: String, + /// The private key for a certificate stored on the file system of the virtual node that the proxy is running on. + #[serde(rename = "privateKey")] + pub private_key: String, +} + +/// An object that represents a TLS cert via SDS entry +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualNodeBackendDefaultsClientPolicyTlsCertificateSds { + /// The certificate trust chain for a certificate issued via SDS cluster + #[serde(rename = "secretName")] + pub secret_name: String, +} + +/// A reference to an object that represents a TLS validation context. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualNodeBackendDefaultsClientPolicyTlsValidation { + /// Possible Alternative names to consider + #[serde(default, skip_serializing_if = "Option::is_none", rename = "subjectAlternativeNames")] + pub subject_alternative_names: Option, + /// A reference to an object that represents a TLS validation context trust + pub trust: VirtualNodeBackendDefaultsClientPolicyTlsValidationTrust, +} + +/// Possible Alternative names to consider +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualNodeBackendDefaultsClientPolicyTlsValidationSubjectAlternativeNames { + /// Match is a required field + #[serde(rename = "match")] + pub r#match: VirtualNodeBackendDefaultsClientPolicyTlsValidationSubjectAlternativeNamesMatch, +} + +/// Match is a required field +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualNodeBackendDefaultsClientPolicyTlsValidationSubjectAlternativeNamesMatch { + /// Exact is a required field + pub exact: Vec, +} + +/// A reference to an object that represents a TLS validation context trust +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualNodeBackendDefaultsClientPolicyTlsValidationTrust { + /// A reference to an object that represents a TLS validation context trust for an AWS Certicate Manager (ACM) certificate. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub acm: Option, + /// An object that represents a TLS validation context trust for a local file. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub file: Option, + /// An object that represents a TLS validation context trust for a SDS. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub sds: Option, +} + +/// A reference to an object that represents a TLS validation context trust for an AWS Certicate Manager (ACM) certificate. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualNodeBackendDefaultsClientPolicyTlsValidationTrustAcm { + /// One or more ACM Amazon Resource Name (ARN)s. + #[serde(rename = "certificateAuthorityARNs")] + pub certificate_authority_ar_ns: Vec, +} + +/// An object that represents a TLS validation context trust for a local file. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualNodeBackendDefaultsClientPolicyTlsValidationTrustFile { + /// The certificate trust chain for a certificate stored on the file system of the virtual node that the proxy is running on. + #[serde(rename = "certificateChain")] + pub certificate_chain: String, +} + +/// An object that represents a TLS validation context trust for a SDS. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualNodeBackendDefaultsClientPolicyTlsValidationTrustSds { + /// The certificate trust chain for a certificate obtained via SDS + #[serde(rename = "secretName")] + pub secret_name: String, +} + +/// BackendGroupReference holds a reference to BackendGroup.appmesh.k8s.aws +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualNodeBackendGroups { + /// Name is the name of BackendGroup CR + pub name: String, + /// Namespace is the namespace of BackendGroup CR. If unspecified, defaults to the referencing object's namespace + #[serde(default, skip_serializing_if = "Option::is_none")] + pub namespace: Option, +} + +/// Backend refers to https://docs.aws.amazon.com/app-mesh/latest/APIReference/API_Backend.html +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualNodeBackends { + /// Specifies a virtual service to use as a backend for a virtual node. + #[serde(rename = "virtualService")] + pub virtual_service: VirtualNodeBackendsVirtualService, +} + +/// Specifies a virtual service to use as a backend for a virtual node. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualNodeBackendsVirtualService { + /// A reference to an object that represents the client policy for a backend. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "clientPolicy")] + pub client_policy: Option, + /// Amazon Resource Name to AppMesh VirtualService object that is acting as a virtual node backend. Exactly one of 'virtualServiceRef' or 'virtualServiceARN' must be specified. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "virtualServiceARN")] + pub virtual_service_arn: Option, + /// Reference to Kubernetes VirtualService CR in cluster that is acting as a virtual node backend. Exactly one of 'virtualServiceRef' or 'virtualServiceARN' must be specified. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "virtualServiceRef")] + pub virtual_service_ref: Option, +} + +/// A reference to an object that represents the client policy for a backend. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualNodeBackendsVirtualServiceClientPolicy { + /// A reference to an object that represents a Transport Layer Security (TLS) client policy. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub tls: Option, +} + +/// A reference to an object that represents a Transport Layer Security (TLS) client policy. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualNodeBackendsVirtualServiceClientPolicyTls { + /// A reference to an object that represents TLS certificate. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub certificate: Option, + /// Whether the policy is enforced. If unspecified, default settings from AWS API will be applied. Refer to AWS Docs for default settings. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub enforce: Option, + /// The range of ports that the policy is enforced for. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub ports: Option>, + /// A reference to an object that represents a TLS validation context. + pub validation: VirtualNodeBackendsVirtualServiceClientPolicyTlsValidation, +} + +/// A reference to an object that represents TLS certificate. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualNodeBackendsVirtualServiceClientPolicyTlsCertificate { + /// An object that represents a TLS cert via a local file + #[serde(default, skip_serializing_if = "Option::is_none")] + pub file: Option, + /// An object that represents a TLS cert via SDS entry + #[serde(default, skip_serializing_if = "Option::is_none")] + pub sds: Option, +} + +/// An object that represents a TLS cert via a local file +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualNodeBackendsVirtualServiceClientPolicyTlsCertificateFile { + /// The certificate chain for the certificate. + #[serde(rename = "certificateChain")] + pub certificate_chain: String, + /// The private key for a certificate stored on the file system of the virtual node that the proxy is running on. + #[serde(rename = "privateKey")] + pub private_key: String, +} + +/// An object that represents a TLS cert via SDS entry +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualNodeBackendsVirtualServiceClientPolicyTlsCertificateSds { + /// The certificate trust chain for a certificate issued via SDS cluster + #[serde(rename = "secretName")] + pub secret_name: String, +} + +/// A reference to an object that represents a TLS validation context. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualNodeBackendsVirtualServiceClientPolicyTlsValidation { + /// Possible Alternative names to consider + #[serde(default, skip_serializing_if = "Option::is_none", rename = "subjectAlternativeNames")] + pub subject_alternative_names: Option, + /// A reference to an object that represents a TLS validation context trust + pub trust: VirtualNodeBackendsVirtualServiceClientPolicyTlsValidationTrust, +} + +/// Possible Alternative names to consider +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualNodeBackendsVirtualServiceClientPolicyTlsValidationSubjectAlternativeNames { + /// Match is a required field + #[serde(rename = "match")] + pub r#match: VirtualNodeBackendsVirtualServiceClientPolicyTlsValidationSubjectAlternativeNamesMatch, +} + +/// Match is a required field +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualNodeBackendsVirtualServiceClientPolicyTlsValidationSubjectAlternativeNamesMatch { + /// Exact is a required field + pub exact: Vec, +} + +/// A reference to an object that represents a TLS validation context trust +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualNodeBackendsVirtualServiceClientPolicyTlsValidationTrust { + /// A reference to an object that represents a TLS validation context trust for an AWS Certicate Manager (ACM) certificate. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub acm: Option, + /// An object that represents a TLS validation context trust for a local file. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub file: Option, + /// An object that represents a TLS validation context trust for a SDS. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub sds: Option, +} + +/// A reference to an object that represents a TLS validation context trust for an AWS Certicate Manager (ACM) certificate. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualNodeBackendsVirtualServiceClientPolicyTlsValidationTrustAcm { + /// One or more ACM Amazon Resource Name (ARN)s. + #[serde(rename = "certificateAuthorityARNs")] + pub certificate_authority_ar_ns: Vec, +} + +/// An object that represents a TLS validation context trust for a local file. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualNodeBackendsVirtualServiceClientPolicyTlsValidationTrustFile { + /// The certificate trust chain for a certificate stored on the file system of the virtual node that the proxy is running on. + #[serde(rename = "certificateChain")] + pub certificate_chain: String, +} + +/// An object that represents a TLS validation context trust for a SDS. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualNodeBackendsVirtualServiceClientPolicyTlsValidationTrustSds { + /// The certificate trust chain for a certificate obtained via SDS + #[serde(rename = "secretName")] + pub secret_name: String, +} + +/// Reference to Kubernetes VirtualService CR in cluster that is acting as a virtual node backend. Exactly one of 'virtualServiceRef' or 'virtualServiceARN' must be specified. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualNodeBackendsVirtualServiceVirtualServiceRef { + /// Name is the name of VirtualService CR + pub name: String, + /// Namespace is the namespace of VirtualService CR. If unspecified, defaults to the referencing object's namespace + #[serde(default, skip_serializing_if = "Option::is_none")] + pub namespace: Option, +} + +/// Listener refers to https://docs.aws.amazon.com/app-mesh/latest/APIReference/API_Listener.html +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualNodeListeners { + /// The connection pool settings for the listener + #[serde(default, skip_serializing_if = "Option::is_none", rename = "connectionPool")] + pub connection_pool: Option, + /// The health check information for the listener. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "healthCheck")] + pub health_check: Option, + /// The outlier detection for the listener + #[serde(default, skip_serializing_if = "Option::is_none", rename = "outlierDetection")] + pub outlier_detection: Option, + /// The port mapping information for the listener. + #[serde(rename = "portMapping")] + pub port_mapping: VirtualNodeListenersPortMapping, + /// A reference to an object that represents + #[serde(default, skip_serializing_if = "Option::is_none")] + pub timeout: Option, + /// A reference to an object that represents the Transport Layer Security (TLS) properties for a listener. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub tls: Option, +} + +/// The connection pool settings for the listener +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualNodeListenersConnectionPool { + /// Specifies grpc connection pool settings for the virtual node listener + #[serde(default, skip_serializing_if = "Option::is_none")] + pub grpc: Option, + /// Specifies http connection pool settings for the virtual node listener + #[serde(default, skip_serializing_if = "Option::is_none")] + pub http: Option, + /// Specifies http2 connection pool settings for the virtual node listener + #[serde(default, skip_serializing_if = "Option::is_none")] + pub http2: Option, + /// Specifies tcp connection pool settings for the virtual node listener + #[serde(default, skip_serializing_if = "Option::is_none")] + pub tcp: Option, +} + +/// Specifies grpc connection pool settings for the virtual node listener +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualNodeListenersConnectionPoolGrpc { + /// Represents the maximum number of inflight requests that an envoy can concurrently support across all the hosts in the upstream cluster + #[serde(rename = "maxRequests")] + pub max_requests: i64, +} + +/// Specifies http connection pool settings for the virtual node listener +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualNodeListenersConnectionPoolHttp { + /// Represents the maximum number of outbound TCP connections the envoy can establish concurrently with all the hosts in the upstream cluster. + #[serde(rename = "maxConnections")] + pub max_connections: i64, + /// Represents the number of overflowing requests after max_connections that an envoy will queue to an upstream cluster. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "maxPendingRequests")] + pub max_pending_requests: Option, +} + +/// Specifies http2 connection pool settings for the virtual node listener +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualNodeListenersConnectionPoolHttp2 { + /// Represents the maximum number of inflight requests that an envoy can concurrently support across all the hosts in the upstream cluster + #[serde(rename = "maxRequests")] + pub max_requests: i64, +} + +/// Specifies tcp connection pool settings for the virtual node listener +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualNodeListenersConnectionPoolTcp { + /// Represents the maximum number of outbound TCP connections the envoy can establish concurrently with all the hosts in the upstream cluster. + #[serde(rename = "maxConnections")] + pub max_connections: i64, +} + +/// The health check information for the listener. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualNodeListenersHealthCheck { + /// The number of consecutive successful health checks that must occur before declaring listener healthy. + #[serde(rename = "healthyThreshold")] + pub healthy_threshold: i64, + /// The time period in milliseconds between each health check execution. + #[serde(rename = "intervalMillis")] + pub interval_millis: i64, + /// The destination path for the health check request. This value is only used if the specified protocol is http or http2. For any other protocol, this value is ignored. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub path: Option, + /// The destination port for the health check request. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub port: Option, + /// The protocol for the health check request + pub protocol: VirtualNodeListenersHealthCheckProtocol, + /// The amount of time to wait when receiving a response from the health check, in milliseconds. + #[serde(rename = "timeoutMillis")] + pub timeout_millis: i64, + /// The number of consecutive failed health checks that must occur before declaring a virtual node unhealthy. + #[serde(rename = "unhealthyThreshold")] + pub unhealthy_threshold: i64, +} + +/// The health check information for the listener. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub enum VirtualNodeListenersHealthCheckProtocol { + #[serde(rename = "grpc")] + Grpc, + #[serde(rename = "http")] + Http, + #[serde(rename = "http2")] + Http2, + #[serde(rename = "tcp")] + Tcp, +} + +/// The outlier detection for the listener +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualNodeListenersOutlierDetection { + /// The base time that a host is ejected for. The real time is equal to the base time multiplied by the number of times the host has been ejected + #[serde(rename = "baseEjectionDuration")] + pub base_ejection_duration: VirtualNodeListenersOutlierDetectionBaseEjectionDuration, + /// The time interval between ejection analysis sweeps. This can result in both new ejections as well as hosts being returned to service + pub interval: VirtualNodeListenersOutlierDetectionInterval, + /// The threshold for the max percentage of outlier hosts that can be ejected from the load balancing set. maxEjectionPercent=100 means outlier detection can potentially eject all of the hosts from the upstream service if they are all considered outliers, leaving the load balancing set with zero hosts + #[serde(rename = "maxEjectionPercent")] + pub max_ejection_percent: i64, + /// The threshold for the number of server errors returned by a given host during an outlier detection interval. If the server error count meets/exceeds this threshold the host is ejected. A server error is defined as any HTTP 5xx response (or the equivalent for gRPC and TCP connections) + #[serde(rename = "maxServerErrors")] + pub max_server_errors: i64, +} + +/// The base time that a host is ejected for. The real time is equal to the base time multiplied by the number of times the host has been ejected +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualNodeListenersOutlierDetectionBaseEjectionDuration { + /// A unit of time. + pub unit: VirtualNodeListenersOutlierDetectionBaseEjectionDurationUnit, + /// A number of time units. + pub value: i64, +} + +/// The base time that a host is ejected for. The real time is equal to the base time multiplied by the number of times the host has been ejected +#[derive(Serialize, Deserialize, Clone, Debug)] +pub enum VirtualNodeListenersOutlierDetectionBaseEjectionDurationUnit { + #[serde(rename = "s")] + S, + #[serde(rename = "ms")] + Ms, +} + +/// The time interval between ejection analysis sweeps. This can result in both new ejections as well as hosts being returned to service +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualNodeListenersOutlierDetectionInterval { + /// A unit of time. + pub unit: VirtualNodeListenersOutlierDetectionIntervalUnit, + /// A number of time units. + pub value: i64, +} + +/// The time interval between ejection analysis sweeps. This can result in both new ejections as well as hosts being returned to service +#[derive(Serialize, Deserialize, Clone, Debug)] +pub enum VirtualNodeListenersOutlierDetectionIntervalUnit { + #[serde(rename = "s")] + S, + #[serde(rename = "ms")] + Ms, +} + +/// The port mapping information for the listener. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualNodeListenersPortMapping { + /// The port used for the port mapping. + pub port: i64, + /// The protocol used for the port mapping. + pub protocol: VirtualNodeListenersPortMappingProtocol, +} + +/// The port mapping information for the listener. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub enum VirtualNodeListenersPortMappingProtocol { + #[serde(rename = "grpc")] + Grpc, + #[serde(rename = "http")] + Http, + #[serde(rename = "http2")] + Http2, + #[serde(rename = "tcp")] + Tcp, +} + +/// A reference to an object that represents +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualNodeListenersTimeout { + /// Specifies grpc timeout information for the virtual node. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub grpc: Option, + /// Specifies http timeout information for the virtual node. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub http: Option, + /// Specifies http2 information for the virtual node. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub http2: Option, + /// Specifies tcp timeout information for the virtual node. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub tcp: Option, +} + +/// Specifies grpc timeout information for the virtual node. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualNodeListenersTimeoutGrpc { + /// An object that represents idle timeout duration. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub idle: Option, + /// An object that represents per request timeout duration. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "perRequest")] + pub per_request: Option, +} + +/// An object that represents idle timeout duration. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualNodeListenersTimeoutGrpcIdle { + /// A unit of time. + pub unit: VirtualNodeListenersTimeoutGrpcIdleUnit, + /// A number of time units. + pub value: i64, +} + +/// An object that represents idle timeout duration. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub enum VirtualNodeListenersTimeoutGrpcIdleUnit { + #[serde(rename = "s")] + S, + #[serde(rename = "ms")] + Ms, +} + +/// An object that represents per request timeout duration. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualNodeListenersTimeoutGrpcPerRequest { + /// A unit of time. + pub unit: VirtualNodeListenersTimeoutGrpcPerRequestUnit, + /// A number of time units. + pub value: i64, +} + +/// An object that represents per request timeout duration. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub enum VirtualNodeListenersTimeoutGrpcPerRequestUnit { + #[serde(rename = "s")] + S, + #[serde(rename = "ms")] + Ms, +} + +/// Specifies http timeout information for the virtual node. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualNodeListenersTimeoutHttp { + /// An object that represents idle timeout duration. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub idle: Option, + /// An object that represents per request timeout duration. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "perRequest")] + pub per_request: Option, +} + +/// An object that represents idle timeout duration. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualNodeListenersTimeoutHttpIdle { + /// A unit of time. + pub unit: VirtualNodeListenersTimeoutHttpIdleUnit, + /// A number of time units. + pub value: i64, +} + +/// An object that represents idle timeout duration. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub enum VirtualNodeListenersTimeoutHttpIdleUnit { + #[serde(rename = "s")] + S, + #[serde(rename = "ms")] + Ms, +} + +/// An object that represents per request timeout duration. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualNodeListenersTimeoutHttpPerRequest { + /// A unit of time. + pub unit: VirtualNodeListenersTimeoutHttpPerRequestUnit, + /// A number of time units. + pub value: i64, +} + +/// An object that represents per request timeout duration. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub enum VirtualNodeListenersTimeoutHttpPerRequestUnit { + #[serde(rename = "s")] + S, + #[serde(rename = "ms")] + Ms, +} + +/// Specifies http2 information for the virtual node. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualNodeListenersTimeoutHttp2 { + /// An object that represents idle timeout duration. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub idle: Option, + /// An object that represents per request timeout duration. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "perRequest")] + pub per_request: Option, +} + +/// An object that represents idle timeout duration. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualNodeListenersTimeoutHttp2Idle { + /// A unit of time. + pub unit: VirtualNodeListenersTimeoutHttp2IdleUnit, + /// A number of time units. + pub value: i64, +} + +/// An object that represents idle timeout duration. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub enum VirtualNodeListenersTimeoutHttp2IdleUnit { + #[serde(rename = "s")] + S, + #[serde(rename = "ms")] + Ms, +} + +/// An object that represents per request timeout duration. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualNodeListenersTimeoutHttp2PerRequest { + /// A unit of time. + pub unit: VirtualNodeListenersTimeoutHttp2PerRequestUnit, + /// A number of time units. + pub value: i64, +} + +/// An object that represents per request timeout duration. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub enum VirtualNodeListenersTimeoutHttp2PerRequestUnit { + #[serde(rename = "s")] + S, + #[serde(rename = "ms")] + Ms, +} + +/// Specifies tcp timeout information for the virtual node. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualNodeListenersTimeoutTcp { + /// An object that represents idle timeout duration. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub idle: Option, +} + +/// An object that represents idle timeout duration. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualNodeListenersTimeoutTcpIdle { + /// A unit of time. + pub unit: VirtualNodeListenersTimeoutTcpIdleUnit, + /// A number of time units. + pub value: i64, +} + +/// An object that represents idle timeout duration. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub enum VirtualNodeListenersTimeoutTcpIdleUnit { + #[serde(rename = "s")] + S, + #[serde(rename = "ms")] + Ms, +} + +/// A reference to an object that represents the Transport Layer Security (TLS) properties for a listener. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualNodeListenersTls { + /// A reference to an object that represents a listener's TLS certificate. + pub certificate: VirtualNodeListenersTlsCertificate, + /// ListenerTLS mode + pub mode: VirtualNodeListenersTlsMode, + /// A reference to an object that represents an SDS Trust Domain + #[serde(default, skip_serializing_if = "Option::is_none")] + pub validation: Option, +} + +/// A reference to an object that represents a listener's TLS certificate. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualNodeListenersTlsCertificate { + /// A reference to an object that represents an AWS Certificate Manager (ACM) certificate. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub acm: Option, + /// A reference to an object that represents a local file certificate. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub file: Option, + /// A reference to an object that represents an SDS certificate. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub sds: Option, +} + +/// A reference to an object that represents an AWS Certificate Manager (ACM) certificate. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualNodeListenersTlsCertificateAcm { + /// The Amazon Resource Name (ARN) for the certificate. + #[serde(rename = "certificateARN")] + pub certificate_arn: String, +} + +/// A reference to an object that represents a local file certificate. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualNodeListenersTlsCertificateFile { + /// The certificate chain for the certificate. + #[serde(rename = "certificateChain")] + pub certificate_chain: String, + /// The private key for a certificate stored on the file system of the virtual node that the proxy is running on. + #[serde(rename = "privateKey")] + pub private_key: String, +} + +/// A reference to an object that represents an SDS certificate. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualNodeListenersTlsCertificateSds { + /// The certificate trust chain for a certificate issued via SDS cluster + #[serde(rename = "secretName")] + pub secret_name: String, +} + +/// A reference to an object that represents the Transport Layer Security (TLS) properties for a listener. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub enum VirtualNodeListenersTlsMode { + #[serde(rename = "DISABLED")] + Disabled, + #[serde(rename = "PERMISSIVE")] + Permissive, + #[serde(rename = "STRICT")] + Strict, +} + +/// A reference to an object that represents an SDS Trust Domain +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualNodeListenersTlsValidation { + /// Possible alternative names to consider + #[serde(default, skip_serializing_if = "Option::is_none", rename = "subjectAlternativeNames")] + pub subject_alternative_names: Option, + pub trust: VirtualNodeListenersTlsValidationTrust, +} + +/// Possible alternative names to consider +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualNodeListenersTlsValidationSubjectAlternativeNames { + /// Match is a required field + #[serde(rename = "match")] + pub r#match: VirtualNodeListenersTlsValidationSubjectAlternativeNamesMatch, +} + +/// Match is a required field +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualNodeListenersTlsValidationSubjectAlternativeNamesMatch { + /// Exact is a required field + pub exact: Vec, +} + +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualNodeListenersTlsValidationTrust { + /// An object that represents a TLS validation context trust for a local file. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub file: Option, + /// An object that represents a TLS validation context trust for an SDS server + #[serde(default, skip_serializing_if = "Option::is_none")] + pub sds: Option, +} + +/// An object that represents a TLS validation context trust for a local file. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualNodeListenersTlsValidationTrustFile { + /// The certificate trust chain for a certificate stored on the file system of the virtual node that the proxy is running on. + #[serde(rename = "certificateChain")] + pub certificate_chain: String, +} + +/// An object that represents a TLS validation context trust for an SDS server +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualNodeListenersTlsValidationTrustSds { + /// The certificate trust chain for a certificate obtained via SDS + #[serde(rename = "secretName")] + pub secret_name: String, +} + +/// The inbound and outbound access logging information for the virtual node. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualNodeLogging { + /// The access log configuration for a virtual node. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "accessLog")] + pub access_log: Option, +} + +/// The access log configuration for a virtual node. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualNodeLoggingAccessLog { + /// The file object to send virtual node access logs to. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub file: Option, +} + +/// The file object to send virtual node access logs to. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualNodeLoggingAccessLogFile { + /// Structured access log output format + #[serde(default, skip_serializing_if = "Option::is_none")] + pub format: Option, + /// The file path to write access logs to. + pub path: String, +} + +/// Structured access log output format +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualNodeLoggingAccessLogFileFormat { + /// Output specified fields as a JSON object + #[serde(default, skip_serializing_if = "Option::is_none")] + pub json: Option>, + /// Custom format string + #[serde(default, skip_serializing_if = "Option::is_none")] + pub text: Option, +} + +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualNodeLoggingAccessLogFileFormatJson { + /// The name of the field in the JSON object + pub key: String, + /// The format string + pub value: String, +} + +/// A reference to k8s Mesh CR that this VirtualNode belongs to. The admission controller populates it using Meshes's selector, and prevents users from setting this field. +/// Populated by the system. Read-only. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualNodeMeshRef { + /// Name is the name of Mesh CR + pub name: String, + /// UID is the UID of Mesh CR + pub uid: String, +} + +/// PodSelector selects Pods using labels to designate VirtualNode membership. This field follows standard label selector semantics: if present but empty, it selects all pods within namespace. if absent, it selects no pod. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualNodePodSelector { + /// matchExpressions is a list of label selector requirements. The requirements are ANDed. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchExpressions")] + pub match_expressions: Option>, + /// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchLabels")] + pub match_labels: Option>, +} + +/// A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualNodePodSelectorMatchExpressions { + /// key is the label key that the selector applies to. + pub key: String, + /// operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. + pub operator: String, + /// values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub values: Option>, +} + +/// The service discovery information for the virtual node. Optional if there is no inbound traffic(no listeners). Mandatory if a listener is specified. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualNodeServiceDiscovery { + /// Specifies any AWS Cloud Map information for the virtual node. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "awsCloudMap")] + pub aws_cloud_map: Option, + /// Specifies the DNS information for the virtual node. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub dns: Option, +} + +/// Specifies any AWS Cloud Map information for the virtual node. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualNodeServiceDiscoveryAwsCloudMap { + /// A string map that contains attributes with values that you can use to filter instances by any custom attribute that you specified when you registered the instance + #[serde(default, skip_serializing_if = "Option::is_none")] + pub attributes: Option>, + /// The name of the AWS Cloud Map namespace to use. + #[serde(rename = "namespaceName")] + pub namespace_name: String, + /// The name of the AWS Cloud Map service to use. + #[serde(rename = "serviceName")] + pub service_name: String, +} + +/// AWSCloudMapInstanceAttribute refers to https://docs.aws.amazon.com/app-mesh/latest/APIReference/API_AwsCloudMapInstanceAttribute.html +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualNodeServiceDiscoveryAwsCloudMapAttributes { + /// The name of an AWS Cloud Map service instance attribute key. + pub key: String, + /// The value of an AWS Cloud Map service instance attribute key. + pub value: String, +} + +/// Specifies the DNS information for the virtual node. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualNodeServiceDiscoveryDns { + /// Specifies the DNS service discovery hostname for the virtual node. + pub hostname: String, + /// Choose between ENDPOINTS (strict DNS) and LOADBALANCER (logical DNS) mode in Envoy sidecar + #[serde(default, skip_serializing_if = "Option::is_none", rename = "responseType")] + pub response_type: Option, +} + +/// Specifies the DNS information for the virtual node. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub enum VirtualNodeServiceDiscoveryDnsResponseType { + #[serde(rename = "ENDPOINTS")] + Endpoints, + #[serde(rename = "LOADBALANCER")] + Loadbalancer, +} + +/// VirtualNodeStatus defines the observed state of VirtualNode +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualNodeStatus { + /// The current VirtualNode status. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub conditions: Option>, + /// The generation observed by the VirtualNode controller. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "observedGeneration")] + pub observed_generation: Option, + /// VirtualNodeARN is the AppMesh VirtualNode object's Amazon Resource Name + #[serde(default, skip_serializing_if = "Option::is_none", rename = "virtualNodeARN")] + pub virtual_node_arn: Option, +} + +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualNodeStatusConditions { + /// Last time the condition transitioned from one status to another. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "lastTransitionTime")] + pub last_transition_time: Option, + /// A human readable message indicating details about the transition. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub message: Option, + /// The reason for the condition's last transition. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub reason: Option, + /// Status of the condition, one of True, False, Unknown. + pub status: String, + /// Type of VirtualNode condition. + #[serde(rename = "type")] + pub r#type: String, +} + diff --git a/kube-custom-resources-rs/src/appmesh_k8s_aws/v1beta2/virtualrouters.rs b/kube-custom-resources-rs/src/appmesh_k8s_aws/v1beta2/virtualrouters.rs new file mode 100644 index 000000000..33130bbaf --- /dev/null +++ b/kube-custom-resources-rs/src/appmesh_k8s_aws/v1beta2/virtualrouters.rs @@ -0,0 +1,913 @@ +// WARNING: generated by kopium - manual changes will be overwritten +// kopium command: kopium --docs --filename=./crd-catalog/aws/aws-app-mesh-controller-for-k8/appmesh.k8s.aws/v1beta2/virtualrouters.yaml +// kopium version: 0.16.5 + +use kube::CustomResource; +use serde::{Serialize, Deserialize}; +use std::collections::BTreeMap; + +/// VirtualRouterSpec defines the desired state of VirtualRouter refers to https://docs.aws.amazon.com/app-mesh/latest/APIReference/API_VirtualRouterSpec.html +#[derive(CustomResource, Serialize, Deserialize, Clone, Debug)] +#[kube(group = "appmesh.k8s.aws", version = "v1beta2", kind = "VirtualRouter", plural = "virtualrouters")] +#[kube(namespaced)] +#[kube(status = "VirtualRouterStatus")] +#[kube(schema = "disabled")] +pub struct VirtualRouterSpec { + /// AWSName is the AppMesh VirtualRouter object's name. If unspecified or empty, it defaults to be "${name}_${namespace}" of k8s VirtualRouter + #[serde(default, skip_serializing_if = "Option::is_none", rename = "awsName")] + pub aws_name: Option, + /// The listeners that the virtual router is expected to receive inbound traffic from + #[serde(default, skip_serializing_if = "Option::is_none")] + pub listeners: Option>, + /// A reference to k8s Mesh CR that this VirtualRouter belongs to. The admission controller populates it using Meshes's selector, and prevents users from setting this field. + /// Populated by the system. Read-only. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "meshRef")] + pub mesh_ref: Option, + /// The routes associated with VirtualRouter + #[serde(default, skip_serializing_if = "Option::is_none")] + pub routes: Option>, +} + +/// VirtualRouterListener refers to https://docs.aws.amazon.com/app-mesh/latest/APIReference/API_VirtualRouterListener.html +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualRouterListeners { + /// The port mapping information for the listener. + #[serde(rename = "portMapping")] + pub port_mapping: VirtualRouterListenersPortMapping, +} + +/// The port mapping information for the listener. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualRouterListenersPortMapping { + /// The port used for the port mapping. + pub port: i64, + /// The protocol used for the port mapping. + pub protocol: VirtualRouterListenersPortMappingProtocol, +} + +/// The port mapping information for the listener. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub enum VirtualRouterListenersPortMappingProtocol { + #[serde(rename = "grpc")] + Grpc, + #[serde(rename = "http")] + Http, + #[serde(rename = "http2")] + Http2, + #[serde(rename = "tcp")] + Tcp, +} + +/// A reference to k8s Mesh CR that this VirtualRouter belongs to. The admission controller populates it using Meshes's selector, and prevents users from setting this field. +/// Populated by the system. Read-only. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualRouterMeshRef { + /// Name is the name of Mesh CR + pub name: String, + /// UID is the UID of Mesh CR + pub uid: String, +} + +/// Route refers to https://docs.aws.amazon.com/app-mesh/latest/APIReference/API_RouteSpec.html +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualRouterRoutes { + /// An object that represents the specification of a gRPC route. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "grpcRoute")] + pub grpc_route: Option, + /// An object that represents the specification of an HTTP/2 route. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "http2Route")] + pub http2_route: Option, + /// An object that represents the specification of an HTTP route. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "httpRoute")] + pub http_route: Option, + /// Route's name + pub name: String, + /// The priority for the route. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub priority: Option, + /// An object that represents the specification of a TCP route. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "tcpRoute")] + pub tcp_route: Option, +} + +/// An object that represents the specification of a gRPC route. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualRouterRoutesGrpcRoute { + /// An object that represents the action to take if a match is determined. + pub action: VirtualRouterRoutesGrpcRouteAction, + /// An object that represents the criteria for determining a request match. + #[serde(rename = "match")] + pub r#match: VirtualRouterRoutesGrpcRouteMatch, + /// An object that represents a retry policy. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "retryPolicy")] + pub retry_policy: Option, + /// An object that represents a grpc timeout. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub timeout: Option, +} + +/// An object that represents the action to take if a match is determined. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualRouterRoutesGrpcRouteAction { + /// An object that represents the targets that traffic is routed to when a request matches the route. + #[serde(rename = "weightedTargets")] + pub weighted_targets: Vec, +} + +/// WeightedTarget refers to https://docs.aws.amazon.com/app-mesh/latest/APIReference/API_WeightedTarget.html +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualRouterRoutesGrpcRouteActionWeightedTargets { + /// Specifies the targeted port of the weighted object + #[serde(default, skip_serializing_if = "Option::is_none")] + pub port: Option, + /// Amazon Resource Name to AppMesh VirtualNode object to associate with the weighted target. Exactly one of 'virtualNodeRef' or 'virtualNodeARN' must be specified. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "virtualNodeARN")] + pub virtual_node_arn: Option, + /// Reference to Kubernetes VirtualNode CR in cluster to associate with the weighted target. Exactly one of 'virtualNodeRef' or 'virtualNodeARN' must be specified. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "virtualNodeRef")] + pub virtual_node_ref: Option, + /// The relative weight of the weighted target. + pub weight: i64, +} + +/// Reference to Kubernetes VirtualNode CR in cluster to associate with the weighted target. Exactly one of 'virtualNodeRef' or 'virtualNodeARN' must be specified. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualRouterRoutesGrpcRouteActionWeightedTargetsVirtualNodeRef { + /// Name is the name of VirtualNode CR + pub name: String, + /// Namespace is the namespace of VirtualNode CR. If unspecified, defaults to the referencing object's namespace + #[serde(default, skip_serializing_if = "Option::is_none")] + pub namespace: Option, +} + +/// An object that represents the criteria for determining a request match. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualRouterRoutesGrpcRouteMatch { + /// An object that represents the data to match from the request. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub metadata: Option>, + /// The method name to match from the request. If you specify a name, you must also specify a serviceName. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "methodName")] + pub method_name: Option, + /// Specifies the port to match requests with + #[serde(default, skip_serializing_if = "Option::is_none")] + pub port: Option, + /// The fully qualified domain name for the service to match from the request. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "serviceName")] + pub service_name: Option, +} + +/// GRPCRouteMetadata refers to https://docs.aws.amazon.com/app-mesh/latest/APIReference/API_GrpcRouteMetadata.html +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualRouterRoutesGrpcRouteMatchMetadata { + /// Specify True to match anything except the match criteria. The default value is False. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub invert: Option, + /// An object that represents the data to match from the request. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "match")] + pub r#match: Option, + /// The name of the route. + pub name: String, +} + +/// An object that represents the data to match from the request. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualRouterRoutesGrpcRouteMatchMetadataMatch { + /// The value sent by the client must match the specified value exactly. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub exact: Option, + /// The value sent by the client must begin with the specified characters. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub prefix: Option, + /// An object that represents the range of values to match on + #[serde(default, skip_serializing_if = "Option::is_none")] + pub range: Option, + /// The value sent by the client must include the specified characters. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub regex: Option, + /// The value sent by the client must end with the specified characters. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub suffix: Option, +} + +/// An object that represents the range of values to match on +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualRouterRoutesGrpcRouteMatchMetadataMatchRange { + /// The end of the range. + pub end: i64, + /// The start of the range. + pub start: i64, +} + +/// An object that represents a retry policy. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualRouterRoutesGrpcRouteRetryPolicy { + #[serde(default, skip_serializing_if = "Option::is_none", rename = "grpcRetryEvents")] + pub grpc_retry_events: Option>, + #[serde(default, skip_serializing_if = "Option::is_none", rename = "httpRetryEvents")] + pub http_retry_events: Option>, + /// The maximum number of retry attempts. + #[serde(rename = "maxRetries")] + pub max_retries: i64, + /// An object that represents a duration of time. + #[serde(rename = "perRetryTimeout")] + pub per_retry_timeout: VirtualRouterRoutesGrpcRouteRetryPolicyPerRetryTimeout, + #[serde(default, skip_serializing_if = "Option::is_none", rename = "tcpRetryEvents")] + pub tcp_retry_events: Option>, +} + +/// An object that represents a duration of time. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualRouterRoutesGrpcRouteRetryPolicyPerRetryTimeout { + /// A unit of time. + pub unit: VirtualRouterRoutesGrpcRouteRetryPolicyPerRetryTimeoutUnit, + /// A number of time units. + pub value: i64, +} + +/// An object that represents a duration of time. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub enum VirtualRouterRoutesGrpcRouteRetryPolicyPerRetryTimeoutUnit { + #[serde(rename = "s")] + S, + #[serde(rename = "ms")] + Ms, +} + +/// An object that represents a grpc timeout. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualRouterRoutesGrpcRouteTimeout { + /// An object that represents idle timeout duration. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub idle: Option, + /// An object that represents per request timeout duration. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "perRequest")] + pub per_request: Option, +} + +/// An object that represents idle timeout duration. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualRouterRoutesGrpcRouteTimeoutIdle { + /// A unit of time. + pub unit: VirtualRouterRoutesGrpcRouteTimeoutIdleUnit, + /// A number of time units. + pub value: i64, +} + +/// An object that represents idle timeout duration. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub enum VirtualRouterRoutesGrpcRouteTimeoutIdleUnit { + #[serde(rename = "s")] + S, + #[serde(rename = "ms")] + Ms, +} + +/// An object that represents per request timeout duration. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualRouterRoutesGrpcRouteTimeoutPerRequest { + /// A unit of time. + pub unit: VirtualRouterRoutesGrpcRouteTimeoutPerRequestUnit, + /// A number of time units. + pub value: i64, +} + +/// An object that represents per request timeout duration. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub enum VirtualRouterRoutesGrpcRouteTimeoutPerRequestUnit { + #[serde(rename = "s")] + S, + #[serde(rename = "ms")] + Ms, +} + +/// An object that represents the specification of an HTTP/2 route. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualRouterRoutesHttp2Route { + /// An object that represents the action to take if a match is determined. + pub action: VirtualRouterRoutesHttp2RouteAction, + /// An object that represents the criteria for determining a request match. + #[serde(rename = "match")] + pub r#match: VirtualRouterRoutesHttp2RouteMatch, + /// An object that represents a retry policy. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "retryPolicy")] + pub retry_policy: Option, + /// An object that represents a http timeout. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub timeout: Option, +} + +/// An object that represents the action to take if a match is determined. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualRouterRoutesHttp2RouteAction { + /// An object that represents the targets that traffic is routed to when a request matches the route. + #[serde(rename = "weightedTargets")] + pub weighted_targets: Vec, +} + +/// WeightedTarget refers to https://docs.aws.amazon.com/app-mesh/latest/APIReference/API_WeightedTarget.html +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualRouterRoutesHttp2RouteActionWeightedTargets { + /// Specifies the targeted port of the weighted object + #[serde(default, skip_serializing_if = "Option::is_none")] + pub port: Option, + /// Amazon Resource Name to AppMesh VirtualNode object to associate with the weighted target. Exactly one of 'virtualNodeRef' or 'virtualNodeARN' must be specified. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "virtualNodeARN")] + pub virtual_node_arn: Option, + /// Reference to Kubernetes VirtualNode CR in cluster to associate with the weighted target. Exactly one of 'virtualNodeRef' or 'virtualNodeARN' must be specified. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "virtualNodeRef")] + pub virtual_node_ref: Option, + /// The relative weight of the weighted target. + pub weight: i64, +} + +/// Reference to Kubernetes VirtualNode CR in cluster to associate with the weighted target. Exactly one of 'virtualNodeRef' or 'virtualNodeARN' must be specified. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualRouterRoutesHttp2RouteActionWeightedTargetsVirtualNodeRef { + /// Name is the name of VirtualNode CR + pub name: String, + /// Namespace is the namespace of VirtualNode CR. If unspecified, defaults to the referencing object's namespace + #[serde(default, skip_serializing_if = "Option::is_none")] + pub namespace: Option, +} + +/// An object that represents the criteria for determining a request match. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualRouterRoutesHttp2RouteMatch { + /// An object that represents the client request headers to match on. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub headers: Option>, + /// The client request method to match on. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub method: Option, + /// The client specified Path to match on. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub path: Option, + /// Specifies the port to match requests with + #[serde(default, skip_serializing_if = "Option::is_none")] + pub port: Option, + /// Specifies the prefix to match requests with + #[serde(default, skip_serializing_if = "Option::is_none")] + pub prefix: Option, + /// The client specified queryParameters to match on + #[serde(default, skip_serializing_if = "Option::is_none", rename = "queryParameters")] + pub query_parameters: Option>, + /// The client request scheme to match on + #[serde(default, skip_serializing_if = "Option::is_none")] + pub scheme: Option, +} + +/// HTTPRouteHeader refers to https://docs.aws.amazon.com/app-mesh/latest/APIReference/API_HttpRouteHeader.html +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualRouterRoutesHttp2RouteMatchHeaders { + /// Specify True to match anything except the match criteria. The default value is False. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub invert: Option, + /// The HeaderMatchMethod object. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "match")] + pub r#match: Option, + /// A name for the HTTP header in the client request that will be matched on. + pub name: String, +} + +/// The HeaderMatchMethod object. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualRouterRoutesHttp2RouteMatchHeadersMatch { + /// The value sent by the client must match the specified value exactly. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub exact: Option, + /// The value sent by the client must begin with the specified characters. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub prefix: Option, + /// An object that represents the range of values to match on. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub range: Option, + /// The value sent by the client must include the specified characters. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub regex: Option, + /// The value sent by the client must end with the specified characters. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub suffix: Option, +} + +/// An object that represents the range of values to match on. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualRouterRoutesHttp2RouteMatchHeadersMatchRange { + /// The end of the range. + pub end: i64, + /// The start of the range. + pub start: i64, +} + +/// An object that represents the criteria for determining a request match. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub enum VirtualRouterRoutesHttp2RouteMatchMethod { + #[serde(rename = "CONNECT")] + Connect, + #[serde(rename = "DELETE")] + Delete, + #[serde(rename = "GET")] + Get, + #[serde(rename = "HEAD")] + Head, + #[serde(rename = "OPTIONS")] + Options, + #[serde(rename = "PATCH")] + Patch, + #[serde(rename = "POST")] + Post, + #[serde(rename = "PUT")] + Put, + #[serde(rename = "TRACE")] + Trace, +} + +/// The client specified Path to match on. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualRouterRoutesHttp2RouteMatchPath { + /// The value sent by the client must match the specified value exactly. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub exact: Option, + /// The value sent by the client must end with the specified characters. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub regex: Option, +} + +/// HTTPQueryParameters refers to https://docs.aws.amazon.com/app-mesh/latest/APIReference/API_HttpQueryParameter.html +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualRouterRoutesHttp2RouteMatchQueryParameters { + /// The QueryMatchMethod object. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "match")] + pub r#match: Option, + pub name: String, +} + +/// The QueryMatchMethod object. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualRouterRoutesHttp2RouteMatchQueryParametersMatch { + #[serde(default, skip_serializing_if = "Option::is_none")] + pub exact: Option, +} + +/// An object that represents the criteria for determining a request match. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub enum VirtualRouterRoutesHttp2RouteMatchScheme { + #[serde(rename = "http")] + Http, + #[serde(rename = "https")] + Https, +} + +/// An object that represents a retry policy. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualRouterRoutesHttp2RouteRetryPolicy { + #[serde(default, skip_serializing_if = "Option::is_none", rename = "httpRetryEvents")] + pub http_retry_events: Option>, + /// The maximum number of retry attempts. + #[serde(rename = "maxRetries")] + pub max_retries: i64, + /// An object that represents a duration of time + #[serde(rename = "perRetryTimeout")] + pub per_retry_timeout: VirtualRouterRoutesHttp2RouteRetryPolicyPerRetryTimeout, + #[serde(default, skip_serializing_if = "Option::is_none", rename = "tcpRetryEvents")] + pub tcp_retry_events: Option>, +} + +/// An object that represents a duration of time +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualRouterRoutesHttp2RouteRetryPolicyPerRetryTimeout { + /// A unit of time. + pub unit: VirtualRouterRoutesHttp2RouteRetryPolicyPerRetryTimeoutUnit, + /// A number of time units. + pub value: i64, +} + +/// An object that represents a duration of time +#[derive(Serialize, Deserialize, Clone, Debug)] +pub enum VirtualRouterRoutesHttp2RouteRetryPolicyPerRetryTimeoutUnit { + #[serde(rename = "s")] + S, + #[serde(rename = "ms")] + Ms, +} + +/// An object that represents a http timeout. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualRouterRoutesHttp2RouteTimeout { + /// An object that represents idle timeout duration. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub idle: Option, + /// An object that represents per request timeout duration. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "perRequest")] + pub per_request: Option, +} + +/// An object that represents idle timeout duration. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualRouterRoutesHttp2RouteTimeoutIdle { + /// A unit of time. + pub unit: VirtualRouterRoutesHttp2RouteTimeoutIdleUnit, + /// A number of time units. + pub value: i64, +} + +/// An object that represents idle timeout duration. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub enum VirtualRouterRoutesHttp2RouteTimeoutIdleUnit { + #[serde(rename = "s")] + S, + #[serde(rename = "ms")] + Ms, +} + +/// An object that represents per request timeout duration. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualRouterRoutesHttp2RouteTimeoutPerRequest { + /// A unit of time. + pub unit: VirtualRouterRoutesHttp2RouteTimeoutPerRequestUnit, + /// A number of time units. + pub value: i64, +} + +/// An object that represents per request timeout duration. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub enum VirtualRouterRoutesHttp2RouteTimeoutPerRequestUnit { + #[serde(rename = "s")] + S, + #[serde(rename = "ms")] + Ms, +} + +/// An object that represents the specification of an HTTP route. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualRouterRoutesHttpRoute { + /// An object that represents the action to take if a match is determined. + pub action: VirtualRouterRoutesHttpRouteAction, + /// An object that represents the criteria for determining a request match. + #[serde(rename = "match")] + pub r#match: VirtualRouterRoutesHttpRouteMatch, + /// An object that represents a retry policy. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "retryPolicy")] + pub retry_policy: Option, + /// An object that represents a http timeout. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub timeout: Option, +} + +/// An object that represents the action to take if a match is determined. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualRouterRoutesHttpRouteAction { + /// An object that represents the targets that traffic is routed to when a request matches the route. + #[serde(rename = "weightedTargets")] + pub weighted_targets: Vec, +} + +/// WeightedTarget refers to https://docs.aws.amazon.com/app-mesh/latest/APIReference/API_WeightedTarget.html +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualRouterRoutesHttpRouteActionWeightedTargets { + /// Specifies the targeted port of the weighted object + #[serde(default, skip_serializing_if = "Option::is_none")] + pub port: Option, + /// Amazon Resource Name to AppMesh VirtualNode object to associate with the weighted target. Exactly one of 'virtualNodeRef' or 'virtualNodeARN' must be specified. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "virtualNodeARN")] + pub virtual_node_arn: Option, + /// Reference to Kubernetes VirtualNode CR in cluster to associate with the weighted target. Exactly one of 'virtualNodeRef' or 'virtualNodeARN' must be specified. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "virtualNodeRef")] + pub virtual_node_ref: Option, + /// The relative weight of the weighted target. + pub weight: i64, +} + +/// Reference to Kubernetes VirtualNode CR in cluster to associate with the weighted target. Exactly one of 'virtualNodeRef' or 'virtualNodeARN' must be specified. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualRouterRoutesHttpRouteActionWeightedTargetsVirtualNodeRef { + /// Name is the name of VirtualNode CR + pub name: String, + /// Namespace is the namespace of VirtualNode CR. If unspecified, defaults to the referencing object's namespace + #[serde(default, skip_serializing_if = "Option::is_none")] + pub namespace: Option, +} + +/// An object that represents the criteria for determining a request match. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualRouterRoutesHttpRouteMatch { + /// An object that represents the client request headers to match on. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub headers: Option>, + /// The client request method to match on. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub method: Option, + /// The client specified Path to match on. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub path: Option, + /// Specifies the port to match requests with + #[serde(default, skip_serializing_if = "Option::is_none")] + pub port: Option, + /// Specifies the prefix to match requests with + #[serde(default, skip_serializing_if = "Option::is_none")] + pub prefix: Option, + /// The client specified queryParameters to match on + #[serde(default, skip_serializing_if = "Option::is_none", rename = "queryParameters")] + pub query_parameters: Option>, + /// The client request scheme to match on + #[serde(default, skip_serializing_if = "Option::is_none")] + pub scheme: Option, +} + +/// HTTPRouteHeader refers to https://docs.aws.amazon.com/app-mesh/latest/APIReference/API_HttpRouteHeader.html +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualRouterRoutesHttpRouteMatchHeaders { + /// Specify True to match anything except the match criteria. The default value is False. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub invert: Option, + /// The HeaderMatchMethod object. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "match")] + pub r#match: Option, + /// A name for the HTTP header in the client request that will be matched on. + pub name: String, +} + +/// The HeaderMatchMethod object. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualRouterRoutesHttpRouteMatchHeadersMatch { + /// The value sent by the client must match the specified value exactly. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub exact: Option, + /// The value sent by the client must begin with the specified characters. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub prefix: Option, + /// An object that represents the range of values to match on. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub range: Option, + /// The value sent by the client must include the specified characters. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub regex: Option, + /// The value sent by the client must end with the specified characters. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub suffix: Option, +} + +/// An object that represents the range of values to match on. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualRouterRoutesHttpRouteMatchHeadersMatchRange { + /// The end of the range. + pub end: i64, + /// The start of the range. + pub start: i64, +} + +/// An object that represents the criteria for determining a request match. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub enum VirtualRouterRoutesHttpRouteMatchMethod { + #[serde(rename = "CONNECT")] + Connect, + #[serde(rename = "DELETE")] + Delete, + #[serde(rename = "GET")] + Get, + #[serde(rename = "HEAD")] + Head, + #[serde(rename = "OPTIONS")] + Options, + #[serde(rename = "PATCH")] + Patch, + #[serde(rename = "POST")] + Post, + #[serde(rename = "PUT")] + Put, + #[serde(rename = "TRACE")] + Trace, +} + +/// The client specified Path to match on. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualRouterRoutesHttpRouteMatchPath { + /// The value sent by the client must match the specified value exactly. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub exact: Option, + /// The value sent by the client must end with the specified characters. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub regex: Option, +} + +/// HTTPQueryParameters refers to https://docs.aws.amazon.com/app-mesh/latest/APIReference/API_HttpQueryParameter.html +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualRouterRoutesHttpRouteMatchQueryParameters { + /// The QueryMatchMethod object. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "match")] + pub r#match: Option, + pub name: String, +} + +/// The QueryMatchMethod object. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualRouterRoutesHttpRouteMatchQueryParametersMatch { + #[serde(default, skip_serializing_if = "Option::is_none")] + pub exact: Option, +} + +/// An object that represents the criteria for determining a request match. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub enum VirtualRouterRoutesHttpRouteMatchScheme { + #[serde(rename = "http")] + Http, + #[serde(rename = "https")] + Https, +} + +/// An object that represents a retry policy. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualRouterRoutesHttpRouteRetryPolicy { + #[serde(default, skip_serializing_if = "Option::is_none", rename = "httpRetryEvents")] + pub http_retry_events: Option>, + /// The maximum number of retry attempts. + #[serde(rename = "maxRetries")] + pub max_retries: i64, + /// An object that represents a duration of time + #[serde(rename = "perRetryTimeout")] + pub per_retry_timeout: VirtualRouterRoutesHttpRouteRetryPolicyPerRetryTimeout, + #[serde(default, skip_serializing_if = "Option::is_none", rename = "tcpRetryEvents")] + pub tcp_retry_events: Option>, +} + +/// An object that represents a duration of time +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualRouterRoutesHttpRouteRetryPolicyPerRetryTimeout { + /// A unit of time. + pub unit: VirtualRouterRoutesHttpRouteRetryPolicyPerRetryTimeoutUnit, + /// A number of time units. + pub value: i64, +} + +/// An object that represents a duration of time +#[derive(Serialize, Deserialize, Clone, Debug)] +pub enum VirtualRouterRoutesHttpRouteRetryPolicyPerRetryTimeoutUnit { + #[serde(rename = "s")] + S, + #[serde(rename = "ms")] + Ms, +} + +/// An object that represents a http timeout. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualRouterRoutesHttpRouteTimeout { + /// An object that represents idle timeout duration. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub idle: Option, + /// An object that represents per request timeout duration. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "perRequest")] + pub per_request: Option, +} + +/// An object that represents idle timeout duration. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualRouterRoutesHttpRouteTimeoutIdle { + /// A unit of time. + pub unit: VirtualRouterRoutesHttpRouteTimeoutIdleUnit, + /// A number of time units. + pub value: i64, +} + +/// An object that represents idle timeout duration. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub enum VirtualRouterRoutesHttpRouteTimeoutIdleUnit { + #[serde(rename = "s")] + S, + #[serde(rename = "ms")] + Ms, +} + +/// An object that represents per request timeout duration. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualRouterRoutesHttpRouteTimeoutPerRequest { + /// A unit of time. + pub unit: VirtualRouterRoutesHttpRouteTimeoutPerRequestUnit, + /// A number of time units. + pub value: i64, +} + +/// An object that represents per request timeout duration. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub enum VirtualRouterRoutesHttpRouteTimeoutPerRequestUnit { + #[serde(rename = "s")] + S, + #[serde(rename = "ms")] + Ms, +} + +/// An object that represents the specification of a TCP route. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualRouterRoutesTcpRoute { + /// The action to take if a match is determined. + pub action: VirtualRouterRoutesTcpRouteAction, + /// An object that represents the criteria for determining a request match. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "match")] + pub r#match: Option, + /// An object that represents a tcp timeout. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub timeout: Option, +} + +/// The action to take if a match is determined. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualRouterRoutesTcpRouteAction { + /// An object that represents the targets that traffic is routed to when a request matches the route. + #[serde(rename = "weightedTargets")] + pub weighted_targets: Vec, +} + +/// WeightedTarget refers to https://docs.aws.amazon.com/app-mesh/latest/APIReference/API_WeightedTarget.html +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualRouterRoutesTcpRouteActionWeightedTargets { + /// Specifies the targeted port of the weighted object + #[serde(default, skip_serializing_if = "Option::is_none")] + pub port: Option, + /// Amazon Resource Name to AppMesh VirtualNode object to associate with the weighted target. Exactly one of 'virtualNodeRef' or 'virtualNodeARN' must be specified. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "virtualNodeARN")] + pub virtual_node_arn: Option, + /// Reference to Kubernetes VirtualNode CR in cluster to associate with the weighted target. Exactly one of 'virtualNodeRef' or 'virtualNodeARN' must be specified. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "virtualNodeRef")] + pub virtual_node_ref: Option, + /// The relative weight of the weighted target. + pub weight: i64, +} + +/// Reference to Kubernetes VirtualNode CR in cluster to associate with the weighted target. Exactly one of 'virtualNodeRef' or 'virtualNodeARN' must be specified. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualRouterRoutesTcpRouteActionWeightedTargetsVirtualNodeRef { + /// Name is the name of VirtualNode CR + pub name: String, + /// Namespace is the namespace of VirtualNode CR. If unspecified, defaults to the referencing object's namespace + #[serde(default, skip_serializing_if = "Option::is_none")] + pub namespace: Option, +} + +/// An object that represents the criteria for determining a request match. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualRouterRoutesTcpRouteMatch { + /// Specifies the port to match requests with + #[serde(default, skip_serializing_if = "Option::is_none")] + pub port: Option, +} + +/// An object that represents a tcp timeout. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualRouterRoutesTcpRouteTimeout { + /// An object that represents idle timeout duration. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub idle: Option, +} + +/// An object that represents idle timeout duration. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualRouterRoutesTcpRouteTimeoutIdle { + /// A unit of time. + pub unit: VirtualRouterRoutesTcpRouteTimeoutIdleUnit, + /// A number of time units. + pub value: i64, +} + +/// An object that represents idle timeout duration. +#[derive(Serialize, Deserialize, Clone, Debug)] +pub enum VirtualRouterRoutesTcpRouteTimeoutIdleUnit { + #[serde(rename = "s")] + S, + #[serde(rename = "ms")] + Ms, +} + +/// VirtualRouterStatus defines the observed state of VirtualRouter +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualRouterStatus { + /// The current VirtualRouter status. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub conditions: Option>, + /// The generation observed by the VirtualRouter controller. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "observedGeneration")] + pub observed_generation: Option, + /// RouteARNs is a map of AppMesh Route objects' Amazon Resource Names, indexed by route name. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "routeARNs")] + pub route_ar_ns: Option>, + /// VirtualRouterARN is the AppMesh VirtualRouter object's Amazon Resource Name. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "virtualRouterARN")] + pub virtual_router_arn: Option, +} + +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct VirtualRouterStatusConditions { + /// Last time the condition transitioned from one status to another. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "lastTransitionTime")] + pub last_transition_time: Option, + /// A human readable message indicating details about the transition. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub message: Option, + /// The reason for the condition's last transition. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub reason: Option, + /// Status of the condition, one of True, False, Unknown. + pub status: String, + /// Type of VirtualRouter condition. + #[serde(rename = "type")] + pub r#type: String, +} + diff --git a/kube-custom-resources-rs/src/appmesh_k8s_aws/v1beta2/virtualservices.rs b/kube-custom-resources-rs/src/appmesh_k8s_aws/v1beta2/virtualservices.rs new file mode 100644 index 000000000..9a19caae6 --- /dev/null +++ b/kube-custom-resources-rs/src/appmesh_k8s_aws/v1beta2/virtualservices.rs @@ -0,0 +1,121 @@ +// WARNING: generated by kopium - manual changes will be overwritten +// kopium command: kopium --docs --filename=./crd-catalog/aws/aws-app-mesh-controller-for-k8/appmesh.k8s.aws/v1beta2/virtualservices.yaml --derive=Default --derive=PartialEq +// kopium version: 0.16.5 + +use kube::CustomResource; +use serde::{Serialize, Deserialize}; + +/// VirtualServiceSpec defines the desired state of VirtualService refers to https://docs.aws.amazon.com/app-mesh/latest/APIReference/API_VirtualServiceSpec.html +#[derive(CustomResource, Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +#[kube(group = "appmesh.k8s.aws", version = "v1beta2", kind = "VirtualService", plural = "virtualservices")] +#[kube(namespaced)] +#[kube(status = "VirtualServiceStatus")] +#[kube(schema = "disabled")] +pub struct VirtualServiceSpec { + /// AWSName is the AppMesh VirtualService object's name. If unspecified or empty, it defaults to be "${name}.${namespace}" of k8s VirtualService + #[serde(default, skip_serializing_if = "Option::is_none", rename = "awsName")] + pub aws_name: Option, + /// A reference to k8s Mesh CR that this VirtualService belongs to. The admission controller populates it using Meshes's selector, and prevents users from setting this field. + /// Populated by the system. Read-only. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "meshRef")] + pub mesh_ref: Option, + /// The provider for virtual services. You can specify a single virtual node or virtual router. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub provider: Option, +} + +/// A reference to k8s Mesh CR that this VirtualService belongs to. The admission controller populates it using Meshes's selector, and prevents users from setting this field. +/// Populated by the system. Read-only. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct VirtualServiceMeshRef { + /// Name is the name of Mesh CR + pub name: String, + /// UID is the UID of Mesh CR + pub uid: String, +} + +/// The provider for virtual services. You can specify a single virtual node or virtual router. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct VirtualServiceProvider { + /// The virtual node associated with a virtual service. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "virtualNode")] + pub virtual_node: Option, + /// The virtual router associated with a virtual service. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "virtualRouter")] + pub virtual_router: Option, +} + +/// The virtual node associated with a virtual service. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct VirtualServiceProviderVirtualNode { + /// Amazon Resource Name to AppMesh VirtualNode object that is acting as a service provider. Exactly one of 'virtualNodeRef' or 'virtualNodeARN' must be specified. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "virtualNodeARN")] + pub virtual_node_arn: Option, + /// Reference to Kubernetes VirtualNode CR in cluster that is acting as a service provider. Exactly one of 'virtualNodeRef' or 'virtualNodeARN' must be specified. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "virtualNodeRef")] + pub virtual_node_ref: Option, +} + +/// Reference to Kubernetes VirtualNode CR in cluster that is acting as a service provider. Exactly one of 'virtualNodeRef' or 'virtualNodeARN' must be specified. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct VirtualServiceProviderVirtualNodeVirtualNodeRef { + /// Name is the name of VirtualNode CR + pub name: String, + /// Namespace is the namespace of VirtualNode CR. If unspecified, defaults to the referencing object's namespace + #[serde(default, skip_serializing_if = "Option::is_none")] + pub namespace: Option, +} + +/// The virtual router associated with a virtual service. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct VirtualServiceProviderVirtualRouter { + /// Amazon Resource Name to AppMesh VirtualRouter object that is acting as a service provider. Exactly one of 'virtualRouterRef' or 'virtualRouterARN' must be specified. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "virtualRouterARN")] + pub virtual_router_arn: Option, + /// Reference to Kubernetes VirtualRouter CR in cluster that is acting as a service provider. Exactly one of 'virtualRouterRef' or 'virtualRouterARN' must be specified. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "virtualRouterRef")] + pub virtual_router_ref: Option, +} + +/// Reference to Kubernetes VirtualRouter CR in cluster that is acting as a service provider. Exactly one of 'virtualRouterRef' or 'virtualRouterARN' must be specified. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct VirtualServiceProviderVirtualRouterVirtualRouterRef { + /// Name is the name of VirtualRouter CR + pub name: String, + /// Namespace is the namespace of VirtualRouter CR. If unspecified, defaults to the referencing object's namespace + #[serde(default, skip_serializing_if = "Option::is_none")] + pub namespace: Option, +} + +/// VirtualServiceStatus defines the observed state of VirtualService +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct VirtualServiceStatus { + /// The current VirtualService status. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub conditions: Option>, + /// The generation observed by the VirtualService controller. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "observedGeneration")] + pub observed_generation: Option, + /// VirtualServiceARN is the AppMesh VirtualService object's Amazon Resource Name. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "virtualServiceARN")] + pub virtual_service_arn: Option, +} + +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct VirtualServiceStatusConditions { + /// Last time the condition transitioned from one status to another. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "lastTransitionTime")] + pub last_transition_time: Option, + /// A human readable message indicating details about the transition. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub message: Option, + /// The reason for the condition's last transition. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub reason: Option, + /// Status of the condition, one of True, False, Unknown. + pub status: String, + /// Type of VirtualService condition. + #[serde(rename = "type")] + pub r#type: String, +} + diff --git a/kube-custom-resources-rs/src/lib.rs b/kube-custom-resources-rs/src/lib.rs index 9b4716daf..c3a3fc88b 100644 --- a/kube-custom-resources-rs/src/lib.rs +++ b/kube-custom-resources-rs/src/lib.rs @@ -147,6 +147,17 @@ apiVersion `applicationautoscaling.services.k8s.aws/v1alpha1`: - `ScalableTarget` - `ScalingPolicy` +## appmesh_k8s_aws + +apiVersion `appmesh.k8s.aws/v1beta2`: +- `BackendGroup` +- `GatewayRoute` +- `Mesh` +- `VirtualGateway` +- `VirtualNode` +- `VirtualRouter` +- `VirtualService` + ## appprotect_f5_com apiVersion `appprotect.f5.com/v1beta1`: @@ -891,7 +902,6 @@ apiVersion `externaldata.gatekeeper.sh/v1beta1`: apiVersion `externaldns.k8s.io/v1alpha1`: - `DNSEndpoint` -- `DNSEndpoint` ## externaldns_nginx_org @@ -2405,6 +2415,8 @@ pub mod app_terraform_io; pub mod application_networking_k8s_aws; #[cfg(feature = "applicationautoscaling_services_k8s_aws")] pub mod applicationautoscaling_services_k8s_aws; +#[cfg(feature = "appmesh_k8s_aws")] +pub mod appmesh_k8s_aws; #[cfg(feature = "appprotect_f5_com")] pub mod appprotect_f5_com; #[cfg(feature = "appprotectdos_f5_com")]