From ad1f07422de45b9855a1fd3a573e53a0c1714463 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Ho=C3=9F?= Date: Sun, 4 Feb 2024 11:44:31 +0100 Subject: [PATCH] add aws/aws-application-networking-k8s 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 | 12 + .../v1alpha1/accesslogpolicies.args | 1 + .../v1alpha1/accesslogpolicies.yaml | 153 +++++++++++++ .../v1alpha1/iamauthpolicies.args | 1 + .../v1alpha1/iamauthpolicies.yaml | 152 +++++++++++++ .../v1alpha1/serviceexports.args | 1 + .../v1alpha1/serviceexports.yaml | 64 ++++++ .../v1alpha1/serviceimports.args | 1 + .../v1alpha1/serviceimports.yaml | 107 +++++++++ .../v1alpha1/targetgrouppolicies.args | 1 + .../v1alpha1/targetgrouppolicies.yaml | 209 ++++++++++++++++++ .../v1alpha1/vpcassociationpolicies.args | 1 + .../v1alpha1/vpcassociationpolicies.yaml | 148 +++++++++++++ kube-custom-resources-rs/Cargo.toml | 1 + .../src/application_networking_k8s_aws/mod.rs | 1 + .../v1alpha1/accesslogpolicies.rs | 82 +++++++ .../v1alpha1/iamauthpolicies.rs | 80 +++++++ .../v1alpha1/mod.rs | 6 + .../v1alpha1/serviceexports.rs | 40 ++++ .../v1alpha1/serviceimports.rs | 83 +++++++ .../v1alpha1/targetgrouppolicies.rs | 146 ++++++++++++ .../v1alpha1/vpcassociationpolicies.rs | 86 +++++++ kube-custom-resources-rs/src/lib.rs | 12 + 24 files changed, 1392 insertions(+) create mode 100644 crd-catalog/aws/aws-application-networking-k8s/application-networking.k8s.aws/v1alpha1/accesslogpolicies.args create mode 100644 crd-catalog/aws/aws-application-networking-k8s/application-networking.k8s.aws/v1alpha1/accesslogpolicies.yaml create mode 100644 crd-catalog/aws/aws-application-networking-k8s/application-networking.k8s.aws/v1alpha1/iamauthpolicies.args create mode 100644 crd-catalog/aws/aws-application-networking-k8s/application-networking.k8s.aws/v1alpha1/iamauthpolicies.yaml create mode 100644 crd-catalog/aws/aws-application-networking-k8s/application-networking.k8s.aws/v1alpha1/serviceexports.args create mode 100644 crd-catalog/aws/aws-application-networking-k8s/application-networking.k8s.aws/v1alpha1/serviceexports.yaml create mode 100644 crd-catalog/aws/aws-application-networking-k8s/application-networking.k8s.aws/v1alpha1/serviceimports.args create mode 100644 crd-catalog/aws/aws-application-networking-k8s/application-networking.k8s.aws/v1alpha1/serviceimports.yaml create mode 100644 crd-catalog/aws/aws-application-networking-k8s/application-networking.k8s.aws/v1alpha1/targetgrouppolicies.args create mode 100644 crd-catalog/aws/aws-application-networking-k8s/application-networking.k8s.aws/v1alpha1/targetgrouppolicies.yaml create mode 100644 crd-catalog/aws/aws-application-networking-k8s/application-networking.k8s.aws/v1alpha1/vpcassociationpolicies.args create mode 100644 crd-catalog/aws/aws-application-networking-k8s/application-networking.k8s.aws/v1alpha1/vpcassociationpolicies.yaml create mode 100644 kube-custom-resources-rs/src/application_networking_k8s_aws/mod.rs create mode 100644 kube-custom-resources-rs/src/application_networking_k8s_aws/v1alpha1/accesslogpolicies.rs create mode 100644 kube-custom-resources-rs/src/application_networking_k8s_aws/v1alpha1/iamauthpolicies.rs create mode 100644 kube-custom-resources-rs/src/application_networking_k8s_aws/v1alpha1/mod.rs create mode 100644 kube-custom-resources-rs/src/application_networking_k8s_aws/v1alpha1/serviceexports.rs create mode 100644 kube-custom-resources-rs/src/application_networking_k8s_aws/v1alpha1/serviceimports.rs create mode 100644 kube-custom-resources-rs/src/application_networking_k8s_aws/v1alpha1/targetgrouppolicies.rs create mode 100644 kube-custom-resources-rs/src/application_networking_k8s_aws/v1alpha1/vpcassociationpolicies.rs diff --git a/.reuse/dep5 b/.reuse/dep5 index 0654ee0b7..ad470b801 100644 --- a/.reuse/dep5 +++ b/.reuse/dep5 @@ -87,6 +87,10 @@ Files: crd-catalog/aws/amazon-vpc-resource-controller-k8s/* Copyright: The aws/amazon-vpc-resource-controller-k8s Authors License: Apache-2.0 +Files: crd-catalog/aws/aws-application-networking-k8s/* +Copyright: The aws/aws-application-networking-k8s 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 87606c779..078a52aa7 100644 --- a/code-generator/src/catalog.rs +++ b/code-generator/src/catalog.rs @@ -216,6 +216,18 @@ pub const CRD_V1_SOURCES: &'static [UpstreamSource] = &[ "https://github.com/aws/amazon-vpc-resource-controller-k8s/blob/master/config/crd/bases/vpcresources.k8s.aws_securitygrouppolicies.yaml", ], }, + UpstreamSource { + project_name: "aws/aws-application-networking-k8s", + license: APACHE_V2, + urls: &[ + "https://github.com/aws/aws-application-networking-k8s/blob/main/config/crds/bases/application-networking.k8s.aws_accesslogpolicies.yaml", + "https://github.com/aws/aws-application-networking-k8s/blob/main/config/crds/bases/application-networking.k8s.aws_iamauthpolicies.yaml", + "https://github.com/aws/aws-application-networking-k8s/blob/main/config/crds/bases/application-networking.k8s.aws_serviceexports.yaml", + "https://github.com/aws/aws-application-networking-k8s/blob/main/config/crds/bases/application-networking.k8s.aws_serviceimports.yaml", + "https://github.com/aws/aws-application-networking-k8s/blob/main/config/crds/bases/application-networking.k8s.aws_targetgrouppolicies.yaml", + "https://github.com/aws/aws-application-networking-k8s/blob/main/config/crds/bases/application-networking.k8s.aws_vpcassociationpolicies.yaml", + ], + }, UpstreamSource { project_name: "aws-controllers-k8s/apigatewayv2-controller", license: APACHE_V2, diff --git a/crd-catalog/aws/aws-application-networking-k8s/application-networking.k8s.aws/v1alpha1/accesslogpolicies.args b/crd-catalog/aws/aws-application-networking-k8s/application-networking.k8s.aws/v1alpha1/accesslogpolicies.args new file mode 100644 index 000000000..7ab47510b --- /dev/null +++ b/crd-catalog/aws/aws-application-networking-k8s/application-networking.k8s.aws/v1alpha1/accesslogpolicies.args @@ -0,0 +1 @@ +--derive=PartialEq diff --git a/crd-catalog/aws/aws-application-networking-k8s/application-networking.k8s.aws/v1alpha1/accesslogpolicies.yaml b/crd-catalog/aws/aws-application-networking-k8s/application-networking.k8s.aws/v1alpha1/accesslogpolicies.yaml new file mode 100644 index 000000000..2d088f16a --- /dev/null +++ b/crd-catalog/aws/aws-application-networking-k8s/application-networking.k8s.aws/v1alpha1/accesslogpolicies.yaml @@ -0,0 +1,153 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.13.0 + name: accesslogpolicies.application-networking.k8s.aws +spec: + group: application-networking.k8s.aws + names: + categories: + - gateway-api + kind: AccessLogPolicy + listKind: AccessLogPolicyList + plural: accesslogpolicies + shortNames: + - alp + singular: accesslogpolicy + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1alpha1 + schema: + openAPIV3Schema: + 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: AccessLogPolicySpec defines the desired state of AccessLogPolicy. + properties: + destinationArn: + description: "The Amazon Resource Name (ARN) of the destination that will store access logs. Supported values are S3 Bucket, CloudWatch Log Group, and Firehose Delivery Stream ARNs. \n Changes to this value results in replacement of the VPC Lattice Access Log Subscription." + pattern: ^arn(:[a-z0-9]+([.-][a-z0-9]+)*){2}(:([a-z0-9]+([.-][a-z0-9]+)*)?){2}:([^/].*)? + type: string + targetRef: + description: "TargetRef points to the Kubernetes Gateway, HTTPRoute, or GRPCRoute resource that will have this policy attached. \n This field is following the guidelines of Kubernetes Gateway API policy attachment." + properties: + group: + description: Group is the group of the target resource. + maxLength: 253 + pattern: ^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ + type: string + kind: + description: Kind is kind of the target resource. + maxLength: 63 + minLength: 1 + pattern: ^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$ + type: string + name: + description: Name is the name of the target resource. + maxLength: 253 + minLength: 1 + type: string + namespace: + description: Namespace is the namespace of the referent. When unspecified, the local namespace is inferred. Even when policy targets a resource in a different namespace, it MUST only apply to traffic originating from the same namespace as the policy. + maxLength: 63 + minLength: 1 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ + type: string + required: + - group + - kind + - name + type: object + required: + - destinationArn + - targetRef + type: object + status: + default: + conditions: + - lastTransitionTime: 1970-01-01T00:00:00Z + message: Waiting for controller + reason: NotReconciled + status: Unknown + type: Accepted + description: Status defines the current state of AccessLogPolicy. + properties: + conditions: + default: + - lastTransitionTime: 1970-01-01T00:00:00Z + message: Waiting for controller + reason: Pending + status: Unknown + type: Accepted + - lastTransitionTime: 1970-01-01T00:00:00Z + message: Waiting for controller + reason: Pending + status: Unknown + type: Programmed + description: "Conditions describe the current conditions of the AccessLogPolicy. \n Implementations should prefer to express Policy conditions using the `PolicyConditionType` and `PolicyConditionReason` constants so that operators and tools can converge on a common vocabulary to describe AccessLogPolicy state. \n Known condition types are: \n * \"Accepted\" * \"Ready\"" + items: + description: "Condition contains details for one aspect of the current state of this API Resource. --- This struct is intended for direct use as an array at the field path .status.conditions. For example, \n type FooStatus struct{ // Represents the observations of a foo's current state. // Known .status.conditions.type are: \"Available\", \"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge // +listType=map // +listMapKey=type Conditions []metav1.Condition `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }" + properties: + lastTransitionTime: + description: lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: message is a human readable message indicating details about the transition. This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance. + format: int64 + minimum: 0.0 + type: integer + reason: + description: reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - 'True' + - 'False' + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. --- Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be useful (see .node.status.conditions), the ability to deconflict is important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + maxItems: 8 + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + type: object + required: + - spec + type: object + served: true + storage: true + subresources: + status: {} diff --git a/crd-catalog/aws/aws-application-networking-k8s/application-networking.k8s.aws/v1alpha1/iamauthpolicies.args b/crd-catalog/aws/aws-application-networking-k8s/application-networking.k8s.aws/v1alpha1/iamauthpolicies.args new file mode 100644 index 000000000..7ab47510b --- /dev/null +++ b/crd-catalog/aws/aws-application-networking-k8s/application-networking.k8s.aws/v1alpha1/iamauthpolicies.args @@ -0,0 +1 @@ +--derive=PartialEq diff --git a/crd-catalog/aws/aws-application-networking-k8s/application-networking.k8s.aws/v1alpha1/iamauthpolicies.yaml b/crd-catalog/aws/aws-application-networking-k8s/application-networking.k8s.aws/v1alpha1/iamauthpolicies.yaml new file mode 100644 index 000000000..b1ad0206c --- /dev/null +++ b/crd-catalog/aws/aws-application-networking-k8s/application-networking.k8s.aws/v1alpha1/iamauthpolicies.yaml @@ -0,0 +1,152 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.13.0 + name: iamauthpolicies.application-networking.k8s.aws +spec: + group: application-networking.k8s.aws + names: + categories: + - gateway-api + kind: IAMAuthPolicy + listKind: IAMAuthPolicyList + plural: iamauthpolicies + shortNames: + - iap + singular: iamauthpolicy + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1alpha1 + schema: + openAPIV3Schema: + 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: IAMAuthPolicySpec defines the desired state of IAMAuthPolicy. When the controller handles IAMAuthPolicy creation, if the targetRef k8s and VPC Lattice resource exists, the controller will change the auth_type of that VPC Lattice resource to AWS_IAM and attach this policy. When the controller handles IAMAuthPolicy deletion, if the targetRef k8s and VPC Lattice resource exists, the controller will change the auth_type of that VPC Lattice resource to NONE and detach this policy. + properties: + policy: + description: IAM auth policy content. It is a JSON string that uses the same syntax as AWS IAM policies. Please check the VPC Lattice documentation to get [the common elements in an auth policy](https://docs.aws.amazon.com/vpc-lattice/latest/ug/auth-policies.html#auth-policies-common-elements) + type: string + targetRef: + description: "TargetRef points to the Kubernetes Gateway, HTTPRoute, or GRPCRoute resource that will have this policy attached. \n This field is following the guidelines of Kubernetes Gateway API policy attachment." + properties: + group: + description: Group is the group of the target resource. + maxLength: 253 + pattern: ^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ + type: string + kind: + description: Kind is kind of the target resource. + maxLength: 63 + minLength: 1 + pattern: ^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$ + type: string + name: + description: Name is the name of the target resource. + maxLength: 253 + minLength: 1 + type: string + namespace: + description: Namespace is the namespace of the referent. When unspecified, the local namespace is inferred. Even when policy targets a resource in a different namespace, it MUST only apply to traffic originating from the same namespace as the policy. + maxLength: 63 + minLength: 1 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ + type: string + required: + - group + - kind + - name + type: object + required: + - policy + - targetRef + type: object + status: + default: + conditions: + - lastTransitionTime: 1970-01-01T00:00:00Z + message: Waiting for controller + reason: NotReconciled + status: Unknown + type: Accepted + description: Status defines the current state of IAMAuthPolicy. + properties: + conditions: + default: + - lastTransitionTime: 1970-01-01T00:00:00Z + message: Waiting for controller + reason: Pending + status: Unknown + type: Accepted + - lastTransitionTime: 1970-01-01T00:00:00Z + message: Waiting for controller + reason: Pending + status: Unknown + type: Programmed + description: "Conditions describe the current conditions of the IAMAuthPolicy. \n Implementations should prefer to express Policy conditions using the `PolicyConditionType` and `PolicyConditionReason` constants so that operators and tools can converge on a common vocabulary to describe IAMAuthPolicy state. \n Known condition types are: \n * \"Accepted\" * \"Ready\"" + items: + description: "Condition contains details for one aspect of the current state of this API Resource. --- This struct is intended for direct use as an array at the field path .status.conditions. For example, \n type FooStatus struct{ // Represents the observations of a foo's current state. // Known .status.conditions.type are: \"Available\", \"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge // +listType=map // +listMapKey=type Conditions []metav1.Condition `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }" + properties: + lastTransitionTime: + description: lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: message is a human readable message indicating details about the transition. This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance. + format: int64 + minimum: 0.0 + type: integer + reason: + description: reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - 'True' + - 'False' + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. --- Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be useful (see .node.status.conditions), the ability to deconflict is important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + maxItems: 8 + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + type: object + required: + - spec + type: object + served: true + storage: true + subresources: + status: {} diff --git a/crd-catalog/aws/aws-application-networking-k8s/application-networking.k8s.aws/v1alpha1/serviceexports.args b/crd-catalog/aws/aws-application-networking-k8s/application-networking.k8s.aws/v1alpha1/serviceexports.args new file mode 100644 index 000000000..7ab47510b --- /dev/null +++ b/crd-catalog/aws/aws-application-networking-k8s/application-networking.k8s.aws/v1alpha1/serviceexports.args @@ -0,0 +1 @@ +--derive=PartialEq diff --git a/crd-catalog/aws/aws-application-networking-k8s/application-networking.k8s.aws/v1alpha1/serviceexports.yaml b/crd-catalog/aws/aws-application-networking-k8s/application-networking.k8s.aws/v1alpha1/serviceexports.yaml new file mode 100644 index 000000000..48b1a7a4c --- /dev/null +++ b/crd-catalog/aws/aws-application-networking-k8s/application-networking.k8s.aws/v1alpha1/serviceexports.yaml @@ -0,0 +1,64 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.13.0 + name: serviceexports.application-networking.k8s.aws +spec: + group: application-networking.k8s.aws + names: + kind: ServiceExport + listKind: ServiceExportList + plural: serviceexports + singular: serviceexport + scope: Namespaced + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + description: ServiceExport declares that the Service with the same name and namespace as this export should be consumable from other clusters. + 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 + status: + description: status describes the current state of an exported service. Service configuration comes from the Service that had the same name and namespace as this ServiceExport. Populated by the multi-cluster service implementation's controller. + properties: + conditions: + items: + description: "ServiceExportCondition contains details for the current condition of this service export. \n Once [KEP-1623](https://github.com/kubernetes/enhancements/tree/master/keps/sig-api-machinery/1623-standardize-conditions) is implemented, this will be replaced by metav1.Condition." + properties: + lastTransitionTime: + format: date-time + type: string + message: + type: string + reason: + type: string + status: + description: Status is one of {"True", "False", "Unknown"} + enum: + - 'True' + - 'False' + - Unknown + type: string + type: + description: ServiceExportConditionType identifies a specific condition. + type: string + required: + - status + - type + type: object + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + type: object + type: object + served: true + storage: true diff --git a/crd-catalog/aws/aws-application-networking-k8s/application-networking.k8s.aws/v1alpha1/serviceimports.args b/crd-catalog/aws/aws-application-networking-k8s/application-networking.k8s.aws/v1alpha1/serviceimports.args new file mode 100644 index 000000000..7ab47510b --- /dev/null +++ b/crd-catalog/aws/aws-application-networking-k8s/application-networking.k8s.aws/v1alpha1/serviceimports.args @@ -0,0 +1 @@ +--derive=PartialEq diff --git a/crd-catalog/aws/aws-application-networking-k8s/application-networking.k8s.aws/v1alpha1/serviceimports.yaml b/crd-catalog/aws/aws-application-networking-k8s/application-networking.k8s.aws/v1alpha1/serviceimports.yaml new file mode 100644 index 000000000..61b6dcebe --- /dev/null +++ b/crd-catalog/aws/aws-application-networking-k8s/application-networking.k8s.aws/v1alpha1/serviceimports.yaml @@ -0,0 +1,107 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.13.0 + name: serviceimports.application-networking.k8s.aws +spec: + group: application-networking.k8s.aws + names: + kind: ServiceImport + listKind: ServiceImportList + plural: serviceimports + singular: serviceimport + scope: Namespaced + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + description: ServiceImport describes a service imported from clusters in a ClusterSet. + 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: spec defines the behavior of a ServiceImport. + properties: + ips: + description: ip will be used as the VIP for this service when type is ClusterSetIP. + items: + type: string + maxItems: 1 + type: array + ports: + items: + description: ServicePort represents the port on which the service is exposed + properties: + appProtocol: + description: The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 and http://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol. Field can be enabled with ServiceAppProtocol feature gate. + type: string + name: + description: The name of this port within the service. This must be a DNS_LABEL. All ports within a ServiceSpec must have unique names. When considering the endpoints for a Service, this must match the 'name' field in the EndpointPort. Optional if only one ServicePort is defined on this service. + type: string + port: + description: The port that will be exposed by this service. + format: int32 + type: integer + protocol: + default: TCP + description: The IP protocol for this port. Supports "TCP", "UDP", and "SCTP". Default is TCP. + type: string + required: + - port + type: object + type: array + x-kubernetes-list-type: atomic + sessionAffinity: + description: 'Supports "ClientIP" and "None". Used to maintain session affinity. Enable client IP based session affinity. Must be ClientIP or None. Defaults to None. Ignored when type is Headless More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies' + type: string + sessionAffinityConfig: + description: sessionAffinityConfig contains session affinity configuration. + properties: + clientIP: + description: clientIP contains the configurations of Client IP based session affinity. + properties: + timeoutSeconds: + description: timeoutSeconds specifies the seconds of ClientIP type session sticky time. The value must be >0 && <=86400(for 1 day) if ServiceAffinity == "ClientIP". Default value is 10800(for 3 hours). + format: int32 + type: integer + type: object + type: object + type: + description: type defines the type of this service. Must be ClusterSetIP or Headless. + enum: + - ClusterSetIP + - Headless + type: string + required: + - ports + - type + type: object + status: + description: status contains information about the exported services that form the multi-cluster service referenced by this ServiceImport. + properties: + clusters: + description: clusters is the list of exporting clusters from which this service was derived. + items: + description: ClusterStatus contains service configuration mapped to a specific source cluster + properties: + cluster: + description: cluster is the name of the exporting cluster. Must be a valid RFC-1123 DNS label. + type: string + required: + - cluster + type: object + type: array + x-kubernetes-list-map-keys: + - cluster + x-kubernetes-list-type: map + type: object + type: object + served: true + storage: true diff --git a/crd-catalog/aws/aws-application-networking-k8s/application-networking.k8s.aws/v1alpha1/targetgrouppolicies.args b/crd-catalog/aws/aws-application-networking-k8s/application-networking.k8s.aws/v1alpha1/targetgrouppolicies.args new file mode 100644 index 000000000..7ab47510b --- /dev/null +++ b/crd-catalog/aws/aws-application-networking-k8s/application-networking.k8s.aws/v1alpha1/targetgrouppolicies.args @@ -0,0 +1 @@ +--derive=PartialEq diff --git a/crd-catalog/aws/aws-application-networking-k8s/application-networking.k8s.aws/v1alpha1/targetgrouppolicies.yaml b/crd-catalog/aws/aws-application-networking-k8s/application-networking.k8s.aws/v1alpha1/targetgrouppolicies.yaml new file mode 100644 index 000000000..056ead73b --- /dev/null +++ b/crd-catalog/aws/aws-application-networking-k8s/application-networking.k8s.aws/v1alpha1/targetgrouppolicies.yaml @@ -0,0 +1,209 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.13.0 + name: targetgrouppolicies.application-networking.k8s.aws +spec: + group: application-networking.k8s.aws + names: + categories: + - gateway-api + kind: TargetGroupPolicy + listKind: TargetGroupPolicyList + plural: targetgrouppolicies + shortNames: + - tgp + singular: targetgrouppolicy + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1alpha1 + schema: + openAPIV3Schema: + 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: TargetGroupPolicySpec defines the desired state of TargetGroupPolicy. + properties: + healthCheck: + description: "The health check configuration. \n Changes to this value will update VPC Lattice resource in place." + properties: + enabled: + description: Indicates whether health checking is enabled. + type: boolean + healthyThresholdCount: + description: The number of consecutive successful health checks required before considering an unhealthy target healthy. + format: int64 + maximum: 10.0 + minimum: 2.0 + type: integer + intervalSeconds: + description: The approximate amount of time, in seconds, between health checks of an individual target. + format: int64 + maximum: 300.0 + minimum: 5.0 + type: integer + path: + description: The destination for health checks on the targets. + type: string + port: + description: The port used when performing health checks on targets. If not specified, health check defaults to the port that a target receives traffic on. + format: int64 + maximum: 65535.0 + minimum: 1.0 + type: integer + protocol: + description: The protocol used when performing health checks on targets. + enum: + - HTTP + - HTTPS + type: string + protocolVersion: + description: The protocol version used when performing health checks on targets. Defaults to HTTP/1. + enum: + - HTTP1 + - HTTP2 + type: string + statusMatch: + description: A regular expression to match HTTP status codes when checking for successful response from a target. + type: string + timeoutSeconds: + description: The amount of time, in seconds, to wait before reporting a target as unhealthy. + format: int64 + maximum: 120.0 + minimum: 1.0 + type: integer + unhealthyThresholdCount: + description: The number of consecutive failed health checks required before considering a target unhealthy. + format: int64 + maximum: 10.0 + minimum: 2.0 + type: integer + type: object + protocol: + description: "The protocol to use for routing traffic to the targets. Supported values are HTTP (default) and HTTPS. \n Changes to this value results in a replacement of VPC Lattice target group." + type: string + protocolVersion: + description: "The protocol version to use. Supported values are HTTP1 (default) and HTTP2. When a policy is behind GRPCRoute, this field value will be ignored as GRPC is only supported through HTTP/2. \n Changes to this value results in a replacement of VPC Lattice target group." + type: string + targetRef: + description: "TargetRef points to the kubernetes Service resource that will have this policy attached. \n This field is following the guidelines of Kubernetes Gateway API policy attachment." + properties: + group: + description: Group is the group of the target resource. + maxLength: 253 + pattern: ^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ + type: string + kind: + description: Kind is kind of the target resource. + maxLength: 63 + minLength: 1 + pattern: ^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$ + type: string + name: + description: Name is the name of the target resource. + maxLength: 253 + minLength: 1 + type: string + namespace: + description: Namespace is the namespace of the referent. When unspecified, the local namespace is inferred. Even when policy targets a resource in a different namespace, it MUST only apply to traffic originating from the same namespace as the policy. + maxLength: 63 + minLength: 1 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ + type: string + required: + - group + - kind + - name + type: object + required: + - targetRef + type: object + status: + default: + conditions: + - lastTransitionTime: 1970-01-01T00:00:00Z + message: Waiting for controller + reason: NotReconciled + status: Unknown + type: Accepted + description: Status defines the current state of TargetGroupPolicy. + properties: + conditions: + default: + - lastTransitionTime: 1970-01-01T00:00:00Z + message: Waiting for controller + reason: Pending + status: Unknown + type: Accepted + - lastTransitionTime: 1970-01-01T00:00:00Z + message: Waiting for controller + reason: Pending + status: Unknown + type: Programmed + description: "Conditions describe the current conditions of the TargetGroup. \n Implementations should prefer to express Policy conditions using the `PolicyConditionType` and `PolicyConditionReason` constants so that operators and tools can converge on a common vocabulary to describe TargetGroup state. \n Known condition types are: \n * \"Accepted\" * \"Ready\"" + items: + description: "Condition contains details for one aspect of the current state of this API Resource. --- This struct is intended for direct use as an array at the field path .status.conditions. For example, \n type FooStatus struct{ // Represents the observations of a foo's current state. // Known .status.conditions.type are: \"Available\", \"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge // +listType=map // +listMapKey=type Conditions []metav1.Condition `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }" + properties: + lastTransitionTime: + description: lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: message is a human readable message indicating details about the transition. This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance. + format: int64 + minimum: 0.0 + type: integer + reason: + description: reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - 'True' + - 'False' + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. --- Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be useful (see .node.status.conditions), the ability to deconflict is important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + maxItems: 8 + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + type: object + required: + - spec + type: object + served: true + storage: true + subresources: + status: {} diff --git a/crd-catalog/aws/aws-application-networking-k8s/application-networking.k8s.aws/v1alpha1/vpcassociationpolicies.args b/crd-catalog/aws/aws-application-networking-k8s/application-networking.k8s.aws/v1alpha1/vpcassociationpolicies.args new file mode 100644 index 000000000..7ab47510b --- /dev/null +++ b/crd-catalog/aws/aws-application-networking-k8s/application-networking.k8s.aws/v1alpha1/vpcassociationpolicies.args @@ -0,0 +1 @@ +--derive=PartialEq diff --git a/crd-catalog/aws/aws-application-networking-k8s/application-networking.k8s.aws/v1alpha1/vpcassociationpolicies.yaml b/crd-catalog/aws/aws-application-networking-k8s/application-networking.k8s.aws/v1alpha1/vpcassociationpolicies.yaml new file mode 100644 index 000000000..547105645 --- /dev/null +++ b/crd-catalog/aws/aws-application-networking-k8s/application-networking.k8s.aws/v1alpha1/vpcassociationpolicies.yaml @@ -0,0 +1,148 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.13.0 + name: vpcassociationpolicies.application-networking.k8s.aws +spec: + group: application-networking.k8s.aws + names: + categories: + - gateway-api + kind: VpcAssociationPolicy + listKind: VpcAssociationPolicyList + plural: vpcassociationpolicies + shortNames: + - vap + singular: vpcassociationpolicy + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1alpha1 + schema: + openAPIV3Schema: + 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: VpcAssociationPolicySpec defines the desired state of VpcAssociationPolicy. + properties: + associateWithVpc: + description: "AssociateWithVpc indicates whether the VpcServiceNetworkAssociation should be created for the current VPC of k8s cluster. \n This value will be considered true by default." + type: boolean + securityGroupIds: + description: "SecurityGroupIds defines the security groups enforced on the VpcServiceNetworkAssociation. Security groups does not take effect if AssociateWithVpc is set to false. \n For more details, please check the VPC Lattice documentation https://docs.aws.amazon.com/vpc-lattice/latest/ug/security-groups.html" + items: + maxLength: 32 + minLength: 3 + pattern: ^sg-[0-9a-z]+$ + type: string + minItems: 1 + type: array + targetRef: + description: "TargetRef points to the kubernetes Gateway resource that will have this policy attached. \n This field is following the guidelines of Kubernetes Gateway API policy attachment." + properties: + group: + description: Group is the group of the target resource. + maxLength: 253 + pattern: ^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ + type: string + kind: + description: Kind is kind of the target resource. + maxLength: 63 + minLength: 1 + pattern: ^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$ + type: string + name: + description: Name is the name of the target resource. + maxLength: 253 + minLength: 1 + type: string + namespace: + description: Namespace is the namespace of the referent. When unspecified, the local namespace is inferred. Even when policy targets a resource in a different namespace, it MUST only apply to traffic originating from the same namespace as the policy. + maxLength: 63 + minLength: 1 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ + type: string + required: + - group + - kind + - name + type: object + required: + - targetRef + type: object + status: + description: VpcAssociationPolicyStatus defines the observed state of VpcAssociationPolicy. + properties: + conditions: + default: + - lastTransitionTime: 1970-01-01T00:00:00Z + message: Waiting for controller + reason: Pending + status: Unknown + type: Accepted + description: "Conditions describe the current conditions of the VpcAssociationPolicy. \n Implementations should prefer to express Policy conditions using the `PolicyConditionType` and `PolicyConditionReason` constants so that operators and tools can converge on a common vocabulary to describe VpcAssociationPolicy state. \n Known condition types are: \n * \"Accepted\"" + items: + description: "Condition contains details for one aspect of the current state of this API Resource. --- This struct is intended for direct use as an array at the field path .status.conditions. For example, \n type FooStatus struct{ // Represents the observations of a foo's current state. // Known .status.conditions.type are: \"Available\", \"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge // +listType=map // +listMapKey=type Conditions []metav1.Condition `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }" + properties: + lastTransitionTime: + description: lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: message is a human readable message indicating details about the transition. This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance. + format: int64 + minimum: 0.0 + type: integer + reason: + description: reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - 'True' + - 'False' + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. --- Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be useful (see .node.status.conditions), the ability to deconflict is important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + maxItems: 8 + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + type: object + required: + - spec + type: object + served: true + storage: true + subresources: + status: {} diff --git a/kube-custom-resources-rs/Cargo.toml b/kube-custom-resources-rs/Cargo.toml index ee3e1b05f..f1fc17fb8 100644 --- a/kube-custom-resources-rs/Cargo.toml +++ b/kube-custom-resources-rs/Cargo.toml @@ -39,6 +39,7 @@ app_kiegroup_org = [] app_lightbend_com = [] app_redislabs_com = [] app_terraform_io = [] +application_networking_k8s_aws = [] applicationautoscaling_services_k8s_aws = [] appprotect_f5_com = [] appprotectdos_f5_com = [] diff --git a/kube-custom-resources-rs/src/application_networking_k8s_aws/mod.rs b/kube-custom-resources-rs/src/application_networking_k8s_aws/mod.rs new file mode 100644 index 000000000..32a5a9d4f --- /dev/null +++ b/kube-custom-resources-rs/src/application_networking_k8s_aws/mod.rs @@ -0,0 +1 @@ +pub mod v1alpha1; diff --git a/kube-custom-resources-rs/src/application_networking_k8s_aws/v1alpha1/accesslogpolicies.rs b/kube-custom-resources-rs/src/application_networking_k8s_aws/v1alpha1/accesslogpolicies.rs new file mode 100644 index 000000000..616e93a9a --- /dev/null +++ b/kube-custom-resources-rs/src/application_networking_k8s_aws/v1alpha1/accesslogpolicies.rs @@ -0,0 +1,82 @@ +// WARNING: generated by kopium - manual changes will be overwritten +// kopium command: kopium --docs --filename=./crd-catalog/aws/aws-application-networking-k8s/application-networking.k8s.aws/v1alpha1/accesslogpolicies.yaml --derive=PartialEq +// kopium version: 0.16.5 + +use kube::CustomResource; +use serde::{Serialize, Deserialize}; + +/// AccessLogPolicySpec defines the desired state of AccessLogPolicy. +#[derive(CustomResource, Serialize, Deserialize, Clone, Debug, PartialEq)] +#[kube(group = "application-networking.k8s.aws", version = "v1alpha1", kind = "AccessLogPolicy", plural = "accesslogpolicies")] +#[kube(namespaced)] +#[kube(status = "AccessLogPolicyStatus")] +#[kube(schema = "disabled")] +pub struct AccessLogPolicySpec { + /// The Amazon Resource Name (ARN) of the destination that will store access logs. Supported values are S3 Bucket, CloudWatch Log Group, and Firehose Delivery Stream ARNs. + /// Changes to this value results in replacement of the VPC Lattice Access Log Subscription. + #[serde(rename = "destinationArn")] + pub destination_arn: String, + /// TargetRef points to the Kubernetes Gateway, HTTPRoute, or GRPCRoute resource that will have this policy attached. + /// This field is following the guidelines of Kubernetes Gateway API policy attachment. + #[serde(rename = "targetRef")] + pub target_ref: AccessLogPolicyTargetRef, +} + +/// TargetRef points to the Kubernetes Gateway, HTTPRoute, or GRPCRoute resource that will have this policy attached. +/// This field is following the guidelines of Kubernetes Gateway API policy attachment. +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] +pub struct AccessLogPolicyTargetRef { + /// Group is the group of the target resource. + pub group: String, + /// Kind is kind of the target resource. + pub kind: String, + /// Name is the name of the target resource. + pub name: String, + /// Namespace is the namespace of the referent. When unspecified, the local namespace is inferred. Even when policy targets a resource in a different namespace, it MUST only apply to traffic originating from the same namespace as the policy. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub namespace: Option, +} + +/// Status defines the current state of AccessLogPolicy. +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] +pub struct AccessLogPolicyStatus { + /// Conditions describe the current conditions of the AccessLogPolicy. + /// Implementations should prefer to express Policy conditions using the `PolicyConditionType` and `PolicyConditionReason` constants so that operators and tools can converge on a common vocabulary to describe AccessLogPolicy state. + /// Known condition types are: + /// * "Accepted" * "Ready" + #[serde(default, skip_serializing_if = "Option::is_none")] + pub conditions: Option>, +} + +/// Condition contains details for one aspect of the current state of this API Resource. --- This struct is intended for direct use as an array at the field path .status.conditions. For example, +/// type FooStatus struct{ // Represents the observations of a foo's current state. // Known .status.conditions.type are: "Available", "Progressing", and "Degraded" // +patchMergeKey=type // +patchStrategy=merge // +listType=map // +listMapKey=type Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"` +/// // other fields } +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] +pub struct AccessLogPolicyStatusConditions { + /// lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + #[serde(rename = "lastTransitionTime")] + pub last_transition_time: String, + /// message is a human readable message indicating details about the transition. This may be an empty string. + pub message: String, + /// observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "observedGeneration")] + pub observed_generation: Option, + /// reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty. + pub reason: String, + /// status of the condition, one of True, False, Unknown. + pub status: AccessLogPolicyStatusConditionsStatus, + /// type of condition in CamelCase or in foo.example.com/CamelCase. --- Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be useful (see .node.status.conditions), the ability to deconflict is important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) + #[serde(rename = "type")] + pub r#type: String, +} + +/// Condition contains details for one aspect of the current state of this API Resource. --- This struct is intended for direct use as an array at the field path .status.conditions. For example, +/// type FooStatus struct{ // Represents the observations of a foo's current state. // Known .status.conditions.type are: "Available", "Progressing", and "Degraded" // +patchMergeKey=type // +patchStrategy=merge // +listType=map // +listMapKey=type Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"` +/// // other fields } +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] +pub enum AccessLogPolicyStatusConditionsStatus { + True, + False, + Unknown, +} + diff --git a/kube-custom-resources-rs/src/application_networking_k8s_aws/v1alpha1/iamauthpolicies.rs b/kube-custom-resources-rs/src/application_networking_k8s_aws/v1alpha1/iamauthpolicies.rs new file mode 100644 index 000000000..e272586c3 --- /dev/null +++ b/kube-custom-resources-rs/src/application_networking_k8s_aws/v1alpha1/iamauthpolicies.rs @@ -0,0 +1,80 @@ +// WARNING: generated by kopium - manual changes will be overwritten +// kopium command: kopium --docs --filename=./crd-catalog/aws/aws-application-networking-k8s/application-networking.k8s.aws/v1alpha1/iamauthpolicies.yaml --derive=PartialEq +// kopium version: 0.16.5 + +use kube::CustomResource; +use serde::{Serialize, Deserialize}; + +/// IAMAuthPolicySpec defines the desired state of IAMAuthPolicy. When the controller handles IAMAuthPolicy creation, if the targetRef k8s and VPC Lattice resource exists, the controller will change the auth_type of that VPC Lattice resource to AWS_IAM and attach this policy. When the controller handles IAMAuthPolicy deletion, if the targetRef k8s and VPC Lattice resource exists, the controller will change the auth_type of that VPC Lattice resource to NONE and detach this policy. +#[derive(CustomResource, Serialize, Deserialize, Clone, Debug, PartialEq)] +#[kube(group = "application-networking.k8s.aws", version = "v1alpha1", kind = "IAMAuthPolicy", plural = "iamauthpolicies")] +#[kube(namespaced)] +#[kube(status = "IAMAuthPolicyStatus")] +#[kube(schema = "disabled")] +pub struct IAMAuthPolicySpec { + /// IAM auth policy content. It is a JSON string that uses the same syntax as AWS IAM policies. Please check the VPC Lattice documentation to get [the common elements in an auth policy](https://docs.aws.amazon.com/vpc-lattice/latest/ug/auth-policies.html#auth-policies-common-elements) + pub policy: String, + /// TargetRef points to the Kubernetes Gateway, HTTPRoute, or GRPCRoute resource that will have this policy attached. + /// This field is following the guidelines of Kubernetes Gateway API policy attachment. + #[serde(rename = "targetRef")] + pub target_ref: IAMAuthPolicyTargetRef, +} + +/// TargetRef points to the Kubernetes Gateway, HTTPRoute, or GRPCRoute resource that will have this policy attached. +/// This field is following the guidelines of Kubernetes Gateway API policy attachment. +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] +pub struct IAMAuthPolicyTargetRef { + /// Group is the group of the target resource. + pub group: String, + /// Kind is kind of the target resource. + pub kind: String, + /// Name is the name of the target resource. + pub name: String, + /// Namespace is the namespace of the referent. When unspecified, the local namespace is inferred. Even when policy targets a resource in a different namespace, it MUST only apply to traffic originating from the same namespace as the policy. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub namespace: Option, +} + +/// Status defines the current state of IAMAuthPolicy. +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] +pub struct IAMAuthPolicyStatus { + /// Conditions describe the current conditions of the IAMAuthPolicy. + /// Implementations should prefer to express Policy conditions using the `PolicyConditionType` and `PolicyConditionReason` constants so that operators and tools can converge on a common vocabulary to describe IAMAuthPolicy state. + /// Known condition types are: + /// * "Accepted" * "Ready" + #[serde(default, skip_serializing_if = "Option::is_none")] + pub conditions: Option>, +} + +/// Condition contains details for one aspect of the current state of this API Resource. --- This struct is intended for direct use as an array at the field path .status.conditions. For example, +/// type FooStatus struct{ // Represents the observations of a foo's current state. // Known .status.conditions.type are: "Available", "Progressing", and "Degraded" // +patchMergeKey=type // +patchStrategy=merge // +listType=map // +listMapKey=type Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"` +/// // other fields } +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] +pub struct IAMAuthPolicyStatusConditions { + /// lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + #[serde(rename = "lastTransitionTime")] + pub last_transition_time: String, + /// message is a human readable message indicating details about the transition. This may be an empty string. + pub message: String, + /// observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "observedGeneration")] + pub observed_generation: Option, + /// reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty. + pub reason: String, + /// status of the condition, one of True, False, Unknown. + pub status: IAMAuthPolicyStatusConditionsStatus, + /// type of condition in CamelCase or in foo.example.com/CamelCase. --- Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be useful (see .node.status.conditions), the ability to deconflict is important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) + #[serde(rename = "type")] + pub r#type: String, +} + +/// Condition contains details for one aspect of the current state of this API Resource. --- This struct is intended for direct use as an array at the field path .status.conditions. For example, +/// type FooStatus struct{ // Represents the observations of a foo's current state. // Known .status.conditions.type are: "Available", "Progressing", and "Degraded" // +patchMergeKey=type // +patchStrategy=merge // +listType=map // +listMapKey=type Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"` +/// // other fields } +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] +pub enum IAMAuthPolicyStatusConditionsStatus { + True, + False, + Unknown, +} + diff --git a/kube-custom-resources-rs/src/application_networking_k8s_aws/v1alpha1/mod.rs b/kube-custom-resources-rs/src/application_networking_k8s_aws/v1alpha1/mod.rs new file mode 100644 index 000000000..1ddc1c11a --- /dev/null +++ b/kube-custom-resources-rs/src/application_networking_k8s_aws/v1alpha1/mod.rs @@ -0,0 +1,6 @@ +pub mod accesslogpolicies; +pub mod iamauthpolicies; +pub mod serviceexports; +pub mod serviceimports; +pub mod targetgrouppolicies; +pub mod vpcassociationpolicies; diff --git a/kube-custom-resources-rs/src/application_networking_k8s_aws/v1alpha1/serviceexports.rs b/kube-custom-resources-rs/src/application_networking_k8s_aws/v1alpha1/serviceexports.rs new file mode 100644 index 000000000..b63b6d1fc --- /dev/null +++ b/kube-custom-resources-rs/src/application_networking_k8s_aws/v1alpha1/serviceexports.rs @@ -0,0 +1,40 @@ +// WARNING: generated by kopium - manual changes will be overwritten +// kopium command: kopium --docs --filename=./crd-catalog/aws/aws-application-networking-k8s/application-networking.k8s.aws/v1alpha1/serviceexports.yaml --derive=PartialEq +// kopium version: 0.16.5 + + +use serde::{Serialize, Deserialize}; + +/// status describes the current state of an exported service. Service configuration comes from the Service that had the same name and namespace as this ServiceExport. Populated by the multi-cluster service implementation's controller. +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] +pub struct ServiceExportStatus { + #[serde(default, skip_serializing_if = "Option::is_none")] + pub conditions: Option>, +} + +/// ServiceExportCondition contains details for the current condition of this service export. +/// Once [KEP-1623](https://github.com/kubernetes/enhancements/tree/master/keps/sig-api-machinery/1623-standardize-conditions) is implemented, this will be replaced by metav1.Condition. +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] +pub struct ServiceExportStatusConditions { + #[serde(default, skip_serializing_if = "Option::is_none", rename = "lastTransitionTime")] + pub last_transition_time: Option, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub message: Option, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub reason: Option, + /// Status is one of {"True", "False", "Unknown"} + pub status: ServiceExportStatusConditionsStatus, + /// ServiceExportConditionType identifies a specific condition. + #[serde(rename = "type")] + pub r#type: String, +} + +/// ServiceExportCondition contains details for the current condition of this service export. +/// Once [KEP-1623](https://github.com/kubernetes/enhancements/tree/master/keps/sig-api-machinery/1623-standardize-conditions) is implemented, this will be replaced by metav1.Condition. +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] +pub enum ServiceExportStatusConditionsStatus { + True, + False, + Unknown, +} + diff --git a/kube-custom-resources-rs/src/application_networking_k8s_aws/v1alpha1/serviceimports.rs b/kube-custom-resources-rs/src/application_networking_k8s_aws/v1alpha1/serviceimports.rs new file mode 100644 index 000000000..4e9aafb2b --- /dev/null +++ b/kube-custom-resources-rs/src/application_networking_k8s_aws/v1alpha1/serviceimports.rs @@ -0,0 +1,83 @@ +// WARNING: generated by kopium - manual changes will be overwritten +// kopium command: kopium --docs --filename=./crd-catalog/aws/aws-application-networking-k8s/application-networking.k8s.aws/v1alpha1/serviceimports.yaml --derive=PartialEq +// kopium version: 0.16.5 + +use kube::CustomResource; +use serde::{Serialize, Deserialize}; + +/// spec defines the behavior of a ServiceImport. +#[derive(CustomResource, Serialize, Deserialize, Clone, Debug, PartialEq)] +#[kube(group = "application-networking.k8s.aws", version = "v1alpha1", kind = "ServiceImport", plural = "serviceimports")] +#[kube(namespaced)] +#[kube(schema = "disabled")] +pub struct ServiceImportSpec { + /// ip will be used as the VIP for this service when type is ClusterSetIP. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub ips: Option>, + pub ports: Vec, + /// Supports "ClientIP" and "None". Used to maintain session affinity. Enable client IP based session affinity. Must be ClientIP or None. Defaults to None. Ignored when type is Headless More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies + #[serde(default, skip_serializing_if = "Option::is_none", rename = "sessionAffinity")] + pub session_affinity: Option, + /// sessionAffinityConfig contains session affinity configuration. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "sessionAffinityConfig")] + pub session_affinity_config: Option, + /// type defines the type of this service. Must be ClusterSetIP or Headless. + #[serde(rename = "type")] + pub r#type: ServiceImportType, +} + +/// ServicePort represents the port on which the service is exposed +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] +pub struct ServiceImportPorts { + /// The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 and http://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol. Field can be enabled with ServiceAppProtocol feature gate. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "appProtocol")] + pub app_protocol: Option, + /// The name of this port within the service. This must be a DNS_LABEL. All ports within a ServiceSpec must have unique names. When considering the endpoints for a Service, this must match the 'name' field in the EndpointPort. Optional if only one ServicePort is defined on this service. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub name: Option, + /// The port that will be exposed by this service. + pub port: i32, + /// The IP protocol for this port. Supports "TCP", "UDP", and "SCTP". Default is TCP. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub protocol: Option, +} + +/// sessionAffinityConfig contains session affinity configuration. +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] +pub struct ServiceImportSessionAffinityConfig { + /// clientIP contains the configurations of Client IP based session affinity. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "clientIP")] + pub client_ip: Option, +} + +/// clientIP contains the configurations of Client IP based session affinity. +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] +pub struct ServiceImportSessionAffinityConfigClientIp { + /// timeoutSeconds specifies the seconds of ClientIP type session sticky time. The value must be >0 && <=86400(for 1 day) if ServiceAffinity == "ClientIP". Default value is 10800(for 3 hours). + #[serde(default, skip_serializing_if = "Option::is_none", rename = "timeoutSeconds")] + pub timeout_seconds: Option, +} + +/// spec defines the behavior of a ServiceImport. +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] +pub enum ServiceImportType { + #[serde(rename = "ClusterSetIP")] + ClusterSetIp, + Headless, +} + +/// status contains information about the exported services that form the multi-cluster service referenced by this ServiceImport. +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] +pub struct ServiceImportStatus { + /// clusters is the list of exporting clusters from which this service was derived. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub clusters: Option>, +} + +/// ClusterStatus contains service configuration mapped to a specific source cluster +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] +pub struct ServiceImportStatusClusters { + /// cluster is the name of the exporting cluster. Must be a valid RFC-1123 DNS label. + pub cluster: String, +} + diff --git a/kube-custom-resources-rs/src/application_networking_k8s_aws/v1alpha1/targetgrouppolicies.rs b/kube-custom-resources-rs/src/application_networking_k8s_aws/v1alpha1/targetgrouppolicies.rs new file mode 100644 index 000000000..5300b6b0f --- /dev/null +++ b/kube-custom-resources-rs/src/application_networking_k8s_aws/v1alpha1/targetgrouppolicies.rs @@ -0,0 +1,146 @@ +// WARNING: generated by kopium - manual changes will be overwritten +// kopium command: kopium --docs --filename=./crd-catalog/aws/aws-application-networking-k8s/application-networking.k8s.aws/v1alpha1/targetgrouppolicies.yaml --derive=PartialEq +// kopium version: 0.16.5 + +use kube::CustomResource; +use serde::{Serialize, Deserialize}; + +/// TargetGroupPolicySpec defines the desired state of TargetGroupPolicy. +#[derive(CustomResource, Serialize, Deserialize, Clone, Debug, PartialEq)] +#[kube(group = "application-networking.k8s.aws", version = "v1alpha1", kind = "TargetGroupPolicy", plural = "targetgrouppolicies")] +#[kube(namespaced)] +#[kube(status = "TargetGroupPolicyStatus")] +#[kube(schema = "disabled")] +pub struct TargetGroupPolicySpec { + /// The health check configuration. + /// Changes to this value will update VPC Lattice resource in place. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "healthCheck")] + pub health_check: Option, + /// The protocol to use for routing traffic to the targets. Supported values are HTTP (default) and HTTPS. + /// Changes to this value results in a replacement of VPC Lattice target group. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub protocol: Option, + /// The protocol version to use. Supported values are HTTP1 (default) and HTTP2. When a policy is behind GRPCRoute, this field value will be ignored as GRPC is only supported through HTTP/2. + /// Changes to this value results in a replacement of VPC Lattice target group. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "protocolVersion")] + pub protocol_version: Option, + /// TargetRef points to the kubernetes Service resource that will have this policy attached. + /// This field is following the guidelines of Kubernetes Gateway API policy attachment. + #[serde(rename = "targetRef")] + pub target_ref: TargetGroupPolicyTargetRef, +} + +/// The health check configuration. +/// Changes to this value will update VPC Lattice resource in place. +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] +pub struct TargetGroupPolicyHealthCheck { + /// Indicates whether health checking is enabled. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub enabled: Option, + /// The number of consecutive successful health checks required before considering an unhealthy target healthy. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "healthyThresholdCount")] + pub healthy_threshold_count: Option, + /// The approximate amount of time, in seconds, between health checks of an individual target. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "intervalSeconds")] + pub interval_seconds: Option, + /// The destination for health checks on the targets. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub path: Option, + /// The port used when performing health checks on targets. If not specified, health check defaults to the port that a target receives traffic on. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub port: Option, + /// The protocol used when performing health checks on targets. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub protocol: Option, + /// The protocol version used when performing health checks on targets. Defaults to HTTP/1. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "protocolVersion")] + pub protocol_version: Option, + /// A regular expression to match HTTP status codes when checking for successful response from a target. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "statusMatch")] + pub status_match: Option, + /// The amount of time, in seconds, to wait before reporting a target as unhealthy. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "timeoutSeconds")] + pub timeout_seconds: Option, + /// The number of consecutive failed health checks required before considering a target unhealthy. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "unhealthyThresholdCount")] + pub unhealthy_threshold_count: Option, +} + +/// The health check configuration. +/// Changes to this value will update VPC Lattice resource in place. +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] +pub enum TargetGroupPolicyHealthCheckProtocol { + #[serde(rename = "HTTP")] + Http, + #[serde(rename = "HTTPS")] + Https, +} + +/// The health check configuration. +/// Changes to this value will update VPC Lattice resource in place. +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] +pub enum TargetGroupPolicyHealthCheckProtocolVersion { + #[serde(rename = "HTTP1")] + Http1, + #[serde(rename = "HTTP2")] + Http2, +} + +/// TargetRef points to the kubernetes Service resource that will have this policy attached. +/// This field is following the guidelines of Kubernetes Gateway API policy attachment. +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] +pub struct TargetGroupPolicyTargetRef { + /// Group is the group of the target resource. + pub group: String, + /// Kind is kind of the target resource. + pub kind: String, + /// Name is the name of the target resource. + pub name: String, + /// Namespace is the namespace of the referent. When unspecified, the local namespace is inferred. Even when policy targets a resource in a different namespace, it MUST only apply to traffic originating from the same namespace as the policy. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub namespace: Option, +} + +/// Status defines the current state of TargetGroupPolicy. +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] +pub struct TargetGroupPolicyStatus { + /// Conditions describe the current conditions of the TargetGroup. + /// Implementations should prefer to express Policy conditions using the `PolicyConditionType` and `PolicyConditionReason` constants so that operators and tools can converge on a common vocabulary to describe TargetGroup state. + /// Known condition types are: + /// * "Accepted" * "Ready" + #[serde(default, skip_serializing_if = "Option::is_none")] + pub conditions: Option>, +} + +/// Condition contains details for one aspect of the current state of this API Resource. --- This struct is intended for direct use as an array at the field path .status.conditions. For example, +/// type FooStatus struct{ // Represents the observations of a foo's current state. // Known .status.conditions.type are: "Available", "Progressing", and "Degraded" // +patchMergeKey=type // +patchStrategy=merge // +listType=map // +listMapKey=type Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"` +/// // other fields } +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] +pub struct TargetGroupPolicyStatusConditions { + /// lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + #[serde(rename = "lastTransitionTime")] + pub last_transition_time: String, + /// message is a human readable message indicating details about the transition. This may be an empty string. + pub message: String, + /// observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "observedGeneration")] + pub observed_generation: Option, + /// reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty. + pub reason: String, + /// status of the condition, one of True, False, Unknown. + pub status: TargetGroupPolicyStatusConditionsStatus, + /// type of condition in CamelCase or in foo.example.com/CamelCase. --- Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be useful (see .node.status.conditions), the ability to deconflict is important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) + #[serde(rename = "type")] + pub r#type: String, +} + +/// Condition contains details for one aspect of the current state of this API Resource. --- This struct is intended for direct use as an array at the field path .status.conditions. For example, +/// type FooStatus struct{ // Represents the observations of a foo's current state. // Known .status.conditions.type are: "Available", "Progressing", and "Degraded" // +patchMergeKey=type // +patchStrategy=merge // +listType=map // +listMapKey=type Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"` +/// // other fields } +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] +pub enum TargetGroupPolicyStatusConditionsStatus { + True, + False, + Unknown, +} + diff --git a/kube-custom-resources-rs/src/application_networking_k8s_aws/v1alpha1/vpcassociationpolicies.rs b/kube-custom-resources-rs/src/application_networking_k8s_aws/v1alpha1/vpcassociationpolicies.rs new file mode 100644 index 000000000..0dc614609 --- /dev/null +++ b/kube-custom-resources-rs/src/application_networking_k8s_aws/v1alpha1/vpcassociationpolicies.rs @@ -0,0 +1,86 @@ +// WARNING: generated by kopium - manual changes will be overwritten +// kopium command: kopium --docs --filename=./crd-catalog/aws/aws-application-networking-k8s/application-networking.k8s.aws/v1alpha1/vpcassociationpolicies.yaml --derive=PartialEq +// kopium version: 0.16.5 + +use kube::CustomResource; +use serde::{Serialize, Deserialize}; + +/// VpcAssociationPolicySpec defines the desired state of VpcAssociationPolicy. +#[derive(CustomResource, Serialize, Deserialize, Clone, Debug, PartialEq)] +#[kube(group = "application-networking.k8s.aws", version = "v1alpha1", kind = "VpcAssociationPolicy", plural = "vpcassociationpolicies")] +#[kube(namespaced)] +#[kube(status = "VpcAssociationPolicyStatus")] +#[kube(schema = "disabled")] +pub struct VpcAssociationPolicySpec { + /// AssociateWithVpc indicates whether the VpcServiceNetworkAssociation should be created for the current VPC of k8s cluster. + /// This value will be considered true by default. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "associateWithVpc")] + pub associate_with_vpc: Option, + /// SecurityGroupIds defines the security groups enforced on the VpcServiceNetworkAssociation. Security groups does not take effect if AssociateWithVpc is set to false. + /// For more details, please check the VPC Lattice documentation https://docs.aws.amazon.com/vpc-lattice/latest/ug/security-groups.html + #[serde(default, skip_serializing_if = "Option::is_none", rename = "securityGroupIds")] + pub security_group_ids: Option>, + /// TargetRef points to the kubernetes Gateway resource that will have this policy attached. + /// This field is following the guidelines of Kubernetes Gateway API policy attachment. + #[serde(rename = "targetRef")] + pub target_ref: VpcAssociationPolicyTargetRef, +} + +/// TargetRef points to the kubernetes Gateway resource that will have this policy attached. +/// This field is following the guidelines of Kubernetes Gateway API policy attachment. +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] +pub struct VpcAssociationPolicyTargetRef { + /// Group is the group of the target resource. + pub group: String, + /// Kind is kind of the target resource. + pub kind: String, + /// Name is the name of the target resource. + pub name: String, + /// Namespace is the namespace of the referent. When unspecified, the local namespace is inferred. Even when policy targets a resource in a different namespace, it MUST only apply to traffic originating from the same namespace as the policy. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub namespace: Option, +} + +/// VpcAssociationPolicyStatus defines the observed state of VpcAssociationPolicy. +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] +pub struct VpcAssociationPolicyStatus { + /// Conditions describe the current conditions of the VpcAssociationPolicy. + /// Implementations should prefer to express Policy conditions using the `PolicyConditionType` and `PolicyConditionReason` constants so that operators and tools can converge on a common vocabulary to describe VpcAssociationPolicy state. + /// Known condition types are: + /// * "Accepted" + #[serde(default, skip_serializing_if = "Option::is_none")] + pub conditions: Option>, +} + +/// Condition contains details for one aspect of the current state of this API Resource. --- This struct is intended for direct use as an array at the field path .status.conditions. For example, +/// type FooStatus struct{ // Represents the observations of a foo's current state. // Known .status.conditions.type are: "Available", "Progressing", and "Degraded" // +patchMergeKey=type // +patchStrategy=merge // +listType=map // +listMapKey=type Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"` +/// // other fields } +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] +pub struct VpcAssociationPolicyStatusConditions { + /// lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + #[serde(rename = "lastTransitionTime")] + pub last_transition_time: String, + /// message is a human readable message indicating details about the transition. This may be an empty string. + pub message: String, + /// observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "observedGeneration")] + pub observed_generation: Option, + /// reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty. + pub reason: String, + /// status of the condition, one of True, False, Unknown. + pub status: VpcAssociationPolicyStatusConditionsStatus, + /// type of condition in CamelCase or in foo.example.com/CamelCase. --- Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be useful (see .node.status.conditions), the ability to deconflict is important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) + #[serde(rename = "type")] + pub r#type: String, +} + +/// Condition contains details for one aspect of the current state of this API Resource. --- This struct is intended for direct use as an array at the field path .status.conditions. For example, +/// type FooStatus struct{ // Represents the observations of a foo's current state. // Known .status.conditions.type are: "Available", "Progressing", and "Degraded" // +patchMergeKey=type // +patchStrategy=merge // +listType=map // +listMapKey=type Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"` +/// // other fields } +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] +pub enum VpcAssociationPolicyStatusConditionsStatus { + True, + False, + Unknown, +} + diff --git a/kube-custom-resources-rs/src/lib.rs b/kube-custom-resources-rs/src/lib.rs index d6d50392a..31be72fd0 100644 --- a/kube-custom-resources-rs/src/lib.rs +++ b/kube-custom-resources-rs/src/lib.rs @@ -131,6 +131,16 @@ apiVersion `app.terraform.io/v1alpha2`: - `Module` - `Workspace` +## application_networking_k8s_aws + +apiVersion `application-networking.k8s.aws/v1alpha1`: +- `AccessLogPolicy` +- `IAMAuthPolicy` +- `ServiceExport` +- `ServiceImport` +- `TargetGroupPolicy` +- `VpcAssociationPolicy` + ## applicationautoscaling_services_k8s_aws apiVersion `applicationautoscaling.services.k8s.aws/v1alpha1`: @@ -2390,6 +2400,8 @@ pub mod app_lightbend_com; pub mod app_redislabs_com; #[cfg(feature = "app_terraform_io")] pub mod app_terraform_io; +#[cfg(feature = "application_networking_k8s_aws")] +pub mod application_networking_k8s_aws; #[cfg(feature = "applicationautoscaling_services_k8s_aws")] pub mod applicationautoscaling_services_k8s_aws; #[cfg(feature = "appprotect_f5_com")]