diff --git a/cmd/cluster/core/dump.go b/cmd/cluster/core/dump.go index 5c553695478..e36e2434da7 100644 --- a/cmd/cluster/core/dump.go +++ b/cmd/cluster/core/dump.go @@ -62,7 +62,7 @@ import ( secretsstorev1 "sigs.k8s.io/secrets-store-csi-driver/apis/v1" "github.com/go-logr/logr" - orcv1alpha1 "github.com/k-orc/openstack-resource-controller/api/v1alpha1" + orcv1alpha1 "github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1" snapshotv1 "github.com/kubernetes-csi/external-snapshotter/client/v6/apis/volumesnapshot/v1" prometheusoperatorv1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1" "github.com/spf13/cobra" diff --git a/cmd/install/assets/crds/cluster-api-provider-agent/capi-provider.agent-install.openshift.io_agentclusters.yaml b/cmd/install/assets/crds/cluster-api-provider-agent/capi-provider.agent-install.openshift.io_agentclusters.yaml index d295955918f..edfd642f129 100644 --- a/cmd/install/assets/crds/cluster-api-provider-agent/capi-provider.agent-install.openshift.io_agentclusters.yaml +++ b/cmd/install/assets/crds/cluster-api-provider-agent/capi-provider.agent-install.openshift.io_agentclusters.yaml @@ -53,9 +53,6 @@ spec: description: port is the port on which the API server is serving. format: int32 type: integer - required: - - host - - port type: object ignitionEndpoint: description: IgnitionEndpoint store the data to of the custom ignition @@ -218,9 +215,6 @@ spec: description: port is the port on which the API server is serving. format: int32 type: integer - required: - - host - - port type: object ignitionEndpoint: description: IgnitionEndpoint store the data to of the custom ignition diff --git a/cmd/install/assets/crds/cluster-api-provider-aws/infrastructure.cluster.x-k8s.io_awsclusters.yaml b/cmd/install/assets/crds/cluster-api-provider-aws/infrastructure.cluster.x-k8s.io_awsclusters.yaml index 3a7b7ce160e..803cf279289 100644 --- a/cmd/install/assets/crds/cluster-api-provider-aws/infrastructure.cluster.x-k8s.io_awsclusters.yaml +++ b/cmd/install/assets/crds/cluster-api-provider-aws/infrastructure.cluster.x-k8s.io_awsclusters.yaml @@ -118,9 +118,6 @@ spec: description: port is the port on which the API server is serving. format: int32 type: integer - required: - - host - - port type: object controlPlaneLoadBalancer: description: ControlPlaneLoadBalancer is optional configuration for @@ -984,9 +981,6 @@ spec: description: port is the port on which the API server is serving. format: int32 type: integer - required: - - host - - port type: object controlPlaneLoadBalancer: description: ControlPlaneLoadBalancer is optional configuration for diff --git a/cmd/install/assets/crds/cluster-api-provider-aws/infrastructure.cluster.x-k8s.io_awsclustertemplates.yaml b/cmd/install/assets/crds/cluster-api-provider-aws/infrastructure.cluster.x-k8s.io_awsclustertemplates.yaml index c9274fb8163..32d57fa8c38 100644 --- a/cmd/install/assets/crds/cluster-api-provider-aws/infrastructure.cluster.x-k8s.io_awsclustertemplates.yaml +++ b/cmd/install/assets/crds/cluster-api-provider-aws/infrastructure.cluster.x-k8s.io_awsclustertemplates.yaml @@ -135,9 +135,6 @@ spec: is serving. format: int32 type: integer - required: - - host - - port type: object controlPlaneLoadBalancer: description: ControlPlaneLoadBalancer is optional configuration @@ -564,9 +561,6 @@ spec: is serving. format: int32 type: integer - required: - - host - - port type: object controlPlaneLoadBalancer: description: ControlPlaneLoadBalancer is optional configuration diff --git a/cmd/install/assets/crds/cluster-api-provider-azure/infrastructure.cluster.x-k8s.io_azureasomanagedclusters.yaml b/cmd/install/assets/crds/cluster-api-provider-azure/infrastructure.cluster.x-k8s.io_azureasomanagedclusters.yaml index b150d6ebad1..7d372273051 100644 --- a/cmd/install/assets/crds/cluster-api-provider-azure/infrastructure.cluster.x-k8s.io_azureasomanagedclusters.yaml +++ b/cmd/install/assets/crds/cluster-api-provider-azure/infrastructure.cluster.x-k8s.io_azureasomanagedclusters.yaml @@ -55,9 +55,6 @@ spec: description: port is the port on which the API server is serving. format: int32 type: integer - required: - - host - - port type: object resources: description: Resources are embedded ASO resources to be managed by diff --git a/cmd/install/assets/crds/cluster-api-provider-azure/infrastructure.cluster.x-k8s.io_azureasomanagedcontrolplanes.yaml b/cmd/install/assets/crds/cluster-api-provider-azure/infrastructure.cluster.x-k8s.io_azureasomanagedcontrolplanes.yaml index 155a4c2e87f..1e872f32b78 100644 --- a/cmd/install/assets/crds/cluster-api-provider-azure/infrastructure.cluster.x-k8s.io_azureasomanagedcontrolplanes.yaml +++ b/cmd/install/assets/crds/cluster-api-provider-azure/infrastructure.cluster.x-k8s.io_azureasomanagedcontrolplanes.yaml @@ -70,9 +70,6 @@ spec: description: port is the port on which the API server is serving. format: int32 type: integer - required: - - host - - port type: object initialized: description: |- diff --git a/cmd/install/assets/crds/cluster-api-provider-azure/infrastructure.cluster.x-k8s.io_azureclusters.yaml b/cmd/install/assets/crds/cluster-api-provider-azure/infrastructure.cluster.x-k8s.io_azureclusters.yaml index 819897033e4..18d7b38aee8 100644 --- a/cmd/install/assets/crds/cluster-api-provider-azure/infrastructure.cluster.x-k8s.io_azureclusters.yaml +++ b/cmd/install/assets/crds/cluster-api-provider-azure/infrastructure.cluster.x-k8s.io_azureclusters.yaml @@ -572,9 +572,6 @@ spec: description: port is the port on which the API server is serving. format: int32 type: integer - required: - - host - - port type: object extendedLocation: description: ExtendedLocation is an optional set of ExtendedLocation diff --git a/cmd/install/assets/crds/cluster-api-provider-gcp/infrastructure.cluster.x-k8s.io_gcpclusters.yaml b/cmd/install/assets/crds/cluster-api-provider-gcp/infrastructure.cluster.x-k8s.io_gcpclusters.yaml index cd5f2b9bdd9..75a711f7bc8 100644 --- a/cmd/install/assets/crds/cluster-api-provider-gcp/infrastructure.cluster.x-k8s.io_gcpclusters.yaml +++ b/cmd/install/assets/crds/cluster-api-provider-gcp/infrastructure.cluster.x-k8s.io_gcpclusters.yaml @@ -78,9 +78,6 @@ spec: description: port is the port on which the API server is serving. format: int32 type: integer - required: - - host - - port type: object credentialsRef: description: |- diff --git a/cmd/install/assets/crds/cluster-api-provider-gcp/infrastructure.cluster.x-k8s.io_gcpclustertemplates.yaml b/cmd/install/assets/crds/cluster-api-provider-gcp/infrastructure.cluster.x-k8s.io_gcpclustertemplates.yaml index 65ecfd88871..cc450903cb8 100644 --- a/cmd/install/assets/crds/cluster-api-provider-gcp/infrastructure.cluster.x-k8s.io_gcpclustertemplates.yaml +++ b/cmd/install/assets/crds/cluster-api-provider-gcp/infrastructure.cluster.x-k8s.io_gcpclustertemplates.yaml @@ -95,9 +95,6 @@ spec: is serving. format: int32 type: integer - required: - - host - - port type: object credentialsRef: description: |- diff --git a/cmd/install/assets/crds/cluster-api-provider-ibmcloud/infrastructure.cluster.x-k8s.io_ibmpowervsclusters.yaml b/cmd/install/assets/crds/cluster-api-provider-ibmcloud/infrastructure.cluster.x-k8s.io_ibmpowervsclusters.yaml index 3161cf00121..ca21618211d 100644 --- a/cmd/install/assets/crds/cluster-api-provider-ibmcloud/infrastructure.cluster.x-k8s.io_ibmpowervsclusters.yaml +++ b/cmd/install/assets/crds/cluster-api-provider-ibmcloud/infrastructure.cluster.x-k8s.io_ibmpowervsclusters.yaml @@ -74,9 +74,6 @@ spec: description: port is the port on which the API server is serving. format: int32 type: integer - required: - - host - - port type: object network: description: Network is the reference to the Network to use for this @@ -182,9 +179,6 @@ spec: description: port is the port on which the API server is serving. format: int32 type: integer - required: - - host - - port type: object cosInstance: description: |- diff --git a/cmd/install/assets/crds/cluster-api-provider-ibmcloud/infrastructure.cluster.x-k8s.io_ibmpowervsclustertemplates.yaml b/cmd/install/assets/crds/cluster-api-provider-ibmcloud/infrastructure.cluster.x-k8s.io_ibmpowervsclustertemplates.yaml index 0a5b74c5c2e..a5bfd33c2d1 100644 --- a/cmd/install/assets/crds/cluster-api-provider-ibmcloud/infrastructure.cluster.x-k8s.io_ibmpowervsclustertemplates.yaml +++ b/cmd/install/assets/crds/cluster-api-provider-ibmcloud/infrastructure.cluster.x-k8s.io_ibmpowervsclustertemplates.yaml @@ -96,9 +96,6 @@ spec: is serving. format: int32 type: integer - required: - - host - - port type: object network: description: Network is the reference to the Network to use @@ -216,9 +213,6 @@ spec: is serving. format: int32 type: integer - required: - - host - - port type: object cosInstance: description: |- diff --git a/cmd/install/assets/crds/cluster-api-provider-ibmcloud/infrastructure.cluster.x-k8s.io_ibmvpcclusters.yaml b/cmd/install/assets/crds/cluster-api-provider-ibmcloud/infrastructure.cluster.x-k8s.io_ibmvpcclusters.yaml index 1c82d012d2e..07c61519b95 100644 --- a/cmd/install/assets/crds/cluster-api-provider-ibmcloud/infrastructure.cluster.x-k8s.io_ibmvpcclusters.yaml +++ b/cmd/install/assets/crds/cluster-api-provider-ibmcloud/infrastructure.cluster.x-k8s.io_ibmvpcclusters.yaml @@ -62,9 +62,6 @@ spec: description: port is the port on which the API server is serving. format: int32 type: integer - required: - - host - - port type: object controlPlaneLoadBalancer: description: ControlPlaneLoadBalancer is optional configuration for @@ -252,9 +249,6 @@ spec: description: port is the port on which the API server is serving. format: int32 type: integer - required: - - host - - port type: object controlPlaneLoadBalancer: description: |- diff --git a/cmd/install/assets/crds/cluster-api-provider-ibmcloud/infrastructure.cluster.x-k8s.io_ibmvpcclustertemplates.yaml b/cmd/install/assets/crds/cluster-api-provider-ibmcloud/infrastructure.cluster.x-k8s.io_ibmvpcclustertemplates.yaml index 6b6af9c486a..cd23ba5c805 100644 --- a/cmd/install/assets/crds/cluster-api-provider-ibmcloud/infrastructure.cluster.x-k8s.io_ibmvpcclustertemplates.yaml +++ b/cmd/install/assets/crds/cluster-api-provider-ibmcloud/infrastructure.cluster.x-k8s.io_ibmvpcclustertemplates.yaml @@ -94,9 +94,6 @@ spec: is serving. format: int32 type: integer - required: - - host - - port type: object controlPlaneLoadBalancer: description: |- diff --git a/cmd/install/assets/crds/cluster-api-provider-openstack/infrastructure.cluster.x-k8s.io_openstackclusteridentities.yaml b/cmd/install/assets/crds/cluster-api-provider-openstack/infrastructure.cluster.x-k8s.io_openstackclusteridentities.yaml new file mode 100644 index 00000000000..ea13bcbfebd --- /dev/null +++ b/cmd/install/assets/crds/cluster-api-provider-openstack/infrastructure.cluster.x-k8s.io_openstackclusteridentities.yaml @@ -0,0 +1,115 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.17.0 + name: openstackclusteridentities.infrastructure.cluster.x-k8s.io +spec: + group: infrastructure.cluster.x-k8s.io + names: + categories: + - cluster-api + kind: OpenStackClusterIdentity + listKind: OpenStackClusterIdentityList + plural: openstackclusteridentities + shortNames: + - osci + singular: openstackclusteridentity + scope: Cluster + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + description: OpenStackClusterIdentity is a cluster-scoped identity that centralizes + OpenStack credentials. + 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: OpenStackClusterIdentitySpec defines the desired state for + an OpenStackClusterIdentity. + properties: + namespaceSelector: + description: NamespaceSelector limits which namespaces may use this + identity. If nil, all namespaces are allowed. + 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 + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + 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 + x-kubernetes-map-type: atomic + secretRef: + description: SecretRef references the credentials Secret containing + a `clouds.yaml` file. + properties: + name: + description: Name of the Secret which contains a `clouds.yaml` + key (and optionally `cacert`). + type: string + namespace: + description: Namespace where the Secret resides. + type: string + required: + - name + - namespace + type: object + required: + - secretRef + type: object + type: object + served: true + storage: true diff --git a/cmd/install/assets/crds/cluster-api-provider-openstack/infrastructure.cluster.x-k8s.io_openstackclusters.yaml b/cmd/install/assets/crds/cluster-api-provider-openstack/infrastructure.cluster.x-k8s.io_openstackclusters.yaml index 9e4d79613f2..d32a1cb099e 100644 --- a/cmd/install/assets/crds/cluster-api-provider-openstack/infrastructure.cluster.x-k8s.io_openstackclusters.yaml +++ b/cmd/install/assets/crds/cluster-api-provider-openstack/infrastructure.cluster.x-k8s.io_openstackclusters.yaml @@ -508,12 +508,15 @@ spec: cloudName: description: CloudName specifies the name of the entry in the clouds.yaml file to use. + minLength: 1 type: string name: description: |- - Name is the name of a secret in the same namespace as the resource being provisioned. - The secret must contain a key named `clouds.yaml` which contains an OpenStack clouds.yaml file. - The secret may optionally contain a key named `cacert` containing a PEM-encoded CA certificate. + Name is the name of a Secret (type=Secret) in the same namespace as the resource being provisioned, + or the name of an OpenStackClusterIdentity (type=ClusterIdentity). + The Secret must contain a key named `clouds.yaml` which contains an OpenStack clouds.yaml file. + The Secret may optionally contain a key named `cacert` containing a PEM-encoded CA certificate. + minLength: 1 type: string region: description: |- @@ -521,9 +524,18 @@ spec: any value in clouds.yaml. If specified for an OpenStackMachine, its value will be included in providerID. type: string + type: + default: Secret + description: Type specifies the identity reference type. + Defaults to Secret for backward compatibility. + enum: + - Secret + - ClusterIdentity + type: string required: - cloudName - name + - type type: object x-kubernetes-validations: - message: region is immutable @@ -1283,9 +1295,6 @@ spec: description: port is the port on which the API server is serving. format: int32 type: integer - required: - - host - - port type: object controlPlaneOmitAvailabilityZone: description: |- @@ -1518,12 +1527,15 @@ spec: cloudName: description: CloudName specifies the name of the entry in the clouds.yaml file to use. + minLength: 1 type: string name: description: |- - Name is the name of a secret in the same namespace as the resource being provisioned. - The secret must contain a key named `clouds.yaml` which contains an OpenStack clouds.yaml file. - The secret may optionally contain a key named `cacert` containing a PEM-encoded CA certificate. + Name is the name of a Secret (type=Secret) in the same namespace as the resource being provisioned, + or the name of an OpenStackClusterIdentity (type=ClusterIdentity). + The Secret must contain a key named `clouds.yaml` which contains an OpenStack clouds.yaml file. + The Secret may optionally contain a key named `cacert` containing a PEM-encoded CA certificate. + minLength: 1 type: string region: description: |- @@ -1531,9 +1543,18 @@ spec: any value in clouds.yaml. If specified for an OpenStackMachine, its value will be included in providerID. type: string + type: + default: Secret + description: Type specifies the identity reference type. Defaults + to Secret for backward compatibility. + enum: + - Secret + - ClusterIdentity + type: string required: - cloudName - name + - type type: object x-kubernetes-validations: - message: region is immutable @@ -2437,6 +2458,62 @@ spec: - id - name type: object + conditions: + description: |- + Conditions defines current service state of the OpenStackCluster. + This field surfaces into Cluster's status.conditions[InfrastructureReady] condition. + The Ready condition must surface issues during the entire lifecycle of the OpenStackCluster + (both during initial provisioning and after the initial provisioning is completed). + items: + description: Condition defines an observation of a Cluster API resource + operational state. + 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 field may be empty. + maxLength: 10240 + minLength: 1 + type: string + reason: + description: |- + reason is the reason for the condition's last transition in CamelCase. + The specific API may choose whether or not this field is considered a guaranteed API. + This field may be empty. + maxLength: 256 + minLength: 1 + type: string + severity: + description: |- + severity provides an explicit classification of Reason code, so the users or machines can immediately + understand the current situation and act accordingly. + The Severity field MUST be set only when Status=False. + maxLength: 32 + type: string + status: + description: status of the condition, one of 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. + maxLength: 256 + minLength: 1 + type: string + required: + - lastTransitionTime + - status + - type + type: object + type: array controlPlaneSecurityGroup: description: |- ControlPlaneSecurityGroup contains the information about the @@ -2506,6 +2583,9 @@ spec: Any transient errors that occur during the reconciliation of OpenStackClusters can be added as events to the OpenStackCluster object and/or logged in the controller's output. + + Deprecated: This field is deprecated and will be removed in a future API version. + Use status.conditions to report failures. type: string failureReason: description: |- @@ -2525,7 +2605,20 @@ spec: Any transient errors that occur during the reconciliation of OpenStackClusters can be added as events to the OpenStackCluster object and/or logged in the controller's output. + + Deprecated: This field is deprecated and will be removed in a future API version. + Use status.conditions to report failures. type: string + initialization: + description: Initialization contains information about the initialization + status of the cluster. + properties: + provisioned: + description: |- + Provisioned is set to true when the initial provisioning of the cluster infrastructure is completed. + The value of this field is never updated after provisioning is completed. + type: boolean + type: object network: description: Network contains information about the created OpenStack Network. @@ -2568,7 +2661,11 @@ spec: type: object ready: default: false - description: Ready is true when the cluster infrastructure is ready. + description: |- + Ready is true when the cluster infrastructure is ready. + + Deprecated: This field is deprecated and will be removed in a future API version. + Use status.conditions to determine the ready state of the cluster. type: boolean router: description: Router describes the default cluster router diff --git a/cmd/install/assets/crds/cluster-api-provider-openstack/infrastructure.cluster.x-k8s.io_openstackclustertemplates.yaml b/cmd/install/assets/crds/cluster-api-provider-openstack/infrastructure.cluster.x-k8s.io_openstackclustertemplates.yaml index 4f9970ebf98..b20377a9abc 100644 --- a/cmd/install/assets/crds/cluster-api-provider-openstack/infrastructure.cluster.x-k8s.io_openstackclustertemplates.yaml +++ b/cmd/install/assets/crds/cluster-api-provider-openstack/infrastructure.cluster.x-k8s.io_openstackclustertemplates.yaml @@ -497,12 +497,15 @@ spec: cloudName: description: CloudName specifies the name of the entry in the clouds.yaml file to use. + minLength: 1 type: string name: description: |- - Name is the name of a secret in the same namespace as the resource being provisioned. - The secret must contain a key named `clouds.yaml` which contains an OpenStack clouds.yaml file. - The secret may optionally contain a key named `cacert` containing a PEM-encoded CA certificate. + Name is the name of a Secret (type=Secret) in the same namespace as the resource being provisioned, + or the name of an OpenStackClusterIdentity (type=ClusterIdentity). + The Secret must contain a key named `clouds.yaml` which contains an OpenStack clouds.yaml file. + The Secret may optionally contain a key named `cacert` containing a PEM-encoded CA certificate. + minLength: 1 type: string region: description: |- @@ -510,9 +513,18 @@ spec: any value in clouds.yaml. If specified for an OpenStackMachine, its value will be included in providerID. type: string + type: + default: Secret + description: Type specifies the identity reference + type. Defaults to Secret for backward compatibility. + enum: + - Secret + - ClusterIdentity + type: string required: - cloudName - name + - type type: object x-kubernetes-validations: - message: region is immutable @@ -1289,9 +1301,6 @@ spec: is serving. format: int32 type: integer - required: - - host - - port type: object controlPlaneOmitAvailabilityZone: description: |- @@ -1525,12 +1534,15 @@ spec: cloudName: description: CloudName specifies the name of the entry in the clouds.yaml file to use. + minLength: 1 type: string name: description: |- - Name is the name of a secret in the same namespace as the resource being provisioned. - The secret must contain a key named `clouds.yaml` which contains an OpenStack clouds.yaml file. - The secret may optionally contain a key named `cacert` containing a PEM-encoded CA certificate. + Name is the name of a Secret (type=Secret) in the same namespace as the resource being provisioned, + or the name of an OpenStackClusterIdentity (type=ClusterIdentity). + The Secret must contain a key named `clouds.yaml` which contains an OpenStack clouds.yaml file. + The Secret may optionally contain a key named `cacert` containing a PEM-encoded CA certificate. + minLength: 1 type: string region: description: |- @@ -1538,9 +1550,18 @@ spec: any value in clouds.yaml. If specified for an OpenStackMachine, its value will be included in providerID. type: string + type: + default: Secret + description: Type specifies the identity reference type. + Defaults to Secret for backward compatibility. + enum: + - Secret + - ClusterIdentity + type: string required: - cloudName - name + - type type: object x-kubernetes-validations: - message: region is immutable diff --git a/cmd/install/assets/crds/cluster-api-provider-openstack/infrastructure.cluster.x-k8s.io_openstackfloatingippools.yaml b/cmd/install/assets/crds/cluster-api-provider-openstack/infrastructure.cluster.x-k8s.io_openstackfloatingippools.yaml index 571c6a4789d..d3e254c11ec 100644 --- a/cmd/install/assets/crds/cluster-api-provider-openstack/infrastructure.cluster.x-k8s.io_openstackfloatingippools.yaml +++ b/cmd/install/assets/crds/cluster-api-provider-openstack/infrastructure.cluster.x-k8s.io_openstackfloatingippools.yaml @@ -126,12 +126,15 @@ spec: cloudName: description: CloudName specifies the name of the entry in the clouds.yaml file to use. + minLength: 1 type: string name: description: |- - Name is the name of a secret in the same namespace as the resource being provisioned. - The secret must contain a key named `clouds.yaml` which contains an OpenStack clouds.yaml file. - The secret may optionally contain a key named `cacert` containing a PEM-encoded CA certificate. + Name is the name of a Secret (type=Secret) in the same namespace as the resource being provisioned, + or the name of an OpenStackClusterIdentity (type=ClusterIdentity). + The Secret must contain a key named `clouds.yaml` which contains an OpenStack clouds.yaml file. + The Secret may optionally contain a key named `cacert` containing a PEM-encoded CA certificate. + minLength: 1 type: string region: description: |- @@ -139,9 +142,18 @@ spec: any value in clouds.yaml. If specified for an OpenStackMachine, its value will be included in providerID. type: string + type: + default: Secret + description: Type specifies the identity reference type. Defaults + to Secret for backward compatibility. + enum: + - Secret + - ClusterIdentity + type: string required: - cloudName - name + - type type: object x-kubernetes-validations: - message: region is immutable diff --git a/cmd/install/assets/crds/cluster-api-provider-openstack/infrastructure.cluster.x-k8s.io_openstackmachines.yaml b/cmd/install/assets/crds/cluster-api-provider-openstack/infrastructure.cluster.x-k8s.io_openstackmachines.yaml index 75355da4eba..d4269ecf6e4 100644 --- a/cmd/install/assets/crds/cluster-api-provider-openstack/infrastructure.cluster.x-k8s.io_openstackmachines.yaml +++ b/cmd/install/assets/crds/cluster-api-provider-openstack/infrastructure.cluster.x-k8s.io_openstackmachines.yaml @@ -195,12 +195,15 @@ spec: cloudName: description: CloudName specifies the name of the entry in the clouds.yaml file to use. + minLength: 1 type: string name: description: |- - Name is the name of a secret in the same namespace as the resource being provisioned. - The secret must contain a key named `clouds.yaml` which contains an OpenStack clouds.yaml file. - The secret may optionally contain a key named `cacert` containing a PEM-encoded CA certificate. + Name is the name of a Secret (type=Secret) in the same namespace as the resource being provisioned, + or the name of an OpenStackClusterIdentity (type=ClusterIdentity). + The Secret must contain a key named `clouds.yaml` which contains an OpenStack clouds.yaml file. + The Secret may optionally contain a key named `cacert` containing a PEM-encoded CA certificate. + minLength: 1 type: string region: description: |- @@ -208,9 +211,18 @@ spec: any value in clouds.yaml. If specified for an OpenStackMachine, its value will be included in providerID. type: string + type: + default: Secret + description: Type specifies the identity reference type. Defaults + to Secret for backward compatibility. + enum: + - Secret + - ClusterIdentity + type: string required: - cloudName - name + - type type: object x-kubernetes-validations: - message: region is immutable @@ -955,8 +967,11 @@ spec: type: object type: array conditions: - description: Conditions provide observations of the operational state - of a Cluster API resource. + description: |- + Conditions defines current service state of the OpenStackMachine. + This field surfaces into Machine's status.conditions[InfrastructureReady] condition. + The Ready condition must surface issues during the entire lifecycle of the OpenStackMachine + (both during initial provisioning and after the initial provisioning is completed). items: description: Condition defines an observation of a Cluster API resource operational state. @@ -1025,11 +1040,27 @@ spec: Any transient errors that occur during the reconciliation of Machines can be added as events to the Machine object and/or logged in the controller's output. + + Deprecated: This field is deprecated and will be removed in a future API version. + Use status.conditions to report failures. type: string failureReason: - description: DeprecatedCAPIMachineStatusError defines errors states - for Machine objects. + description: |- + FailureReason explains the reson behind a failure. + + Deprecated: This field is deprecated and will be removed in a future API version. + Use status.conditions to report failures. type: string + initialization: + description: Initialization contains information about the initialization + status of the machine. + properties: + provisioned: + description: |- + Provisioned is set to true when the initial provisioning of the machine infrastructure is completed. + The value of this field is never updated after provisioning is completed. + type: boolean + type: object instanceID: description: InstanceID is the OpenStack instance ID for this machine. type: string @@ -1040,7 +1071,11 @@ spec: Instead, it's set by the OpenStackServer controller. type: string ready: - description: Ready is true when the provider resource is ready. + description: |- + Ready is true when the provider resource is ready. + + Deprecated: This field is deprecated and will be removed in a future API version. + Use status.conditions to determine the ready state of the machine. type: boolean resolved: description: |- diff --git a/cmd/install/assets/crds/cluster-api-provider-openstack/infrastructure.cluster.x-k8s.io_openstackmachinetemplates.yaml b/cmd/install/assets/crds/cluster-api-provider-openstack/infrastructure.cluster.x-k8s.io_openstackmachinetemplates.yaml index e4de100196e..d36d8b3f2c1 100644 --- a/cmd/install/assets/crds/cluster-api-provider-openstack/infrastructure.cluster.x-k8s.io_openstackmachinetemplates.yaml +++ b/cmd/install/assets/crds/cluster-api-provider-openstack/infrastructure.cluster.x-k8s.io_openstackmachinetemplates.yaml @@ -186,12 +186,15 @@ spec: cloudName: description: CloudName specifies the name of the entry in the clouds.yaml file to use. + minLength: 1 type: string name: description: |- - Name is the name of a secret in the same namespace as the resource being provisioned. - The secret must contain a key named `clouds.yaml` which contains an OpenStack clouds.yaml file. - The secret may optionally contain a key named `cacert` containing a PEM-encoded CA certificate. + Name is the name of a Secret (type=Secret) in the same namespace as the resource being provisioned, + or the name of an OpenStackClusterIdentity (type=ClusterIdentity). + The Secret must contain a key named `clouds.yaml` which contains an OpenStack clouds.yaml file. + The Secret may optionally contain a key named `cacert` containing a PEM-encoded CA certificate. + minLength: 1 type: string region: description: |- @@ -199,9 +202,18 @@ spec: any value in clouds.yaml. If specified for an OpenStackMachine, its value will be included in providerID. type: string + type: + default: Secret + description: Type specifies the identity reference type. + Defaults to Secret for backward compatibility. + enum: + - Secret + - ClusterIdentity + type: string required: - cloudName - name + - type type: object x-kubernetes-validations: - message: region is immutable @@ -938,6 +950,36 @@ spec: required: - template type: object + status: + description: OpenStackMachineTemplateStatus defines the observed state + of OpenStackMachineTemplate. + properties: + capacity: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: |- + Capacity defines the resource capacity for this machine. + This value is used for autoscaling from zero operations as defined in: + https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20210310-opt-in-autoscaling-from-zero.md + type: object + nodeInfo: + description: NodeInfo contains information about the node's architecture + and operating system. + minProperties: 1 + properties: + operatingSystem: + description: |- + operatingSystem is a string representing the operating system of the node. + This may be a string like 'linux' or 'windows'. + type: string + type: object + type: object type: object served: true storage: true + subresources: + status: {} diff --git a/cmd/install/assets/crds/cluster-api-provider-openstack/infrastructure.cluster.x-k8s.io_openstackservers.yaml b/cmd/install/assets/crds/cluster-api-provider-openstack/infrastructure.cluster.x-k8s.io_openstackservers.yaml index dc7e7a7ed5e..435930d8cb6 100644 --- a/cmd/install/assets/crds/cluster-api-provider-openstack/infrastructure.cluster.x-k8s.io_openstackservers.yaml +++ b/cmd/install/assets/crds/cluster-api-provider-openstack/infrastructure.cluster.x-k8s.io_openstackservers.yaml @@ -192,12 +192,15 @@ spec: cloudName: description: CloudName specifies the name of the entry in the clouds.yaml file to use. + minLength: 1 type: string name: description: |- - Name is the name of a secret in the same namespace as the resource being provisioned. - The secret must contain a key named `clouds.yaml` which contains an OpenStack clouds.yaml file. - The secret may optionally contain a key named `cacert` containing a PEM-encoded CA certificate. + Name is the name of a Secret (type=Secret) in the same namespace as the resource being provisioned, + or the name of an OpenStackClusterIdentity (type=ClusterIdentity). + The Secret must contain a key named `clouds.yaml` which contains an OpenStack clouds.yaml file. + The Secret may optionally contain a key named `cacert` containing a PEM-encoded CA certificate. + minLength: 1 type: string region: description: |- @@ -205,9 +208,18 @@ spec: any value in clouds.yaml. If specified for an OpenStackMachine, its value will be included in providerID. type: string + type: + default: Secret + description: Type specifies the identity reference type. Defaults + to Secret for backward compatibility. + enum: + - Secret + - ClusterIdentity + type: string required: - cloudName - name + - type type: object x-kubernetes-validations: - message: region is immutable diff --git a/cmd/install/assets/crds/cluster-api-provider-openstack/openstack.k-orc.cloud_domains.yaml b/cmd/install/assets/crds/cluster-api-provider-openstack/openstack.k-orc.cloud_domains.yaml new file mode 100644 index 00000000000..99352611cbc --- /dev/null +++ b/cmd/install/assets/crds/cluster-api-provider-openstack/openstack.k-orc.cloud_domains.yaml @@ -0,0 +1,293 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.17.0 + name: domains.openstack.k-orc.cloud +spec: + group: openstack.k-orc.cloud + names: + categories: + - openstack + kind: Domain + listKind: DomainList + plural: domains + singular: domain + scope: Namespaced + versions: + - additionalPrinterColumns: + - description: Resource ID + jsonPath: .status.id + name: ID + type: string + - description: Availability status of resource + jsonPath: .status.conditions[?(@.type=='Available')].status + name: Available + type: string + - description: Message describing current progress status + jsonPath: .status.conditions[?(@.type=='Progressing')].message + name: Message + type: string + name: v1alpha1 + schema: + openAPIV3Schema: + description: Domain is the Schema for an ORC resource. + 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 specifies the desired state of the resource. + properties: + cloudCredentialsRef: + description: cloudCredentialsRef points to a secret containing OpenStack + credentials + properties: + cloudName: + description: cloudName specifies the name of the entry in the + clouds.yaml file to use. + maxLength: 256 + minLength: 1 + type: string + secretName: + description: |- + secretName is the name of a secret in the same namespace as the resource being provisioned. + The secret must contain a key named `clouds.yaml` which contains an OpenStack clouds.yaml file. + The secret may optionally contain a key named `cacert` containing a PEM-encoded CA certificate. + maxLength: 253 + minLength: 1 + type: string + required: + - cloudName + - secretName + type: object + import: + description: |- + import refers to an existing OpenStack resource which will be imported instead of + creating a new one. + maxProperties: 1 + minProperties: 1 + properties: + filter: + description: |- + filter contains a resource query which is expected to return a single + result. The controller will continue to retry if filter returns no + results. If filter returns multiple results the controller will set an + error state and will not continue to retry. + minProperties: 1 + properties: + enabled: + description: |- + enabled defines whether a domain is enabled or not. Default is true. + Note: Users can only authorize against an enabled domain (and any of its projects). + type: boolean + name: + description: name of the existing resource + maxLength: 64 + minLength: 1 + type: string + type: object + id: + description: |- + id contains the unique identifier of an existing OpenStack resource. Note + that when specifying an import by ID, the resource MUST already exist. + The ORC object will enter an error state if the resource does not exist. + format: uuid + type: string + type: object + managedOptions: + description: managedOptions specifies options which may be applied + to managed objects. + properties: + onDelete: + default: delete + description: |- + onDelete specifies the behaviour of the controller when the ORC + object is deleted. Options are `delete` - delete the OpenStack resource; + `detach` - do not delete the OpenStack resource. If not specified, the + default is `delete`. + enum: + - delete + - detach + type: string + type: object + managementPolicy: + default: managed + description: |- + managementPolicy defines how ORC will treat the object. Valid values are + `managed`: ORC will create, update, and delete the resource; `unmanaged`: + ORC will import an existing resource, and will not apply updates to it or + delete it. + enum: + - managed + - unmanaged + type: string + x-kubernetes-validations: + - message: managementPolicy is immutable + rule: self == oldSelf + resource: + description: |- + resource specifies the desired state of the resource. + + resource may not be specified if the management policy is `unmanaged`. + + resource must be specified if the management policy is `managed`. + properties: + description: + description: description is a human-readable description for the + resource. + maxLength: 255 + minLength: 1 + type: string + enabled: + description: |- + enabled defines whether a domain is enabled or not. Default is true. + Note: Users can only authorize against an enabled domain (and any of its projects). + type: boolean + name: + description: |- + name will be the name of the created resource. If not specified, the + name of the ORC object will be used. + maxLength: 64 + minLength: 1 + type: string + type: object + required: + - cloudCredentialsRef + type: object + x-kubernetes-validations: + - message: resource must be specified when policy is managed + rule: 'self.managementPolicy == ''managed'' ? has(self.resource) : true' + - message: import may not be specified when policy is managed + rule: 'self.managementPolicy == ''managed'' ? !has(self.__import__) + : true' + - message: resource may not be specified when policy is unmanaged + rule: 'self.managementPolicy == ''unmanaged'' ? !has(self.resource) + : true' + - message: import must be specified when policy is unmanaged + rule: 'self.managementPolicy == ''unmanaged'' ? has(self.__import__) + : true' + - message: managedOptions may only be provided when policy is managed + rule: 'has(self.managedOptions) ? self.managementPolicy == ''managed'' + : true' + status: + description: status defines the observed state of the resource. + properties: + conditions: + description: |- + conditions represents the observed status of the object. + Known .status.conditions.type are: "Available", "Progressing" + + Available represents the availability of the OpenStack resource. If it is + true then the resource is ready for use. + + Progressing indicates whether the controller is still attempting to + reconcile the current state of the OpenStack resource to the desired + state. Progressing will be False either because the desired state has + been achieved, or because some terminal error prevents it from ever being + achieved and the controller is no longer attempting to reconcile. If + Progressing is True, an observer waiting on the resource should continue + to wait. + items: + description: Condition contains details for one aspect of the current + state of this API Resource. + 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 + 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. + 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: 32 + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + id: + description: id is the unique identifier of the OpenStack resource. + type: string + resource: + description: resource contains the observed state of the OpenStack + resource. + properties: + description: + description: description is a human-readable description for the + resource. + maxLength: 1024 + type: string + enabled: + description: |- + enabled defines whether a domain is enabled or not. Default is true. + Note: Users can only authorize against an enabled domain (and any of its projects). + type: boolean + name: + description: name is a Human-readable name for the resource. Might + not be unique. + maxLength: 1024 + type: string + type: object + type: object + type: object + served: true + storage: true + subresources: + status: {} diff --git a/cmd/install/assets/crds/cluster-api-provider-openstack/openstack.k-orc.cloud_flavors.yaml b/cmd/install/assets/crds/cluster-api-provider-openstack/openstack.k-orc.cloud_flavors.yaml new file mode 100644 index 00000000000..eb335b3689a --- /dev/null +++ b/cmd/install/assets/crds/cluster-api-provider-openstack/openstack.k-orc.cloud_flavors.yaml @@ -0,0 +1,373 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.17.0 + name: flavors.openstack.k-orc.cloud +spec: + group: openstack.k-orc.cloud + names: + categories: + - openstack + kind: Flavor + listKind: FlavorList + plural: flavors + singular: flavor + scope: Namespaced + versions: + - additionalPrinterColumns: + - description: Resource ID + jsonPath: .status.id + name: ID + type: string + - description: Availability status of resource + jsonPath: .status.conditions[?(@.type=='Available')].status + name: Available + type: string + - description: Message describing current progress status + jsonPath: .status.conditions[?(@.type=='Progressing')].message + name: Message + type: string + name: v1alpha1 + schema: + openAPIV3Schema: + description: Flavor is the Schema for an ORC resource. + 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 specifies the desired state of the resource. + properties: + cloudCredentialsRef: + description: cloudCredentialsRef points to a secret containing OpenStack + credentials + properties: + cloudName: + description: cloudName specifies the name of the entry in the + clouds.yaml file to use. + maxLength: 256 + minLength: 1 + type: string + secretName: + description: |- + secretName is the name of a secret in the same namespace as the resource being provisioned. + The secret must contain a key named `clouds.yaml` which contains an OpenStack clouds.yaml file. + The secret may optionally contain a key named `cacert` containing a PEM-encoded CA certificate. + maxLength: 253 + minLength: 1 + type: string + required: + - cloudName + - secretName + type: object + import: + description: |- + import refers to an existing OpenStack resource which will be imported instead of + creating a new one. + maxProperties: 1 + minProperties: 1 + properties: + filter: + description: |- + filter contains a resource query which is expected to return a single + result. The controller will continue to retry if filter returns no + results. If filter returns multiple results the controller will set an + error state and will not continue to retry. + minProperties: 1 + properties: + disk: + description: disk is the size of the root disk in GiB. + format: int32 + minimum: 0 + type: integer + name: + description: name of the existing resource + maxLength: 255 + minLength: 1 + pattern: ^[^,]+$ + type: string + ram: + description: ram is the memory of the flavor, measured in + MB. + format: int32 + minimum: 1 + type: integer + vcpus: + description: vcpus is the number of vcpus for the flavor. + format: int32 + minimum: 1 + type: integer + type: object + id: + description: |- + id contains the unique identifier of an existing OpenStack resource. Note + that when specifying an import by ID, the resource MUST already exist. + The ORC object will enter an error state if the resource does not exist. + format: uuid + type: string + type: object + managedOptions: + description: managedOptions specifies options which may be applied + to managed objects. + properties: + onDelete: + default: delete + description: |- + onDelete specifies the behaviour of the controller when the ORC + object is deleted. Options are `delete` - delete the OpenStack resource; + `detach` - do not delete the OpenStack resource. If not specified, the + default is `delete`. + enum: + - delete + - detach + type: string + type: object + managementPolicy: + default: managed + description: |- + managementPolicy defines how ORC will treat the object. Valid values are + `managed`: ORC will create, update, and delete the resource; `unmanaged`: + ORC will import an existing resource, and will not apply updates to it or + delete it. + enum: + - managed + - unmanaged + type: string + x-kubernetes-validations: + - message: managementPolicy is immutable + rule: self == oldSelf + resource: + description: |- + resource specifies the desired state of the resource. + + resource may not be specified if the management policy is `unmanaged`. + + resource must be specified if the management policy is `managed`. + properties: + description: + description: description contains a free form description of the + flavor. + maxLength: 65535 + minLength: 1 + type: string + disk: + description: |- + disk is the size of the root disk that will be created in GiB. If 0 + the root disk will be set to exactly the size of the image used to + deploy the instance. However, in this case the scheduler cannot + select the compute host based on the virtual image size. Therefore, + 0 should only be used for volume booted instances or for testing + purposes. Volume-backed instances can be enforced for flavors with + zero root disk via the + os_compute_api:servers:create:zero_disk_flavor policy rule. + format: int32 + minimum: 0 + type: integer + ephemeral: + description: |- + ephemeral is the size of the ephemeral disk that will be created, in GiB. + Ephemeral disks may be written over on server state changes. So should only + be used as a scratch space for applications that are aware of its + limitations. Defaults to 0. + format: int32 + minimum: 0 + type: integer + isPublic: + description: isPublic flags a flavor as being available to all + projects or not. + type: boolean + name: + description: |- + name will be the name of the created resource. If not specified, the + name of the ORC object will be used. + maxLength: 255 + minLength: 1 + pattern: ^[^,]+$ + type: string + ram: + description: ram is the memory of the flavor, measured in MB. + format: int32 + minimum: 1 + type: integer + swap: + description: |- + swap is the size of a dedicated swap disk that will be allocated, in + MiB. If 0 (the default), no dedicated swap disk will be created. + format: int32 + minimum: 0 + type: integer + vcpus: + description: vcpus is the number of vcpus for the flavor. + format: int32 + minimum: 1 + type: integer + required: + - disk + - ram + - vcpus + type: object + x-kubernetes-validations: + - message: FlavorResourceSpec is immutable + rule: self == oldSelf + required: + - cloudCredentialsRef + type: object + x-kubernetes-validations: + - message: resource must be specified when policy is managed + rule: 'self.managementPolicy == ''managed'' ? has(self.resource) : true' + - message: import may not be specified when policy is managed + rule: 'self.managementPolicy == ''managed'' ? !has(self.__import__) + : true' + - message: resource may not be specified when policy is unmanaged + rule: 'self.managementPolicy == ''unmanaged'' ? !has(self.resource) + : true' + - message: import must be specified when policy is unmanaged + rule: 'self.managementPolicy == ''unmanaged'' ? has(self.__import__) + : true' + - message: managedOptions may only be provided when policy is managed + rule: 'has(self.managedOptions) ? self.managementPolicy == ''managed'' + : true' + status: + description: status defines the observed state of the resource. + properties: + conditions: + description: |- + conditions represents the observed status of the object. + Known .status.conditions.type are: "Available", "Progressing" + + Available represents the availability of the OpenStack resource. If it is + true then the resource is ready for use. + + Progressing indicates whether the controller is still attempting to + reconcile the current state of the OpenStack resource to the desired + state. Progressing will be False either because the desired state has + been achieved, or because some terminal error prevents it from ever being + achieved and the controller is no longer attempting to reconcile. If + Progressing is True, an observer waiting on the resource should continue + to wait. + items: + description: Condition contains details for one aspect of the current + state of this API Resource. + 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 + 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. + 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: 32 + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + id: + description: id is the unique identifier of the OpenStack resource. + type: string + resource: + description: resource contains the observed state of the OpenStack + resource. + properties: + description: + description: description is a human-readable description for the + resource. + maxLength: 65535 + type: string + disk: + description: disk is the size of the root disk that will be created + in GiB. + format: int32 + type: integer + ephemeral: + description: ephemeral is the size of the ephemeral disk, in GiB. + format: int32 + type: integer + isPublic: + description: isPublic flags a flavor as being available to all + projects or not. + type: boolean + name: + description: name is a Human-readable name for the flavor. Might + not be unique. + maxLength: 1024 + type: string + ram: + description: ram is the memory of the flavor, measured in MB. + format: int32 + type: integer + swap: + description: |- + swap is the size of a dedicated swap disk that will be allocated, in + MiB. + format: int32 + type: integer + vcpus: + description: vcpus is the number of vcpus for the flavor. + format: int32 + type: integer + type: object + type: object + type: object + served: true + storage: true + subresources: + status: {} diff --git a/cmd/install/assets/crds/cluster-api-provider-openstack/openstack.k-orc.cloud_floatingips.yaml b/cmd/install/assets/crds/cluster-api-provider-openstack/openstack.k-orc.cloud_floatingips.yaml new file mode 100644 index 00000000000..0074fec3835 --- /dev/null +++ b/cmd/install/assets/crds/cluster-api-provider-openstack/openstack.k-orc.cloud_floatingips.yaml @@ -0,0 +1,486 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.17.0 + name: floatingips.openstack.k-orc.cloud +spec: + group: openstack.k-orc.cloud + names: + categories: + - openstack + kind: FloatingIP + listKind: FloatingIPList + plural: floatingips + singular: floatingip + scope: Namespaced + versions: + - additionalPrinterColumns: + - description: Resource ID + jsonPath: .status.id + name: ID + type: string + - description: Availability status of resource + jsonPath: .status.conditions[?(@.type=='Available')].status + name: Available + type: string + - description: Allocated IP address + jsonPath: .status.resource.floatingIP + name: Address + type: string + - description: Message describing current progress status + jsonPath: .status.conditions[?(@.type=='Progressing')].message + name: Message + type: string + name: v1alpha1 + schema: + openAPIV3Schema: + description: FloatingIP is the Schema for an ORC resource. + 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 specifies the desired state of the resource. + properties: + cloudCredentialsRef: + description: cloudCredentialsRef points to a secret containing OpenStack + credentials + properties: + cloudName: + description: cloudName specifies the name of the entry in the + clouds.yaml file to use. + maxLength: 256 + minLength: 1 + type: string + secretName: + description: |- + secretName is the name of a secret in the same namespace as the resource being provisioned. + The secret must contain a key named `clouds.yaml` which contains an OpenStack clouds.yaml file. + The secret may optionally contain a key named `cacert` containing a PEM-encoded CA certificate. + maxLength: 253 + minLength: 1 + type: string + required: + - cloudName + - secretName + type: object + import: + description: |- + import refers to an existing OpenStack resource which will be imported instead of + creating a new one. + maxProperties: 1 + minProperties: 1 + properties: + filter: + description: |- + filter contains a resource query which is expected to return a single + result. The controller will continue to retry if filter returns no + results. If filter returns multiple results the controller will set an + error state and will not continue to retry. + minProperties: 1 + properties: + description: + description: description of the existing resource + maxLength: 255 + minLength: 1 + type: string + floatingIP: + description: floatingIP is the floatingip address. + maxLength: 45 + minLength: 1 + type: string + floatingNetworkRef: + description: floatingNetworkRef is a reference to the ORC + Network which this resource is associated with. + maxLength: 253 + minLength: 1 + type: string + notTags: + description: |- + notTags is a list of tags to filter by. If specified, resources which + contain all of the given tags will be excluded from the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + maxLength: 255 + minLength: 1 + type: string + maxItems: 64 + type: array + x-kubernetes-list-type: set + notTagsAny: + description: |- + notTagsAny is a list of tags to filter by. If specified, resources + which contain any of the given tags will be excluded from the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + maxLength: 255 + minLength: 1 + type: string + maxItems: 64 + type: array + x-kubernetes-list-type: set + portRef: + description: portRef is a reference to the ORC Port which + this resource is associated with. + maxLength: 253 + minLength: 1 + type: string + projectRef: + description: |- + projectRef is a reference to the ORC Project this resource is associated with. + Typically, only used by admin. + maxLength: 253 + minLength: 1 + type: string + status: + description: status is the status of the floatingip. + maxLength: 1024 + type: string + tags: + description: |- + tags is a list of tags to filter by. If specified, the resource must + have all of the tags specified to be included in the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + maxLength: 255 + minLength: 1 + type: string + maxItems: 64 + type: array + x-kubernetes-list-type: set + tagsAny: + description: |- + tagsAny is a list of tags to filter by. If specified, the resource + must have at least one of the tags specified to be included in the + result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + maxLength: 255 + minLength: 1 + type: string + maxItems: 64 + type: array + x-kubernetes-list-type: set + type: object + id: + description: |- + id contains the unique identifier of an existing OpenStack resource. Note + that when specifying an import by ID, the resource MUST already exist. + The ORC object will enter an error state if the resource does not exist. + format: uuid + type: string + type: object + managedOptions: + description: managedOptions specifies options which may be applied + to managed objects. + properties: + onDelete: + default: delete + description: |- + onDelete specifies the behaviour of the controller when the ORC + object is deleted. Options are `delete` - delete the OpenStack resource; + `detach` - do not delete the OpenStack resource. If not specified, the + default is `delete`. + enum: + - delete + - detach + type: string + type: object + managementPolicy: + default: managed + description: |- + managementPolicy defines how ORC will treat the object. Valid values are + `managed`: ORC will create, update, and delete the resource; `unmanaged`: + ORC will import an existing resource, and will not apply updates to it or + delete it. + enum: + - managed + - unmanaged + type: string + x-kubernetes-validations: + - message: managementPolicy is immutable + rule: self == oldSelf + resource: + description: |- + resource specifies the desired state of the resource. + + resource may not be specified if the management policy is `unmanaged`. + + resource must be specified if the management policy is `managed`. + properties: + description: + description: description is a human-readable description for the + resource. + maxLength: 255 + minLength: 1 + type: string + fixedIP: + description: fixedIP is the IP address of the port to which the + floatingip is associated. + maxLength: 45 + minLength: 1 + type: string + x-kubernetes-validations: + - message: fixedIP is immutable + rule: self == oldSelf + floatingIP: + description: |- + floatingIP is the IP that will be assigned to the floatingip. If not set, it will + be assigned automatically. + maxLength: 45 + minLength: 1 + type: string + x-kubernetes-validations: + - message: floatingIP is immutable + rule: self == oldSelf + floatingNetworkRef: + description: floatingNetworkRef references the network to which + the floatingip is associated. + maxLength: 253 + minLength: 1 + type: string + x-kubernetes-validations: + - message: floatingNetworkRef is immutable + rule: self == oldSelf + floatingSubnetRef: + description: floatingSubnetRef references the subnet to which + the floatingip is associated. + maxLength: 253 + minLength: 1 + type: string + x-kubernetes-validations: + - message: floatingSubnetRef is immutable + rule: self == oldSelf + portRef: + description: portRef is a reference to the ORC Port which this + resource is associated with. + maxLength: 253 + minLength: 1 + type: string + x-kubernetes-validations: + - message: portRef is immutable + rule: self == oldSelf + projectRef: + description: |- + projectRef is a reference to the ORC Project this resource is associated with. + Typically, only used by admin. + maxLength: 253 + minLength: 1 + type: string + x-kubernetes-validations: + - message: projectRef is immutable + rule: self == oldSelf + tags: + description: tags is a list of tags which will be applied to the + floatingip. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + maxLength: 255 + minLength: 1 + type: string + maxItems: 64 + type: array + x-kubernetes-list-type: set + type: object + x-kubernetes-validations: + - message: Exactly one of 'floatingNetworkRef' or 'floatingSubnetRef' + must be set + rule: has(self.floatingNetworkRef) != has(self.floatingSubnetRef) + required: + - cloudCredentialsRef + type: object + x-kubernetes-validations: + - message: resource must be specified when policy is managed + rule: 'self.managementPolicy == ''managed'' ? has(self.resource) : true' + - message: import may not be specified when policy is managed + rule: 'self.managementPolicy == ''managed'' ? !has(self.__import__) + : true' + - message: resource may not be specified when policy is unmanaged + rule: 'self.managementPolicy == ''unmanaged'' ? !has(self.resource) + : true' + - message: import must be specified when policy is unmanaged + rule: 'self.managementPolicy == ''unmanaged'' ? has(self.__import__) + : true' + - message: managedOptions may only be provided when policy is managed + rule: 'has(self.managedOptions) ? self.managementPolicy == ''managed'' + : true' + status: + description: status defines the observed state of the resource. + properties: + conditions: + description: |- + conditions represents the observed status of the object. + Known .status.conditions.type are: "Available", "Progressing" + + Available represents the availability of the OpenStack resource. If it is + true then the resource is ready for use. + + Progressing indicates whether the controller is still attempting to + reconcile the current state of the OpenStack resource to the desired + state. Progressing will be False either because the desired state has + been achieved, or because some terminal error prevents it from ever being + achieved and the controller is no longer attempting to reconcile. If + Progressing is True, an observer waiting on the resource should continue + to wait. + items: + description: Condition contains details for one aspect of the current + state of this API Resource. + 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 + 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. + 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: 32 + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + id: + description: id is the unique identifier of the OpenStack resource. + type: string + resource: + description: resource contains the observed state of the OpenStack + resource. + properties: + createdAt: + description: createdAt shows the date and time when the resource + was created. The date and time stamp format is ISO 8601 + format: date-time + type: string + description: + description: description is a human-readable description for the + resource. + maxLength: 1024 + type: string + fixedIP: + description: fixedIP is the IP address of the port to which the + floatingip is associated. + maxLength: 1024 + type: string + floatingIP: + description: floatingIP is the IP address of the floatingip. + maxLength: 1024 + type: string + floatingNetworkID: + description: floatingNetworkID is the ID of the network to which + the floatingip is associated. + maxLength: 1024 + type: string + portID: + description: portID is the ID of the port to which the floatingip + is associated. + maxLength: 1024 + type: string + projectID: + description: projectID is the project owner of the resource. + maxLength: 1024 + type: string + revisionNumber: + description: revisionNumber optionally set via extensions/standard-attr-revisions + format: int64 + type: integer + routerID: + description: routerID is the ID of the router to which the floatingip + is associated. + maxLength: 1024 + type: string + status: + description: status indicates the current status of the resource. + maxLength: 1024 + type: string + tags: + description: tags is the list of tags on the resource. + items: + maxLength: 1024 + type: string + maxItems: 64 + type: array + x-kubernetes-list-type: atomic + tenantID: + description: tenantID is the project owner of the resource. + maxLength: 1024 + type: string + updatedAt: + description: updatedAt shows the date and time when the resource + was updated. The date and time stamp format is ISO 8601 + format: date-time + type: string + type: object + type: object + type: object + served: true + storage: true + subresources: + status: {} diff --git a/cmd/install/assets/crds/cluster-api-provider-openstack/openstack.k-orc.cloud_groups.yaml b/cmd/install/assets/crds/cluster-api-provider-openstack/openstack.k-orc.cloud_groups.yaml new file mode 100644 index 00000000000..4944f66c05c --- /dev/null +++ b/cmd/install/assets/crds/cluster-api-provider-openstack/openstack.k-orc.cloud_groups.yaml @@ -0,0 +1,298 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.17.0 + name: groups.openstack.k-orc.cloud +spec: + group: openstack.k-orc.cloud + names: + categories: + - openstack + kind: Group + listKind: GroupList + plural: groups + singular: group + scope: Namespaced + versions: + - additionalPrinterColumns: + - description: Resource ID + jsonPath: .status.id + name: ID + type: string + - description: Availability status of resource + jsonPath: .status.conditions[?(@.type=='Available')].status + name: Available + type: string + - description: Message describing current progress status + jsonPath: .status.conditions[?(@.type=='Progressing')].message + name: Message + type: string + name: v1alpha1 + schema: + openAPIV3Schema: + description: Group is the Schema for an ORC resource. + 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 specifies the desired state of the resource. + properties: + cloudCredentialsRef: + description: cloudCredentialsRef points to a secret containing OpenStack + credentials + properties: + cloudName: + description: cloudName specifies the name of the entry in the + clouds.yaml file to use. + maxLength: 256 + minLength: 1 + type: string + secretName: + description: |- + secretName is the name of a secret in the same namespace as the resource being provisioned. + The secret must contain a key named `clouds.yaml` which contains an OpenStack clouds.yaml file. + The secret may optionally contain a key named `cacert` containing a PEM-encoded CA certificate. + maxLength: 253 + minLength: 1 + type: string + required: + - cloudName + - secretName + type: object + import: + description: |- + import refers to an existing OpenStack resource which will be imported instead of + creating a new one. + maxProperties: 1 + minProperties: 1 + properties: + filter: + description: |- + filter contains a resource query which is expected to return a single + result. The controller will continue to retry if filter returns no + results. If filter returns multiple results the controller will set an + error state and will not continue to retry. + minProperties: 1 + properties: + domainRef: + description: domainRef is a reference to the ORC Domain which + this resource is associated with. + maxLength: 253 + minLength: 1 + type: string + name: + description: name of the existing resource + maxLength: 64 + minLength: 1 + type: string + type: object + id: + description: |- + id contains the unique identifier of an existing OpenStack resource. Note + that when specifying an import by ID, the resource MUST already exist. + The ORC object will enter an error state if the resource does not exist. + format: uuid + type: string + type: object + managedOptions: + description: managedOptions specifies options which may be applied + to managed objects. + properties: + onDelete: + default: delete + description: |- + onDelete specifies the behaviour of the controller when the ORC + object is deleted. Options are `delete` - delete the OpenStack resource; + `detach` - do not delete the OpenStack resource. If not specified, the + default is `delete`. + enum: + - delete + - detach + type: string + type: object + managementPolicy: + default: managed + description: |- + managementPolicy defines how ORC will treat the object. Valid values are + `managed`: ORC will create, update, and delete the resource; `unmanaged`: + ORC will import an existing resource, and will not apply updates to it or + delete it. + enum: + - managed + - unmanaged + type: string + x-kubernetes-validations: + - message: managementPolicy is immutable + rule: self == oldSelf + resource: + description: |- + resource specifies the desired state of the resource. + + resource may not be specified if the management policy is `unmanaged`. + + resource must be specified if the management policy is `managed`. + properties: + description: + description: description is a human-readable description for the + resource. + maxLength: 255 + minLength: 1 + type: string + domainRef: + description: domainRef is a reference to the ORC Domain which + this resource is associated with. + maxLength: 253 + minLength: 1 + type: string + x-kubernetes-validations: + - message: domainRef is immutable + rule: self == oldSelf + name: + description: |- + name will be the name of the created resource. If not specified, the + name of the ORC object will be used. + maxLength: 64 + minLength: 1 + type: string + type: object + required: + - cloudCredentialsRef + type: object + x-kubernetes-validations: + - message: resource must be specified when policy is managed + rule: 'self.managementPolicy == ''managed'' ? has(self.resource) : true' + - message: import may not be specified when policy is managed + rule: 'self.managementPolicy == ''managed'' ? !has(self.__import__) + : true' + - message: resource may not be specified when policy is unmanaged + rule: 'self.managementPolicy == ''unmanaged'' ? !has(self.resource) + : true' + - message: import must be specified when policy is unmanaged + rule: 'self.managementPolicy == ''unmanaged'' ? has(self.__import__) + : true' + - message: managedOptions may only be provided when policy is managed + rule: 'has(self.managedOptions) ? self.managementPolicy == ''managed'' + : true' + status: + description: status defines the observed state of the resource. + properties: + conditions: + description: |- + conditions represents the observed status of the object. + Known .status.conditions.type are: "Available", "Progressing" + + Available represents the availability of the OpenStack resource. If it is + true then the resource is ready for use. + + Progressing indicates whether the controller is still attempting to + reconcile the current state of the OpenStack resource to the desired + state. Progressing will be False either because the desired state has + been achieved, or because some terminal error prevents it from ever being + achieved and the controller is no longer attempting to reconcile. If + Progressing is True, an observer waiting on the resource should continue + to wait. + items: + description: Condition contains details for one aspect of the current + state of this API Resource. + 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 + 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. + 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: 32 + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + id: + description: id is the unique identifier of the OpenStack resource. + type: string + resource: + description: resource contains the observed state of the OpenStack + resource. + properties: + description: + description: description is a human-readable description for the + resource. + maxLength: 1024 + type: string + domainID: + description: domainID is the ID of the Domain to which the resource + is associated. + maxLength: 1024 + type: string + name: + description: name is a Human-readable name for the resource. Might + not be unique. + maxLength: 1024 + type: string + type: object + type: object + type: object + served: true + storage: true + subresources: + status: {} diff --git a/cmd/install/assets/crds/cluster-api-provider-openstack/openstack.k-orc.cloud_images.yaml b/cmd/install/assets/crds/cluster-api-provider-openstack/openstack.k-orc.cloud_images.yaml index 962e19d418a..6514df7c930 100644 --- a/cmd/install/assets/crds/cluster-api-provider-openstack/openstack.k-orc.cloud_images.yaml +++ b/cmd/install/assets/crds/cluster-api-provider-openstack/openstack.k-orc.cloud_images.yaml @@ -8,6 +8,8 @@ metadata: spec: group: openstack.k-orc.cloud names: + categories: + - openstack kind: Image listKind: ImageList plural: images @@ -23,14 +25,10 @@ spec: jsonPath: .status.conditions[?(@.type=='Available')].status name: Available type: string - - description: Message describing current availability status - jsonPath: .status.conditions[?(@.type=='Available')].message + - description: Message describing current progress status + jsonPath: .status.conditions[?(@.type=='Progressing')].message name: Message type: string - - description: Time duration since creation - jsonPath: .metadata.creationTimestamp - name: Age - type: date name: v1alpha1 schema: openAPIV3Schema: @@ -54,21 +52,21 @@ spec: metadata: type: object spec: - description: ImageSpec defines the desired state of an ORC object. + description: spec specifies the desired state of the resource. properties: cloudCredentialsRef: - description: CloudCredentialsRef points to a secret containing OpenStack + description: cloudCredentialsRef points to a secret containing OpenStack credentials properties: cloudName: - description: CloudName specifies the name of the entry in the + description: cloudName specifies the name of the entry in the clouds.yaml file to use. maxLength: 256 minLength: 1 type: string secretName: description: |- - SecretName is the name of a secret in the same namespace as the resource being provisioned. + secretName is the name of a secret in the same namespace as the resource being provisioned. The secret must contain a key named `clouds.yaml` which contains an OpenStack clouds.yaml file. The secret may optionally contain a key named `cacert` containing a PEM-encoded CA certificate. maxLength: 253 @@ -80,41 +78,60 @@ spec: type: object import: description: |- - Import refers to an existing OpenStack resource which will be imported instead of + import refers to an existing OpenStack resource which will be imported instead of creating a new one. maxProperties: 1 minProperties: 1 properties: filter: description: |- - Filter contains a resource query which is expected to return a single + filter contains a resource query which is expected to return a single result. The controller will continue to retry if filter returns no results. If filter returns multiple results the controller will set an error state and will not continue to retry. minProperties: 1 properties: name: - description: Name specifies the name of a Glance image - maxLength: 1000 + description: name specifies the name of a Glance image + maxLength: 255 minLength: 1 + pattern: ^[^,]+$ + type: string + tags: + description: tags is the list of tags on the resource. + items: + maxLength: 255 + minLength: 1 + type: string + maxItems: 64 + type: array + x-kubernetes-list-type: set + visibility: + description: visibility specifies the visibility of a Glance + image. + enum: + - public + - private + - shared + - community type: string type: object id: description: |- - ID contains the unique identifier of an existing OpenStack resource. Note + id contains the unique identifier of an existing OpenStack resource. Note that when specifying an import by ID, the resource MUST already exist. The ORC object will enter an error state if the resource does not exist. format: uuid type: string type: object managedOptions: - description: ManagedOptions specifies options which may be applied + description: managedOptions specifies options which may be applied to managed objects. properties: onDelete: default: delete description: |- - OnDelete specifies the behaviour of the controller when the ORC + onDelete specifies the behaviour of the controller when the ORC object is deleted. Options are `delete` - delete the OpenStack resource; `detach` - do not delete the OpenStack resource. If not specified, the default is `delete`. @@ -126,7 +143,7 @@ spec: managementPolicy: default: managed description: |- - ManagementPolicy defines how ORC will treat the object. Valid values are + managementPolicy defines how ORC will treat the object. Valid values are `managed`: ORC will create, update, and delete the resource; `unmanaged`: ORC will import an existing resource, and will not apply updates to it or delete it. @@ -139,21 +156,21 @@ spec: rule: self == oldSelf resource: description: |- - Resource specifies the desired state of the resource. + resource specifies the desired state of the resource. - Resource may not be specified if the management policy is `unmanaged`. + resource may not be specified if the management policy is `unmanaged`. - Resource must be specified if the management policy is `managed`. + resource must be specified if the management policy is `managed`. properties: content: - description: Content specifies how to obtain the image content. + description: content specifies how to obtain the image content. properties: containerFormat: default: bare description: |- - ContainerFormat is the format of the image container. + containerFormat is the format of the image container. qcow2 and raw images do not usually have a container. This is specified as "bare", which is also the default. - Permitted values are ami, ari, aki, bare, ovf, ova, and docker. + Permitted values are ami, ari, aki, bare, compressed, ovf, ova, and docker. enum: - ami - ari @@ -162,10 +179,11 @@ spec: - ovf - ova - docker + - compressed type: string diskFormat: description: |- - DiskFormat is the format of the disk image. + diskFormat is the format of the disk image. Normal values are "qcow2", or "raw". Glance may be configured to support others. enum: - ami @@ -182,12 +200,12 @@ spec: type: string download: description: |- - Download describes how to obtain image data by downloading it from a URL. + download describes how to obtain image data by downloading it from a URL. Must be set when creating a managed image. properties: decompress: description: |- - Decompress specifies that the source data must be decompressed with the + decompress specifies that the source data must be decompressed with the given compression algorithm before being stored. Specifying Decompress will disable the use of Glance's web-download, as web-download cannot currently deterministically decompress downloaded content. @@ -198,14 +216,14 @@ spec: type: string hash: description: |- - Hash is a hash which will be used to verify downloaded data, i.e. + hash is a hash which will be used to verify downloaded data, i.e. before any decompression. If not specified, no hash verification will be performed. Specifying a Hash will disable the use of Glance's web-download, as web-download cannot currently deterministically verify the hash of downloaded content. properties: algorithm: - description: Algorithm is the hash algorithm used + description: algorithm is the hash algorithm used to generate value. enum: - md5 @@ -214,7 +232,7 @@ spec: - sha512 type: string value: - description: Value is the hash of the image data using + description: value is the hash of the image data using Algorithm. It must be hex encoded using lowercase letters. maxLength: 1024 @@ -229,8 +247,9 @@ spec: - message: hash is immutable rule: self == oldSelf url: - description: URL containing image data + description: url containing image data format: uri + maxLength: 2048 type: string required: - url @@ -244,22 +263,58 @@ spec: rule: self == oldSelf name: description: |- - Name will be the name of the created Glance image. If not specified, the + name will be the name of the created Glance image. If not specified, the name of the Image object will be used. - maxLength: 1000 + maxLength: 255 minLength: 1 + pattern: ^[^,]+$ type: string properties: - description: Properties is metadata available to consumers of + description: properties is metadata available to consumers of the image properties: + architecture: + description: architecture is the CPU architecture that must + be supported by the hypervisor. + enum: + - aarch64 + - alpha + - armv7l + - cris + - i686 + - ia64 + - lm32 + - m68k + - microblaze + - microblazeel + - mips + - mipsel + - mips64 + - mips64el + - openrisc + - parisc + - parisc64 + - ppc + - ppc64 + - ppcemb + - s390 + - s390x + - sh4 + - sh4eb + - sparc + - sparc64 + - unicore32 + - x86_64 + - xtensa + - xtensaeb + type: string hardware: description: |- - Hardware is a set of properties which control the virtual hardware + hardware is a set of properties which control the virtual hardware created by Nova. properties: cdromBus: - description: CDROMBus specifies the type of disk controller + description: cdromBus specifies the type of disk controller to attach CD-ROM devices to. enum: - scsi @@ -271,12 +326,14 @@ spec: - lxc type: string cpuCores: - description: CPUCores is the preferred number of cores + description: cpuCores is the preferred number of cores to expose to the guest + format: int32 + minimum: 1 type: integer cpuPolicy: description: |- - CPUPolicy is used to pin the virtual CPUs (vCPUs) of instances to the + cpuPolicy is used to pin the virtual CPUs (vCPUs) of instances to the host's physical CPU cores (pCPUs). Host aggregates should be used to separate these pinned instances from unpinned instances as the latter will not respect the resourcing requirements of the former. @@ -300,12 +357,14 @@ spec: - dedicated type: string cpuSockets: - description: CPUSockets is the preferred number of sockets + description: cpuSockets is the preferred number of sockets to expose to the guest + format: int32 + minimum: 1 type: integer cpuThreadPolicy: description: |- - CPUThreadPolicy further refines a CPUPolicy of 'dedicated' by stating + cpuThreadPolicy further refines a CPUPolicy of 'dedicated' by stating how hardware CPU threads in a simultaneous multithreading-based (SMT) architecture be used. SMT-based architectures include Intel processors with Hyper-Threading technology. In these architectures, @@ -339,11 +398,13 @@ spec: - require type: string cpuThreads: - description: CPUThreads is the preferred number of threads + description: cpuThreads is the preferred number of threads to expose to the guest + format: int32 + minimum: 1 type: integer diskBus: - description: DiskBus specifies the type of disk controller + description: diskBus specifies the type of disk controller to attach disk devices to. enum: - scsi @@ -354,9 +415,19 @@ spec: - usb - lxc type: string + qemuGuestAgent: + description: qemuGuestAgent enables QEMU guest agent. + type: boolean + rngModel: + description: |- + rngModel adds a random-number generator device to the image’s instances. + This image property by itself does not guarantee that a hardware RNG will be used; + it expresses a preference that may or may not be satisfied depending upon Nova configuration. + maxLength: 255 + type: string scsiModel: description: |- - SCSIModel enables the use of VirtIO SCSI (virtio-scsi) to provide + scsiModel enables the use of VirtIO SCSI (virtio-scsi) to provide block device access for compute instances; by default, instances use VirtIO Block (virtio-blk). VirtIO SCSI is a para-virtualized SCSI controller device that provides improved scalability and performance, @@ -368,7 +439,7 @@ spec: type: string vifModel: description: |- - VIFModel specifies the model of virtual network interface device to use. + vifModel specifies the model of virtual network interface device to use. Permitted values are e1000, e1000e, ne2k_pci, pcnet, rtl8139, virtio, and vmxnet3. @@ -382,57 +453,93 @@ spec: - vmxnet3 type: string type: object + hypervisorType: + description: hypervisorType is the hypervisor type + enum: + - hyperv + - ironic + - lxc + - qemu + - uml + - vmware + - xen + type: string minDiskGB: - description: MinDisk is the minimum amount of disk space in - GB that is required to boot the image + description: minDiskGB is the minimum amount of disk space + in GB that is required to boot the image + format: int32 minimum: 1 type: integer minMemoryMB: - description: MinMemoryMB is the minimum amount of RAM in MB + description: minMemoryMB is the minimum amount of RAM in MB that is required to boot the image. + format: int32 minimum: 1 type: integer + operatingSystem: + description: |- + operatingSystem is a set of properties that specify and influence the behavior + of the operating system within the virtual machine. + properties: + distro: + description: distro is the common name of the operating + system distribution in lowercase. + enum: + - arch + - centos + - debian + - fedora + - freebsd + - gentoo + - mandrake + - mandriva + - mes + - msdos + - netbsd + - netware + - openbsd + - opensolaris + - opensuse + - rocky + - rhel + - sled + - ubuntu + - windows + type: string + version: + description: version is the operating system version as + specified by the distributor. + maxLength: 255 + type: string + type: object type: object + x-kubernetes-validations: + - message: properties is immutable + rule: self == oldSelf protected: description: |- - Protected specifies that the image is protected from deletion. + protected specifies that the image is protected from deletion. If not specified, the default is false. type: boolean tags: - description: Tags is a list of tags which will be applied to the + description: tags is a list of tags which will be applied to the image. A tag has a maximum length of 255 characters. items: maxLength: 255 minLength: 1 type: string + maxItems: 64 type: array x-kubernetes-list-type: set visibility: - description: Visibility of the image + description: visibility of the image enum: - public - private - shared - community type: string - x-kubernetes-validations: - - message: visibility is immutable - rule: self == oldSelf type: object - x-kubernetes-validations: - - message: name is immutable - rule: 'has(self.name) ? self.name == oldSelf.name : !has(oldSelf.name)' - - message: name is immutable - rule: 'has(self.protected) ? self.protected == oldSelf.protected - : !has(oldSelf.protected)' - - message: tags is immutable - rule: 'has(self.tags) ? self.tags == oldSelf.tags : !has(oldSelf.tags)' - - message: visibility is immutable - rule: 'has(self.visibility) ? self.visibility == oldSelf.visibility - : !has(oldSelf.visibility)' - - message: properties is immutable - rule: 'has(self.properties) ? self.properties == oldSelf.properties - : !has(oldSelf.properties)' required: - cloudCredentialsRef type: object @@ -454,11 +561,11 @@ spec: - message: resource content must be specified when not importing rule: '!has(self.__import__) ? has(self.resource.content) : true' status: - description: ImageStatus defines the observed state of an ORC resource. + description: status defines the observed state of the resource. properties: conditions: description: |- - Conditions represents the observed status of the object. + conditions represents the observed status of the object. Known .status.conditions.type are: "Available", "Progressing" Available represents the availability of the OpenStack resource. If it is @@ -525,31 +632,33 @@ spec: - status - type type: object + maxItems: 32 type: array x-kubernetes-list-map-keys: - type x-kubernetes-list-type: map downloadAttempts: - description: DownloadAttempts is the number of times the controller + description: downloadAttempts is the number of times the controller has attempted to download the image contents + format: int32 type: integer id: - description: ID is the unique identifier of the OpenStack resource. + description: id is the unique identifier of the OpenStack resource. type: string resource: - description: Resource contains the observed state of the OpenStack + description: resource contains the observed state of the OpenStack resource. properties: hash: description: |- - Hash is the hash of the image data published by Glance. Note that this is + hash is the hash of the image data published by Glance. Note that this is a hash of the data stored internally by Glance, which will have been decompressed and potentially format converted depending on server-side configuration which is not visible to clients. It is expected that this hash will usually differ from the download hash. properties: algorithm: - description: Algorithm is the hash algorithm used to generate + description: algorithm is the hash algorithm used to generate value. enum: - md5 @@ -558,7 +667,7 @@ spec: - sha512 type: string value: - description: Value is the hash of the image data using Algorithm. + description: value is the hash of the image data using Algorithm. It must be hex encoded using lowercase letters. maxLength: 1024 minLength: 1 @@ -568,18 +677,40 @@ spec: - algorithm - value type: object + name: + description: name is a Human-readable name for the image. Might + not be unique. + maxLength: 1024 + type: string + protected: + description: protected specifies that the image is protected from + deletion. + type: boolean sizeB: - description: SizeB is the size of the image data, in bytes + description: sizeB is the size of the image data, in bytes format: int64 type: integer status: - description: Status is the image status as reported by Glance + description: status is the image status as reported by Glance + maxLength: 1024 type: string + tags: + description: tags is the list of tags on the resource. + items: + maxLength: 1024 + type: string + maxItems: 64 + type: array + x-kubernetes-list-type: atomic virtualSizeB: - description: VirtualSizeB is the size of the disk the image data + description: virtualSizeB is the size of the disk the image data represents, in bytes format: int64 type: integer + visibility: + description: visibility of the image + maxLength: 1024 + type: string type: object type: object type: object diff --git a/cmd/install/assets/crds/cluster-api-provider-openstack/openstack.k-orc.cloud_keypairs.yaml b/cmd/install/assets/crds/cluster-api-provider-openstack/openstack.k-orc.cloud_keypairs.yaml new file mode 100644 index 00000000000..225d71fb5c7 --- /dev/null +++ b/cmd/install/assets/crds/cluster-api-provider-openstack/openstack.k-orc.cloud_keypairs.yaml @@ -0,0 +1,296 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.17.0 + name: keypairs.openstack.k-orc.cloud +spec: + group: openstack.k-orc.cloud + names: + categories: + - openstack + kind: KeyPair + listKind: KeyPairList + plural: keypairs + singular: keypair + scope: Namespaced + versions: + - additionalPrinterColumns: + - description: Resource ID + jsonPath: .status.id + name: ID + type: string + - description: Availability status of resource + jsonPath: .status.conditions[?(@.type=='Available')].status + name: Available + type: string + - description: Message describing current progress status + jsonPath: .status.conditions[?(@.type=='Progressing')].message + name: Message + type: string + name: v1alpha1 + schema: + openAPIV3Schema: + description: KeyPair is the Schema for an ORC resource. + 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 specifies the desired state of the resource. + properties: + cloudCredentialsRef: + description: cloudCredentialsRef points to a secret containing OpenStack + credentials + properties: + cloudName: + description: cloudName specifies the name of the entry in the + clouds.yaml file to use. + maxLength: 256 + minLength: 1 + type: string + secretName: + description: |- + secretName is the name of a secret in the same namespace as the resource being provisioned. + The secret must contain a key named `clouds.yaml` which contains an OpenStack clouds.yaml file. + The secret may optionally contain a key named `cacert` containing a PEM-encoded CA certificate. + maxLength: 253 + minLength: 1 + type: string + required: + - cloudName + - secretName + type: object + import: + description: |- + import refers to an existing OpenStack resource which will be imported instead of + creating a new one. + maxProperties: 1 + minProperties: 1 + properties: + filter: + description: |- + filter contains a resource query which is expected to return a single + result. The controller will continue to retry if filter returns no + results. If filter returns multiple results the controller will set an + error state and will not continue to retry. + minProperties: 1 + properties: + name: + description: name of the existing Keypair + maxLength: 255 + minLength: 1 + pattern: ^[^,]+$ + type: string + type: object + id: + description: |- + id contains the name of an existing resource. Note: This resource uses + the resource name as the unique identifier, not a UUID. + When specifying an import by ID, the resource MUST already exist. + The ORC object will enter an error state if the resource does not exist. + type: string + type: object + managedOptions: + description: managedOptions specifies options which may be applied + to managed objects. + properties: + onDelete: + default: delete + description: |- + onDelete specifies the behaviour of the controller when the ORC + object is deleted. Options are `delete` - delete the OpenStack resource; + `detach` - do not delete the OpenStack resource. If not specified, the + default is `delete`. + enum: + - delete + - detach + type: string + type: object + managementPolicy: + default: managed + description: |- + managementPolicy defines how ORC will treat the object. Valid values are + `managed`: ORC will create, update, and delete the resource; `unmanaged`: + ORC will import an existing resource, and will not apply updates to it or + delete it. + enum: + - managed + - unmanaged + type: string + x-kubernetes-validations: + - message: managementPolicy is immutable + rule: self == oldSelf + resource: + description: |- + resource specifies the desired state of the resource. + + resource may not be specified if the management policy is `unmanaged`. + + resource must be specified if the management policy is `managed`. + properties: + name: + description: |- + name will be the name of the created resource. If not specified, the + name of the ORC object will be used. + maxLength: 255 + minLength: 1 + pattern: ^[^,]+$ + type: string + publicKey: + description: publicKey is the public key to import. + maxLength: 16384 + minLength: 1 + type: string + type: + description: |- + type specifies the type of the Keypair. Allowed values are ssh or x509. + If not specified, defaults to ssh. + enum: + - ssh + - x509 + type: string + required: + - publicKey + type: object + required: + - cloudCredentialsRef + type: object + x-kubernetes-validations: + - message: resource must be specified when policy is managed + rule: 'self.managementPolicy == ''managed'' ? has(self.resource) : true' + - message: import may not be specified when policy is managed + rule: 'self.managementPolicy == ''managed'' ? !has(self.__import__) + : true' + - message: resource may not be specified when policy is unmanaged + rule: 'self.managementPolicy == ''unmanaged'' ? !has(self.resource) + : true' + - message: import must be specified when policy is unmanaged + rule: 'self.managementPolicy == ''unmanaged'' ? has(self.__import__) + : true' + - message: managedOptions may only be provided when policy is managed + rule: 'has(self.managedOptions) ? self.managementPolicy == ''managed'' + : true' + status: + description: status defines the observed state of the resource. + properties: + conditions: + description: |- + conditions represents the observed status of the object. + Known .status.conditions.type are: "Available", "Progressing" + + Available represents the availability of the OpenStack resource. If it is + true then the resource is ready for use. + + Progressing indicates whether the controller is still attempting to + reconcile the current state of the OpenStack resource to the desired + state. Progressing will be False either because the desired state has + been achieved, or because some terminal error prevents it from ever being + achieved and the controller is no longer attempting to reconcile. If + Progressing is True, an observer waiting on the resource should continue + to wait. + items: + description: Condition contains details for one aspect of the current + state of this API Resource. + 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 + 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. + 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: 32 + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + id: + description: id is the unique identifier of the OpenStack resource. + type: string + resource: + description: resource contains the observed state of the OpenStack + resource. + properties: + fingerprint: + description: fingerprint is the fingerprint of the public key + maxLength: 1024 + type: string + name: + description: name is a Human-readable name for the resource. Might + not be unique. + maxLength: 1024 + type: string + publicKey: + description: publicKey is the public key of the Keypair + maxLength: 16384 + type: string + type: + description: type is the type of the Keypair (ssh or x509) + maxLength: 64 + type: string + type: object + type: object + type: object + served: true + storage: true + subresources: + status: {} diff --git a/cmd/install/assets/crds/cluster-api-provider-openstack/openstack.k-orc.cloud_networks.yaml b/cmd/install/assets/crds/cluster-api-provider-openstack/openstack.k-orc.cloud_networks.yaml new file mode 100644 index 00000000000..b8767edb353 --- /dev/null +++ b/cmd/install/assets/crds/cluster-api-provider-openstack/openstack.k-orc.cloud_networks.yaml @@ -0,0 +1,547 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.17.0 + name: networks.openstack.k-orc.cloud +spec: + group: openstack.k-orc.cloud + names: + categories: + - openstack + kind: Network + listKind: NetworkList + plural: networks + singular: network + scope: Namespaced + versions: + - additionalPrinterColumns: + - description: Resource ID + jsonPath: .status.id + name: ID + type: string + - description: Availability status of resource + jsonPath: .status.conditions[?(@.type=='Available')].status + name: Available + type: string + - description: Message describing current progress status + jsonPath: .status.conditions[?(@.type=='Progressing')].message + name: Message + type: string + name: v1alpha1 + schema: + openAPIV3Schema: + description: Network is the Schema for an ORC resource. + 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 specifies the desired state of the resource. + properties: + cloudCredentialsRef: + description: cloudCredentialsRef points to a secret containing OpenStack + credentials + properties: + cloudName: + description: cloudName specifies the name of the entry in the + clouds.yaml file to use. + maxLength: 256 + minLength: 1 + type: string + secretName: + description: |- + secretName is the name of a secret in the same namespace as the resource being provisioned. + The secret must contain a key named `clouds.yaml` which contains an OpenStack clouds.yaml file. + The secret may optionally contain a key named `cacert` containing a PEM-encoded CA certificate. + maxLength: 253 + minLength: 1 + type: string + required: + - cloudName + - secretName + type: object + import: + description: |- + import refers to an existing OpenStack resource which will be imported instead of + creating a new one. + maxProperties: 1 + minProperties: 1 + properties: + filter: + description: |- + filter contains a resource query which is expected to return a single + result. The controller will continue to retry if filter returns no + results. If filter returns multiple results the controller will set an + error state and will not continue to retry. + minProperties: 1 + properties: + description: + description: description of the existing resource + maxLength: 255 + minLength: 1 + type: string + external: + description: |- + external indicates whether the network has an external routing + facility that’s not managed by the networking service. + type: boolean + name: + description: name of the existing resource + maxLength: 255 + minLength: 1 + pattern: ^[^,]+$ + type: string + notTags: + description: |- + notTags is a list of tags to filter by. If specified, resources which + contain all of the given tags will be excluded from the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + maxLength: 255 + minLength: 1 + type: string + maxItems: 64 + type: array + x-kubernetes-list-type: set + notTagsAny: + description: |- + notTagsAny is a list of tags to filter by. If specified, resources + which contain any of the given tags will be excluded from the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + maxLength: 255 + minLength: 1 + type: string + maxItems: 64 + type: array + x-kubernetes-list-type: set + projectRef: + description: |- + projectRef is a reference to the ORC Project this resource is associated with. + Typically, only used by admin. + maxLength: 253 + minLength: 1 + type: string + tags: + description: |- + tags is a list of tags to filter by. If specified, the resource must + have all of the tags specified to be included in the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + maxLength: 255 + minLength: 1 + type: string + maxItems: 64 + type: array + x-kubernetes-list-type: set + tagsAny: + description: |- + tagsAny is a list of tags to filter by. If specified, the resource + must have at least one of the tags specified to be included in the + result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + maxLength: 255 + minLength: 1 + type: string + maxItems: 64 + type: array + x-kubernetes-list-type: set + type: object + id: + description: |- + id contains the unique identifier of an existing OpenStack resource. Note + that when specifying an import by ID, the resource MUST already exist. + The ORC object will enter an error state if the resource does not exist. + format: uuid + type: string + type: object + managedOptions: + description: managedOptions specifies options which may be applied + to managed objects. + properties: + onDelete: + default: delete + description: |- + onDelete specifies the behaviour of the controller when the ORC + object is deleted. Options are `delete` - delete the OpenStack resource; + `detach` - do not delete the OpenStack resource. If not specified, the + default is `delete`. + enum: + - delete + - detach + type: string + type: object + managementPolicy: + default: managed + description: |- + managementPolicy defines how ORC will treat the object. Valid values are + `managed`: ORC will create, update, and delete the resource; `unmanaged`: + ORC will import an existing resource, and will not apply updates to it or + delete it. + enum: + - managed + - unmanaged + type: string + x-kubernetes-validations: + - message: managementPolicy is immutable + rule: self == oldSelf + resource: + description: |- + resource specifies the desired state of the resource. + + resource may not be specified if the management policy is `unmanaged`. + + resource must be specified if the management policy is `managed`. + properties: + adminStateUp: + description: adminStateUp is the administrative state of the network, + which is up (true) or down (false) + type: boolean + availabilityZoneHints: + description: availabilityZoneHints is the availability zone candidate + for the network. + items: + maxLength: 255 + minLength: 1 + type: string + maxItems: 64 + type: array + x-kubernetes-list-type: set + x-kubernetes-validations: + - message: availabilityZoneHints is immutable + rule: self == oldSelf + description: + description: description is a human-readable description for the + resource. + maxLength: 255 + minLength: 1 + type: string + dnsDomain: + description: dnsDomain is the DNS domain of the network + maxLength: 255 + minLength: 1 + pattern: ^[A-Za-z0-9]{1,63}(.[A-Za-z0-9-]{1,63})*(.[A-Za-z]{2,63})*.?$ + type: string + x-kubernetes-validations: + - message: dnsDomain is immutable + rule: self == oldSelf + external: + description: |- + external indicates whether the network has an external routing + facility that’s not managed by the networking service. + type: boolean + mtu: + description: |- + mtu is the the maximum transmission unit value to address + fragmentation. Minimum value is 68 for IPv4, and 1280 for IPv6. + Defaults to 1500. + format: int32 + maximum: 9216 + minimum: 68 + type: integer + name: + description: |- + name will be the name of the created resource. If not specified, the + name of the ORC object will be used. + maxLength: 255 + minLength: 1 + pattern: ^[^,]+$ + type: string + portSecurityEnabled: + description: |- + portSecurityEnabled is the port security status of the network. + Valid values are enabled (true) and disabled (false). This value is + used as the default value of port_security_enabled field of a newly + created port. + type: boolean + projectRef: + description: |- + projectRef is a reference to the ORC Project this resource is associated with. + Typically, only used by admin. + maxLength: 253 + minLength: 1 + type: string + x-kubernetes-validations: + - message: projectRef is immutable + rule: self == oldSelf + shared: + description: |- + shared indicates whether this resource is shared across all + projects. By default, only administrative users can change this + value. + type: boolean + tags: + description: tags is a list of tags which will be applied to the + network. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + maxLength: 255 + minLength: 1 + type: string + maxItems: 64 + type: array + x-kubernetes-list-type: set + type: object + required: + - cloudCredentialsRef + type: object + x-kubernetes-validations: + - message: resource must be specified when policy is managed + rule: 'self.managementPolicy == ''managed'' ? has(self.resource) : true' + - message: import may not be specified when policy is managed + rule: 'self.managementPolicy == ''managed'' ? !has(self.__import__) + : true' + - message: resource may not be specified when policy is unmanaged + rule: 'self.managementPolicy == ''unmanaged'' ? !has(self.resource) + : true' + - message: import must be specified when policy is unmanaged + rule: 'self.managementPolicy == ''unmanaged'' ? has(self.__import__) + : true' + - message: managedOptions may only be provided when policy is managed + rule: 'has(self.managedOptions) ? self.managementPolicy == ''managed'' + : true' + status: + description: status defines the observed state of the resource. + properties: + conditions: + description: |- + conditions represents the observed status of the object. + Known .status.conditions.type are: "Available", "Progressing" + + Available represents the availability of the OpenStack resource. If it is + true then the resource is ready for use. + + Progressing indicates whether the controller is still attempting to + reconcile the current state of the OpenStack resource to the desired + state. Progressing will be False either because the desired state has + been achieved, or because some terminal error prevents it from ever being + achieved and the controller is no longer attempting to reconcile. If + Progressing is True, an observer waiting on the resource should continue + to wait. + items: + description: Condition contains details for one aspect of the current + state of this API Resource. + 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 + 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. + 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: 32 + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + id: + description: id is the unique identifier of the OpenStack resource. + type: string + resource: + description: resource contains the observed state of the OpenStack + resource. + properties: + adminStateUp: + description: |- + adminStateUp is the administrative state of the network, + which is up (true) or down (false). + type: boolean + availabilityZoneHints: + description: |- + availabilityZoneHints is the availability zone candidate for the + network. + items: + maxLength: 1024 + type: string + maxItems: 64 + type: array + x-kubernetes-list-type: atomic + createdAt: + description: createdAt shows the date and time when the resource + was created. The date and time stamp format is ISO 8601 + format: date-time + type: string + description: + description: description is a human-readable description for the + resource. + maxLength: 1024 + type: string + dnsDomain: + description: dnsDomain is the DNS domain of the network + maxLength: 1024 + type: string + external: + description: |- + external defines whether the network may be used for creation of + floating IPs. Only networks with this flag may be an external + gateway for routers. The network must have an external routing + facility that is not managed by the networking service. If the + network is updated from external to internal the unused floating IPs + of this network are automatically deleted when extension + floatingip-autodelete-internal is present. + type: boolean + mtu: + description: |- + mtu is the the maximum transmission unit value to address + fragmentation. Minimum value is 68 for IPv4, and 1280 for IPv6. + format: int32 + type: integer + name: + description: name is a Human-readable name for the network. Might + not be unique. + maxLength: 1024 + type: string + portSecurityEnabled: + description: |- + portSecurityEnabled is the port security status of the network. + Valid values are enabled (true) and disabled (false). This value is + used as the default value of port_security_enabled field of a newly + created port. + type: boolean + projectID: + description: projectID is the project owner of the network. + maxLength: 1024 + type: string + provider: + description: provider contains provider-network properties. + properties: + networkType: + description: |- + networkType is the type of physical network that this + network should be mapped to. Supported values are flat, vlan, vxlan, and gre. + Valid values depend on the networking back-end. + maxLength: 1024 + type: string + physicalNetwork: + description: |- + physicalNetwork is the physical network where this network + should be implemented. The Networking API v2.0 does not provide a + way to list available physical networks. For example, the Open + vSwitch plug-in configuration file defines a symbolic name that maps + to specific bridges on each compute host. + maxLength: 1024 + type: string + segmentationID: + description: |- + segmentationID is the ID of the isolated segment on the + physical network. The network_type attribute defines the + segmentation model. For example, if the network_type value is vlan, + this ID is a vlan identifier. If the network_type value is gre, this + ID is a gre key. + format: int32 + type: integer + type: object + revisionNumber: + description: revisionNumber optionally set via extensions/standard-attr-revisions + format: int64 + type: integer + shared: + description: |- + shared specifies whether the network resource can be accessed by any + tenant. + type: boolean + status: + description: |- + status indicates whether network is currently operational. Possible values + include `ACTIVE', `DOWN', `BUILD', or `ERROR'. Plug-ins might define + additional values. + maxLength: 1024 + type: string + subnets: + description: subnets associated with this network. + items: + maxLength: 1024 + type: string + maxItems: 256 + type: array + x-kubernetes-list-type: atomic + tags: + description: tags is the list of tags on the resource. + items: + maxLength: 1024 + type: string + maxItems: 64 + type: array + x-kubernetes-list-type: atomic + updatedAt: + description: updatedAt shows the date and time when the resource + was updated. The date and time stamp format is ISO 8601 + format: date-time + type: string + type: object + type: object + type: object + served: true + storage: true + subresources: + status: {} diff --git a/cmd/install/assets/crds/cluster-api-provider-openstack/openstack.k-orc.cloud_ports.yaml b/cmd/install/assets/crds/cluster-api-provider-openstack/openstack.k-orc.cloud_ports.yaml new file mode 100644 index 00000000000..6612cdd0bae --- /dev/null +++ b/cmd/install/assets/crds/cluster-api-provider-openstack/openstack.k-orc.cloud_ports.yaml @@ -0,0 +1,612 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.17.0 + name: ports.openstack.k-orc.cloud +spec: + group: openstack.k-orc.cloud + names: + categories: + - openstack + kind: Port + listKind: PortList + plural: ports + singular: port + scope: Namespaced + versions: + - additionalPrinterColumns: + - description: Resource ID + jsonPath: .status.id + name: ID + type: string + - description: Availability status of resource + jsonPath: .status.conditions[?(@.type=='Available')].status + name: Available + type: string + - description: Allocated IP addresses + jsonPath: .status.resource.fixedIPs[*].ip + name: Addresses + type: string + - description: Message describing current progress status + jsonPath: .status.conditions[?(@.type=='Progressing')].message + name: Message + type: string + name: v1alpha1 + schema: + openAPIV3Schema: + description: Port is the Schema for an ORC resource. + 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 specifies the desired state of the resource. + properties: + cloudCredentialsRef: + description: cloudCredentialsRef points to a secret containing OpenStack + credentials + properties: + cloudName: + description: cloudName specifies the name of the entry in the + clouds.yaml file to use. + maxLength: 256 + minLength: 1 + type: string + secretName: + description: |- + secretName is the name of a secret in the same namespace as the resource being provisioned. + The secret must contain a key named `clouds.yaml` which contains an OpenStack clouds.yaml file. + The secret may optionally contain a key named `cacert` containing a PEM-encoded CA certificate. + maxLength: 253 + minLength: 1 + type: string + required: + - cloudName + - secretName + type: object + import: + description: |- + import refers to an existing OpenStack resource which will be imported instead of + creating a new one. + maxProperties: 1 + minProperties: 1 + properties: + filter: + description: |- + filter contains a resource query which is expected to return a single + result. The controller will continue to retry if filter returns no + results. If filter returns multiple results the controller will set an + error state and will not continue to retry. + minProperties: 1 + properties: + description: + description: description of the existing resource + maxLength: 255 + minLength: 1 + type: string + name: + description: name of the existing resource + maxLength: 255 + minLength: 1 + pattern: ^[^,]+$ + type: string + networkRef: + description: networkRef is a reference to the ORC Network + which this port is associated with. + maxLength: 253 + minLength: 1 + type: string + notTags: + description: |- + notTags is a list of tags to filter by. If specified, resources which + contain all of the given tags will be excluded from the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + maxLength: 255 + minLength: 1 + type: string + maxItems: 64 + type: array + x-kubernetes-list-type: set + notTagsAny: + description: |- + notTagsAny is a list of tags to filter by. If specified, resources + which contain any of the given tags will be excluded from the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + maxLength: 255 + minLength: 1 + type: string + maxItems: 64 + type: array + x-kubernetes-list-type: set + projectRef: + description: |- + projectRef is a reference to the ORC Project this resource is associated with. + Typically, only used by admin. + maxLength: 253 + minLength: 1 + type: string + tags: + description: |- + tags is a list of tags to filter by. If specified, the resource must + have all of the tags specified to be included in the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + maxLength: 255 + minLength: 1 + type: string + maxItems: 64 + type: array + x-kubernetes-list-type: set + tagsAny: + description: |- + tagsAny is a list of tags to filter by. If specified, the resource + must have at least one of the tags specified to be included in the + result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + maxLength: 255 + minLength: 1 + type: string + maxItems: 64 + type: array + x-kubernetes-list-type: set + type: object + id: + description: |- + id contains the unique identifier of an existing OpenStack resource. Note + that when specifying an import by ID, the resource MUST already exist. + The ORC object will enter an error state if the resource does not exist. + format: uuid + type: string + type: object + managedOptions: + description: managedOptions specifies options which may be applied + to managed objects. + properties: + onDelete: + default: delete + description: |- + onDelete specifies the behaviour of the controller when the ORC + object is deleted. Options are `delete` - delete the OpenStack resource; + `detach` - do not delete the OpenStack resource. If not specified, the + default is `delete`. + enum: + - delete + - detach + type: string + type: object + managementPolicy: + default: managed + description: |- + managementPolicy defines how ORC will treat the object. Valid values are + `managed`: ORC will create, update, and delete the resource; `unmanaged`: + ORC will import an existing resource, and will not apply updates to it or + delete it. + enum: + - managed + - unmanaged + type: string + x-kubernetes-validations: + - message: managementPolicy is immutable + rule: self == oldSelf + resource: + description: |- + resource specifies the desired state of the resource. + + resource may not be specified if the management policy is `unmanaged`. + + resource must be specified if the management policy is `managed`. + properties: + addresses: + description: addresses are the IP addresses for the port. + items: + properties: + ip: + description: |- + ip contains a fixed IP address assigned to the port. It must belong + to the referenced subnet's CIDR. If not specified, OpenStack + allocates an available IP from the referenced subnet. + maxLength: 45 + minLength: 1 + type: string + subnetRef: + description: |- + subnetRef references the subnet from which to allocate the IP + address. + maxLength: 253 + minLength: 1 + type: string + required: + - subnetRef + type: object + maxItems: 128 + type: array + x-kubernetes-list-type: atomic + x-kubernetes-validations: + - message: addresses is immutable + rule: self == oldSelf + allowedAddressPairs: + description: allowedAddressPairs are allowed addresses associated + with this port. + items: + properties: + ip: + description: |- + ip contains an IP address which a server connected to the port can + send packets with. It can be an IP Address or a CIDR (if supported + by the underlying extension plugin). + maxLength: 45 + minLength: 1 + type: string + mac: + description: |- + mac contains a MAC address which a server connected to the port can + send packets with. Defaults to the MAC address of the port. + maxLength: 17 + minLength: 1 + type: string + required: + - ip + type: object + maxItems: 128 + type: array + x-kubernetes-list-type: atomic + description: + description: description is a human-readable description for the + resource. + maxLength: 255 + minLength: 1 + type: string + name: + description: name is a human-readable name of the port. If not + set, the object's name will be used. + maxLength: 255 + minLength: 1 + pattern: ^[^,]+$ + type: string + networkRef: + description: networkRef is a reference to the ORC Network which + this port is associated with. + maxLength: 253 + minLength: 1 + type: string + x-kubernetes-validations: + - message: networkRef is immutable + rule: self == oldSelf + portSecurity: + default: Inherit + description: |- + portSecurity controls port security for this port. + When set to Enabled, port security is enabled. + When set to Disabled, port security is disabled and SecurityGroupRefs must be empty. + When set to Inherit (default), it takes the value from the network level. + enum: + - Enabled + - Disabled + - Inherit + type: string + x-kubernetes-validations: + - message: portSecurity cannot be changed to Inherit + rule: '!(oldSelf != ''Inherit'' && self == ''Inherit'')' + projectRef: + description: |- + projectRef is a reference to the ORC Project this resource is associated with. + Typically, only used by admin. + maxLength: 253 + minLength: 1 + type: string + x-kubernetes-validations: + - message: projectRef is immutable + rule: self == oldSelf + securityGroupRefs: + description: |- + securityGroupRefs are the names of the security groups associated + with this port. + items: + maxLength: 255 + minLength: 1 + pattern: ^[^,]+$ + type: string + maxItems: 64 + type: array + x-kubernetes-list-type: set + tags: + description: tags is a list of tags which will be applied to the + port. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + maxLength: 255 + minLength: 1 + type: string + maxItems: 64 + type: array + x-kubernetes-list-type: set + vnicType: + description: |- + vnicType specifies the type of vNIC which this port should be + attached to. This is used to determine which mechanism driver(s) to + be used to bind the port. The valid values are normal, macvtap, + direct, baremetal, direct-physical, virtio-forwarder, smart-nic and + remote-managed, although these values will not be validated in this + API to ensure compatibility with future neutron changes or custom + implementations. What type of vNIC is actually available depends on + deployments. If not specified, the Neutron default value is used. + maxLength: 64 + type: string + required: + - networkRef + type: object + x-kubernetes-validations: + - message: securityGroupRefs must be empty when portSecurity is set + to Disabled + rule: 'has(self.portSecurity) && self.portSecurity == ''Disabled'' + ? !has(self.securityGroupRefs) : true' + - message: allowedAddressPairs must be empty when portSecurity is + set to Disabled + rule: 'has(self.portSecurity) && self.portSecurity == ''Disabled'' + ? !has(self.allowedAddressPairs) : true' + required: + - cloudCredentialsRef + type: object + x-kubernetes-validations: + - message: resource must be specified when policy is managed + rule: 'self.managementPolicy == ''managed'' ? has(self.resource) : true' + - message: import may not be specified when policy is managed + rule: 'self.managementPolicy == ''managed'' ? !has(self.__import__) + : true' + - message: resource may not be specified when policy is unmanaged + rule: 'self.managementPolicy == ''unmanaged'' ? !has(self.resource) + : true' + - message: import must be specified when policy is unmanaged + rule: 'self.managementPolicy == ''unmanaged'' ? has(self.__import__) + : true' + - message: managedOptions may only be provided when policy is managed + rule: 'has(self.managedOptions) ? self.managementPolicy == ''managed'' + : true' + status: + description: status defines the observed state of the resource. + properties: + conditions: + description: |- + conditions represents the observed status of the object. + Known .status.conditions.type are: "Available", "Progressing" + + Available represents the availability of the OpenStack resource. If it is + true then the resource is ready for use. + + Progressing indicates whether the controller is still attempting to + reconcile the current state of the OpenStack resource to the desired + state. Progressing will be False either because the desired state has + been achieved, or because some terminal error prevents it from ever being + achieved and the controller is no longer attempting to reconcile. If + Progressing is True, an observer waiting on the resource should continue + to wait. + items: + description: Condition contains details for one aspect of the current + state of this API Resource. + 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 + 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. + 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: 32 + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + id: + description: id is the unique identifier of the OpenStack resource. + type: string + resource: + description: resource contains the observed state of the OpenStack + resource. + properties: + adminStateUp: + description: |- + adminStateUp is the administrative state of the port, + which is up (true) or down (false). + type: boolean + allowedAddressPairs: + description: |- + allowedAddressPairs is a set of zero or more allowed address pair + objects each where address pair object contains an IP address and + MAC address. + items: + properties: + ip: + description: |- + ip contains an IP address which a server connected to the port can + send packets with. + maxLength: 1024 + type: string + mac: + description: |- + mac contains a MAC address which a server connected to the port can + send packets with. + maxLength: 1024 + type: string + type: object + maxItems: 128 + type: array + x-kubernetes-list-type: atomic + createdAt: + description: createdAt shows the date and time when the resource + was created. The date and time stamp format is ISO 8601 + format: date-time + type: string + description: + description: description is a human-readable description for the + resource. + maxLength: 1024 + type: string + deviceID: + description: deviceID is the ID of the device that uses this port. + maxLength: 1024 + type: string + deviceOwner: + description: deviceOwner is the entity type that uses this port. + maxLength: 1024 + type: string + fixedIPs: + description: |- + fixedIPs is a set of zero or more fixed IP objects each where fixed + IP object contains an IP address and subnet ID from which the IP + address is assigned. + items: + properties: + ip: + description: ip contains a fixed IP address assigned to + the port. + maxLength: 1024 + type: string + subnetID: + description: subnetID is the ID of the subnet this IP is + allocated from. + maxLength: 1024 + type: string + type: object + maxItems: 128 + type: array + x-kubernetes-list-type: atomic + macAddress: + description: macAddress is the MAC address of the port. + maxLength: 1024 + type: string + name: + description: name is the human-readable name of the resource. + Might not be unique. + maxLength: 1024 + type: string + networkID: + description: networkID is the ID of the attached network. + maxLength: 1024 + type: string + portSecurityEnabled: + description: portSecurityEnabled indicates whether port security + is enabled or not. + type: boolean + projectID: + description: projectID is the project owner of the resource. + maxLength: 1024 + type: string + propagateUplinkStatus: + description: |- + propagateUplinkStatus represents the uplink status propagation of + the port. + type: boolean + revisionNumber: + description: revisionNumber optionally set via extensions/standard-attr-revisions + format: int64 + type: integer + securityGroups: + description: securityGroups contains the IDs of security groups + applied to the port. + items: + maxLength: 1024 + type: string + maxItems: 64 + type: array + x-kubernetes-list-type: atomic + status: + description: status indicates the current status of the resource. + maxLength: 1024 + type: string + tags: + description: tags is the list of tags on the resource. + items: + maxLength: 1024 + type: string + maxItems: 64 + type: array + x-kubernetes-list-type: atomic + updatedAt: + description: updatedAt shows the date and time when the resource + was updated. The date and time stamp format is ISO 8601 + format: date-time + type: string + vnicType: + description: vnicType is the type of vNIC which this port is attached + to. + maxLength: 64 + type: string + type: object + type: object + type: object + served: true + storage: true + subresources: + status: {} diff --git a/cmd/install/assets/crds/cluster-api-provider-openstack/openstack.k-orc.cloud_projects.yaml b/cmd/install/assets/crds/cluster-api-provider-openstack/openstack.k-orc.cloud_projects.yaml new file mode 100644 index 00000000000..a0bcaa39f1b --- /dev/null +++ b/cmd/install/assets/crds/cluster-api-provider-openstack/openstack.k-orc.cloud_projects.yaml @@ -0,0 +1,350 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.17.0 + name: projects.openstack.k-orc.cloud +spec: + group: openstack.k-orc.cloud + names: + categories: + - openstack + kind: Project + listKind: ProjectList + plural: projects + singular: project + scope: Namespaced + versions: + - additionalPrinterColumns: + - description: Resource ID + jsonPath: .status.id + name: ID + type: string + - description: Availability status of resource + jsonPath: .status.conditions[?(@.type=='Available')].status + name: Available + type: string + - description: Message describing current progress status + jsonPath: .status.conditions[?(@.type=='Progressing')].message + name: Message + type: string + name: v1alpha1 + schema: + openAPIV3Schema: + description: Project is the Schema for an ORC resource. + 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 specifies the desired state of the resource. + properties: + cloudCredentialsRef: + description: cloudCredentialsRef points to a secret containing OpenStack + credentials + properties: + cloudName: + description: cloudName specifies the name of the entry in the + clouds.yaml file to use. + maxLength: 256 + minLength: 1 + type: string + secretName: + description: |- + secretName is the name of a secret in the same namespace as the resource being provisioned. + The secret must contain a key named `clouds.yaml` which contains an OpenStack clouds.yaml file. + The secret may optionally contain a key named `cacert` containing a PEM-encoded CA certificate. + maxLength: 253 + minLength: 1 + type: string + required: + - cloudName + - secretName + type: object + import: + description: |- + import refers to an existing OpenStack resource which will be imported instead of + creating a new one. + maxProperties: 1 + minProperties: 1 + properties: + filter: + description: |- + filter contains a resource query which is expected to return a single + result. The controller will continue to retry if filter returns no + results. If filter returns multiple results the controller will set an + error state and will not continue to retry. + minProperties: 1 + properties: + name: + description: name of the existing resource + maxLength: 64 + minLength: 1 + type: string + notTags: + description: |- + notTags is a list of tags to filter by. If specified, resources which + contain all of the given tags will be excluded from the result. + items: + maxLength: 255 + minLength: 1 + type: string + maxItems: 80 + type: array + x-kubernetes-list-type: set + notTagsAny: + description: |- + notTagsAny is a list of tags to filter by. If specified, resources + which contain any of the given tags will be excluded from the result. + items: + maxLength: 255 + minLength: 1 + type: string + maxItems: 80 + type: array + x-kubernetes-list-type: set + tags: + description: |- + tags is a list of tags to filter by. If specified, the resource must + have all of the tags specified to be included in the result. + items: + maxLength: 255 + minLength: 1 + type: string + maxItems: 80 + type: array + x-kubernetes-list-type: set + tagsAny: + description: |- + tagsAny is a list of tags to filter by. If specified, the resource + must have at least one of the tags specified to be included in the + result. + items: + maxLength: 255 + minLength: 1 + type: string + maxItems: 80 + type: array + x-kubernetes-list-type: set + type: object + id: + description: |- + id contains the unique identifier of an existing OpenStack resource. Note + that when specifying an import by ID, the resource MUST already exist. + The ORC object will enter an error state if the resource does not exist. + format: uuid + type: string + type: object + managedOptions: + description: managedOptions specifies options which may be applied + to managed objects. + properties: + onDelete: + default: delete + description: |- + onDelete specifies the behaviour of the controller when the ORC + object is deleted. Options are `delete` - delete the OpenStack resource; + `detach` - do not delete the OpenStack resource. If not specified, the + default is `delete`. + enum: + - delete + - detach + type: string + type: object + managementPolicy: + default: managed + description: |- + managementPolicy defines how ORC will treat the object. Valid values are + `managed`: ORC will create, update, and delete the resource; `unmanaged`: + ORC will import an existing resource, and will not apply updates to it or + delete it. + enum: + - managed + - unmanaged + type: string + x-kubernetes-validations: + - message: managementPolicy is immutable + rule: self == oldSelf + resource: + description: |- + resource specifies the desired state of the resource. + + resource may not be specified if the management policy is `unmanaged`. + + resource must be specified if the management policy is `managed`. + properties: + description: + description: description contains a free form description of the + project. + maxLength: 65535 + minLength: 1 + type: string + enabled: + description: enabled defines whether a project is enabled or not. + Default is true. + type: boolean + name: + description: |- + name will be the name of the created resource. If not specified, the + name of the ORC object will be used. + maxLength: 64 + minLength: 1 + type: string + tags: + description: |- + tags is list of simple strings assigned to a project. + Tags can be used to classify projects into groups. + items: + maxLength: 255 + minLength: 1 + type: string + maxItems: 80 + type: array + x-kubernetes-list-type: set + type: object + required: + - cloudCredentialsRef + type: object + x-kubernetes-validations: + - message: resource must be specified when policy is managed + rule: 'self.managementPolicy == ''managed'' ? has(self.resource) : true' + - message: import may not be specified when policy is managed + rule: 'self.managementPolicy == ''managed'' ? !has(self.__import__) + : true' + - message: resource may not be specified when policy is unmanaged + rule: 'self.managementPolicy == ''unmanaged'' ? !has(self.resource) + : true' + - message: import must be specified when policy is unmanaged + rule: 'self.managementPolicy == ''unmanaged'' ? has(self.__import__) + : true' + - message: managedOptions may only be provided when policy is managed + rule: 'has(self.managedOptions) ? self.managementPolicy == ''managed'' + : true' + status: + description: status defines the observed state of the resource. + properties: + conditions: + description: |- + conditions represents the observed status of the object. + Known .status.conditions.type are: "Available", "Progressing" + + Available represents the availability of the OpenStack resource. If it is + true then the resource is ready for use. + + Progressing indicates whether the controller is still attempting to + reconcile the current state of the OpenStack resource to the desired + state. Progressing will be False either because the desired state has + been achieved, or because some terminal error prevents it from ever being + achieved and the controller is no longer attempting to reconcile. If + Progressing is True, an observer waiting on the resource should continue + to wait. + items: + description: Condition contains details for one aspect of the current + state of this API Resource. + 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 + 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. + 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: 32 + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + id: + description: id is the unique identifier of the OpenStack resource. + type: string + resource: + description: resource contains the observed state of the OpenStack + resource. + properties: + description: + description: description is a human-readable description for the + resource. + maxLength: 65535 + type: string + enabled: + description: enabled represents whether a project is enabled or + not. + type: boolean + name: + description: name is a Human-readable name for the project. Might + not be unique. + maxLength: 1024 + type: string + tags: + description: tags is the list of tags on the resource. + items: + maxLength: 1024 + type: string + maxItems: 80 + type: array + x-kubernetes-list-type: atomic + type: object + type: object + type: object + served: true + storage: true + subresources: + status: {} diff --git a/cmd/install/assets/crds/cluster-api-provider-openstack/openstack.k-orc.cloud_roles.yaml b/cmd/install/assets/crds/cluster-api-provider-openstack/openstack.k-orc.cloud_roles.yaml new file mode 100644 index 00000000000..0b27177163b --- /dev/null +++ b/cmd/install/assets/crds/cluster-api-provider-openstack/openstack.k-orc.cloud_roles.yaml @@ -0,0 +1,298 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.17.0 + name: roles.openstack.k-orc.cloud +spec: + group: openstack.k-orc.cloud + names: + categories: + - openstack + kind: Role + listKind: RoleList + plural: roles + singular: role + scope: Namespaced + versions: + - additionalPrinterColumns: + - description: Resource ID + jsonPath: .status.id + name: ID + type: string + - description: Availability status of resource + jsonPath: .status.conditions[?(@.type=='Available')].status + name: Available + type: string + - description: Message describing current progress status + jsonPath: .status.conditions[?(@.type=='Progressing')].message + name: Message + type: string + name: v1alpha1 + schema: + openAPIV3Schema: + description: Role is the Schema for an ORC resource. + 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 specifies the desired state of the resource. + properties: + cloudCredentialsRef: + description: cloudCredentialsRef points to a secret containing OpenStack + credentials + properties: + cloudName: + description: cloudName specifies the name of the entry in the + clouds.yaml file to use. + maxLength: 256 + minLength: 1 + type: string + secretName: + description: |- + secretName is the name of a secret in the same namespace as the resource being provisioned. + The secret must contain a key named `clouds.yaml` which contains an OpenStack clouds.yaml file. + The secret may optionally contain a key named `cacert` containing a PEM-encoded CA certificate. + maxLength: 253 + minLength: 1 + type: string + required: + - cloudName + - secretName + type: object + import: + description: |- + import refers to an existing OpenStack resource which will be imported instead of + creating a new one. + maxProperties: 1 + minProperties: 1 + properties: + filter: + description: |- + filter contains a resource query which is expected to return a single + result. The controller will continue to retry if filter returns no + results. If filter returns multiple results the controller will set an + error state and will not continue to retry. + minProperties: 1 + properties: + domainRef: + description: domainRef is a reference to the ORC Domain which + this resource is associated with. + maxLength: 253 + minLength: 1 + type: string + name: + description: name of the existing resource + maxLength: 64 + minLength: 1 + type: string + type: object + id: + description: |- + id contains the unique identifier of an existing OpenStack resource. Note + that when specifying an import by ID, the resource MUST already exist. + The ORC object will enter an error state if the resource does not exist. + format: uuid + type: string + type: object + managedOptions: + description: managedOptions specifies options which may be applied + to managed objects. + properties: + onDelete: + default: delete + description: |- + onDelete specifies the behaviour of the controller when the ORC + object is deleted. Options are `delete` - delete the OpenStack resource; + `detach` - do not delete the OpenStack resource. If not specified, the + default is `delete`. + enum: + - delete + - detach + type: string + type: object + managementPolicy: + default: managed + description: |- + managementPolicy defines how ORC will treat the object. Valid values are + `managed`: ORC will create, update, and delete the resource; `unmanaged`: + ORC will import an existing resource, and will not apply updates to it or + delete it. + enum: + - managed + - unmanaged + type: string + x-kubernetes-validations: + - message: managementPolicy is immutable + rule: self == oldSelf + resource: + description: |- + resource specifies the desired state of the resource. + + resource may not be specified if the management policy is `unmanaged`. + + resource must be specified if the management policy is `managed`. + properties: + description: + description: description is a human-readable description for the + resource. + maxLength: 255 + minLength: 1 + type: string + domainRef: + description: domainRef is a reference to the ORC Domain which + this resource is associated with. + maxLength: 253 + minLength: 1 + type: string + x-kubernetes-validations: + - message: domainRef is immutable + rule: self == oldSelf + name: + description: |- + name will be the name of the created resource. If not specified, the + name of the ORC object will be used. + maxLength: 64 + minLength: 1 + type: string + type: object + required: + - cloudCredentialsRef + type: object + x-kubernetes-validations: + - message: resource must be specified when policy is managed + rule: 'self.managementPolicy == ''managed'' ? has(self.resource) : true' + - message: import may not be specified when policy is managed + rule: 'self.managementPolicy == ''managed'' ? !has(self.__import__) + : true' + - message: resource may not be specified when policy is unmanaged + rule: 'self.managementPolicy == ''unmanaged'' ? !has(self.resource) + : true' + - message: import must be specified when policy is unmanaged + rule: 'self.managementPolicy == ''unmanaged'' ? has(self.__import__) + : true' + - message: managedOptions may only be provided when policy is managed + rule: 'has(self.managedOptions) ? self.managementPolicy == ''managed'' + : true' + status: + description: status defines the observed state of the resource. + properties: + conditions: + description: |- + conditions represents the observed status of the object. + Known .status.conditions.type are: "Available", "Progressing" + + Available represents the availability of the OpenStack resource. If it is + true then the resource is ready for use. + + Progressing indicates whether the controller is still attempting to + reconcile the current state of the OpenStack resource to the desired + state. Progressing will be False either because the desired state has + been achieved, or because some terminal error prevents it from ever being + achieved and the controller is no longer attempting to reconcile. If + Progressing is True, an observer waiting on the resource should continue + to wait. + items: + description: Condition contains details for one aspect of the current + state of this API Resource. + 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 + 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. + 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: 32 + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + id: + description: id is the unique identifier of the OpenStack resource. + type: string + resource: + description: resource contains the observed state of the OpenStack + resource. + properties: + description: + description: description is a human-readable description for the + resource. + maxLength: 1024 + type: string + domainID: + description: domainID is the ID of the Domain to which the resource + is associated. + maxLength: 1024 + type: string + name: + description: name is a Human-readable name for the resource. Might + not be unique. + maxLength: 1024 + type: string + type: object + type: object + type: object + served: true + storage: true + subresources: + status: {} diff --git a/cmd/install/assets/crds/cluster-api-provider-openstack/openstack.k-orc.cloud_routerinterfaces.yaml b/cmd/install/assets/crds/cluster-api-provider-openstack/openstack.k-orc.cloud_routerinterfaces.yaml new file mode 100644 index 00000000000..ad191888c2c --- /dev/null +++ b/cmd/install/assets/crds/cluster-api-provider-openstack/openstack.k-orc.cloud_routerinterfaces.yaml @@ -0,0 +1,169 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.17.0 + name: routerinterfaces.openstack.k-orc.cloud +spec: + group: openstack.k-orc.cloud + names: + categories: + - openstack + kind: RouterInterface + listKind: RouterInterfaceList + plural: routerinterfaces + singular: routerinterface + scope: Namespaced + versions: + - additionalPrinterColumns: + - description: Availability status of resource + jsonPath: .status.conditions[?(@.type=='Available')].status + name: Available + type: string + - description: Message describing current progress status + jsonPath: .status.conditions[?(@.type=='Progressing')].message + name: Message + type: string + name: v1alpha1 + schema: + openAPIV3Schema: + description: RouterInterface is the Schema for an ORC resource. + 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 specifies the desired state of the resource. + properties: + routerRef: + description: routerRef references the router to which this interface + belongs. + maxLength: 253 + minLength: 1 + type: string + subnetRef: + description: subnetRef references the subnet the router interface + is created on. + maxLength: 253 + minLength: 1 + type: string + type: + description: type specifies the type of the router interface. + enum: + - Subnet + maxLength: 8 + minLength: 1 + type: string + required: + - routerRef + - type + type: object + x-kubernetes-validations: + - message: subnetRef is required when type is 'Subnet' and not permitted + otherwise + rule: 'self.type == ''Subnet'' ? has(self.subnetRef) : !has(self.subnetRef)' + - message: RouterInterfaceResourceSpec is immutable + rule: self == oldSelf + status: + description: status defines the observed state of the resource. + properties: + conditions: + description: |- + conditions represents the observed status of the object. + Known .status.conditions.type are: "Available", "Progressing" + + Available represents the availability of the OpenStack resource. If it is + true then the resource is ready for use. + + Progressing indicates whether the controller is still attempting to + reconcile the current state of the OpenStack resource to the desired + state. Progressing will be False either because the desired state has + been achieved, or because some terminal error prevents it from ever being + achieved and the controller is no longer attempting to reconcile. If + Progressing is True, an observer waiting on the resource should continue + to wait. + items: + description: Condition contains details for one aspect of the current + state of this API Resource. + 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 + 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. + 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: 32 + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + id: + description: id is the unique identifier of the port created for the + router interface + maxLength: 1024 + type: string + type: object + type: object + served: true + storage: true + subresources: + status: {} diff --git a/cmd/install/assets/crds/cluster-api-provider-openstack/openstack.k-orc.cloud_routers.yaml b/cmd/install/assets/crds/cluster-api-provider-openstack/openstack.k-orc.cloud_routers.yaml new file mode 100644 index 00000000000..ffe55141c75 --- /dev/null +++ b/cmd/install/assets/crds/cluster-api-provider-openstack/openstack.k-orc.cloud_routers.yaml @@ -0,0 +1,465 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.17.0 + name: routers.openstack.k-orc.cloud +spec: + group: openstack.k-orc.cloud + names: + categories: + - openstack + kind: Router + listKind: RouterList + plural: routers + singular: router + scope: Namespaced + versions: + - additionalPrinterColumns: + - description: Resource ID + jsonPath: .status.id + name: ID + type: string + - description: Availability status of resource + jsonPath: .status.conditions[?(@.type=='Available')].status + name: Available + type: string + - description: Message describing current progress status + jsonPath: .status.conditions[?(@.type=='Progressing')].message + name: Message + type: string + name: v1alpha1 + schema: + openAPIV3Schema: + description: Router is the Schema for an ORC resource. + 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 specifies the desired state of the resource. + properties: + cloudCredentialsRef: + description: cloudCredentialsRef points to a secret containing OpenStack + credentials + properties: + cloudName: + description: cloudName specifies the name of the entry in the + clouds.yaml file to use. + maxLength: 256 + minLength: 1 + type: string + secretName: + description: |- + secretName is the name of a secret in the same namespace as the resource being provisioned. + The secret must contain a key named `clouds.yaml` which contains an OpenStack clouds.yaml file. + The secret may optionally contain a key named `cacert` containing a PEM-encoded CA certificate. + maxLength: 253 + minLength: 1 + type: string + required: + - cloudName + - secretName + type: object + import: + description: |- + import refers to an existing OpenStack resource which will be imported instead of + creating a new one. + maxProperties: 1 + minProperties: 1 + properties: + filter: + description: |- + filter contains a resource query which is expected to return a single + result. The controller will continue to retry if filter returns no + results. If filter returns multiple results the controller will set an + error state and will not continue to retry. + minProperties: 1 + properties: + description: + description: description of the existing resource + maxLength: 255 + minLength: 1 + type: string + name: + description: name of the existing resource + maxLength: 255 + minLength: 1 + pattern: ^[^,]+$ + type: string + notTags: + description: |- + notTags is a list of tags to filter by. If specified, resources which + contain all of the given tags will be excluded from the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + maxLength: 255 + minLength: 1 + type: string + maxItems: 64 + type: array + x-kubernetes-list-type: set + notTagsAny: + description: |- + notTagsAny is a list of tags to filter by. If specified, resources + which contain any of the given tags will be excluded from the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + maxLength: 255 + minLength: 1 + type: string + maxItems: 64 + type: array + x-kubernetes-list-type: set + projectRef: + description: |- + projectRef is a reference to the ORC Project this resource is associated with. + Typically, only used by admin. + maxLength: 253 + minLength: 1 + type: string + tags: + description: |- + tags is a list of tags to filter by. If specified, the resource must + have all of the tags specified to be included in the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + maxLength: 255 + minLength: 1 + type: string + maxItems: 64 + type: array + x-kubernetes-list-type: set + tagsAny: + description: |- + tagsAny is a list of tags to filter by. If specified, the resource + must have at least one of the tags specified to be included in the + result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + maxLength: 255 + minLength: 1 + type: string + maxItems: 64 + type: array + x-kubernetes-list-type: set + type: object + id: + description: |- + id contains the unique identifier of an existing OpenStack resource. Note + that when specifying an import by ID, the resource MUST already exist. + The ORC object will enter an error state if the resource does not exist. + format: uuid + type: string + type: object + managedOptions: + description: managedOptions specifies options which may be applied + to managed objects. + properties: + onDelete: + default: delete + description: |- + onDelete specifies the behaviour of the controller when the ORC + object is deleted. Options are `delete` - delete the OpenStack resource; + `detach` - do not delete the OpenStack resource. If not specified, the + default is `delete`. + enum: + - delete + - detach + type: string + type: object + managementPolicy: + default: managed + description: |- + managementPolicy defines how ORC will treat the object. Valid values are + `managed`: ORC will create, update, and delete the resource; `unmanaged`: + ORC will import an existing resource, and will not apply updates to it or + delete it. + enum: + - managed + - unmanaged + type: string + x-kubernetes-validations: + - message: managementPolicy is immutable + rule: self == oldSelf + resource: + description: |- + resource specifies the desired state of the resource. + + resource may not be specified if the management policy is `unmanaged`. + + resource must be specified if the management policy is `managed`. + properties: + adminStateUp: + description: |- + adminStateUp represents the administrative state of the resource, + which is up (true) or down (false). Default is true. + type: boolean + availabilityZoneHints: + description: availabilityZoneHints is the availability zone candidate + for the router. + items: + maxLength: 255 + minLength: 1 + type: string + maxItems: 64 + type: array + x-kubernetes-list-type: set + x-kubernetes-validations: + - message: availabilityZoneHints is immutable + rule: self == oldSelf + description: + description: description is a human-readable description for the + resource. + maxLength: 255 + minLength: 1 + type: string + distributed: + description: |- + distributed indicates whether the router is distributed or not. It + is available when dvr extension is enabled. + type: boolean + x-kubernetes-validations: + - message: distributed is immutable + rule: self == oldSelf + externalGateways: + description: |- + externalGateways is a list of external gateways for the router. + Multiple gateways are not currently supported by ORC. + items: + properties: + networkRef: + description: |- + networkRef is a reference to the ORC Network which the external + gateway is on. + maxLength: 253 + minLength: 1 + type: string + required: + - networkRef + type: object + maxItems: 1 + type: array + x-kubernetes-list-type: atomic + x-kubernetes-validations: + - message: externalGateways is immutable + rule: self == oldSelf + name: + description: |- + name is a human-readable name of the router. If not set, the + object's name will be used. + maxLength: 255 + minLength: 1 + pattern: ^[^,]+$ + type: string + projectRef: + description: |- + projectRef is a reference to the ORC Project this resource is associated with. + Typically, only used by admin. + maxLength: 253 + minLength: 1 + type: string + x-kubernetes-validations: + - message: projectRef is immutable + rule: self == oldSelf + tags: + description: tags is a list of tags which will be applied to the + router. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + maxLength: 255 + minLength: 1 + type: string + maxItems: 64 + type: array + x-kubernetes-list-type: set + type: object + required: + - cloudCredentialsRef + type: object + x-kubernetes-validations: + - message: resource must be specified when policy is managed + rule: 'self.managementPolicy == ''managed'' ? has(self.resource) : true' + - message: import may not be specified when policy is managed + rule: 'self.managementPolicy == ''managed'' ? !has(self.__import__) + : true' + - message: resource may not be specified when policy is unmanaged + rule: 'self.managementPolicy == ''unmanaged'' ? !has(self.resource) + : true' + - message: import must be specified when policy is unmanaged + rule: 'self.managementPolicy == ''unmanaged'' ? has(self.__import__) + : true' + - message: managedOptions may only be provided when policy is managed + rule: 'has(self.managedOptions) ? self.managementPolicy == ''managed'' + : true' + status: + description: status defines the observed state of the resource. + properties: + conditions: + description: |- + conditions represents the observed status of the object. + Known .status.conditions.type are: "Available", "Progressing" + + Available represents the availability of the OpenStack resource. If it is + true then the resource is ready for use. + + Progressing indicates whether the controller is still attempting to + reconcile the current state of the OpenStack resource to the desired + state. Progressing will be False either because the desired state has + been achieved, or because some terminal error prevents it from ever being + achieved and the controller is no longer attempting to reconcile. If + Progressing is True, an observer waiting on the resource should continue + to wait. + items: + description: Condition contains details for one aspect of the current + state of this API Resource. + 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 + 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. + 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: 32 + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + id: + description: id is the unique identifier of the OpenStack resource. + type: string + resource: + description: resource contains the observed state of the OpenStack + resource. + properties: + adminStateUp: + description: |- + adminStateUp is the administrative state of the router, + which is up (true) or down (false). + type: boolean + availabilityZoneHints: + description: |- + availabilityZoneHints is the availability zone candidate for the + router. + items: + maxLength: 1024 + type: string + maxItems: 64 + type: array + x-kubernetes-list-type: atomic + description: + description: description is a human-readable description for the + resource. + maxLength: 1024 + type: string + externalGateways: + description: externalGateways is a list of external gateways for + the router. + items: + properties: + networkID: + description: networkID is the ID of the network the gateway + is on. + maxLength: 1024 + type: string + type: object + maxItems: 32 + type: array + x-kubernetes-list-type: atomic + name: + description: name is the human-readable name of the resource. + Might not be unique. + maxLength: 1024 + type: string + projectID: + description: projectID is the project owner of the resource. + maxLength: 1024 + type: string + status: + description: status indicates the current status of the resource. + maxLength: 1024 + type: string + tags: + description: tags is the list of tags on the resource. + items: + maxLength: 1024 + type: string + maxItems: 64 + type: array + x-kubernetes-list-type: atomic + type: object + type: object + type: object + served: true + storage: true + subresources: + status: {} diff --git a/cmd/install/assets/crds/cluster-api-provider-openstack/openstack.k-orc.cloud_securitygroups.yaml b/cmd/install/assets/crds/cluster-api-provider-openstack/openstack.k-orc.cloud_securitygroups.yaml new file mode 100644 index 00000000000..75ca785db5c --- /dev/null +++ b/cmd/install/assets/crds/cluster-api-provider-openstack/openstack.k-orc.cloud_securitygroups.yaml @@ -0,0 +1,595 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.17.0 + name: securitygroups.openstack.k-orc.cloud +spec: + group: openstack.k-orc.cloud + names: + categories: + - openstack + kind: SecurityGroup + listKind: SecurityGroupList + plural: securitygroups + singular: securitygroup + scope: Namespaced + versions: + - additionalPrinterColumns: + - description: Resource ID + jsonPath: .status.id + name: ID + type: string + - description: Availability status of resource + jsonPath: .status.conditions[?(@.type=='Available')].status + name: Available + type: string + - description: Message describing current progress status + jsonPath: .status.conditions[?(@.type=='Progressing')].message + name: Message + type: string + name: v1alpha1 + schema: + openAPIV3Schema: + description: SecurityGroup is the Schema for an ORC resource. + 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 specifies the desired state of the resource. + properties: + cloudCredentialsRef: + description: cloudCredentialsRef points to a secret containing OpenStack + credentials + properties: + cloudName: + description: cloudName specifies the name of the entry in the + clouds.yaml file to use. + maxLength: 256 + minLength: 1 + type: string + secretName: + description: |- + secretName is the name of a secret in the same namespace as the resource being provisioned. + The secret must contain a key named `clouds.yaml` which contains an OpenStack clouds.yaml file. + The secret may optionally contain a key named `cacert` containing a PEM-encoded CA certificate. + maxLength: 253 + minLength: 1 + type: string + required: + - cloudName + - secretName + type: object + import: + description: |- + import refers to an existing OpenStack resource which will be imported instead of + creating a new one. + maxProperties: 1 + minProperties: 1 + properties: + filter: + description: |- + filter contains a resource query which is expected to return a single + result. The controller will continue to retry if filter returns no + results. If filter returns multiple results the controller will set an + error state and will not continue to retry. + minProperties: 1 + properties: + description: + description: description of the existing resource + maxLength: 255 + minLength: 1 + type: string + name: + description: name of the existing resource + maxLength: 255 + minLength: 1 + pattern: ^[^,]+$ + type: string + notTags: + description: |- + notTags is a list of tags to filter by. If specified, resources which + contain all of the given tags will be excluded from the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + maxLength: 255 + minLength: 1 + type: string + maxItems: 64 + type: array + x-kubernetes-list-type: set + notTagsAny: + description: |- + notTagsAny is a list of tags to filter by. If specified, resources + which contain any of the given tags will be excluded from the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + maxLength: 255 + minLength: 1 + type: string + maxItems: 64 + type: array + x-kubernetes-list-type: set + projectRef: + description: |- + projectRef is a reference to the ORC Project this resource is associated with. + Typically, only used by admin. + maxLength: 253 + minLength: 1 + type: string + tags: + description: |- + tags is a list of tags to filter by. If specified, the resource must + have all of the tags specified to be included in the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + maxLength: 255 + minLength: 1 + type: string + maxItems: 64 + type: array + x-kubernetes-list-type: set + tagsAny: + description: |- + tagsAny is a list of tags to filter by. If specified, the resource + must have at least one of the tags specified to be included in the + result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + maxLength: 255 + minLength: 1 + type: string + maxItems: 64 + type: array + x-kubernetes-list-type: set + type: object + id: + description: |- + id contains the unique identifier of an existing OpenStack resource. Note + that when specifying an import by ID, the resource MUST already exist. + The ORC object will enter an error state if the resource does not exist. + format: uuid + type: string + type: object + managedOptions: + description: managedOptions specifies options which may be applied + to managed objects. + properties: + onDelete: + default: delete + description: |- + onDelete specifies the behaviour of the controller when the ORC + object is deleted. Options are `delete` - delete the OpenStack resource; + `detach` - do not delete the OpenStack resource. If not specified, the + default is `delete`. + enum: + - delete + - detach + type: string + type: object + managementPolicy: + default: managed + description: |- + managementPolicy defines how ORC will treat the object. Valid values are + `managed`: ORC will create, update, and delete the resource; `unmanaged`: + ORC will import an existing resource, and will not apply updates to it or + delete it. + enum: + - managed + - unmanaged + type: string + x-kubernetes-validations: + - message: managementPolicy is immutable + rule: self == oldSelf + resource: + description: |- + resource specifies the desired state of the resource. + + resource may not be specified if the management policy is `unmanaged`. + + resource must be specified if the management policy is `managed`. + properties: + description: + description: description is a human-readable description for the + resource. + maxLength: 255 + minLength: 1 + type: string + name: + description: |- + name will be the name of the created resource. If not specified, the + name of the ORC object will be used. + maxLength: 255 + minLength: 1 + pattern: ^[^,]+$ + type: string + projectRef: + description: |- + projectRef is a reference to the ORC Project this resource is associated with. + Typically, only used by admin. + maxLength: 253 + minLength: 1 + type: string + x-kubernetes-validations: + - message: projectRef is immutable + rule: self == oldSelf + rules: + description: rules is a list of security group rules belonging + to this SG. + items: + description: SecurityGroupRule defines a Security Group rule + minProperties: 1 + properties: + description: + description: description is a human-readable description + for the resource. + maxLength: 255 + minLength: 1 + type: string + direction: + description: |- + direction represents the direction in which the security group rule + is applied. Can be ingress or egress. + enum: + - ingress + - egress + type: string + ethertype: + description: |- + ethertype must be IPv4 or IPv6, and addresses represented in CIDR + must match the ingress or egress rules. + enum: + - IPv4 + - IPv6 + type: string + portRange: + description: |- + portRange sets the minimum and maximum ports range that the security group rule + matches. If the protocol is [tcp, udp, dccp sctp,udplite] PortRange.Min must be less than + or equal to the PortRange.Max attribute value. + If the protocol is ICMP, this PortRamge.Min must be an ICMP code and PortRange.Max + should be an ICMP type + properties: + max: + description: |- + max is the maximum port number in the range that is matched by the security group rule. + If the protocol is TCP, UDP, DCCP, SCTP or UDP-Lite this value must be greater than or equal + to the port_range_min attribute value. If the protocol is ICMP, this value must be an ICMP code. + format: int32 + maximum: 65535 + minimum: 0 + type: integer + min: + description: |- + min is the minimum port number in the range that is matched by the security group rule. + If the protocol is TCP, UDP, DCCP, SCTP or UDP-Lite this value must be less than or equal + to the port_range_max attribute value. If the protocol is ICMP, this value must be an ICMP type + format: int32 + maximum: 65535 + minimum: 0 + type: integer + required: + - max + - min + type: object + protocol: + description: protocol is the IP protocol is represented + by a string + enum: + - ah + - dccp + - egp + - esp + - gre + - icmp + - icmpv6 + - igmp + - ipip + - ipv6-encap + - ipv6-frag + - ipv6-icmp + - ipv6-nonxt + - ipv6-opts + - ipv6-route + - ospf + - pgm + - rsvp + - sctp + - tcp + - udp + - udplite + - vrrp + type: string + remoteIPPrefix: + description: remoteIPPrefix is an IP address block. Should + match the Ethertype (IPv4 or IPv6) + format: cidr + maxLength: 49 + minLength: 1 + type: string + required: + - ethertype + type: object + x-kubernetes-validations: + - message: portRangeMax should be equal or greater than portRange.min + rule: (!has(self.portRange)|| !(self.protocol == 'tcp'|| self.protocol + == 'udp' || self.protocol == 'dccp' || self.protocol == + 'sctp' || self.protocol == 'udplite') || (self.portRange.min + <= self.portRange.max)) + - message: When protocol is ICMP or ICMPv6 portRange.min should + be between 0 and 255 + rule: '!(self.protocol == ''icmp'' || self.protocol == ''icmpv6'') + || !has(self.portRange)|| (self.portRange.min >= 0 && self.portRange.min + <= 255)' + - message: When protocol is ICMP or ICMPv6 portRange.max should + be between 0 and 255 + rule: '!(self.protocol == ''icmp'' || self.protocol == ''icmpv6'') + || !has(self.portRange)|| (self.portRange.max >= 0 && self.portRange.max + <= 255)' + maxItems: 256 + type: array + x-kubernetes-list-type: atomic + stateful: + description: stateful indicates if the security group is stateful + or stateless. + type: boolean + x-kubernetes-validations: + - message: stateful is immutable + rule: self == oldSelf + tags: + description: tags is a list of tags which will be applied to the + security group. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + maxLength: 255 + minLength: 1 + type: string + maxItems: 64 + type: array + x-kubernetes-list-type: set + type: object + required: + - cloudCredentialsRef + type: object + x-kubernetes-validations: + - message: resource must be specified when policy is managed + rule: 'self.managementPolicy == ''managed'' ? has(self.resource) : true' + - message: import may not be specified when policy is managed + rule: 'self.managementPolicy == ''managed'' ? !has(self.__import__) + : true' + - message: resource may not be specified when policy is unmanaged + rule: 'self.managementPolicy == ''unmanaged'' ? !has(self.resource) + : true' + - message: import must be specified when policy is unmanaged + rule: 'self.managementPolicy == ''unmanaged'' ? has(self.__import__) + : true' + - message: managedOptions may only be provided when policy is managed + rule: 'has(self.managedOptions) ? self.managementPolicy == ''managed'' + : true' + status: + description: status defines the observed state of the resource. + properties: + conditions: + description: |- + conditions represents the observed status of the object. + Known .status.conditions.type are: "Available", "Progressing" + + Available represents the availability of the OpenStack resource. If it is + true then the resource is ready for use. + + Progressing indicates whether the controller is still attempting to + reconcile the current state of the OpenStack resource to the desired + state. Progressing will be False either because the desired state has + been achieved, or because some terminal error prevents it from ever being + achieved and the controller is no longer attempting to reconcile. If + Progressing is True, an observer waiting on the resource should continue + to wait. + items: + description: Condition contains details for one aspect of the current + state of this API Resource. + 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 + 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. + 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: 32 + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + id: + description: id is the unique identifier of the OpenStack resource. + type: string + resource: + description: resource contains the observed state of the OpenStack + resource. + properties: + createdAt: + description: createdAt shows the date and time when the resource + was created. The date and time stamp format is ISO 8601 + format: date-time + type: string + description: + description: description is a human-readable description for the + resource. + maxLength: 1024 + type: string + name: + description: name is a Human-readable name for the security group. + Might not be unique. + maxLength: 1024 + type: string + projectID: + description: projectID is the project owner of the security group. + maxLength: 1024 + type: string + revisionNumber: + description: revisionNumber optionally set via extensions/standard-attr-revisions + format: int64 + type: integer + rules: + description: rules is a list of security group rules belonging + to this SG. + items: + properties: + description: + description: description is a human-readable description + for the resource. + maxLength: 1024 + type: string + direction: + description: |- + direction represents the direction in which the security group rule + is applied. Can be ingress or egress. + maxLength: 1024 + type: string + ethertype: + description: |- + ethertype must be IPv4 or IPv6, and addresses represented in CIDR + must match the ingress or egress rules. + maxLength: 1024 + type: string + id: + description: id is the ID of the security group rule. + maxLength: 1024 + type: string + portRange: + description: |- + portRange sets the minimum and maximum ports range that the security group rule + matches. If the protocol is [tcp, udp, dccp sctp,udplite] PortRange.Min must be less than + or equal to the PortRange.Max attribute value. + If the protocol is ICMP, this PortRamge.Min must be an ICMP code and PortRange.Max + should be an ICMP type + properties: + max: + description: |- + max is the maximum port number in the range that is matched by the security group rule. + If the protocol is TCP, UDP, DCCP, SCTP or UDP-Lite this value must be greater than or equal + to the port_range_min attribute value. If the protocol is ICMP, this value must be an ICMP code. + format: int32 + type: integer + min: + description: |- + min is the minimum port number in the range that is matched by the security group rule. + If the protocol is TCP, UDP, DCCP, SCTP or UDP-Lite this value must be less than or equal + to the port_range_max attribute value. If the protocol is ICMP, this value must be an ICMP type + format: int32 + type: integer + type: object + protocol: + description: |- + protocol is the IP protocol can be represented by a string, an + integer, or null + maxLength: 1024 + type: string + remoteGroupID: + description: |- + remoteGroupID is the remote group UUID to associate with this security group rule + RemoteGroupID + maxLength: 1024 + type: string + remoteIPPrefix: + description: remoteIPPrefix is an IP address block. Should + match the Ethertype (IPv4 or IPv6) + maxLength: 1024 + type: string + type: object + maxItems: 256 + type: array + x-kubernetes-list-type: atomic + stateful: + description: stateful indicates if the security group is stateful + or stateless. + type: boolean + tags: + description: tags is the list of tags on the resource. + items: + maxLength: 1024 + type: string + maxItems: 64 + type: array + x-kubernetes-list-type: atomic + updatedAt: + description: updatedAt shows the date and time when the resource + was updated. The date and time stamp format is ISO 8601 + format: date-time + type: string + type: object + type: object + type: object + served: true + storage: true + subresources: + status: {} diff --git a/cmd/install/assets/crds/cluster-api-provider-openstack/openstack.k-orc.cloud_servergroups.yaml b/cmd/install/assets/crds/cluster-api-provider-openstack/openstack.k-orc.cloud_servergroups.yaml new file mode 100644 index 00000000000..610a06a7b2f --- /dev/null +++ b/cmd/install/assets/crds/cluster-api-provider-openstack/openstack.k-orc.cloud_servergroups.yaml @@ -0,0 +1,318 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.17.0 + name: servergroups.openstack.k-orc.cloud +spec: + group: openstack.k-orc.cloud + names: + categories: + - openstack + kind: ServerGroup + listKind: ServerGroupList + plural: servergroups + singular: servergroup + scope: Namespaced + versions: + - additionalPrinterColumns: + - description: Resource ID + jsonPath: .status.id + name: ID + type: string + - description: Availability status of resource + jsonPath: .status.conditions[?(@.type=='Available')].status + name: Available + type: string + - description: Message describing current progress status + jsonPath: .status.conditions[?(@.type=='Progressing')].message + name: Message + type: string + name: v1alpha1 + schema: + openAPIV3Schema: + description: ServerGroup is the Schema for an ORC resource. + 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 specifies the desired state of the resource. + properties: + cloudCredentialsRef: + description: cloudCredentialsRef points to a secret containing OpenStack + credentials + properties: + cloudName: + description: cloudName specifies the name of the entry in the + clouds.yaml file to use. + maxLength: 256 + minLength: 1 + type: string + secretName: + description: |- + secretName is the name of a secret in the same namespace as the resource being provisioned. + The secret must contain a key named `clouds.yaml` which contains an OpenStack clouds.yaml file. + The secret may optionally contain a key named `cacert` containing a PEM-encoded CA certificate. + maxLength: 253 + minLength: 1 + type: string + required: + - cloudName + - secretName + type: object + import: + description: |- + import refers to an existing OpenStack resource which will be imported instead of + creating a new one. + maxProperties: 1 + minProperties: 1 + properties: + filter: + description: |- + filter contains a resource query which is expected to return a single + result. The controller will continue to retry if filter returns no + results. If filter returns multiple results the controller will set an + error state and will not continue to retry. + minProperties: 1 + properties: + name: + description: name of the existing resource + maxLength: 255 + minLength: 1 + pattern: ^[^,]+$ + type: string + type: object + id: + description: |- + id contains the unique identifier of an existing OpenStack resource. Note + that when specifying an import by ID, the resource MUST already exist. + The ORC object will enter an error state if the resource does not exist. + format: uuid + type: string + type: object + managedOptions: + description: managedOptions specifies options which may be applied + to managed objects. + properties: + onDelete: + default: delete + description: |- + onDelete specifies the behaviour of the controller when the ORC + object is deleted. Options are `delete` - delete the OpenStack resource; + `detach` - do not delete the OpenStack resource. If not specified, the + default is `delete`. + enum: + - delete + - detach + type: string + type: object + managementPolicy: + default: managed + description: |- + managementPolicy defines how ORC will treat the object. Valid values are + `managed`: ORC will create, update, and delete the resource; `unmanaged`: + ORC will import an existing resource, and will not apply updates to it or + delete it. + enum: + - managed + - unmanaged + type: string + x-kubernetes-validations: + - message: managementPolicy is immutable + rule: self == oldSelf + resource: + description: |- + resource specifies the desired state of the resource. + + resource may not be specified if the management policy is `unmanaged`. + + resource must be specified if the management policy is `managed`. + properties: + name: + description: |- + name will be the name of the created resource. If not specified, the + name of the ORC object will be used. + maxLength: 255 + minLength: 1 + pattern: ^[^,]+$ + type: string + policy: + description: policy is the policy to use for the server group. + enum: + - affinity + - anti-affinity + - soft-affinity + - soft-anti-affinity + type: string + rules: + description: rules is the rules to use for the server group. + properties: + maxServerPerHost: + description: |- + maxServerPerHost specifies how many servers can reside on a single compute host. + It can be used only with the "anti-affinity" policy. + format: int32 + type: integer + type: object + required: + - policy + type: object + x-kubernetes-validations: + - message: ServerGroupResourceSpec is immutable + rule: self == oldSelf + - message: maxServerPerHost can only be used with the anti-affinity + policy + rule: 'has(self.rules) && self.rules.maxServerPerHost > 0 ? self.policy + == ''anti-affinity'' : true' + required: + - cloudCredentialsRef + type: object + x-kubernetes-validations: + - message: resource must be specified when policy is managed + rule: 'self.managementPolicy == ''managed'' ? has(self.resource) : true' + - message: import may not be specified when policy is managed + rule: 'self.managementPolicy == ''managed'' ? !has(self.__import__) + : true' + - message: resource may not be specified when policy is unmanaged + rule: 'self.managementPolicy == ''unmanaged'' ? !has(self.resource) + : true' + - message: import must be specified when policy is unmanaged + rule: 'self.managementPolicy == ''unmanaged'' ? has(self.__import__) + : true' + - message: managedOptions may only be provided when policy is managed + rule: 'has(self.managedOptions) ? self.managementPolicy == ''managed'' + : true' + status: + description: status defines the observed state of the resource. + properties: + conditions: + description: |- + conditions represents the observed status of the object. + Known .status.conditions.type are: "Available", "Progressing" + + Available represents the availability of the OpenStack resource. If it is + true then the resource is ready for use. + + Progressing indicates whether the controller is still attempting to + reconcile the current state of the OpenStack resource to the desired + state. Progressing will be False either because the desired state has + been achieved, or because some terminal error prevents it from ever being + achieved and the controller is no longer attempting to reconcile. If + Progressing is True, an observer waiting on the resource should continue + to wait. + items: + description: Condition contains details for one aspect of the current + state of this API Resource. + 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 + 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. + 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: 32 + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + id: + description: id is the unique identifier of the OpenStack resource. + type: string + resource: + description: resource contains the observed state of the OpenStack + resource. + properties: + name: + description: name is a Human-readable name for the servergroup. + Might not be unique. + maxLength: 1024 + type: string + policy: + description: policy is the policy of the servergroup. + maxLength: 1024 + type: string + projectID: + description: projectID is the project owner of the resource. + maxLength: 1024 + type: string + rules: + description: rules is the rules of the server group. + properties: + maxServerPerHost: + description: |- + maxServerPerHost specifies how many servers can reside on a single compute host. + It can be used only with the "anti-affinity" policy. + format: int32 + type: integer + type: object + userID: + description: userID of the server group. + maxLength: 1024 + type: string + type: object + type: object + type: object + served: true + storage: true + subresources: + status: {} diff --git a/cmd/install/assets/crds/cluster-api-provider-openstack/openstack.k-orc.cloud_servers.yaml b/cmd/install/assets/crds/cluster-api-provider-openstack/openstack.k-orc.cloud_servers.yaml new file mode 100644 index 00000000000..c7cfcae4d22 --- /dev/null +++ b/cmd/install/assets/crds/cluster-api-provider-openstack/openstack.k-orc.cloud_servers.yaml @@ -0,0 +1,539 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.17.0 + name: servers.openstack.k-orc.cloud +spec: + group: openstack.k-orc.cloud + names: + categories: + - openstack + kind: Server + listKind: ServerList + plural: servers + singular: server + scope: Namespaced + versions: + - additionalPrinterColumns: + - description: Resource ID + jsonPath: .status.id + name: ID + type: string + - description: Availability status of resource + jsonPath: .status.conditions[?(@.type=='Available')].status + name: Available + type: string + - description: Message describing current progress status + jsonPath: .status.conditions[?(@.type=='Progressing')].message + name: Message + type: string + name: v1alpha1 + schema: + openAPIV3Schema: + description: Server is the Schema for an ORC resource. + 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 specifies the desired state of the resource. + properties: + cloudCredentialsRef: + description: cloudCredentialsRef points to a secret containing OpenStack + credentials + properties: + cloudName: + description: cloudName specifies the name of the entry in the + clouds.yaml file to use. + maxLength: 256 + minLength: 1 + type: string + secretName: + description: |- + secretName is the name of a secret in the same namespace as the resource being provisioned. + The secret must contain a key named `clouds.yaml` which contains an OpenStack clouds.yaml file. + The secret may optionally contain a key named `cacert` containing a PEM-encoded CA certificate. + maxLength: 253 + minLength: 1 + type: string + required: + - cloudName + - secretName + type: object + import: + description: |- + import refers to an existing OpenStack resource which will be imported instead of + creating a new one. + maxProperties: 1 + minProperties: 1 + properties: + filter: + description: |- + filter contains a resource query which is expected to return a single + result. The controller will continue to retry if filter returns no + results. If filter returns multiple results the controller will set an + error state and will not continue to retry. + minProperties: 1 + properties: + availabilityZone: + description: availabilityZone is the availability zone of + the existing resource + maxLength: 255 + type: string + name: + description: name of the existing resource + maxLength: 255 + minLength: 1 + pattern: ^[^,]+$ + type: string + notTags: + description: |- + notTags is a list of tags to filter by. If specified, resources which + contain all of the given tags will be excluded from the result. + items: + maxLength: 80 + minLength: 1 + type: string + maxItems: 50 + type: array + x-kubernetes-list-type: set + notTagsAny: + description: |- + notTagsAny is a list of tags to filter by. If specified, resources + which contain any of the given tags will be excluded from the result. + items: + maxLength: 80 + minLength: 1 + type: string + maxItems: 50 + type: array + x-kubernetes-list-type: set + tags: + description: |- + tags is a list of tags to filter by. If specified, the resource must + have all of the tags specified to be included in the result. + items: + maxLength: 80 + minLength: 1 + type: string + maxItems: 50 + type: array + x-kubernetes-list-type: set + tagsAny: + description: |- + tagsAny is a list of tags to filter by. If specified, the resource + must have at least one of the tags specified to be included in the + result. + items: + maxLength: 80 + minLength: 1 + type: string + maxItems: 50 + type: array + x-kubernetes-list-type: set + type: object + id: + description: |- + id contains the unique identifier of an existing OpenStack resource. Note + that when specifying an import by ID, the resource MUST already exist. + The ORC object will enter an error state if the resource does not exist. + format: uuid + type: string + type: object + managedOptions: + description: managedOptions specifies options which may be applied + to managed objects. + properties: + onDelete: + default: delete + description: |- + onDelete specifies the behaviour of the controller when the ORC + object is deleted. Options are `delete` - delete the OpenStack resource; + `detach` - do not delete the OpenStack resource. If not specified, the + default is `delete`. + enum: + - delete + - detach + type: string + type: object + managementPolicy: + default: managed + description: |- + managementPolicy defines how ORC will treat the object. Valid values are + `managed`: ORC will create, update, and delete the resource; `unmanaged`: + ORC will import an existing resource, and will not apply updates to it or + delete it. + enum: + - managed + - unmanaged + type: string + x-kubernetes-validations: + - message: managementPolicy is immutable + rule: self == oldSelf + resource: + description: |- + resource specifies the desired state of the resource. + + resource may not be specified if the management policy is `unmanaged`. + + resource must be specified if the management policy is `managed`. + properties: + availabilityZone: + description: availabilityZone is the availability zone in which + to create the server. + maxLength: 255 + type: string + x-kubernetes-validations: + - message: availabilityZone is immutable + rule: self == oldSelf + flavorRef: + description: flavorRef references the flavor to use for the server + instance. + maxLength: 253 + minLength: 1 + type: string + x-kubernetes-validations: + - message: flavorRef is immutable + rule: self == oldSelf + imageRef: + description: |- + imageRef references the image to use for the server instance. + NOTE: This is not required in case of boot from volume. + maxLength: 253 + minLength: 1 + type: string + x-kubernetes-validations: + - message: imageRef is immutable + rule: self == oldSelf + keypairRef: + description: |- + keypairRef is a reference to a KeyPair object. The server will be + created with this keypair for SSH access. + maxLength: 253 + minLength: 1 + type: string + x-kubernetes-validations: + - message: keypairRef is immutable + rule: self == oldSelf + name: + description: |- + name will be the name of the created resource. If not specified, the + name of the ORC object will be used. + maxLength: 255 + minLength: 1 + pattern: ^[^,]+$ + type: string + ports: + description: ports defines a list of ports which will be attached + to the server. + items: + maxProperties: 1 + minProperties: 1 + properties: + portRef: + description: |- + portRef is a reference to a Port object. Server creation will wait for + this port to be created and available. + maxLength: 253 + minLength: 1 + type: string + type: object + maxItems: 64 + type: array + x-kubernetes-list-type: atomic + serverGroupRef: + description: |- + serverGroupRef is a reference to a ServerGroup object. The server + will be created in the server group. + maxLength: 253 + minLength: 1 + type: string + x-kubernetes-validations: + - message: serverGroupRef is immutable + rule: self == oldSelf + tags: + description: tags is a list of tags which will be applied to the + server. + items: + maxLength: 80 + minLength: 1 + type: string + maxItems: 50 + type: array + x-kubernetes-list-type: set + userData: + description: |- + userData specifies data which will be made available to the server at + boot time, either via the metadata service or a config drive. It is + typically read by a configuration service such as cloud-init or ignition. + maxProperties: 1 + minProperties: 1 + properties: + secretRef: + description: secretRef is a reference to a Secret containing + the user data for this server. + maxLength: 253 + minLength: 1 + type: string + type: object + x-kubernetes-validations: + - message: userData is immutable + rule: self == oldSelf + volumes: + description: volumes is a list of volumes attached to the server. + items: + minProperties: 1 + properties: + device: + description: |- + device is the name of the device, such as `/dev/vdb`. + Omit for auto-assignment + maxLength: 255 + type: string + volumeRef: + description: |- + volumeRef is a reference to a Volume object. Server creation will wait for + this volume to be created and available. + maxLength: 253 + minLength: 1 + type: string + required: + - volumeRef + type: object + maxItems: 64 + type: array + x-kubernetes-list-type: atomic + required: + - flavorRef + - imageRef + - ports + type: object + required: + - cloudCredentialsRef + type: object + x-kubernetes-validations: + - message: resource must be specified when policy is managed + rule: 'self.managementPolicy == ''managed'' ? has(self.resource) : true' + - message: import may not be specified when policy is managed + rule: 'self.managementPolicy == ''managed'' ? !has(self.__import__) + : true' + - message: resource may not be specified when policy is unmanaged + rule: 'self.managementPolicy == ''unmanaged'' ? !has(self.resource) + : true' + - message: import must be specified when policy is unmanaged + rule: 'self.managementPolicy == ''unmanaged'' ? has(self.__import__) + : true' + - message: managedOptions may only be provided when policy is managed + rule: 'has(self.managedOptions) ? self.managementPolicy == ''managed'' + : true' + status: + description: status defines the observed state of the resource. + properties: + conditions: + description: |- + conditions represents the observed status of the object. + Known .status.conditions.type are: "Available", "Progressing" + + Available represents the availability of the OpenStack resource. If it is + true then the resource is ready for use. + + Progressing indicates whether the controller is still attempting to + reconcile the current state of the OpenStack resource to the desired + state. Progressing will be False either because the desired state has + been achieved, or because some terminal error prevents it from ever being + achieved and the controller is no longer attempting to reconcile. If + Progressing is True, an observer waiting on the resource should continue + to wait. + items: + description: Condition contains details for one aspect of the current + state of this API Resource. + 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 + 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. + 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: 32 + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + id: + description: id is the unique identifier of the OpenStack resource. + type: string + resource: + description: resource contains the observed state of the OpenStack + resource. + properties: + availabilityZone: + description: availabilityZone is the availability zone where the + server is located. + maxLength: 1024 + type: string + hostID: + description: hostID is the host where the server is located in + the cloud. + maxLength: 1024 + type: string + imageID: + description: imageID indicates the OS image used to deploy the + server. + maxLength: 1024 + type: string + interfaces: + description: interfaces contains the list of interfaces attached + to the server. + items: + properties: + fixedIPs: + description: fixedIPs is the list of fixed IP addresses + assigned to the interface. + items: + properties: + ipAddress: + description: ipAddress is the IP address assigned + to the port. + maxLength: 1024 + type: string + subnetID: + description: subnetID is the ID of the subnet from + which the IP address is allocated. + maxLength: 1024 + type: string + type: object + maxItems: 32 + type: array + x-kubernetes-list-type: atomic + macAddr: + description: macAddr is the MAC address of the interface. + maxLength: 1024 + type: string + netID: + description: netID is the ID of the network to which the + interface is attached. + maxLength: 1024 + type: string + portID: + description: portID is the ID of a port attached to the + server. + maxLength: 1024 + type: string + portState: + description: portState is the state of the port (e.g., ACTIVE, + DOWN). + maxLength: 1024 + type: string + type: object + maxItems: 64 + type: array + x-kubernetes-list-type: atomic + name: + description: name is the human-readable name of the resource. + Might not be unique. + maxLength: 1024 + type: string + serverGroups: + description: |- + serverGroups is a slice of strings containing the UUIDs of the + server groups to which the server belongs. Currently this can + contain at most one entry. + items: + maxLength: 1024 + type: string + maxItems: 32 + type: array + x-kubernetes-list-type: atomic + status: + description: |- + status contains the current operational status of the server, + such as IN_PROGRESS or ACTIVE. + maxLength: 1024 + type: string + tags: + description: tags is the list of tags on the resource. + items: + maxLength: 1024 + type: string + maxItems: 50 + type: array + x-kubernetes-list-type: atomic + volumes: + description: volumes contains the volumes attached to the server. + items: + properties: + id: + description: id is the ID of a volume attached to the server. + maxLength: 1024 + type: string + type: object + maxItems: 64 + type: array + x-kubernetes-list-type: atomic + type: object + type: object + type: object + served: true + storage: true + subresources: + status: {} diff --git a/cmd/install/assets/crds/cluster-api-provider-openstack/openstack.k-orc.cloud_services.yaml b/cmd/install/assets/crds/cluster-api-provider-openstack/openstack.k-orc.cloud_services.yaml new file mode 100644 index 00000000000..aab39e86302 --- /dev/null +++ b/cmd/install/assets/crds/cluster-api-provider-openstack/openstack.k-orc.cloud_services.yaml @@ -0,0 +1,304 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.17.0 + name: services.openstack.k-orc.cloud +spec: + group: openstack.k-orc.cloud + names: + categories: + - openstack + kind: Service + listKind: ServiceList + plural: services + singular: service + scope: Namespaced + versions: + - additionalPrinterColumns: + - description: Resource ID + jsonPath: .status.id + name: ID + type: string + - description: Availability status of resource + jsonPath: .status.conditions[?(@.type=='Available')].status + name: Available + type: string + - description: Message describing current progress status + jsonPath: .status.conditions[?(@.type=='Progressing')].message + name: Message + type: string + name: v1alpha1 + schema: + openAPIV3Schema: + description: Service is the Schema for an ORC resource. + 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 specifies the desired state of the resource. + properties: + cloudCredentialsRef: + description: cloudCredentialsRef points to a secret containing OpenStack + credentials + properties: + cloudName: + description: cloudName specifies the name of the entry in the + clouds.yaml file to use. + maxLength: 256 + minLength: 1 + type: string + secretName: + description: |- + secretName is the name of a secret in the same namespace as the resource being provisioned. + The secret must contain a key named `clouds.yaml` which contains an OpenStack clouds.yaml file. + The secret may optionally contain a key named `cacert` containing a PEM-encoded CA certificate. + maxLength: 253 + minLength: 1 + type: string + required: + - cloudName + - secretName + type: object + import: + description: |- + import refers to an existing OpenStack resource which will be imported instead of + creating a new one. + maxProperties: 1 + minProperties: 1 + properties: + filter: + description: |- + filter contains a resource query which is expected to return a single + result. The controller will continue to retry if filter returns no + results. If filter returns multiple results the controller will set an + error state and will not continue to retry. + minProperties: 1 + properties: + name: + description: name of the existing resource + maxLength: 255 + minLength: 1 + pattern: ^[^,]+$ + type: string + type: + description: type of the existing resource + maxLength: 255 + minLength: 1 + type: string + type: object + id: + description: |- + id contains the unique identifier of an existing OpenStack resource. Note + that when specifying an import by ID, the resource MUST already exist. + The ORC object will enter an error state if the resource does not exist. + format: uuid + type: string + type: object + managedOptions: + description: managedOptions specifies options which may be applied + to managed objects. + properties: + onDelete: + default: delete + description: |- + onDelete specifies the behaviour of the controller when the ORC + object is deleted. Options are `delete` - delete the OpenStack resource; + `detach` - do not delete the OpenStack resource. If not specified, the + default is `delete`. + enum: + - delete + - detach + type: string + type: object + managementPolicy: + default: managed + description: |- + managementPolicy defines how ORC will treat the object. Valid values are + `managed`: ORC will create, update, and delete the resource; `unmanaged`: + ORC will import an existing resource, and will not apply updates to it or + delete it. + enum: + - managed + - unmanaged + type: string + x-kubernetes-validations: + - message: managementPolicy is immutable + rule: self == oldSelf + resource: + description: |- + resource specifies the desired state of the resource. + + resource may not be specified if the management policy is `unmanaged`. + + resource must be specified if the management policy is `managed`. + properties: + description: + description: description indicates the description of service. + maxLength: 255 + minLength: 1 + type: string + enabled: + default: true + description: enabled indicates whether the service is enabled + or not. + type: boolean + name: + description: |- + name indicates the name of service. If not specified, the name of the ORC + resource will be used. + maxLength: 255 + minLength: 1 + pattern: ^[^,]+$ + type: string + type: + description: type indicates which resource the service is responsible + for. + maxLength: 255 + minLength: 1 + type: string + required: + - type + type: object + required: + - cloudCredentialsRef + type: object + x-kubernetes-validations: + - message: resource must be specified when policy is managed + rule: 'self.managementPolicy == ''managed'' ? has(self.resource) : true' + - message: import may not be specified when policy is managed + rule: 'self.managementPolicy == ''managed'' ? !has(self.__import__) + : true' + - message: resource may not be specified when policy is unmanaged + rule: 'self.managementPolicy == ''unmanaged'' ? !has(self.resource) + : true' + - message: import must be specified when policy is unmanaged + rule: 'self.managementPolicy == ''unmanaged'' ? has(self.__import__) + : true' + - message: managedOptions may only be provided when policy is managed + rule: 'has(self.managedOptions) ? self.managementPolicy == ''managed'' + : true' + status: + description: status defines the observed state of the resource. + properties: + conditions: + description: |- + conditions represents the observed status of the object. + Known .status.conditions.type are: "Available", "Progressing" + + Available represents the availability of the OpenStack resource. If it is + true then the resource is ready for use. + + Progressing indicates whether the controller is still attempting to + reconcile the current state of the OpenStack resource to the desired + state. Progressing will be False either because the desired state has + been achieved, or because some terminal error prevents it from ever being + achieved and the controller is no longer attempting to reconcile. If + Progressing is True, an observer waiting on the resource should continue + to wait. + items: + description: Condition contains details for one aspect of the current + state of this API Resource. + 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 + 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. + 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: 32 + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + id: + description: id is the unique identifier of the OpenStack resource. + type: string + resource: + description: resource contains the observed state of the OpenStack + resource. + properties: + description: + description: description indicates the description of service. + maxLength: 255 + type: string + enabled: + description: enabled indicates whether the service is enabled + or not. + type: boolean + name: + description: name indicates the name of service. + maxLength: 255 + type: string + type: + description: type indicates which resource the service is responsible + for. + maxLength: 255 + type: string + type: object + type: object + type: object + served: true + storage: true + subresources: + status: {} diff --git a/cmd/install/assets/crds/cluster-api-provider-openstack/openstack.k-orc.cloud_subnets.yaml b/cmd/install/assets/crds/cluster-api-provider-openstack/openstack.k-orc.cloud_subnets.yaml new file mode 100644 index 00000000000..964a1c0d4be --- /dev/null +++ b/cmd/install/assets/crds/cluster-api-provider-openstack/openstack.k-orc.cloud_subnets.yaml @@ -0,0 +1,702 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.17.0 + name: subnets.openstack.k-orc.cloud +spec: + group: openstack.k-orc.cloud + names: + categories: + - openstack + kind: Subnet + listKind: SubnetList + plural: subnets + singular: subnet + scope: Namespaced + versions: + - additionalPrinterColumns: + - description: Resource ID + jsonPath: .status.id + name: ID + type: string + - description: Availability status of resource + jsonPath: .status.conditions[?(@.type=='Available')].status + name: Available + type: string + - description: Message describing current progress status + jsonPath: .status.conditions[?(@.type=='Progressing')].message + name: Message + type: string + name: v1alpha1 + schema: + openAPIV3Schema: + description: Subnet is the Schema for an ORC resource. + 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 specifies the desired state of the resource. + properties: + cloudCredentialsRef: + description: cloudCredentialsRef points to a secret containing OpenStack + credentials + properties: + cloudName: + description: cloudName specifies the name of the entry in the + clouds.yaml file to use. + maxLength: 256 + minLength: 1 + type: string + secretName: + description: |- + secretName is the name of a secret in the same namespace as the resource being provisioned. + The secret must contain a key named `clouds.yaml` which contains an OpenStack clouds.yaml file. + The secret may optionally contain a key named `cacert` containing a PEM-encoded CA certificate. + maxLength: 253 + minLength: 1 + type: string + required: + - cloudName + - secretName + type: object + import: + description: |- + import refers to an existing OpenStack resource which will be imported instead of + creating a new one. + maxProperties: 1 + minProperties: 1 + properties: + filter: + description: |- + filter contains a resource query which is expected to return a single + result. The controller will continue to retry if filter returns no + results. If filter returns multiple results the controller will set an + error state and will not continue to retry. + minProperties: 1 + properties: + cidr: + description: cidr of the existing resource + format: cidr + maxLength: 49 + minLength: 1 + type: string + description: + description: description of the existing resource + maxLength: 255 + minLength: 1 + type: string + gatewayIP: + description: gatewayIP is the IP address of the gateway of + the existing resource + maxLength: 45 + minLength: 1 + type: string + ipVersion: + description: ipVersion of the existing resource + enum: + - 4 + - 6 + format: int32 + type: integer + ipv6: + description: ipv6 options of the existing resource + minProperties: 1 + properties: + addressMode: + description: addressMode specifies mechanisms for assigning + IPv6 IP addresses. + enum: + - slaac + - dhcpv6-stateful + - dhcpv6-stateless + type: string + raMode: + description: |- + raMode specifies the IPv6 router advertisement mode. It specifies whether + the networking service should transmit ICMPv6 packets. + enum: + - slaac + - dhcpv6-stateful + - dhcpv6-stateless + type: string + type: object + name: + description: name of the existing resource + maxLength: 255 + minLength: 1 + pattern: ^[^,]+$ + type: string + networkRef: + description: networkRef is a reference to the ORC Network + which this subnet is associated with. + maxLength: 253 + minLength: 1 + type: string + notTags: + description: |- + notTags is a list of tags to filter by. If specified, resources which + contain all of the given tags will be excluded from the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + maxLength: 255 + minLength: 1 + type: string + maxItems: 64 + type: array + x-kubernetes-list-type: set + notTagsAny: + description: |- + notTagsAny is a list of tags to filter by. If specified, resources + which contain any of the given tags will be excluded from the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + maxLength: 255 + minLength: 1 + type: string + maxItems: 64 + type: array + x-kubernetes-list-type: set + projectRef: + description: |- + projectRef is a reference to the ORC Project this resource is associated with. + Typically, only used by admin. + maxLength: 253 + minLength: 1 + type: string + tags: + description: |- + tags is a list of tags to filter by. If specified, the resource must + have all of the tags specified to be included in the result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + maxLength: 255 + minLength: 1 + type: string + maxItems: 64 + type: array + x-kubernetes-list-type: set + tagsAny: + description: |- + tagsAny is a list of tags to filter by. If specified, the resource + must have at least one of the tags specified to be included in the + result. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + maxLength: 255 + minLength: 1 + type: string + maxItems: 64 + type: array + x-kubernetes-list-type: set + type: object + id: + description: |- + id contains the unique identifier of an existing OpenStack resource. Note + that when specifying an import by ID, the resource MUST already exist. + The ORC object will enter an error state if the resource does not exist. + format: uuid + type: string + type: object + managedOptions: + description: managedOptions specifies options which may be applied + to managed objects. + properties: + onDelete: + default: delete + description: |- + onDelete specifies the behaviour of the controller when the ORC + object is deleted. Options are `delete` - delete the OpenStack resource; + `detach` - do not delete the OpenStack resource. If not specified, the + default is `delete`. + enum: + - delete + - detach + type: string + type: object + managementPolicy: + default: managed + description: |- + managementPolicy defines how ORC will treat the object. Valid values are + `managed`: ORC will create, update, and delete the resource; `unmanaged`: + ORC will import an existing resource, and will not apply updates to it or + delete it. + enum: + - managed + - unmanaged + type: string + x-kubernetes-validations: + - message: managementPolicy is immutable + rule: self == oldSelf + resource: + description: |- + resource specifies the desired state of the resource. + + resource may not be specified if the management policy is `unmanaged`. + + resource must be specified if the management policy is `managed`. + properties: + allocationPools: + description: |- + allocationPools are IP Address pools that will be available for DHCP. IP + addresses must be in CIDR. + items: + properties: + end: + description: end is the last IP address in the allocation + pool. + maxLength: 45 + minLength: 1 + type: string + start: + description: start is the first IP address in the allocation + pool. + maxLength: 45 + minLength: 1 + type: string + required: + - end + - start + type: object + maxItems: 32 + type: array + x-kubernetes-list-type: atomic + cidr: + description: cidr is the address CIDR of the subnet. It must match + the IP version specified in IPVersion. + format: cidr + maxLength: 49 + minLength: 1 + type: string + x-kubernetes-validations: + - message: cidr is immutable + rule: self == oldSelf + description: + description: description is a human-readable description for the + resource. + maxLength: 255 + minLength: 1 + type: string + dnsNameservers: + description: dnsNameservers are the nameservers to be set via + DHCP. + items: + maxLength: 45 + minLength: 1 + type: string + maxItems: 16 + type: array + x-kubernetes-list-type: set + dnsPublishFixedIP: + description: |- + dnsPublishFixedIP will either enable or disable the publication of + fixed IPs to the DNS. Defaults to false. + type: boolean + x-kubernetes-validations: + - message: dnsPublishFixedIP is immutable + rule: self == oldSelf + enableDHCP: + description: enableDHCP will either enable to disable the DHCP + service. + type: boolean + gateway: + description: |- + gateway specifies the default gateway of the subnet. If not specified, + neutron will add one automatically. To disable this behaviour, specify a + gateway with a type of None. + properties: + ip: + description: |- + ip is the IP address of the default gateway, which must be specified if + Type is `IP`. It must be a valid IP address, either IPv4 or IPv6, + matching the IPVersion in SubnetResourceSpec. + maxLength: 45 + minLength: 1 + type: string + type: + description: |- + type specifies how the default gateway will be created. `Automatic` + specifies that neutron will automatically add a default gateway. This is + also the default if no Gateway is specified. `None` specifies that the + subnet will not have a default gateway. `IP` specifies that the subnet + will use a specific address as the default gateway, which must be + specified in `IP`. + enum: + - None + - Automatic + - IP + type: string + required: + - type + type: object + hostRoutes: + description: hostRoutes are any static host routes to be set via + DHCP. + items: + properties: + destination: + description: destination for the additional route. + format: cidr + maxLength: 49 + minLength: 1 + type: string + nextHop: + description: nextHop for the additional route. + maxLength: 45 + minLength: 1 + type: string + required: + - destination + - nextHop + type: object + maxItems: 256 + type: array + x-kubernetes-list-type: atomic + ipVersion: + description: ipVersion is the IP version for the subnet. + enum: + - 4 + - 6 + format: int32 + type: integer + x-kubernetes-validations: + - message: ipVersion is immutable + rule: self == oldSelf + ipv6: + description: ipv6 contains IPv6-specific options. It may only + be set if IPVersion is 6. + minProperties: 1 + properties: + addressMode: + description: addressMode specifies mechanisms for assigning + IPv6 IP addresses. + enum: + - slaac + - dhcpv6-stateful + - dhcpv6-stateless + type: string + raMode: + description: |- + raMode specifies the IPv6 router advertisement mode. It specifies whether + the networking service should transmit ICMPv6 packets. + enum: + - slaac + - dhcpv6-stateful + - dhcpv6-stateless + type: string + type: object + x-kubernetes-validations: + - message: ipv6 is immutable + rule: self == oldSelf + name: + description: name is a human-readable name of the subnet. If not + set, the object's name will be used. + maxLength: 255 + minLength: 1 + pattern: ^[^,]+$ + type: string + networkRef: + description: networkRef is a reference to the ORC Network which + this subnet is associated with. + maxLength: 253 + minLength: 1 + type: string + x-kubernetes-validations: + - message: networkRef is immutable + rule: self == oldSelf + projectRef: + description: |- + projectRef is a reference to the ORC Project this resource is associated with. + Typically, only used by admin. + maxLength: 253 + minLength: 1 + type: string + x-kubernetes-validations: + - message: projectRef is immutable + rule: self == oldSelf + routerRef: + description: routerRef specifies a router to attach the subnet + to + maxLength: 253 + minLength: 1 + type: string + x-kubernetes-validations: + - message: routerRef is immutable + rule: self == oldSelf + tags: + description: tags is a list of tags which will be applied to the + subnet. + items: + description: |- + NeutronTag represents a tag on a Neutron resource. + It may not be empty and may not contain commas. + maxLength: 255 + minLength: 1 + type: string + maxItems: 64 + type: array + x-kubernetes-list-type: set + required: + - cidr + - ipVersion + - networkRef + type: object + required: + - cloudCredentialsRef + type: object + x-kubernetes-validations: + - message: resource must be specified when policy is managed + rule: 'self.managementPolicy == ''managed'' ? has(self.resource) : true' + - message: import may not be specified when policy is managed + rule: 'self.managementPolicy == ''managed'' ? !has(self.__import__) + : true' + - message: resource may not be specified when policy is unmanaged + rule: 'self.managementPolicy == ''unmanaged'' ? !has(self.resource) + : true' + - message: import must be specified when policy is unmanaged + rule: 'self.managementPolicy == ''unmanaged'' ? has(self.__import__) + : true' + - message: managedOptions may only be provided when policy is managed + rule: 'has(self.managedOptions) ? self.managementPolicy == ''managed'' + : true' + status: + description: status defines the observed state of the resource. + properties: + conditions: + description: |- + conditions represents the observed status of the object. + Known .status.conditions.type are: "Available", "Progressing" + + Available represents the availability of the OpenStack resource. If it is + true then the resource is ready for use. + + Progressing indicates whether the controller is still attempting to + reconcile the current state of the OpenStack resource to the desired + state. Progressing will be False either because the desired state has + been achieved, or because some terminal error prevents it from ever being + achieved and the controller is no longer attempting to reconcile. If + Progressing is True, an observer waiting on the resource should continue + to wait. + items: + description: Condition contains details for one aspect of the current + state of this API Resource. + 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 + 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. + 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: 32 + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + id: + description: id is the unique identifier of the OpenStack resource. + type: string + resource: + description: resource contains the observed state of the OpenStack + resource. + properties: + allocationPools: + description: |- + allocationPools is a list of sub-ranges within CIDR available for dynamic + allocation to ports. + items: + properties: + end: + description: end is the last IP address in the allocation + pool. + maxLength: 1024 + type: string + start: + description: start is the first IP address in the allocation + pool. + maxLength: 1024 + type: string + type: object + maxItems: 32 + type: array + x-kubernetes-list-type: atomic + cidr: + description: cidr representing IP range for this subnet, based + on IP version. + maxLength: 1024 + type: string + createdAt: + description: createdAt shows the date and time when the resource + was created. The date and time stamp format is ISO 8601 + format: date-time + type: string + description: + description: description is a human-readable description for the + resource. + maxLength: 1024 + type: string + dnsNameservers: + description: dnsNameservers is a list of name servers used by + hosts in this subnet. + items: + maxLength: 1024 + type: string + maxItems: 16 + type: array + x-kubernetes-list-type: atomic + dnsPublishFixedIP: + description: dnsPublishFixedIP specifies whether the fixed IP + addresses are published to the DNS. + type: boolean + enableDHCP: + description: enableDHCP specifies whether DHCP is enabled for + this subnet or not. + type: boolean + gatewayIP: + description: gatewayIP is the default gateway used by devices + in this subnet, if any. + maxLength: 1024 + type: string + hostRoutes: + description: |- + hostRoutes is a list of routes that should be used by devices with IPs + from this subnet (not including local subnet route). + items: + properties: + destination: + description: destination for the additional route. + maxLength: 1024 + type: string + nextHop: + description: nextHop for the additional route. + maxLength: 1024 + type: string + type: object + maxItems: 256 + type: array + x-kubernetes-list-type: atomic + ipVersion: + description: ipVersion specifies IP version, either `4' or `6'. + format: int32 + type: integer + ipv6AddressMode: + description: ipv6AddressMode specifies mechanisms for assigning + IPv6 IP addresses. + maxLength: 1024 + type: string + ipv6RAMode: + description: |- + ipv6RAMode is the IPv6 router advertisement mode. It specifies + whether the networking service should transmit ICMPv6 packets. + maxLength: 1024 + type: string + name: + description: name is the human-readable name of the subnet. Might + not be unique. + maxLength: 1024 + type: string + networkID: + description: networkID is the ID of the network to which the subnet + belongs. + maxLength: 1024 + type: string + projectID: + description: projectID is the project owner of the subnet. + maxLength: 1024 + type: string + revisionNumber: + description: revisionNumber optionally set via extensions/standard-attr-revisions + format: int64 + type: integer + subnetPoolID: + description: subnetPoolID is the id of the subnet pool associated + with the subnet. + maxLength: 1024 + type: string + tags: + description: tags optionally set via extensions/attributestags + items: + maxLength: 1024 + type: string + maxItems: 64 + type: array + x-kubernetes-list-type: atomic + updatedAt: + description: updatedAt shows the date and time when the resource + was updated. The date and time stamp format is ISO 8601 + format: date-time + type: string + type: object + type: object + type: object + served: true + storage: true + subresources: + status: {} diff --git a/cmd/install/assets/crds/cluster-api-provider-openstack/openstack.k-orc.cloud_volumes.yaml b/cmd/install/assets/crds/cluster-api-provider-openstack/openstack.k-orc.cloud_volumes.yaml new file mode 100644 index 00000000000..edbe4589823 --- /dev/null +++ b/cmd/install/assets/crds/cluster-api-provider-openstack/openstack.k-orc.cloud_volumes.yaml @@ -0,0 +1,463 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.17.0 + name: volumes.openstack.k-orc.cloud +spec: + group: openstack.k-orc.cloud + names: + categories: + - openstack + kind: Volume + listKind: VolumeList + plural: volumes + singular: volume + scope: Namespaced + versions: + - additionalPrinterColumns: + - description: Resource ID + jsonPath: .status.id + name: ID + type: string + - description: Availability status of resource + jsonPath: .status.conditions[?(@.type=='Available')].status + name: Available + type: string + - description: Message describing current progress status + jsonPath: .status.conditions[?(@.type=='Progressing')].message + name: Message + type: string + name: v1alpha1 + schema: + openAPIV3Schema: + description: Volume is the Schema for an ORC resource. + 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 specifies the desired state of the resource. + properties: + cloudCredentialsRef: + description: cloudCredentialsRef points to a secret containing OpenStack + credentials + properties: + cloudName: + description: cloudName specifies the name of the entry in the + clouds.yaml file to use. + maxLength: 256 + minLength: 1 + type: string + secretName: + description: |- + secretName is the name of a secret in the same namespace as the resource being provisioned. + The secret must contain a key named `clouds.yaml` which contains an OpenStack clouds.yaml file. + The secret may optionally contain a key named `cacert` containing a PEM-encoded CA certificate. + maxLength: 253 + minLength: 1 + type: string + required: + - cloudName + - secretName + type: object + import: + description: |- + import refers to an existing OpenStack resource which will be imported instead of + creating a new one. + maxProperties: 1 + minProperties: 1 + properties: + filter: + description: |- + filter contains a resource query which is expected to return a single + result. The controller will continue to retry if filter returns no + results. If filter returns multiple results the controller will set an + error state and will not continue to retry. + minProperties: 1 + properties: + availabilityZone: + description: availabilityZone is the availability zone of + the existing resource + maxLength: 255 + type: string + description: + description: description of the existing resource + maxLength: 255 + minLength: 1 + type: string + name: + description: name of the existing resource + maxLength: 255 + minLength: 1 + pattern: ^[^,]+$ + type: string + size: + description: size is the size of the volume in GiB. + format: int32 + minimum: 1 + type: integer + type: object + id: + description: |- + id contains the unique identifier of an existing OpenStack resource. Note + that when specifying an import by ID, the resource MUST already exist. + The ORC object will enter an error state if the resource does not exist. + format: uuid + type: string + type: object + managedOptions: + description: managedOptions specifies options which may be applied + to managed objects. + properties: + onDelete: + default: delete + description: |- + onDelete specifies the behaviour of the controller when the ORC + object is deleted. Options are `delete` - delete the OpenStack resource; + `detach` - do not delete the OpenStack resource. If not specified, the + default is `delete`. + enum: + - delete + - detach + type: string + type: object + managementPolicy: + default: managed + description: |- + managementPolicy defines how ORC will treat the object. Valid values are + `managed`: ORC will create, update, and delete the resource; `unmanaged`: + ORC will import an existing resource, and will not apply updates to it or + delete it. + enum: + - managed + - unmanaged + type: string + x-kubernetes-validations: + - message: managementPolicy is immutable + rule: self == oldSelf + resource: + description: |- + resource specifies the desired state of the resource. + + resource may not be specified if the management policy is `unmanaged`. + + resource must be specified if the management policy is `managed`. + properties: + availabilityZone: + description: availabilityZone is the availability zone in which + to create the volume. + maxLength: 255 + type: string + x-kubernetes-validations: + - message: availabilityZone is immutable + rule: self == oldSelf + description: + description: description is a human-readable description for the + resource. + maxLength: 255 + minLength: 1 + type: string + metadata: + description: |- + metadata key and value pairs to be associated with the volume. + NOTE(mandre): gophercloud can't clear all metadata at the moment, we thus can't allow + mutability for metadata as we might end up in a state that is not reconciliable + items: + properties: + name: + description: name is the name of the metadata + maxLength: 255 + type: string + value: + description: value is the value of the metadata + maxLength: 255 + type: string + required: + - name + - value + type: object + maxItems: 64 + type: array + x-kubernetes-list-type: atomic + x-kubernetes-validations: + - message: metadata is immutable + rule: self == oldSelf + name: + description: |- + name will be the name of the created resource. If not specified, the + name of the ORC object will be used. + maxLength: 255 + minLength: 1 + pattern: ^[^,]+$ + type: string + size: + description: size is the size of the volume, in gibibytes (GiB). + format: int32 + minimum: 1 + type: integer + x-kubernetes-validations: + - message: size is immutable + rule: self == oldSelf + volumeTypeRef: + description: volumeTypeRef is a reference to the ORC VolumeType + which this resource is associated with. + maxLength: 253 + minLength: 1 + type: string + x-kubernetes-validations: + - message: volumeTypeRef is immutable + rule: self == oldSelf + required: + - size + type: object + required: + - cloudCredentialsRef + type: object + x-kubernetes-validations: + - message: resource must be specified when policy is managed + rule: 'self.managementPolicy == ''managed'' ? has(self.resource) : true' + - message: import may not be specified when policy is managed + rule: 'self.managementPolicy == ''managed'' ? !has(self.__import__) + : true' + - message: resource may not be specified when policy is unmanaged + rule: 'self.managementPolicy == ''unmanaged'' ? !has(self.resource) + : true' + - message: import must be specified when policy is unmanaged + rule: 'self.managementPolicy == ''unmanaged'' ? has(self.__import__) + : true' + - message: managedOptions may only be provided when policy is managed + rule: 'has(self.managedOptions) ? self.managementPolicy == ''managed'' + : true' + status: + description: status defines the observed state of the resource. + properties: + conditions: + description: |- + conditions represents the observed status of the object. + Known .status.conditions.type are: "Available", "Progressing" + + Available represents the availability of the OpenStack resource. If it is + true then the resource is ready for use. + + Progressing indicates whether the controller is still attempting to + reconcile the current state of the OpenStack resource to the desired + state. Progressing will be False either because the desired state has + been achieved, or because some terminal error prevents it from ever being + achieved and the controller is no longer attempting to reconcile. If + Progressing is True, an observer waiting on the resource should continue + to wait. + items: + description: Condition contains details for one aspect of the current + state of this API Resource. + 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 + 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. + 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: 32 + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + id: + description: id is the unique identifier of the OpenStack resource. + type: string + resource: + description: resource contains the observed state of the OpenStack + resource. + properties: + attachments: + description: attachments is a list of attachments for the volume. + items: + properties: + attachedAt: + description: attachedAt shows the date and time when the + resource was attached. The date and time stamp format + is ISO 8601. + format: date-time + type: string + attachmentID: + description: attachmentID represents the attachment UUID. + maxLength: 1024 + type: string + device: + description: device is the name of the device in the instance. + maxLength: 1024 + type: string + serverID: + description: serverID is the UUID of the server to which + the volume is attached. + maxLength: 1024 + type: string + type: object + maxItems: 32 + type: array + x-kubernetes-list-type: atomic + availabilityZone: + description: availabilityZone is which availability zone the volume + is in. + maxLength: 1024 + type: string + backupID: + description: backupID is the ID of the backup from which the volume + was restored + maxLength: 1024 + type: string + bootable: + description: bootable indicates whether this is a bootable volume. + type: boolean + consistencyGroupID: + description: consistencyGroupID is the consistency group ID. + maxLength: 1024 + type: string + createdAt: + description: createdAt shows the date and time when the resource + was created. The date and time stamp format is ISO 8601 + format: date-time + type: string + description: + description: description is a human-readable description for the + resource. + maxLength: 1024 + type: string + encrypted: + description: encrypted denotes if the volume is encrypted. + type: boolean + host: + description: host is the identifier of the host holding the volume. + maxLength: 1024 + type: string + metadata: + description: metadata key and value pairs to be associated with + the volume. + items: + properties: + name: + description: name is the name of the metadata + maxLength: 255 + type: string + value: + description: value is the value of the metadata + maxLength: 255 + type: string + type: object + maxItems: 64 + type: array + x-kubernetes-list-type: atomic + multiattach: + description: multiattach denotes if the volume is multi-attach + capable. + type: boolean + name: + description: name is a Human-readable name for the resource. Might + not be unique. + maxLength: 1024 + type: string + replicationStatus: + description: replicationStatus is the status of replication. + maxLength: 1024 + type: string + size: + description: size is the size of the volume in GiB. + format: int32 + type: integer + snapshotID: + description: snapshotID is the ID of the snapshot from which the + volume was created + maxLength: 1024 + type: string + sourceVolID: + description: sourceVolID is the ID of another block storage volume + from which the current volume was created + maxLength: 1024 + type: string + status: + description: status represents the current status of the volume. + maxLength: 1024 + type: string + tenantID: + description: tenantID is the ID of the project that owns the volume. + maxLength: 1024 + type: string + updatedAt: + description: updatedAt shows the date and time when the resource + was updated. The date and time stamp format is ISO 8601 + format: date-time + type: string + userID: + description: userID is the ID of the user who created the volume. + maxLength: 1024 + type: string + volumeType: + description: volumeType is the name of associated the volume type. + maxLength: 1024 + type: string + type: object + type: object + type: object + served: true + storage: true + subresources: + status: {} diff --git a/cmd/install/assets/crds/cluster-api-provider-openstack/openstack.k-orc.cloud_volumetypes.yaml b/cmd/install/assets/crds/cluster-api-provider-openstack/openstack.k-orc.cloud_volumetypes.yaml new file mode 100644 index 00000000000..74a629f46c3 --- /dev/null +++ b/cmd/install/assets/crds/cluster-api-provider-openstack/openstack.k-orc.cloud_volumetypes.yaml @@ -0,0 +1,332 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.17.0 + name: volumetypes.openstack.k-orc.cloud +spec: + group: openstack.k-orc.cloud + names: + categories: + - openstack + kind: VolumeType + listKind: VolumeTypeList + plural: volumetypes + singular: volumetype + scope: Namespaced + versions: + - additionalPrinterColumns: + - description: Resource ID + jsonPath: .status.id + name: ID + type: string + - description: Availability status of resource + jsonPath: .status.conditions[?(@.type=='Available')].status + name: Available + type: string + - description: Message describing current progress status + jsonPath: .status.conditions[?(@.type=='Progressing')].message + name: Message + type: string + name: v1alpha1 + schema: + openAPIV3Schema: + description: VolumeType is the Schema for an ORC resource. + 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 specifies the desired state of the resource. + properties: + cloudCredentialsRef: + description: cloudCredentialsRef points to a secret containing OpenStack + credentials + properties: + cloudName: + description: cloudName specifies the name of the entry in the + clouds.yaml file to use. + maxLength: 256 + minLength: 1 + type: string + secretName: + description: |- + secretName is the name of a secret in the same namespace as the resource being provisioned. + The secret must contain a key named `clouds.yaml` which contains an OpenStack clouds.yaml file. + The secret may optionally contain a key named `cacert` containing a PEM-encoded CA certificate. + maxLength: 253 + minLength: 1 + type: string + required: + - cloudName + - secretName + type: object + import: + description: |- + import refers to an existing OpenStack resource which will be imported instead of + creating a new one. + maxProperties: 1 + minProperties: 1 + properties: + filter: + description: |- + filter contains a resource query which is expected to return a single + result. The controller will continue to retry if filter returns no + results. If filter returns multiple results the controller will set an + error state and will not continue to retry. + minProperties: 1 + properties: + description: + description: description of the existing resource + maxLength: 255 + minLength: 1 + type: string + isPublic: + description: isPublic indicates whether the VolumeType is + public. + type: boolean + name: + description: name of the existing resource + maxLength: 255 + minLength: 1 + pattern: ^[^,]+$ + type: string + type: object + id: + description: |- + id contains the unique identifier of an existing OpenStack resource. Note + that when specifying an import by ID, the resource MUST already exist. + The ORC object will enter an error state if the resource does not exist. + format: uuid + type: string + type: object + managedOptions: + description: managedOptions specifies options which may be applied + to managed objects. + properties: + onDelete: + default: delete + description: |- + onDelete specifies the behaviour of the controller when the ORC + object is deleted. Options are `delete` - delete the OpenStack resource; + `detach` - do not delete the OpenStack resource. If not specified, the + default is `delete`. + enum: + - delete + - detach + type: string + type: object + managementPolicy: + default: managed + description: |- + managementPolicy defines how ORC will treat the object. Valid values are + `managed`: ORC will create, update, and delete the resource; `unmanaged`: + ORC will import an existing resource, and will not apply updates to it or + delete it. + enum: + - managed + - unmanaged + type: string + x-kubernetes-validations: + - message: managementPolicy is immutable + rule: self == oldSelf + resource: + description: |- + resource specifies the desired state of the resource. + + resource may not be specified if the management policy is `unmanaged`. + + resource must be specified if the management policy is `managed`. + properties: + description: + description: description is a human-readable description for the + resource. + maxLength: 255 + minLength: 1 + type: string + extraSpecs: + description: extraSpecs is a map of key-value pairs that define + extra specifications for the volume type. + items: + properties: + name: + description: name is the name of the extraspec + maxLength: 255 + type: string + value: + description: value is the value of the extraspec + maxLength: 255 + type: string + required: + - name + - value + type: object + maxItems: 64 + type: array + x-kubernetes-list-type: atomic + isPublic: + description: isPublic indicates whether the volume type is public. + type: boolean + name: + description: |- + name will be the name of the created resource. If not specified, the + name of the ORC object will be used. + maxLength: 255 + minLength: 1 + pattern: ^[^,]+$ + type: string + type: object + required: + - cloudCredentialsRef + type: object + x-kubernetes-validations: + - message: resource must be specified when policy is managed + rule: 'self.managementPolicy == ''managed'' ? has(self.resource) : true' + - message: import may not be specified when policy is managed + rule: 'self.managementPolicy == ''managed'' ? !has(self.__import__) + : true' + - message: resource may not be specified when policy is unmanaged + rule: 'self.managementPolicy == ''unmanaged'' ? !has(self.resource) + : true' + - message: import must be specified when policy is unmanaged + rule: 'self.managementPolicy == ''unmanaged'' ? has(self.__import__) + : true' + - message: managedOptions may only be provided when policy is managed + rule: 'has(self.managedOptions) ? self.managementPolicy == ''managed'' + : true' + status: + description: status defines the observed state of the resource. + properties: + conditions: + description: |- + conditions represents the observed status of the object. + Known .status.conditions.type are: "Available", "Progressing" + + Available represents the availability of the OpenStack resource. If it is + true then the resource is ready for use. + + Progressing indicates whether the controller is still attempting to + reconcile the current state of the OpenStack resource to the desired + state. Progressing will be False either because the desired state has + been achieved, or because some terminal error prevents it from ever being + achieved and the controller is no longer attempting to reconcile. If + Progressing is True, an observer waiting on the resource should continue + to wait. + items: + description: Condition contains details for one aspect of the current + state of this API Resource. + 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 + 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. + 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: 32 + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + id: + description: id is the unique identifier of the OpenStack resource. + type: string + resource: + description: resource contains the observed state of the OpenStack + resource. + properties: + description: + description: description is a human-readable description for the + resource. + maxLength: 1024 + type: string + extraSpecs: + description: extraSpecs is a map of key-value pairs that define + extra specifications for the volume type. + items: + properties: + name: + description: name is the name of the extraspec + maxLength: 255 + type: string + value: + description: value is the value of the extraspec + maxLength: 255 + type: string + type: object + maxItems: 64 + type: array + x-kubernetes-list-type: atomic + isPublic: + description: isPublic indicates whether the VolumeType is public. + type: boolean + name: + description: name is a Human-readable name for the resource. Might + not be unique. + maxLength: 1024 + type: string + type: object + type: object + type: object + served: true + storage: true + subresources: + status: {} diff --git a/cmd/install/assets/crds/cluster-api/cluster.x-k8s.io_clusterclasses.yaml b/cmd/install/assets/crds/cluster-api/cluster.x-k8s.io_clusterclasses.yaml index e429ac6527c..98ff2eb1c2c 100644 --- a/cmd/install/assets/crds/cluster-api/cluster.x-k8s.io_clusterclasses.yaml +++ b/cmd/install/assets/crds/cluster-api/cluster.x-k8s.io_clusterclasses.yaml @@ -2572,6 +2572,53 @@ spec: format: int32 minimum: 0 type: integer + unhealthyMachineConditions: + description: |- + unhealthyMachineConditions contains a list of the machine conditions that determine + whether a machine is considered unhealthy. The conditions are combined in a + logical OR, i.e. if any of the conditions is met, the machine is unhealthy. + items: + description: |- + UnhealthyMachineCondition represents a Machine condition type and value with a timeout + specified as a duration. When the named condition has been in the given + status for at least the timeout value, a machine is considered unhealthy. + properties: + status: + description: status of the condition, one of True, + False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + timeoutSeconds: + description: |- + timeoutSeconds is the duration that a machine must be in a given status for, + after which the machine is considered unhealthy. + For example, with a value of "3600", the machine must match the status + for at least 1 hour before being considered unhealthy. + format: int32 + minimum: 0 + type: integer + type: + description: type of Machine condition + maxLength: 316 + minLength: 1 + 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 + x-kubernetes-validations: + - message: 'type must not be one of: Ready, Available, + HealthCheckSucceeded, OwnerRemediated, ExternallyRemediated' + rule: '!(self in [''Ready'',''Available'',''HealthCheckSucceeded'',''OwnerRemediated'',''ExternallyRemediated''])' + required: + - status + - timeoutSeconds + - type + type: object + maxItems: 100 + minItems: 1 + type: array + x-kubernetes-list-type: atomic unhealthyNodeConditions: description: |- unhealthyNodeConditions contains a list of conditions that determine @@ -2592,7 +2639,7 @@ spec: description: |- timeoutSeconds is the duration that a node must be in a given status for, after which the node is considered unhealthy. - For example, with a value of "1h", the node must match the status + For example, with a value of "3600", the node must match the status for at least 1 hour before being considered unhealthy. format: int32 minimum: 0 @@ -2923,6 +2970,20 @@ spec: required: - templateRef type: object + kubernetesVersions: + description: |- + kubernetesVersions is the list of Kubernetes versions that can be + used for clusters using this ClusterClass. + The list of version must be ordered from the older to the newer version, and there should be + at least one version for every minor in between the first and the last version. + items: + maxLength: 256 + minLength: 1 + type: string + maxItems: 100 + minItems: 1 + type: array + x-kubernetes-list-type: atomic patches: description: |- patches defines the patches which are applied to customize @@ -3148,6 +3209,24 @@ spec: minItems: 1 type: array x-kubernetes-list-type: atomic + upgrade: + description: upgrade defines the upgrade configuration for clusters + using this ClusterClass. + minProperties: 1 + properties: + external: + description: external defines external runtime extensions for + upgrade operations. + minProperties: 1 + properties: + generateUpgradePlanExtension: + description: generateUpgradePlanExtension references an extension + which is called to generate upgrade plan. + maxLength: 512 + minLength: 1 + type: string + type: object + type: object variables: description: |- variables defines the variables which can be configured @@ -3717,6 +3796,54 @@ spec: format: int32 minimum: 0 type: integer + unhealthyMachineConditions: + description: |- + unhealthyMachineConditions contains a list of the machine conditions that determine + whether a machine is considered unhealthy. The conditions are combined in a + logical OR, i.e. if any of the conditions is met, the machine is unhealthy. + items: + description: |- + UnhealthyMachineCondition represents a Machine condition type and value with a timeout + specified as a duration. When the named condition has been in the given + status for at least the timeout value, a machine is considered unhealthy. + properties: + status: + description: status of the condition, one + of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + timeoutSeconds: + description: |- + timeoutSeconds is the duration that a machine must be in a given status for, + after which the machine is considered unhealthy. + For example, with a value of "3600", the machine must match the status + for at least 1 hour before being considered unhealthy. + format: int32 + minimum: 0 + type: integer + type: + description: type of Machine condition + maxLength: 316 + minLength: 1 + 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 + x-kubernetes-validations: + - message: 'type must not be one of: Ready, + Available, HealthCheckSucceeded, OwnerRemediated, + ExternallyRemediated' + rule: '!(self in [''Ready'',''Available'',''HealthCheckSucceeded'',''OwnerRemediated'',''ExternallyRemediated''])' + required: + - status + - timeoutSeconds + - type + type: object + maxItems: 100 + minItems: 1 + type: array + x-kubernetes-list-type: atomic unhealthyNodeConditions: description: |- unhealthyNodeConditions contains a list of conditions that determine @@ -3737,7 +3864,7 @@ spec: description: |- timeoutSeconds is the duration that a node must be in a given status for, after which the node is considered unhealthy. - For example, with a value of "1h", the node must match the status + For example, with a value of "3600", the node must match the status for at least 1 hour before being considered unhealthy. format: int32 minimum: 0 diff --git a/cmd/install/assets/crds/cluster-api/cluster.x-k8s.io_clusters.yaml b/cmd/install/assets/crds/cluster-api/cluster.x-k8s.io_clusters.yaml index f6641531847..9596cee338f 100644 --- a/cmd/install/assets/crds/cluster-api/cluster.x-k8s.io_clusters.yaml +++ b/cmd/install/assets/crds/cluster-api/cluster.x-k8s.io_clusters.yaml @@ -159,9 +159,6 @@ spec: description: port is the port on which the API server is serving. format: int32 type: integer - required: - - host - - port type: object controlPlaneRef: description: |- @@ -1838,6 +1835,54 @@ spec: format: int32 minimum: 0 type: integer + unhealthyMachineConditions: + description: |- + unhealthyMachineConditions contains a list of the machine conditions that determine + whether a machine is considered unhealthy. The conditions are combined in a + logical OR, i.e. if any of the conditions is met, the machine is unhealthy. + items: + description: |- + UnhealthyMachineCondition represents a Machine condition type and value with a timeout + specified as a duration. When the named condition has been in the given + status for at least the timeout value, a machine is considered unhealthy. + properties: + status: + description: status of the condition, one of + True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + timeoutSeconds: + description: |- + timeoutSeconds is the duration that a machine must be in a given status for, + after which the machine is considered unhealthy. + For example, with a value of "3600", the machine must match the status + for at least 1 hour before being considered unhealthy. + format: int32 + minimum: 0 + type: integer + type: + description: type of Machine condition + maxLength: 316 + minLength: 1 + 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 + x-kubernetes-validations: + - message: 'type must not be one of: Ready, + Available, HealthCheckSucceeded, OwnerRemediated, + ExternallyRemediated' + rule: '!(self in [''Ready'',''Available'',''HealthCheckSucceeded'',''OwnerRemediated'',''ExternallyRemediated''])' + required: + - status + - timeoutSeconds + - type + type: object + maxItems: 100 + minItems: 1 + type: array + x-kubernetes-list-type: atomic unhealthyNodeConditions: description: |- unhealthyNodeConditions contains a list of conditions that determine @@ -1858,7 +1903,7 @@ spec: description: |- timeoutSeconds is the duration that a node must be in a given status for, after which the node is considered unhealthy. - For example, with a value of "1h", the node must match the status + For example, with a value of "3600", the node must match the status for at least 1 hour before being considered unhealthy. format: int32 minimum: 0 @@ -2239,6 +2284,54 @@ spec: format: int32 minimum: 0 type: integer + unhealthyMachineConditions: + description: |- + unhealthyMachineConditions contains a list of the machine conditions that determine + whether a machine is considered unhealthy. The conditions are combined in a + logical OR, i.e. if any of the conditions is met, the machine is unhealthy. + items: + description: |- + UnhealthyMachineCondition represents a Machine condition type and value with a timeout + specified as a duration. When the named condition has been in the given + status for at least the timeout value, a machine is considered unhealthy. + properties: + status: + description: status of the condition, + one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + timeoutSeconds: + description: |- + timeoutSeconds is the duration that a machine must be in a given status for, + after which the machine is considered unhealthy. + For example, with a value of "3600", the machine must match the status + for at least 1 hour before being considered unhealthy. + format: int32 + minimum: 0 + type: integer + type: + description: type of Machine condition + maxLength: 316 + minLength: 1 + 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 + x-kubernetes-validations: + - message: 'type must not be one of: Ready, + Available, HealthCheckSucceeded, OwnerRemediated, + ExternallyRemediated' + rule: '!(self in [''Ready'',''Available'',''HealthCheckSucceeded'',''OwnerRemediated'',''ExternallyRemediated''])' + required: + - status + - timeoutSeconds + - type + type: object + maxItems: 100 + minItems: 1 + type: array + x-kubernetes-list-type: atomic unhealthyNodeConditions: description: |- unhealthyNodeConditions contains a list of conditions that determine @@ -2259,7 +2352,7 @@ spec: description: |- timeoutSeconds is the duration that a node must be in a given status for, after which the node is considered unhealthy. - For example, with a value of "1h", the node must match the status + For example, with a value of "3600", the node must match the status for at least 1 hour before being considered unhealthy. format: int32 minimum: 0 diff --git a/cmd/install/assets/crds/cluster-api/cluster.x-k8s.io_machinedeployments.yaml b/cmd/install/assets/crds/cluster-api/cluster.x-k8s.io_machinedeployments.yaml index e6d429803b2..71b2ccef775 100644 --- a/cmd/install/assets/crds/cluster-api/cluster.x-k8s.io_machinedeployments.yaml +++ b/cmd/install/assets/crds/cluster-api/cluster.x-k8s.io_machinedeployments.yaml @@ -1303,6 +1303,77 @@ spec: x-kubernetes-list-map-keys: - conditionType x-kubernetes-list-type: map + taints: + description: |- + taints are the node taints that Cluster API will manage. + This list is not necessarily complete: other Kubernetes components may add or remove other taints from nodes, + e.g. the node controller might add the node.kubernetes.io/not-ready taint. + Only those taints defined in this list will be added or removed by core Cluster API controllers. + + There can be at most 64 taints. + A pod would have to tolerate all existing taints to run on the corresponding node. + + NOTE: This list is implemented as a "map" type, meaning that individual elements can be managed by different owners. + items: + description: MachineTaint defines a taint equivalent to + corev1.Taint, but additionally having a propagation field. + properties: + effect: + description: effect is the effect for the taint. Valid + values are NoSchedule, PreferNoSchedule and NoExecute. + enum: + - NoSchedule + - PreferNoSchedule + - NoExecute + type: string + key: + description: |- + key is the taint key to be applied to a node. + Must be a valid qualified name of maximum size 63 characters + with an optional subdomain prefix of maximum size 253 characters, + separated by a `/`. + maxLength: 317 + minLength: 1 + 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 + x-kubernetes-validations: + - message: key must be a valid qualified name of max + size 63 characters with an optional subdomain prefix + of max size 253 characters + rule: 'self.contains(''/'') ? ( self.split(''/'') + [0].size() <= 253 && self.split(''/'') [1].size() + <= 63 && self.split(''/'').size() == 2 ) : self.size() + <= 63' + propagation: + description: |- + propagation defines how this taint should be propagated to nodes. + Valid values are 'Always' and 'OnInitialization'. + Always: The taint will be continuously reconciled. If it is not set for a node, it will be added during reconciliation. + OnInitialization: The taint will be added during node initialization. If it gets removed from the node later on it will not get added again. + enum: + - Always + - OnInitialization + type: string + value: + description: |- + value is the taint value corresponding to the taint key. + It must be a valid label value of maximum size 63 characters. + maxLength: 63 + minLength: 1 + pattern: ^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$ + type: string + required: + - effect + - key + - propagation + type: object + maxItems: 64 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - key + - effect + x-kubernetes-list-type: map version: description: |- version defines the desired Kubernetes version. diff --git a/cmd/install/assets/crds/cluster-api/cluster.x-k8s.io_machinehealthchecks.yaml b/cmd/install/assets/crds/cluster-api/cluster.x-k8s.io_machinehealthchecks.yaml index fa644b4f436..2739e0b7e5c 100644 --- a/cmd/install/assets/crds/cluster-api/cluster.x-k8s.io_machinehealthchecks.yaml +++ b/cmd/install/assets/crds/cluster-api/cluster.x-k8s.io_machinehealthchecks.yaml @@ -487,6 +487,53 @@ spec: format: int32 minimum: 0 type: integer + unhealthyMachineConditions: + description: |- + unhealthyMachineConditions contains a list of the machine conditions that determine + whether a machine is considered unhealthy. The conditions are combined in a + logical OR, i.e. if any of the conditions is met, the machine is unhealthy. + items: + description: |- + UnhealthyMachineCondition represents a Machine condition type and value with a timeout + specified as a duration. When the named condition has been in the given + status for at least the timeout value, a machine is considered unhealthy. + properties: + status: + description: status of the condition, one of True, False, + Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + timeoutSeconds: + description: |- + timeoutSeconds is the duration that a machine must be in a given status for, + after which the machine is considered unhealthy. + For example, with a value of "3600", the machine must match the status + for at least 1 hour before being considered unhealthy. + format: int32 + minimum: 0 + type: integer + type: + description: type of Machine condition + maxLength: 316 + minLength: 1 + 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 + x-kubernetes-validations: + - message: 'type must not be one of: Ready, Available, HealthCheckSucceeded, + OwnerRemediated, ExternallyRemediated' + rule: '!(self in [''Ready'',''Available'',''HealthCheckSucceeded'',''OwnerRemediated'',''ExternallyRemediated''])' + required: + - status + - timeoutSeconds + - type + type: object + maxItems: 100 + minItems: 1 + type: array + x-kubernetes-list-type: atomic unhealthyNodeConditions: description: |- unhealthyNodeConditions contains a list of conditions that determine @@ -507,7 +554,7 @@ spec: description: |- timeoutSeconds is the duration that a node must be in a given status for, after which the node is considered unhealthy. - For example, with a value of "1h", the node must match the status + For example, with a value of "3600", the node must match the status for at least 1 hour before being considered unhealthy. format: int32 minimum: 0 diff --git a/cmd/install/assets/crds/cluster-api/cluster.x-k8s.io_machinepools.yaml b/cmd/install/assets/crds/cluster-api/cluster.x-k8s.io_machinepools.yaml index 698af44792d..7d55c5d0770 100644 --- a/cmd/install/assets/crds/cluster-api/cluster.x-k8s.io_machinepools.yaml +++ b/cmd/install/assets/crds/cluster-api/cluster.x-k8s.io_machinepools.yaml @@ -961,6 +961,77 @@ spec: x-kubernetes-list-map-keys: - conditionType x-kubernetes-list-type: map + taints: + description: |- + taints are the node taints that Cluster API will manage. + This list is not necessarily complete: other Kubernetes components may add or remove other taints from nodes, + e.g. the node controller might add the node.kubernetes.io/not-ready taint. + Only those taints defined in this list will be added or removed by core Cluster API controllers. + + There can be at most 64 taints. + A pod would have to tolerate all existing taints to run on the corresponding node. + + NOTE: This list is implemented as a "map" type, meaning that individual elements can be managed by different owners. + items: + description: MachineTaint defines a taint equivalent to + corev1.Taint, but additionally having a propagation field. + properties: + effect: + description: effect is the effect for the taint. Valid + values are NoSchedule, PreferNoSchedule and NoExecute. + enum: + - NoSchedule + - PreferNoSchedule + - NoExecute + type: string + key: + description: |- + key is the taint key to be applied to a node. + Must be a valid qualified name of maximum size 63 characters + with an optional subdomain prefix of maximum size 253 characters, + separated by a `/`. + maxLength: 317 + minLength: 1 + 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 + x-kubernetes-validations: + - message: key must be a valid qualified name of max + size 63 characters with an optional subdomain prefix + of max size 253 characters + rule: 'self.contains(''/'') ? ( self.split(''/'') + [0].size() <= 253 && self.split(''/'') [1].size() + <= 63 && self.split(''/'').size() == 2 ) : self.size() + <= 63' + propagation: + description: |- + propagation defines how this taint should be propagated to nodes. + Valid values are 'Always' and 'OnInitialization'. + Always: The taint will be continuously reconciled. If it is not set for a node, it will be added during reconciliation. + OnInitialization: The taint will be added during node initialization. If it gets removed from the node later on it will not get added again. + enum: + - Always + - OnInitialization + type: string + value: + description: |- + value is the taint value corresponding to the taint key. + It must be a valid label value of maximum size 63 characters. + maxLength: 63 + minLength: 1 + pattern: ^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$ + type: string + required: + - effect + - key + - propagation + type: object + maxItems: 64 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - key + - effect + x-kubernetes-list-type: map version: description: |- version defines the desired Kubernetes version. diff --git a/cmd/install/assets/crds/cluster-api/cluster.x-k8s.io_machines.yaml b/cmd/install/assets/crds/cluster-api/cluster.x-k8s.io_machines.yaml index 65cd40e0484..5af9f56a3f8 100644 --- a/cmd/install/assets/crds/cluster-api/cluster.x-k8s.io_machines.yaml +++ b/cmd/install/assets/crds/cluster-api/cluster.x-k8s.io_machines.yaml @@ -931,6 +931,76 @@ spec: x-kubernetes-list-map-keys: - conditionType x-kubernetes-list-type: map + taints: + description: |- + taints are the node taints that Cluster API will manage. + This list is not necessarily complete: other Kubernetes components may add or remove other taints from nodes, + e.g. the node controller might add the node.kubernetes.io/not-ready taint. + Only those taints defined in this list will be added or removed by core Cluster API controllers. + + There can be at most 64 taints. + A pod would have to tolerate all existing taints to run on the corresponding node. + + NOTE: This list is implemented as a "map" type, meaning that individual elements can be managed by different owners. + items: + description: MachineTaint defines a taint equivalent to corev1.Taint, + but additionally having a propagation field. + properties: + effect: + description: effect is the effect for the taint. Valid values + are NoSchedule, PreferNoSchedule and NoExecute. + enum: + - NoSchedule + - PreferNoSchedule + - NoExecute + type: string + key: + description: |- + key is the taint key to be applied to a node. + Must be a valid qualified name of maximum size 63 characters + with an optional subdomain prefix of maximum size 253 characters, + separated by a `/`. + maxLength: 317 + minLength: 1 + 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 + x-kubernetes-validations: + - message: key must be a valid qualified name of max size 63 + characters with an optional subdomain prefix of max size + 253 characters + rule: 'self.contains(''/'') ? ( self.split(''/'') [0].size() + <= 253 && self.split(''/'') [1].size() <= 63 && self.split(''/'').size() + == 2 ) : self.size() <= 63' + propagation: + description: |- + propagation defines how this taint should be propagated to nodes. + Valid values are 'Always' and 'OnInitialization'. + Always: The taint will be continuously reconciled. If it is not set for a node, it will be added during reconciliation. + OnInitialization: The taint will be added during node initialization. If it gets removed from the node later on it will not get added again. + enum: + - Always + - OnInitialization + type: string + value: + description: |- + value is the taint value corresponding to the taint key. + It must be a valid label value of maximum size 63 characters. + maxLength: 63 + minLength: 1 + pattern: ^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$ + type: string + required: + - effect + - key + - propagation + type: object + maxItems: 64 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - key + - effect + x-kubernetes-list-type: map version: description: |- version defines the desired Kubernetes version. @@ -987,7 +1057,7 @@ spec: description: |- conditions represents the observations of a Machine's current state. Known condition types are Available, Ready, UpToDate, BootstrapConfigReady, InfrastructureReady, NodeReady, - NodeHealthy, Deleting, Paused. + NodeHealthy, Updating, Deleting, Paused. If a MachineHealthCheck is targeting this machine, also HealthCheckSucceeded, OwnerRemediated conditions are added. Additionally control plane Machines controlled by KubeadmControlPlane will have following additional conditions: APIServerPodHealthy, ControllerManagerPodHealthy, SchedulerPodHealthy, EtcdPodHealthy, EtcdMemberHealthy. @@ -1299,6 +1369,7 @@ spec: - Provisioning - Provisioned - Running + - Updating - Deleting - Deleted - Failed diff --git a/cmd/install/assets/crds/cluster-api/cluster.x-k8s.io_machinesets.yaml b/cmd/install/assets/crds/cluster-api/cluster.x-k8s.io_machinesets.yaml index e0e0462abb4..bb10ca5a362 100644 --- a/cmd/install/assets/crds/cluster-api/cluster.x-k8s.io_machinesets.yaml +++ b/cmd/install/assets/crds/cluster-api/cluster.x-k8s.io_machinesets.yaml @@ -1085,6 +1085,77 @@ spec: x-kubernetes-list-map-keys: - conditionType x-kubernetes-list-type: map + taints: + description: |- + taints are the node taints that Cluster API will manage. + This list is not necessarily complete: other Kubernetes components may add or remove other taints from nodes, + e.g. the node controller might add the node.kubernetes.io/not-ready taint. + Only those taints defined in this list will be added or removed by core Cluster API controllers. + + There can be at most 64 taints. + A pod would have to tolerate all existing taints to run on the corresponding node. + + NOTE: This list is implemented as a "map" type, meaning that individual elements can be managed by different owners. + items: + description: MachineTaint defines a taint equivalent to + corev1.Taint, but additionally having a propagation field. + properties: + effect: + description: effect is the effect for the taint. Valid + values are NoSchedule, PreferNoSchedule and NoExecute. + enum: + - NoSchedule + - PreferNoSchedule + - NoExecute + type: string + key: + description: |- + key is the taint key to be applied to a node. + Must be a valid qualified name of maximum size 63 characters + with an optional subdomain prefix of maximum size 253 characters, + separated by a `/`. + maxLength: 317 + minLength: 1 + 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 + x-kubernetes-validations: + - message: key must be a valid qualified name of max + size 63 characters with an optional subdomain prefix + of max size 253 characters + rule: 'self.contains(''/'') ? ( self.split(''/'') + [0].size() <= 253 && self.split(''/'') [1].size() + <= 63 && self.split(''/'').size() == 2 ) : self.size() + <= 63' + propagation: + description: |- + propagation defines how this taint should be propagated to nodes. + Valid values are 'Always' and 'OnInitialization'. + Always: The taint will be continuously reconciled. If it is not set for a node, it will be added during reconciliation. + OnInitialization: The taint will be added during node initialization. If it gets removed from the node later on it will not get added again. + enum: + - Always + - OnInitialization + type: string + value: + description: |- + value is the taint value corresponding to the taint key. + It must be a valid label value of maximum size 63 characters. + maxLength: 63 + minLength: 1 + pattern: ^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$ + type: string + required: + - effect + - key + - propagation + type: object + maxItems: 64 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - key + - effect + x-kubernetes-list-type: map version: description: |- version defines the desired Kubernetes version. diff --git a/go.mod b/go.mod index ed9b4a7de2f..6b4140dfe9d 100644 --- a/go.mod +++ b/go.mod @@ -55,7 +55,7 @@ require ( github.com/google/gofuzz v1.2.0 github.com/google/uuid v1.6.0 github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 - github.com/k-orc/openstack-resource-controller v1.0.0 + github.com/k-orc/openstack-resource-controller/v2 v2.4.0 github.com/kubernetes-csi/external-snapshotter/client/v6 v6.3.0 github.com/onsi/ginkgo/v2 v2.28.1 github.com/onsi/gomega v1.39.1 @@ -116,14 +116,14 @@ require ( k8s.io/utils v0.0.0-20260108192941-914a6e750570 kubevirt.io/api v1.8.2 kubevirt.io/containerized-data-importer-api v1.65.0 - sigs.k8s.io/cluster-api v1.11.7 + sigs.k8s.io/cluster-api v1.12.7 sigs.k8s.io/cluster-api-provider-aws/v2 v2.10.0 sigs.k8s.io/cluster-api-provider-azure v1.22.0 sigs.k8s.io/cluster-api-provider-gcp v1.11.0 sigs.k8s.io/cluster-api-provider-ibmcloud v0.12.0 sigs.k8s.io/cluster-api-provider-kubevirt v0.11.1 - sigs.k8s.io/cluster-api-provider-openstack v0.13.3 - sigs.k8s.io/controller-runtime v0.22.4 + sigs.k8s.io/cluster-api-provider-openstack v0.14.4 + sigs.k8s.io/controller-runtime v0.22.5 sigs.k8s.io/karpenter v1.9.0 sigs.k8s.io/secrets-store-csi-driver v1.4.8 sigs.k8s.io/structured-merge-diff/v6 v6.3.2 @@ -313,9 +313,6 @@ require ( replace github.com/openshift/hypershift/api => ./api -// orc currently lives in CAPO -replace github.com/k-orc/openstack-resource-controller => sigs.k8s.io/cluster-api-provider-openstack/orc v0.0.0-20250113192833-e4f56a2b4f32 - // CVE-2025-30204 replace github.com/golang-jwt/jwt/v4 => github.com/golang-jwt/jwt/v4 v4.5.2 diff --git a/go.sum b/go.sum index 4bf47a49500..7e20fc71261 100644 --- a/go.sum +++ b/go.sum @@ -215,8 +215,8 @@ github.com/cockroachdb/datadriven v1.0.2 h1:H9MtNqVoVhvd9nCBwOyDjUEdZCREqbIdCJD9 github.com/cockroachdb/datadriven v1.0.2/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= github.com/coredns/caddy v1.1.1 h1:2eYKZT7i6yxIfGP3qLJoJ7HAsDJqYB+X68g4NYjSrE0= github.com/coredns/caddy v1.1.1/go.mod h1:A6ntJQlAWuQfFlsd9hvigKbo2WS0VUs2l1e2F+BawD4= -github.com/coredns/corefile-migration v1.0.30 h1:ljZNPGgna+4yKv81gfkvkgLEWdtz0NjBR1glaiPI140= -github.com/coredns/corefile-migration v1.0.30/go.mod h1:56DPqONc3njpVPsdilEnfijCwNGC3/kTJLl7i7SPavY= +github.com/coredns/corefile-migration v1.0.31 h1:f7WGhY8M2Jn8P2dVO0p7wSQ1QKsMARl6WEyUjCb/V38= +github.com/coredns/corefile-migration v1.0.31/go.mod h1:56DPqONc3njpVPsdilEnfijCwNGC3/kTJLl7i7SPavY= github.com/coreos/go-semver v0.3.1 h1:yi21YpKnrx1gt5R+la8n5WgS0kCrsPp33dmEyHReZr4= github.com/coreos/go-semver v0.3.1/go.mod h1:irMmmIw/7yzSRPWryHsK7EYSg09caPQL03VsM8rvUec= github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf h1:iW4rZ826su+pqaw19uhpSCzhj44qo35pNgKFGqzDKkU= @@ -496,6 +496,8 @@ github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/u github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/k-orc/openstack-resource-controller/v2 v2.4.0 h1:5sRLIe24eIwICl/210LuH3BgeF3LAMq+MI0qyCaZ7MI= +github.com/k-orc/openstack-resource-controller/v2 v2.4.0/go.mod h1:0ucstXuHmAJXXTYJxcqBgNQ3en7YF7Ffr7FnLuBB15w= github.com/keybase/go-keychain v0.0.1 h1:way+bWYa6lDppZoZcgMbYsvC7GxljxrskdNInRtuthU= github.com/keybase/go-keychain v0.0.1/go.mod h1:PdEILRW3i9D8JcdM+FmY6RwkHGnhHxXwkPPMeUgOK1k= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= @@ -693,8 +695,8 @@ github.com/sirupsen/logrus v1.9.4/go.mod h1:ftWc9WdOfJ0a92nsE2jF5u5ZwH8Bv2zdeOC4 github.com/soheilhy/cmux v0.1.5 h1:jjzc5WVemNEDTLwv9tlmemhC73tI08BNOIGwBOo10Js= github.com/soheilhy/cmux v0.1.5/go.mod h1:T7TcVDs9LWfQgPlPsdngu6I6QIoyIFZDDC6sNE1GqG0= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= -github.com/spf13/cast v1.7.1 h1:cuNEagBQEHWN1FnbGEjCXL2szYEXqfJPbP2HNUaca9Y= -github.com/spf13/cast v1.7.1/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= +github.com/spf13/cast v1.10.0 h1:h2x0u2shc1QuLHfxi+cTJvs30+ZAHOGRic8uyGTDWxY= +github.com/spf13/cast v1.10.0/go.mod h1:jNfB8QC9IA6ZuY2ZjDp0KtFO2LZZlg4S/7bzP6qqeHo= github.com/spf13/cobra v1.10.2 h1:DMTTonx5m65Ic0GOoRY2c16WCbHxOOw6xxezuLaBpcU= github.com/spf13/cobra v1.10.2/go.mod h1:7C1pvHqHw5A4vrJfjNwvOdzYu0Gml16OCs2GRiTUUS4= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= @@ -1072,8 +1074,8 @@ kubevirt.io/controller-lifecycle-operator-sdk/api v0.2.4 h1:fZYvD3/Vnitfkx6IJxjL kubevirt.io/controller-lifecycle-operator-sdk/api v0.2.4/go.mod h1:018lASpFYBsYN6XwmA2TIrPCx6e0gviTd/ZNtSitKgc= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.33.0 h1:qPrZsv1cwQiFeieFlRqT627fVZ+tyfou/+S5S0H5ua0= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.33.0/go.mod h1:Ve9uj1L+deCXFrPOk1LpFXqTg7LCFzFso6PA48q/XZw= -sigs.k8s.io/cluster-api v1.11.7 h1:RPEpDy6iBn13lLEj9bmq845ib47/joSBkM0Rqlhd1GI= -sigs.k8s.io/cluster-api v1.11.7/go.mod h1:LfMVDJoVNoHj/FJuwAlNYiN1QNYqojGAJ0czqRi31yI= +sigs.k8s.io/cluster-api v1.12.7 h1:CbRMWgKN/sHZGBWc/6s8DH9ZnqsSsmYDKlJJ69Rxt8o= +sigs.k8s.io/cluster-api v1.12.7/go.mod h1:RdmTGGRMvAGIIQBljHUHNov/6Lgz7rmYXqzZNCK+Z4o= sigs.k8s.io/cluster-api-provider-aws/v2 v2.10.0 h1:E28NopVRAtnenHsfh54VwS2uEpGAkW0bv6Y19bqAwCg= sigs.k8s.io/cluster-api-provider-aws/v2 v2.10.0/go.mod h1:cuuFljMXGat8qW+lvSdYEWReR0DSauv19/rh+bpobl4= sigs.k8s.io/cluster-api-provider-azure v1.22.0 h1:TL+QXMVCeY2zR41PSlH2jyhQivDXXPGT8wqG4LX92ss= @@ -1084,10 +1086,8 @@ sigs.k8s.io/cluster-api-provider-ibmcloud v0.12.0 h1:0+jfWLg+UmnGOdHZ9SrEpnUJgQP sigs.k8s.io/cluster-api-provider-ibmcloud v0.12.0/go.mod h1:OENB/2pEx2IgYAovlV7qHvOJYyBoKc94TxNqnjjyWYs= sigs.k8s.io/cluster-api-provider-kubevirt v0.11.1 h1:6He4EkFNVsEpYsObVRh1agt1/CxhqdqsOvEvyjRWWzk= sigs.k8s.io/cluster-api-provider-kubevirt v0.11.1/go.mod h1:so1WRGRRsxT4lqS0htpUqXrXLy0guBklh9UPVxoilLY= -sigs.k8s.io/cluster-api-provider-openstack v0.13.3 h1:qBPgWG1E3wiiK8+VR5a3jnKGTyDPo6ZbXruTLOXw/3w= -sigs.k8s.io/cluster-api-provider-openstack v0.13.3/go.mod h1:McuqrgmgsbK4yaC1HKqJ7dxKnOERmXQedUUL15sqelQ= -sigs.k8s.io/cluster-api-provider-openstack/orc v0.0.0-20250113192833-e4f56a2b4f32 h1:AkFSgi+dAnPLtg+SXjtCf3rDzjI/mskDiJ1PWHZoRno= -sigs.k8s.io/cluster-api-provider-openstack/orc v0.0.0-20250113192833-e4f56a2b4f32/go.mod h1:hQOMZZjzuAt9pdLaE/tj5ByDTVNBkqNaP10ijnqNZfU= +sigs.k8s.io/cluster-api-provider-openstack v0.14.4 h1:dvvDcPkvXqGJD/C+FchNWqW6E2OlREviJ/AJ8S6Z+uk= +sigs.k8s.io/cluster-api-provider-openstack v0.14.4/go.mod h1:OJRiKdPY3SoYKMXDbzVgqwa9j8GBie31Pt8oiMtVT2Q= sigs.k8s.io/controller-runtime v0.19.7 h1:DLABZfMr20A+AwCZOHhcbcu+TqBXnJZaVBri9K3EO48= sigs.k8s.io/controller-runtime v0.19.7/go.mod h1:iRmWllt8IlaLjvTTDLhRBXIEtkCK6hwVBJJsYS9Ajf4= sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6/go.mod h1:p4QtZmO4uMYipTQNzagwnNoseA6OxSUutVw05NhYDRs= diff --git a/hypershift-operator/controllers/nodepool/openstack.go b/hypershift-operator/controllers/nodepool/openstack.go index bd9773caa73..09f1340aba1 100644 --- a/hypershift-operator/controllers/nodepool/openstack.go +++ b/hypershift-operator/controllers/nodepool/openstack.go @@ -15,7 +15,7 @@ import ( capiopenstackv1beta1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1" "sigs.k8s.io/controller-runtime/pkg/client" - orc "github.com/k-orc/openstack-resource-controller/api/v1alpha1" + orc "github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1" ) func (c *CAPI) openstackMachineTemplate(templateNameGenerator func(spec any) (string, error)) (*capiopenstackv1beta1.OpenStackMachineTemplate, error) { diff --git a/hypershift-operator/controllers/nodepool/openstack/openstack.go b/hypershift-operator/controllers/nodepool/openstack/openstack.go index 4a824f3e028..aee572aa681 100644 --- a/hypershift-operator/controllers/nodepool/openstack/openstack.go +++ b/hypershift-operator/controllers/nodepool/openstack/openstack.go @@ -14,7 +14,7 @@ import ( capiopenstackv1beta1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1" "sigs.k8s.io/controller-runtime/pkg/client" - orc "github.com/k-orc/openstack-resource-controller/api/v1alpha1" + orc "github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1" ) func MachineTemplateSpec(hcluster *hyperv1.HostedCluster, nodePool *hyperv1.NodePool, releaseImage *releaseinfo.ReleaseImage) (*capiopenstackv1beta1.OpenStackMachineTemplateSpec, error) { @@ -111,7 +111,7 @@ func ReconcileOpenStackImageSpec(hcluster *hyperv1.HostedCluster, openStackImage } openStackImageSpec.Resource = &orc.ImageResourceSpec{ - Name: imageName, + Name: &imageName, Content: &orc.ImageContent{ ContainerFormat: "bare", DiskFormat: "qcow2", @@ -167,10 +167,10 @@ func OpenStackReleaseImage(releaseImage *releaseinfo.ReleaseImage) (string, erro } // PrefixedClusterImageName returns a prefixed name of the image for the given HostedCluster. -func PrefixedClusterImageName(hcluster *hyperv1.HostedCluster, releaseImage *releaseinfo.ReleaseImage) (string, error) { +func PrefixedClusterImageName(hcluster *hyperv1.HostedCluster, releaseImage *releaseinfo.ReleaseImage) (orc.OpenStackName, error) { releaseVersion, err := OpenStackReleaseImage(releaseImage) if err != nil { return "", err } - return hcluster.Name + "-rhcos-" + releaseVersion, nil + return orc.OpenStackName(hcluster.Name + "-rhcos-" + releaseVersion), nil } diff --git a/hypershift-operator/controllers/nodepool/openstack/openstack_test.go b/hypershift-operator/controllers/nodepool/openstack/openstack_test.go index c61f6a9fcf3..fa8cfd14b36 100644 --- a/hypershift-operator/controllers/nodepool/openstack/openstack_test.go +++ b/hypershift-operator/controllers/nodepool/openstack/openstack_test.go @@ -14,7 +14,7 @@ import ( capiopenstackv1beta1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1" "github.com/google/go-cmp/cmp" - orc "github.com/k-orc/openstack-resource-controller/api/v1alpha1" + orc "github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1" ) const flavor = "m1.xlarge" @@ -423,7 +423,7 @@ func TestReconcileOpenStackImageSpec(t *testing.T) { CloudName: "test-cloud", }, Resource: &orc.ImageResourceSpec{ - Name: "test-cluster-rhcos-4.9.0", + Name: ptr.To(orc.OpenStackName("test-cluster-rhcos-4.9.0")), Content: &orc.ImageContent{ ContainerFormat: "bare", DiskFormat: "qcow2", @@ -498,7 +498,7 @@ func TestClusterImageName(t *testing.T) { name string hostedCluster *hyperv1.HostedCluster releaseImage *releaseinfo.ReleaseImage - expectedResult string + expectedResult orc.OpenStackName expectedError bool }{ { @@ -522,7 +522,7 @@ func TestClusterImageName(t *testing.T) { }, }, }, - expectedResult: "test-cluster-rhcos-4.19.0", + expectedResult: orc.OpenStackName("test-cluster-rhcos-4.19.0"), expectedError: false, }, { diff --git a/support/api/scheme.go b/support/api/scheme.go index e8bd573a1c9..2dcdf29e17d 100644 --- a/support/api/scheme.go +++ b/support/api/scheme.go @@ -62,7 +62,7 @@ import ( karpenterv1 "sigs.k8s.io/karpenter/pkg/apis/v1" secretsstorev1 "sigs.k8s.io/secrets-store-csi-driver/apis/v1" - orcv1alpha1 "github.com/k-orc/openstack-resource-controller/api/v1alpha1" + orcv1alpha1 "github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1" snapshotv1 "github.com/kubernetes-csi/external-snapshotter/client/v6/apis/volumesnapshot/v1" prometheusoperatorv1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1" kubevirtv1 "kubevirt.io/api/core/v1" diff --git a/vendor/github.com/k-orc/openstack-resource-controller/api/v1alpha1/zz_generated.deepcopy.go b/vendor/github.com/k-orc/openstack-resource-controller/api/v1alpha1/zz_generated.deepcopy.go deleted file mode 100644 index 3ae986c9c0a..00000000000 --- a/vendor/github.com/k-orc/openstack-resource-controller/api/v1alpha1/zz_generated.deepcopy.go +++ /dev/null @@ -1,469 +0,0 @@ -//go:build !ignore_autogenerated - -/* -Copyright 2024 The ORC Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by controller-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CloudCredentialsReference) DeepCopyInto(out *CloudCredentialsReference) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CloudCredentialsReference. -func (in *CloudCredentialsReference) DeepCopy() *CloudCredentialsReference { - if in == nil { - return nil - } - out := new(CloudCredentialsReference) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Image) DeepCopyInto(out *Image) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Image. -func (in *Image) DeepCopy() *Image { - if in == nil { - return nil - } - out := new(Image) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *Image) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ImageContent) DeepCopyInto(out *ImageContent) { - *out = *in - if in.Download != nil { - in, out := &in.Download, &out.Download - *out = new(ImageContentSourceDownload) - (*in).DeepCopyInto(*out) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageContent. -func (in *ImageContent) DeepCopy() *ImageContent { - if in == nil { - return nil - } - out := new(ImageContent) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ImageContentSourceDownload) DeepCopyInto(out *ImageContentSourceDownload) { - *out = *in - if in.Decompress != nil { - in, out := &in.Decompress, &out.Decompress - *out = new(ImageCompression) - **out = **in - } - if in.Hash != nil { - in, out := &in.Hash, &out.Hash - *out = new(ImageHash) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageContentSourceDownload. -func (in *ImageContentSourceDownload) DeepCopy() *ImageContentSourceDownload { - if in == nil { - return nil - } - out := new(ImageContentSourceDownload) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ImageFilter) DeepCopyInto(out *ImageFilter) { - *out = *in - if in.Name != nil { - in, out := &in.Name, &out.Name - *out = new(string) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageFilter. -func (in *ImageFilter) DeepCopy() *ImageFilter { - if in == nil { - return nil - } - out := new(ImageFilter) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ImageHash) DeepCopyInto(out *ImageHash) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageHash. -func (in *ImageHash) DeepCopy() *ImageHash { - if in == nil { - return nil - } - out := new(ImageHash) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ImageImport) DeepCopyInto(out *ImageImport) { - *out = *in - if in.ID != nil { - in, out := &in.ID, &out.ID - *out = new(string) - **out = **in - } - if in.Filter != nil { - in, out := &in.Filter, &out.Filter - *out = new(ImageFilter) - (*in).DeepCopyInto(*out) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageImport. -func (in *ImageImport) DeepCopy() *ImageImport { - if in == nil { - return nil - } - out := new(ImageImport) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ImageList) DeepCopyInto(out *ImageList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Image, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageList. -func (in *ImageList) DeepCopy() *ImageList { - if in == nil { - return nil - } - out := new(ImageList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ImageList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ImageProperties) DeepCopyInto(out *ImageProperties) { - *out = *in - if in.MinDiskGB != nil { - in, out := &in.MinDiskGB, &out.MinDiskGB - *out = new(int) - **out = **in - } - if in.MinMemoryMB != nil { - in, out := &in.MinMemoryMB, &out.MinMemoryMB - *out = new(int) - **out = **in - } - if in.Hardware != nil { - in, out := &in.Hardware, &out.Hardware - *out = new(ImagePropertiesHardware) - (*in).DeepCopyInto(*out) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageProperties. -func (in *ImageProperties) DeepCopy() *ImageProperties { - if in == nil { - return nil - } - out := new(ImageProperties) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ImagePropertiesHardware) DeepCopyInto(out *ImagePropertiesHardware) { - *out = *in - if in.CPUSockets != nil { - in, out := &in.CPUSockets, &out.CPUSockets - *out = new(int) - **out = **in - } - if in.CPUCores != nil { - in, out := &in.CPUCores, &out.CPUCores - *out = new(int) - **out = **in - } - if in.CPUThreads != nil { - in, out := &in.CPUThreads, &out.CPUThreads - *out = new(int) - **out = **in - } - if in.CPUPolicy != nil { - in, out := &in.CPUPolicy, &out.CPUPolicy - *out = new(string) - **out = **in - } - if in.CPUThreadPolicy != nil { - in, out := &in.CPUThreadPolicy, &out.CPUThreadPolicy - *out = new(string) - **out = **in - } - if in.CDROMBus != nil { - in, out := &in.CDROMBus, &out.CDROMBus - *out = new(ImageHWBus) - **out = **in - } - if in.DiskBus != nil { - in, out := &in.DiskBus, &out.DiskBus - *out = new(ImageHWBus) - **out = **in - } - if in.SCSIModel != nil { - in, out := &in.SCSIModel, &out.SCSIModel - *out = new(string) - **out = **in - } - if in.VIFModel != nil { - in, out := &in.VIFModel, &out.VIFModel - *out = new(string) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImagePropertiesHardware. -func (in *ImagePropertiesHardware) DeepCopy() *ImagePropertiesHardware { - if in == nil { - return nil - } - out := new(ImagePropertiesHardware) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ImageResourceSpec) DeepCopyInto(out *ImageResourceSpec) { - *out = *in - if in.Protected != nil { - in, out := &in.Protected, &out.Protected - *out = new(bool) - **out = **in - } - if in.Tags != nil { - in, out := &in.Tags, &out.Tags - *out = make([]ImageTag, len(*in)) - copy(*out, *in) - } - if in.Visibility != nil { - in, out := &in.Visibility, &out.Visibility - *out = new(ImageVisibility) - **out = **in - } - if in.Properties != nil { - in, out := &in.Properties, &out.Properties - *out = new(ImageProperties) - (*in).DeepCopyInto(*out) - } - if in.Content != nil { - in, out := &in.Content, &out.Content - *out = new(ImageContent) - (*in).DeepCopyInto(*out) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageResourceSpec. -func (in *ImageResourceSpec) DeepCopy() *ImageResourceSpec { - if in == nil { - return nil - } - out := new(ImageResourceSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ImageResourceStatus) DeepCopyInto(out *ImageResourceStatus) { - *out = *in - if in.Status != nil { - in, out := &in.Status, &out.Status - *out = new(string) - **out = **in - } - if in.Hash != nil { - in, out := &in.Hash, &out.Hash - *out = new(ImageHash) - **out = **in - } - if in.SizeB != nil { - in, out := &in.SizeB, &out.SizeB - *out = new(int64) - **out = **in - } - if in.VirtualSizeB != nil { - in, out := &in.VirtualSizeB, &out.VirtualSizeB - *out = new(int64) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageResourceStatus. -func (in *ImageResourceStatus) DeepCopy() *ImageResourceStatus { - if in == nil { - return nil - } - out := new(ImageResourceStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ImageSpec) DeepCopyInto(out *ImageSpec) { - *out = *in - if in.Import != nil { - in, out := &in.Import, &out.Import - *out = new(ImageImport) - (*in).DeepCopyInto(*out) - } - if in.Resource != nil { - in, out := &in.Resource, &out.Resource - *out = new(ImageResourceSpec) - (*in).DeepCopyInto(*out) - } - if in.ManagedOptions != nil { - in, out := &in.ManagedOptions, &out.ManagedOptions - *out = new(ManagedOptions) - **out = **in - } - out.CloudCredentialsRef = in.CloudCredentialsRef -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageSpec. -func (in *ImageSpec) DeepCopy() *ImageSpec { - if in == nil { - return nil - } - out := new(ImageSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ImageStatus) DeepCopyInto(out *ImageStatus) { - *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]v1.Condition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.ID != nil { - in, out := &in.ID, &out.ID - *out = new(string) - **out = **in - } - if in.Resource != nil { - in, out := &in.Resource, &out.Resource - *out = new(ImageResourceStatus) - (*in).DeepCopyInto(*out) - } - in.ImageStatusExtra.DeepCopyInto(&out.ImageStatusExtra) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageStatus. -func (in *ImageStatus) DeepCopy() *ImageStatus { - if in == nil { - return nil - } - out := new(ImageStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ImageStatusExtra) DeepCopyInto(out *ImageStatusExtra) { - *out = *in - if in.DownloadAttempts != nil { - in, out := &in.DownloadAttempts, &out.DownloadAttempts - *out = new(int) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageStatusExtra. -func (in *ImageStatusExtra) DeepCopy() *ImageStatusExtra { - if in == nil { - return nil - } - out := new(ImageStatusExtra) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ManagedOptions) DeepCopyInto(out *ManagedOptions) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagedOptions. -func (in *ManagedOptions) DeepCopy() *ManagedOptions { - if in == nil { - return nil - } - out := new(ManagedOptions) - in.DeepCopyInto(out) - return out -} diff --git a/vendor/github.com/k-orc/openstack-resource-controller/LICENSE b/vendor/github.com/k-orc/openstack-resource-controller/v2/LICENSE similarity index 99% rename from vendor/github.com/k-orc/openstack-resource-controller/LICENSE rename to vendor/github.com/k-orc/openstack-resource-controller/v2/LICENSE index 51f5e59645f..261eeb9e9f8 100644 --- a/vendor/github.com/k-orc/openstack-resource-controller/LICENSE +++ b/vendor/github.com/k-orc/openstack-resource-controller/v2/LICENSE @@ -192,7 +192,7 @@ you may not use this file except in compliance with the License. You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, diff --git a/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/common_types.go b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/common_types.go new file mode 100644 index 00000000000..4afeb5fbb9d --- /dev/null +++ b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/common_types.go @@ -0,0 +1,103 @@ +/* +Copyright 2024 The ORC Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +kubebuilder:validation:MinLength:=1 +// +kubebuilder:validation:MaxLength:=255 +type NeutronDescription string + +// NeutronTag represents a tag on a Neutron resource. +// It may not be empty and may not contain commas. +// +kubebuilder:validation:MinLength:=1 +// +kubebuilder:validation:MaxLength:=255 +type NeutronTag string + +type FilterByNeutronTags struct { + // tags is a list of tags to filter by. If specified, the resource must + // have all of the tags specified to be included in the result. + // +listType=set + // +optional + // +kubebuilder:validation:MaxItems:=64 + Tags []NeutronTag `json:"tags,omitempty"` + + // tagsAny is a list of tags to filter by. If specified, the resource + // must have at least one of the tags specified to be included in the + // result. + // +listType=set + // +optional + // +kubebuilder:validation:MaxItems:=64 + TagsAny []NeutronTag `json:"tagsAny,omitempty"` + + // notTags is a list of tags to filter by. If specified, resources which + // contain all of the given tags will be excluded from the result. + // +listType=set + // +optional + // +kubebuilder:validation:MaxItems:=64 + NotTags []NeutronTag `json:"notTags,omitempty"` + + // notTagsAny is a list of tags to filter by. If specified, resources + // which contain any of the given tags will be excluded from the result. + // +listType=set + // +optional + // +kubebuilder:validation:MaxItems:=64 + NotTagsAny []NeutronTag `json:"notTagsAny,omitempty"` +} + +// +kubebuilder:validation:Enum:=4;6 +type IPVersion int32 + +// +kubebuilder:validation:Format:=cidr +// +kubebuilder:validation:MinLength:=1 +// +kubebuilder:validation:MaxLength:=49 +type CIDR string + +// +kubebuilder:validation:MinLength:=1 +// +kubebuilder:validation:MaxLength:=45 +type IPvAny string + +// +kubebuilder:validation:MinLength:=1 +// +kubebuilder:validation:MaxLength:=17 +type MAC string + +// +kubebuilder:validation:MinLength:=1 +// +kubebuilder:validation:MaxLength:=255 +type AvailabilityZoneHint string + +type NeutronStatusMetadata struct { + // createdAt shows the date and time when the resource was created. The date and time stamp format is ISO 8601 + // +optional + CreatedAt *metav1.Time `json:"createdAt,omitempty"` + // updatedAt shows the date and time when the resource was updated. The date and time stamp format is ISO 8601 + // +optional + UpdatedAt *metav1.Time `json:"updatedAt,omitempty"` + + // revisionNumber optionally set via extensions/standard-attr-revisions + // +optional + RevisionNumber *int64 `json:"revisionNumber,omitempty"` +} + +// +kubebuilder:validation:MinLength:=1 +// +kubebuilder:validation:MaxLength:=253 +type KubernetesNameRef string + +// +kubebuilder:validation:MinLength:=1 +// +kubebuilder:validation:MaxLength:=64 +type KeystoneName string diff --git a/vendor/github.com/k-orc/openstack-resource-controller/api/v1alpha1/conditions.go b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/conditions.go similarity index 79% rename from vendor/github.com/k-orc/openstack-resource-controller/api/v1alpha1/conditions.go rename to vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/conditions.go index 83631732ea0..93dfe77121b 100644 --- a/vendor/github.com/k-orc/openstack-resource-controller/api/v1alpha1/conditions.go +++ b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/conditions.go @@ -1,5 +1,5 @@ /* -Copyright 2023 The Kubernetes Authors. +Copyright 2023 The ORC Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -31,34 +31,34 @@ const ( // Message. // Normal progress: continue waiting. - OpenStackConditionReasonProgressing = "Progressing" + ConditionReasonProgressing = "Progressing" // The user must fix the configuration before trying again. - OpenStackConditionReasonInvalidConfiguration = "InvalidConfiguration" + ConditionReasonInvalidConfiguration = "InvalidConfiguration" // An error occurred which we can't recover from. It must be addressed // before we can continue. - OpenStackConditionReasonUnrecoverableError = "UnrecoverableError" + ConditionReasonUnrecoverableError = "UnrecoverableError" // An error occurred which may go away eventually if we keep trying. The // user likely wants to know about this if it persists. - OpenStackConditionReasonTransientError = "TransientError" + ConditionReasonTransientError = "TransientError" // The resource is ready for use. - OpenStackConditionReasonSuccess = "Success" + ConditionReasonSuccess = "Success" ) const ( - OpenStackConditionAvailable = "Available" - OpenStackConditionProgressing = "Progressing" + ConditionAvailable = "Available" + ConditionProgressing = "Progressing" ) // IsConditionReasonTerminal returns true if the given reason represents an error which should prevent further reconciliation. func IsConditionReasonTerminal(reason string) bool { return slices.Contains( []string{ - OpenStackConditionReasonInvalidConfiguration, - OpenStackConditionReasonUnrecoverableError, + ConditionReasonInvalidConfiguration, + ConditionReasonUnrecoverableError, }, reason) } @@ -73,7 +73,7 @@ type ObjectWithConditions interface { // exists and is up to date. func getUpToDateProgressing(obj ObjectWithConditions) *metav1.Condition { conditions := obj.GetConditions() - progressing := meta.FindStatusCondition(conditions, OpenStackConditionProgressing) + progressing := meta.FindStatusCondition(conditions, ConditionProgressing) // Not complete if Progressing condition does not exist if progressing == nil { @@ -96,7 +96,7 @@ func IsReconciliationComplete(obj ObjectWithConditions) bool { } // Complete if we've either succeeded or failed terminally - return progressing.Reason == OpenStackConditionReasonSuccess || IsConditionReasonTerminal(progressing.Reason) + return progressing.Reason == ConditionReasonSuccess || IsConditionReasonTerminal(progressing.Reason) } // GetTerminalError returns an error containing a descriptive message if reconciliation has failed terminally, or nil otherwise. @@ -115,7 +115,7 @@ func GetTerminalError(obj ObjectWithConditions) error { func IsAvailable(obj ObjectWithConditions) bool { conditions := obj.GetConditions() - available := meta.FindStatusCondition(conditions, OpenStackConditionAvailable) + available := meta.FindStatusCondition(conditions, ConditionAvailable) return available != nil && available.Status == metav1.ConditionTrue } diff --git a/vendor/github.com/k-orc/openstack-resource-controller/api/v1alpha1/controller_options.go b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/controller_options.go similarity index 95% rename from vendor/github.com/k-orc/openstack-resource-controller/api/v1alpha1/controller_options.go rename to vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/controller_options.go index a950cbf3bc6..d0908b10ebc 100644 --- a/vendor/github.com/k-orc/openstack-resource-controller/api/v1alpha1/controller_options.go +++ b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/controller_options.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2024 The ORC Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -46,7 +46,7 @@ const ( ) type ManagedOptions struct { - // OnDelete specifies the behaviour of the controller when the ORC + // onDelete specifies the behaviour of the controller when the ORC // object is deleted. Options are `delete` - delete the OpenStack resource; // `detach` - do not delete the OpenStack resource. If not specified, the // default is `delete`. diff --git a/vendor/github.com/k-orc/openstack-resource-controller/api/v1alpha1/credentials_ref.go b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/credentials_ref.go similarity index 71% rename from vendor/github.com/k-orc/openstack-resource-controller/api/v1alpha1/credentials_ref.go rename to vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/credentials_ref.go index b007a63aef5..6d15e5d3042 100644 --- a/vendor/github.com/k-orc/openstack-resource-controller/api/v1alpha1/credentials_ref.go +++ b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/credentials_ref.go @@ -16,21 +16,28 @@ limitations under the License. package v1alpha1 +const ( + // CloudCredentialsConfigSecretKey is the key for the clouds configuration in the cloud credentials secret. + CloudCredentialsConfigSecretKey = "clouds.yaml" + // CloudCredencialsCASecretKey is the key for the CA certificate in the cloud credentials secret. + CloudCredencialsCASecretKey = "cacert" +) + // CloudCredentialsReference is a reference to a secret containing OpenStack credentials. type CloudCredentialsReference struct { - // SecretName is the name of a secret in the same namespace as the resource being provisioned. + // secretName is the name of a secret in the same namespace as the resource being provisioned. // The secret must contain a key named `clouds.yaml` which contains an OpenStack clouds.yaml file. // The secret may optionally contain a key named `cacert` containing a PEM-encoded CA certificate. - // +kubebuilder:validation:Required + // +required // +kubebuilder:validation:MinLength:=1 // +kubebuilder:validation:MaxLength:=253 - SecretName string `json:"secretName"` + SecretName string `json:"secretName,omitempty"` - // CloudName specifies the name of the entry in the clouds.yaml file to use. - // +kubebuilder:validation:Required + // cloudName specifies the name of the entry in the clouds.yaml file to use. + // +required // +kubebuilder:validation:MinLength:=1 // +kubebuilder:validation:MaxLength:=256 - CloudName string `json:"cloudName"` + CloudName string `json:"cloudName,omitempty"` } // CloudCredentialsRefProvider is an interface for obtaining OpenStack credentials from an API object diff --git a/vendor/github.com/k-orc/openstack-resource-controller/api/v1alpha1/doc.go b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/doc.go similarity index 100% rename from vendor/github.com/k-orc/openstack-resource-controller/api/v1alpha1/doc.go rename to vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/doc.go diff --git a/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/domain_types.go b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/domain_types.go new file mode 100644 index 00000000000..e3e5dd8d774 --- /dev/null +++ b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/domain_types.go @@ -0,0 +1,67 @@ +/* +Copyright 2025 The ORC Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +// DomainResourceSpec contains the desired state of the resource. +type DomainResourceSpec struct { + // name will be the name of the created resource. If not specified, the + // name of the ORC object will be used. + // +optional + Name *KeystoneName `json:"name,omitempty"` + + // description is a human-readable description for the resource. + // +kubebuilder:validation:MinLength:=1 + // +kubebuilder:validation:MaxLength:=255 + // +optional + Description *string `json:"description,omitempty"` + + // enabled defines whether a domain is enabled or not. Default is true. + // Note: Users can only authorize against an enabled domain (and any of its projects). + // +optional + Enabled *bool `json:"enabled,omitempty"` +} + +// DomainFilter defines an existing resource by its properties +// +kubebuilder:validation:MinProperties:=1 +type DomainFilter struct { + // name of the existing resource + // +optional + Name *KeystoneName `json:"name,omitempty"` + + // enabled defines whether a domain is enabled or not. Default is true. + // Note: Users can only authorize against an enabled domain (and any of its projects). + // +optional + Enabled *bool `json:"enabled,omitempty"` +} + +// DomainResourceStatus represents the observed state of the resource. +type DomainResourceStatus struct { + // name is a Human-readable name for the resource. Might not be unique. + // +kubebuilder:validation:MaxLength=1024 + // +optional + Name string `json:"name,omitempty"` + + // description is a human-readable description for the resource. + // +kubebuilder:validation:MaxLength=1024 + // +optional + Description string `json:"description,omitempty"` + + // enabled defines whether a domain is enabled or not. Default is true. + // Note: Users can only authorize against an enabled domain (and any of its projects). + // +optional + Enabled *bool `json:"enabled,omitempty"` +} diff --git a/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/flavor_types.go b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/flavor_types.go new file mode 100644 index 00000000000..991133619c0 --- /dev/null +++ b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/flavor_types.go @@ -0,0 +1,133 @@ +/* +Copyright 2024 The ORC Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +// FlavorResourceSpec contains the desired state of a flavor +// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="FlavorResourceSpec is immutable" +type FlavorResourceSpec struct { + // name will be the name of the created resource. If not specified, the + // name of the ORC object will be used. + // +optional + Name *OpenStackName `json:"name,omitempty"` + + // description contains a free form description of the flavor. + // +kubebuilder:validation:MinLength:=1 + // +kubebuilder:validation:MaxLength:=65535 + // +optional + Description *string `json:"description,omitempty"` + + // ram is the memory of the flavor, measured in MB. + // +kubebuilder:validation:Minimum=1 + // +required + RAM int32 `json:"ram,omitempty"` + + // vcpus is the number of vcpus for the flavor. + // +kubebuilder:validation:Minimum=1 + // +required + Vcpus int32 `json:"vcpus,omitempty"` + + // disk is the size of the root disk that will be created in GiB. If 0 + // the root disk will be set to exactly the size of the image used to + // deploy the instance. However, in this case the scheduler cannot + // select the compute host based on the virtual image size. Therefore, + // 0 should only be used for volume booted instances or for testing + // purposes. Volume-backed instances can be enforced for flavors with + // zero root disk via the + // os_compute_api:servers:create:zero_disk_flavor policy rule. + // +kubebuilder:validation:Minimum=0 + // +required + Disk int32 `json:"disk"` + + // swap is the size of a dedicated swap disk that will be allocated, in + // MiB. If 0 (the default), no dedicated swap disk will be created. + // +kubebuilder:validation:Minimum=0 + // +optional + Swap int32 `json:"swap,omitempty"` + + // isPublic flags a flavor as being available to all projects or not. + // +optional + IsPublic *bool `json:"isPublic,omitempty"` + + // ephemeral is the size of the ephemeral disk that will be created, in GiB. + // Ephemeral disks may be written over on server state changes. So should only + // be used as a scratch space for applications that are aware of its + // limitations. Defaults to 0. + // +kubebuilder:validation:Minimum=0 + // +optional + Ephemeral int32 `json:"ephemeral,omitempty"` +} + +// FlavorFilter defines an existing resource by its properties +// +kubebuilder:validation:MinProperties:=1 +type FlavorFilter struct { + // name of the existing resource + // +optional + Name *OpenStackName `json:"name,omitempty"` + + // ram is the memory of the flavor, measured in MB. + // +kubebuilder:validation:Minimum=1 + // +optional + RAM *int32 `json:"ram,omitempty"` + + // vcpus is the number of vcpus for the flavor. + // +kubebuilder:validation:Minimum=1 + // +optional + Vcpus *int32 `json:"vcpus,omitempty"` + + // disk is the size of the root disk in GiB. + // +kubebuilder:validation:Minimum=0 + // +optional + Disk *int32 `json:"disk,omitempty"` +} + +// FlavorResourceStatus represents the observed state of the resource. +type FlavorResourceStatus struct { + // name is a Human-readable name for the flavor. Might not be unique. + // +kubebuilder:validation:MaxLength=1024 + // +optional + Name string `json:"name,omitempty"` + + // description is a human-readable description for the resource. + // +kubebuilder:validation:MaxLength:=65535 + // +optional + Description string `json:"description,omitempty"` + + // ram is the memory of the flavor, measured in MB. + // +optional + RAM *int32 `json:"ram,omitempty"` + + // vcpus is the number of vcpus for the flavor. + // +optional + Vcpus *int32 `json:"vcpus,omitempty"` + + // disk is the size of the root disk that will be created in GiB. + // +optional + Disk *int32 `json:"disk,omitempty"` + + // swap is the size of a dedicated swap disk that will be allocated, in + // MiB. + // +optional + Swap *int32 `json:"swap,omitempty"` + + // isPublic flags a flavor as being available to all projects or not. + // +optional + IsPublic *bool `json:"isPublic,omitempty"` + + // ephemeral is the size of the ephemeral disk, in GiB. + // +optional + Ephemeral *int32 `json:"ephemeral,omitempty"` +} diff --git a/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/floatingip_types.go b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/floatingip_types.go new file mode 100644 index 00000000000..fd2739abaca --- /dev/null +++ b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/floatingip_types.go @@ -0,0 +1,151 @@ +/* +Copyright 2024 The ORC Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +// FloatingIPFilter specifies a query to select an OpenStack floatingip. At least one property must be set. +// +kubebuilder:validation:MinProperties:=1 +type FloatingIPFilter struct { + // floatingIP is the floatingip address. + // +optional + FloatingIP *IPvAny `json:"floatingIP,omitempty"` + + // description of the existing resource + // +optional + Description *NeutronDescription `json:"description,omitempty"` + + // floatingNetworkRef is a reference to the ORC Network which this resource is associated with. + // +optional + FloatingNetworkRef *KubernetesNameRef `json:"floatingNetworkRef,omitempty"` + + // portRef is a reference to the ORC Port which this resource is associated with. + // +optional + PortRef *KubernetesNameRef `json:"portRef,omitempty"` + + // projectRef is a reference to the ORC Project this resource is associated with. + // Typically, only used by admin. + // +optional + ProjectRef *KubernetesNameRef `json:"projectRef,omitempty"` + + // status is the status of the floatingip. + // +kubebuilder:validation:MaxLength=1024 + // +optional + Status string `json:"status,omitempty"` + + FilterByNeutronTags `json:",inline"` +} + +// FloatingIPResourceSpec contains the desired state of a floating IP +// +kubebuilder:validation:XValidation:rule="has(self.floatingNetworkRef) != has(self.floatingSubnetRef)",message="Exactly one of 'floatingNetworkRef' or 'floatingSubnetRef' must be set" +type FloatingIPResourceSpec struct { + // description is a human-readable description for the resource. + // +optional + Description *NeutronDescription `json:"description,omitempty"` + + // tags is a list of tags which will be applied to the floatingip. + // +kubebuilder:validation:MaxItems:=64 + // +listType=set + // +optional + Tags []NeutronTag `json:"tags,omitempty"` + + // floatingNetworkRef references the network to which the floatingip is associated. + // +optional + // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="floatingNetworkRef is immutable" + FloatingNetworkRef *KubernetesNameRef `json:"floatingNetworkRef,omitempty"` + + // floatingSubnetRef references the subnet to which the floatingip is associated. + // +optional + // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="floatingSubnetRef is immutable" + FloatingSubnetRef *KubernetesNameRef `json:"floatingSubnetRef,omitempty"` + + // floatingIP is the IP that will be assigned to the floatingip. If not set, it will + // be assigned automatically. + // +optional + // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="floatingIP is immutable" + FloatingIP *IPvAny `json:"floatingIP,omitempty"` + + // portRef is a reference to the ORC Port which this resource is associated with. + // +optional + // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="portRef is immutable" + PortRef *KubernetesNameRef `json:"portRef,omitempty"` + + // fixedIP is the IP address of the port to which the floatingip is associated. + // +optional + // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="fixedIP is immutable" + FixedIP *IPvAny `json:"fixedIP,omitempty"` + + // projectRef is a reference to the ORC Project this resource is associated with. + // Typically, only used by admin. + // +optional + // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="projectRef is immutable" + ProjectRef *KubernetesNameRef `json:"projectRef,omitempty"` +} + +type FloatingIPResourceStatus struct { + // description is a human-readable description for the resource. + // +kubebuilder:validation:MaxLength=1024 + // +optional + Description string `json:"description,omitempty"` + + // floatingNetworkID is the ID of the network to which the floatingip is associated. + // +kubebuilder:validation:MaxLength=1024 + // +optional + FloatingNetworkID string `json:"floatingNetworkID,omitempty"` + + // floatingIP is the IP address of the floatingip. + // +kubebuilder:validation:MaxLength=1024 + // +optional + FloatingIP string `json:"floatingIP,omitempty"` + + // portID is the ID of the port to which the floatingip is associated. + // +kubebuilder:validation:MaxLength=1024 + // +optional + PortID string `json:"portID,omitempty"` + + // fixedIP is the IP address of the port to which the floatingip is associated. + // +kubebuilder:validation:MaxLength=1024 + // +optional + FixedIP string `json:"fixedIP,omitempty"` + + // tenantID is the project owner of the resource. + // +kubebuilder:validation:MaxLength=1024 + // +optional + TenantID string `json:"tenantID,omitempty"` + + // projectID is the project owner of the resource. + // +kubebuilder:validation:MaxLength=1024 + // +optional + ProjectID string `json:"projectID,omitempty"` + + // status indicates the current status of the resource. + // +kubebuilder:validation:MaxLength=1024 + // +optional + Status string `json:"status,omitempty"` + + // routerID is the ID of the router to which the floatingip is associated. + // +kubebuilder:validation:MaxLength=1024 + // +optional + RouterID string `json:"routerID,omitempty"` + + // tags is the list of tags on the resource. + // +kubebuilder:validation:MaxItems:=64 + // +kubebuilder:validation:items:MaxLength=1024 + // +listType=atomic + // +optional + Tags []string `json:"tags,omitempty"` + + NeutronStatusMetadata `json:",inline"` +} diff --git a/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/group_types.go b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/group_types.go new file mode 100644 index 00000000000..f3719f5ae24 --- /dev/null +++ b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/group_types.go @@ -0,0 +1,66 @@ +/* +Copyright 2025 The ORC Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +// GroupResourceSpec contains the desired state of the resource. +type GroupResourceSpec struct { + // name will be the name of the created resource. If not specified, the + // name of the ORC object will be used. + // +optional + Name *KeystoneName `json:"name,omitempty"` + + // description is a human-readable description for the resource. + // +kubebuilder:validation:MinLength:=1 + // +kubebuilder:validation:MaxLength:=255 + // +optional + Description *string `json:"description,omitempty"` + + // domainRef is a reference to the ORC Domain which this resource is associated with. + // +optional + // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="domainRef is immutable" + DomainRef *KubernetesNameRef `json:"domainRef,omitempty"` +} + +// GroupFilter defines an existing resource by its properties +// +kubebuilder:validation:MinProperties:=1 +type GroupFilter struct { + // name of the existing resource + // +optional + Name *KeystoneName `json:"name,omitempty"` + + // domainRef is a reference to the ORC Domain which this resource is associated with. + // +optional + DomainRef *KubernetesNameRef `json:"domainRef,omitempty"` +} + +// GroupResourceStatus represents the observed state of the resource. +type GroupResourceStatus struct { + // name is a Human-readable name for the resource. Might not be unique. + // +kubebuilder:validation:MaxLength=1024 + // +optional + Name string `json:"name,omitempty"` + + // description is a human-readable description for the resource. + // +kubebuilder:validation:MaxLength=1024 + // +optional + Description string `json:"description,omitempty"` + + // domainID is the ID of the Domain to which the resource is associated. + // +kubebuilder:validation:MaxLength=1024 + // +optional + DomainID string `json:"domainID,omitempty"` +} diff --git a/vendor/github.com/k-orc/openstack-resource-controller/api/v1alpha1/groupversion_info.go b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/groupversion_info.go similarity index 94% rename from vendor/github.com/k-orc/openstack-resource-controller/api/v1alpha1/groupversion_info.go rename to vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/groupversion_info.go index 7ce3f2ad99b..4bba99d498f 100644 --- a/vendor/github.com/k-orc/openstack-resource-controller/api/v1alpha1/groupversion_info.go +++ b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/groupversion_info.go @@ -14,7 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Package v1alpha1 contains API Schema definitions for the openstack v1alpha1 API group // +kubebuilder:object:generate=true // +groupName=openstack.k-orc.cloud // +k8s:openapi-gen=true diff --git a/vendor/github.com/k-orc/openstack-resource-controller/api/v1alpha1/image_types.go b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/image_types.go similarity index 60% rename from vendor/github.com/k-orc/openstack-resource-controller/api/v1alpha1/image_types.go rename to vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/image_types.go index e5702961379..b05992d783f 100644 --- a/vendor/github.com/k-orc/openstack-resource-controller/api/v1alpha1/image_types.go +++ b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/image_types.go @@ -1,5 +1,5 @@ /* -Copyright 2024 The Kubernetes Authors. +Copyright 2024 The ORC Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -23,17 +23,18 @@ const GlanceTag = "glance" // +kubebuilder:validation:MaxLength:=255 type ImageTag string -// +kubebuilder:validation:Enum:=ami;ari;aki;bare;ovf;ova;docker +// +kubebuilder:validation:Enum:=ami;ari;aki;bare;ovf;ova;docker;compressed type ImageContainerFormat string const ( - ImageContainerFormatAKI ImageContainerFormat = "aki" - ImageContainerFormatAMI ImageContainerFormat = "ami" - ImageContainerFormatARI ImageContainerFormat = "ari" - ImageContainerFormatBare ImageContainerFormat = "bare" - ImageContainerFormatDocker ImageContainerFormat = "docker" - ImageContainerFormatOVA ImageContainerFormat = "ova" - ImageContainerFormatOVF ImageContainerFormat = "ovf" + ImageContainerFormatAKI ImageContainerFormat = "aki" + ImageContainerFormatAMI ImageContainerFormat = "ami" + ImageContainerFormatARI ImageContainerFormat = "ari" + ImageContainerFormatBare ImageContainerFormat = "bare" + ImageContainerFormatCompressed ImageContainerFormat = "compressed" + ImageContainerFormatDocker ImageContainerFormat = "docker" + ImageContainerFormatOVA ImageContainerFormat = "ova" + ImageContainerFormatOVF ImageContainerFormat = "ovf" ) // +kubebuilder:validation:Enum:=ami;ari;aki;vhd;vhdx;vmdk;raw;qcow2;vdi;ploop;iso @@ -86,19 +87,22 @@ const ( type ImageHWBus string type ImagePropertiesHardware struct { - // CPUSockets is the preferred number of sockets to expose to the guest + // cpuSockets is the preferred number of sockets to expose to the guest + // +kubebuilder:validation:Minimum:=1 // +optional - CPUSockets *int `json:"cpuSockets,omitempty" glance:"hw_cpu_sockets"` + CPUSockets *int32 `json:"cpuSockets,omitempty" glance:"hw_cpu_sockets"` - // CPUCores is the preferred number of cores to expose to the guest + // cpuCores is the preferred number of cores to expose to the guest + // +kubebuilder:validation:Minimum:=1 // +optional - CPUCores *int `json:"cpuCores,omitempty" glance:"hw_cpu_cores"` + CPUCores *int32 `json:"cpuCores,omitempty" glance:"hw_cpu_cores"` - // CPUThreads is the preferred number of threads to expose to the guest + // cpuThreads is the preferred number of threads to expose to the guest + // +kubebuilder:validation:Minimum:=1 // +optional - CPUThreads *int `json:"cpuThreads,omitempty" glance:"hw_cpu_threads"` + CPUThreads *int32 `json:"cpuThreads,omitempty" glance:"hw_cpu_threads"` - // CPUPolicy is used to pin the virtual CPUs (vCPUs) of instances to the + // cpuPolicy is used to pin the virtual CPUs (vCPUs) of instances to the // host's physical CPU cores (pCPUs). Host aggregates should be used to // separate these pinned instances from unpinned instances as the latter // will not respect the resourcing requirements of the former. @@ -121,7 +125,7 @@ type ImagePropertiesHardware struct { // +optional CPUPolicy *string `json:"cpuPolicy,omitempty" glance:"hw_cpu_policy"` - // CPUThreadPolicy further refines a CPUPolicy of 'dedicated' by stating + // cpuThreadPolicy further refines a CPUPolicy of 'dedicated' by stating // how hardware CPU threads in a simultaneous multithreading-based (SMT) // architecture be used. SMT-based architectures include Intel // processors with Hyper-Threading technology. In these architectures, @@ -153,18 +157,18 @@ type ImagePropertiesHardware struct { // +optional CPUThreadPolicy *string `json:"cpuThreadPolicy,omitempty" glance:"hw_cpu_thread_policy"` - // CDROMBus specifies the type of disk controller to attach CD-ROM devices to. + // cdromBus specifies the type of disk controller to attach CD-ROM devices to. // +optional CDROMBus *ImageHWBus `json:"cdromBus,omitempty" glance:"hw_cdrom_bus"` - // DiskBus specifies the type of disk controller to attach disk devices to. + // diskBus specifies the type of disk controller to attach disk devices to. // +optional DiskBus *ImageHWBus `json:"diskBus,omitempty" glance:"hw_disk_bus"` // TODO: hw_machine_type seems important to support early, but how to // select a supported set? - // SCSIModel enables the use of VirtIO SCSI (virtio-scsi) to provide + // scsiModel enables the use of VirtIO SCSI (virtio-scsi) to provide // block device access for compute instances; by default, instances use // VirtIO Block (virtio-blk). VirtIO SCSI is a para-virtualized SCSI // controller device that provides improved scalability and performance, @@ -175,30 +179,67 @@ type ImagePropertiesHardware struct { // +optional SCSIModel *string `json:"scsiModel,omitempty" glance:"hw_scsi_model"` - // VIFModel specifies the model of virtual network interface device to use. + // vifModel specifies the model of virtual network interface device to use. // // Permitted values are e1000, e1000e, ne2k_pci, pcnet, rtl8139, virtio, // and vmxnet3. // +kubebuilder:validation:Enum:=e1000;e1000e;ne2k_pci;pcnet;rtl8139;virtio;vmxnet3 // +optional VIFModel *string `json:"vifModel,omitempty" glance:"hw_vif_model"` + + // rngModel adds a random-number generator device to the image’s instances. + // This image property by itself does not guarantee that a hardware RNG will be used; + // it expresses a preference that may or may not be satisfied depending upon Nova configuration. + // +kubebuilder:validation:MaxLength:=255 + // +optional + RngModel *string `json:"rngModel,omitempty" glance:"hw_rng_model"` + + // qemuGuestAgent enables QEMU guest agent. + // +optional + QemuGuestAgent *bool `json:"qemuGuestAgent,omitempty" glance:"hw_qemu_guest_agent"` +} + +type ImagePropertiesOperatingSystem struct { + // distro is the common name of the operating system distribution in lowercase. + // +kubebuilder:validation:Enum:=arch;centos;debian;fedora;freebsd;gentoo;mandrake;mandriva;mes;msdos;netbsd;netware;openbsd;opensolaris;opensuse;rocky;rhel;sled;ubuntu;windows + // +optional + Distro *string `json:"distro,omitempty" glance:"os_distro"` + // version is the operating system version as specified by the distributor. + // +kubebuilder:validation:MaxLength:=255 + // +optional + Version *string `json:"version,omitempty" glance:"os_version"` } type ImageProperties struct { - // MinDisk is the minimum amount of disk space in GB that is required to boot the image + // architecture is the CPU architecture that must be supported by the hypervisor. + // +kubebuilder:validation:Enum:=aarch64;alpha;armv7l;cris;i686;ia64;lm32;m68k;microblaze;microblazeel;mips;mipsel;mips64;mips64el;openrisc;parisc;parisc64;ppc;ppc64;ppcemb;s390;s390x;sh4;sh4eb;sparc;sparc64;unicore32;x86_64;xtensa;xtensaeb + // +optional + Architecture *string `json:"architecture,omitempty" glance:"architecture"` + + // hypervisorType is the hypervisor type + // +kubebuilder:validation:Enum:=hyperv;ironic;lxc;qemu;uml;vmware;xen + // +optional + HypervisorType *string `json:"hypervisorType,omitempty" glance:"hypervisor_type"` + + // minDiskGB is the minimum amount of disk space in GB that is required to boot the image // +kubebuilder:validation:Minimum:=1 // +optional - MinDiskGB *int `json:"minDiskGB,omitempty"` + MinDiskGB *int32 `json:"minDiskGB,omitempty"` - // MinMemoryMB is the minimum amount of RAM in MB that is required to boot the image. + // minMemoryMB is the minimum amount of RAM in MB that is required to boot the image. // +kubebuilder:validation:Minimum:=1 // +optional - MinMemoryMB *int `json:"minMemoryMB,omitempty"` + MinMemoryMB *int32 `json:"minMemoryMB,omitempty"` - // Hardware is a set of properties which control the virtual hardware + // hardware is a set of properties which control the virtual hardware // created by Nova. // +optional Hardware *ImagePropertiesHardware `json:"hardware,omitempty"` + + // operatingSystem is a set of properties that specify and influence the behavior + // of the operating system within the virtual machine. + // +optional + OperatingSystem *ImagePropertiesOperatingSystem `json:"operatingSystem,omitempty"` } // +kubebuilder:validation:Enum:=xz;gz;bz2 @@ -211,38 +252,40 @@ const ( ) type ImageContent struct { - // ContainerFormat is the format of the image container. + // containerFormat is the format of the image container. // qcow2 and raw images do not usually have a container. This is specified as "bare", which is also the default. - // Permitted values are ami, ari, aki, bare, ovf, ova, and docker. + // Permitted values are ami, ari, aki, bare, compressed, ovf, ova, and docker. // +kubebuilder:default:=bare // +optional ContainerFormat ImageContainerFormat `json:"containerFormat,omitempty"` - // DiskFormat is the format of the disk image. + // diskFormat is the format of the disk image. // Normal values are "qcow2", or "raw". Glance may be configured to support others. - // +kubebuilder:validation:Required - DiskFormat ImageDiskFormat `json:"diskFormat"` + // +required + DiskFormat ImageDiskFormat `json:"diskFormat,omitempty"` - // Download describes how to obtain image data by downloading it from a URL. + // download describes how to obtain image data by downloading it from a URL. // Must be set when creating a managed image. - // +kubebuilder:validation:Required - Download *ImageContentSourceDownload `json:"download,omitempty"` + // +required + //nolint:kubeapilinter + Download *ImageContentSourceDownload `json:"download"` } type ImageContentSourceDownload struct { - // URL containing image data + // url containing image data // +kubebuilder:validation:Format=uri - // +kubebuilder:validation:Required + // +kubebuilder:validation:MaxLength=2048 + // +required URL string `json:"url"` - // Decompress specifies that the source data must be decompressed with the + // decompress specifies that the source data must be decompressed with the // given compression algorithm before being stored. Specifying Decompress // will disable the use of Glance's web-download, as web-download cannot // currently deterministically decompress downloaded content. // +optional Decompress *ImageCompression `json:"decompress,omitempty"` - // Hash is a hash which will be used to verify downloaded data, i.e. + // hash is a hash which will be used to verify downloaded data, i.e. // before any decompression. If not specified, no hash verification will be // performed. Specifying a Hash will disable the use of Glance's // web-download, as web-download cannot currently deterministically verify @@ -253,52 +296,46 @@ type ImageContentSourceDownload struct { } type ImageHash struct { - // Algorithm is the hash algorithm used to generate value. - // +kubebuilder:validation:Required - Algorithm ImageHashAlgorithm `json:"algorithm"` + // algorithm is the hash algorithm used to generate value. + // +required + Algorithm ImageHashAlgorithm `json:"algorithm,omitempty"` - // Value is the hash of the image data using Algorithm. It must be hex encoded using lowercase letters. + // value is the hash of the image data using Algorithm. It must be hex encoded using lowercase letters. // +kubebuilder:validation:MinLength:=1 // +kubebuilder:validation:MaxLength:=1024 // +kubebuilder:validation:Pattern:=`^[0-9a-f]+$` - // +kubebuilder:validation:Required - Value string `json:"value"` + // +required + Value string `json:"value,omitempty"` } // ImageResourceSpec contains the desired state of a Glance image -// +kubebuilder:validation:XValidation:rule="has(self.name) ? self.name == oldSelf.name : !has(oldSelf.name)",message="name is immutable" -// +kubebuilder:validation:XValidation:rule="has(self.protected) ? self.protected == oldSelf.protected : !has(oldSelf.protected)",message="name is immutable" -// +kubebuilder:validation:XValidation:rule="has(self.tags) ? self.tags == oldSelf.tags : !has(oldSelf.tags)",message="tags is immutable" -// +kubebuilder:validation:XValidation:rule="has(self.visibility) ? self.visibility == oldSelf.visibility : !has(oldSelf.visibility)",message="visibility is immutable" -// +kubebuilder:validation:XValidation:rule="has(self.properties) ? self.properties == oldSelf.properties : !has(oldSelf.properties)",message="properties is immutable" type ImageResourceSpec struct { - // Name will be the name of the created Glance image. If not specified, the + // name will be the name of the created Glance image. If not specified, the // name of the Image object will be used. - // +kubebuilder:validation:MinLength:=1 - // +kubebuilder:validation:MaxLength:=1000 // +optional - Name string `json:"name,omitempty"` + Name *OpenStackName `json:"name,omitempty"` - // Protected specifies that the image is protected from deletion. + // protected specifies that the image is protected from deletion. // If not specified, the default is false. // +optional Protected *bool `json:"protected,omitempty"` - // Tags is a list of tags which will be applied to the image. A tag has a maximum length of 255 characters. + // tags is a list of tags which will be applied to the image. A tag has a maximum length of 255 characters. + // +kubebuilder:validation:MaxItems:=64 // +listType=set // +optional Tags []ImageTag `json:"tags,omitempty"` - // Visibility of the image - // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="visibility is immutable" + // visibility of the image // +optional Visibility *ImageVisibility `json:"visibility,omitempty"` - // Properties is metadata available to consumers of the image + // properties is metadata available to consumers of the image + // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="properties is immutable" // +optional Properties *ImageProperties `json:"properties,omitempty"` - // Content specifies how to obtain the image content. + // content specifies how to obtain the image content. // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="content is immutable" // +optional Content *ImageContent `json:"content,omitempty"` @@ -307,20 +344,43 @@ type ImageResourceSpec struct { // ImageFilter defines a Glance query // +kubebuilder:validation:MinProperties:=1 type ImageFilter struct { - // Name specifies the name of a Glance image + // name specifies the name of a Glance image // +optional - // +kubebuilder:validation:MinLength:=1 - // +kubebuilder:validation:MaxLength:=1000 - Name *string `json:"name,omitempty"` + Name *OpenStackName `json:"name,omitempty"` + + // visibility specifies the visibility of a Glance image. + // +optional + Visibility *ImageVisibility `json:"visibility,omitempty"` + + // tags is the list of tags on the resource. + // +kubebuilder:validation:MaxItems:=64 + // +listType=set + // +optional + Tags []ImageTag `json:"tags,omitempty"` } // ImageResourceStatus represents the observed state of a Glance image type ImageResourceStatus struct { - // Status is the image status as reported by Glance + // name is a Human-readable name for the image. Might not be unique. + // +kubebuilder:validation:MaxLength=1024 // +optional - Status *string `json:"status,omitempty"` + Name string `json:"name,omitempty"` + + // status is the image status as reported by Glance + // +kubebuilder:validation:MaxLength=1024 + // +optional + Status string `json:"status,omitempty"` + + // protected specifies that the image is protected from deletion. + // +optional + Protected bool `json:"protected,omitempty"` - // Hash is the hash of the image data published by Glance. Note that this is + // visibility of the image + // +kubebuilder:validation:MaxLength=1024 + // +optional + Visibility string `json:"visibility,omitempty"` + + // hash is the hash of the image data published by Glance. Note that this is // a hash of the data stored internally by Glance, which will have been // decompressed and potentially format converted depending on server-side // configuration which is not visible to clients. It is expected that this @@ -328,17 +388,24 @@ type ImageResourceStatus struct { // +optional Hash *ImageHash `json:"hash,omitempty"` - // SizeB is the size of the image data, in bytes + // sizeB is the size of the image data, in bytes // +optional SizeB *int64 `json:"sizeB,omitempty"` - // VirtualSizeB is the size of the disk the image data represents, in bytes + // virtualSizeB is the size of the disk the image data represents, in bytes // +optional VirtualSizeB *int64 `json:"virtualSizeB,omitempty"` + + // tags is the list of tags on the resource. + // +kubebuilder:validation:MaxItems:=64 + // +kubebuilder:validation:items:MaxLength=1024 + // +listType=atomic + // +optional + Tags []string `json:"tags,omitempty"` } type ImageStatusExtra struct { - // DownloadAttempts is the number of times the controller has attempted to download the image contents + // downloadAttempts is the number of times the controller has attempted to download the image contents // +optional - DownloadAttempts *int `json:"downloadAttempts,omitempty"` + DownloadAttempts *int32 `json:"downloadAttempts,omitempty"` } diff --git a/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/keypair_types.go b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/keypair_types.go new file mode 100644 index 00000000000..a1a04e8586d --- /dev/null +++ b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/keypair_types.go @@ -0,0 +1,68 @@ +/* +Copyright 2025 The ORC Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +// KeyPairResourceSpec contains the desired state of the resource. +type KeyPairResourceSpec struct { + // name will be the name of the created resource. If not specified, the + // name of the ORC object will be used. + // +optional + Name *OpenStackName `json:"name,omitempty"` + + // type specifies the type of the Keypair. Allowed values are ssh or x509. + // If not specified, defaults to ssh. + // +kubebuilder:validation:Enum=ssh;x509 + // +optional + Type *string `json:"type,omitempty"` + + // publicKey is the public key to import. + // +kubebuilder:validation:MinLength=1 + // +kubebuilder:validation:MaxLength=16384 + // +required + PublicKey string `json:"publicKey,omitempty"` +} + +// KeyPairFilter defines an existing resource by its properties +// +kubebuilder:validation:MinProperties:=1 +type KeyPairFilter struct { + // name of the existing Keypair + // +optional + Name *OpenStackName `json:"name,omitempty"` +} + +// KeyPairResourceStatus represents the observed state of the resource. +type KeyPairResourceStatus struct { + // name is a Human-readable name for the resource. Might not be unique. + // +kubebuilder:validation:MaxLength=1024 + // +optional + Name string `json:"name,omitempty"` + + // fingerprint is the fingerprint of the public key + // +kubebuilder:validation:MaxLength=1024 + // +optional + Fingerprint string `json:"fingerprint,omitempty"` + + // publicKey is the public key of the Keypair + // +kubebuilder:validation:MaxLength=16384 + // +optional + PublicKey string `json:"publicKey,omitempty"` + + // type is the type of the Keypair (ssh or x509) + // +kubebuilder:validation:MaxLength=64 + // +optional + Type string `json:"type,omitempty"` +} diff --git a/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/network_types.go b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/network_types.go new file mode 100644 index 00000000000..18abf1e4ea7 --- /dev/null +++ b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/network_types.go @@ -0,0 +1,232 @@ +/* +Copyright 2024 The ORC Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +type ProviderPropertiesStatus struct { + // networkType is the type of physical network that this + // network should be mapped to. Supported values are flat, vlan, vxlan, and gre. + // Valid values depend on the networking back-end. + // +kubebuilder:validation:MaxLength=1024 + // +optional + NetworkType string `json:"networkType,omitempty"` + + // physicalNetwork is the physical network where this network + // should be implemented. The Networking API v2.0 does not provide a + // way to list available physical networks. For example, the Open + // vSwitch plug-in configuration file defines a symbolic name that maps + // to specific bridges on each compute host. + // +kubebuilder:validation:MaxLength=1024 + // +optional + PhysicalNetwork string `json:"physicalNetwork,omitempty"` + + // segmentationID is the ID of the isolated segment on the + // physical network. The network_type attribute defines the + // segmentation model. For example, if the network_type value is vlan, + // this ID is a vlan identifier. If the network_type value is gre, this + // ID is a gre key. + // +optional + SegmentationID *int32 `json:"segmentationID,omitempty"` +} + +// TODO: Much better DNSDomain validation + +// +kubebuilder:validation:MinLength:=1 +// +kubebuilder:validation:MaxLength:=255 +// +kubebuilder:validation:Pattern:="^[A-Za-z0-9]{1,63}(.[A-Za-z0-9-]{1,63})*(.[A-Za-z]{2,63})*.?$" +type DNSDomain string + +// +kubebuilder:validation:Minimum:=68 +// +kubebuilder:validation:Maximum:=9216 +type MTU int32 + +// NetworkResourceSpec contains the desired state of a network +type NetworkResourceSpec struct { + // name will be the name of the created resource. If not specified, the + // name of the ORC object will be used. + // +optional + Name *OpenStackName `json:"name,omitempty"` + + // description is a human-readable description for the resource. + // +optional + Description *NeutronDescription `json:"description,omitempty"` + + // tags is a list of tags which will be applied to the network. + // +kubebuilder:validation:MaxItems:=64 + // +listType=set + // +optional + Tags []NeutronTag `json:"tags,omitempty"` + + // adminStateUp is the administrative state of the network, which is up (true) or down (false) + // +optional + AdminStateUp *bool `json:"adminStateUp,omitempty"` + + // dnsDomain is the DNS domain of the network + // +optional + // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="dnsDomain is immutable" + DNSDomain *DNSDomain `json:"dnsDomain,omitempty"` + + // mtu is the the maximum transmission unit value to address + // fragmentation. Minimum value is 68 for IPv4, and 1280 for IPv6. + // Defaults to 1500. + // +optional + MTU *MTU `json:"mtu,omitempty"` + + // portSecurityEnabled is the port security status of the network. + // Valid values are enabled (true) and disabled (false). This value is + // used as the default value of port_security_enabled field of a newly + // created port. + // +optional + PortSecurityEnabled *bool `json:"portSecurityEnabled,omitempty"` + + // external indicates whether the network has an external routing + // facility that’s not managed by the networking service. + // +optional + External *bool `json:"external,omitempty"` + + // shared indicates whether this resource is shared across all + // projects. By default, only administrative users can change this + // value. + // +optional + Shared *bool `json:"shared,omitempty"` + + // availabilityZoneHints is the availability zone candidate for the network. + // +kubebuilder:validation:MaxItems:=64 + // +listType=set + // +optional + // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="availabilityZoneHints is immutable" + AvailabilityZoneHints []AvailabilityZoneHint `json:"availabilityZoneHints,omitempty"` + + // projectRef is a reference to the ORC Project this resource is associated with. + // Typically, only used by admin. + // +optional + // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="projectRef is immutable" + ProjectRef *KubernetesNameRef `json:"projectRef,omitempty"` +} + +// NetworkFilter defines an existing resource by its properties +// +kubebuilder:validation:MinProperties:=1 +type NetworkFilter struct { + // name of the existing resource + // +optional + Name *OpenStackName `json:"name,omitempty"` + + // description of the existing resource + // +optional + Description *NeutronDescription `json:"description,omitempty"` + + // external indicates whether the network has an external routing + // facility that’s not managed by the networking service. + // +optional + External *bool `json:"external,omitempty"` + + // projectRef is a reference to the ORC Project this resource is associated with. + // Typically, only used by admin. + // +optional + ProjectRef *KubernetesNameRef `json:"projectRef,omitempty"` + + FilterByNeutronTags `json:",inline"` +} + +// NetworkResourceStatus represents the observed state of the resource. +type NetworkResourceStatus struct { + // name is a Human-readable name for the network. Might not be unique. + // +kubebuilder:validation:MaxLength=1024 + // +optional + Name string `json:"name,omitempty"` + + // description is a human-readable description for the resource. + // +kubebuilder:validation:MaxLength=1024 + // +optional + Description string `json:"description,omitempty"` + + // projectID is the project owner of the network. + // +kubebuilder:validation:MaxLength=1024 + // +optional + ProjectID string `json:"projectID,omitempty"` + + // status indicates whether network is currently operational. Possible values + // include `ACTIVE', `DOWN', `BUILD', or `ERROR'. Plug-ins might define + // additional values. + // +kubebuilder:validation:MaxLength=1024 + // +optional + Status string `json:"status,omitempty"` + + // tags is the list of tags on the resource. + // +kubebuilder:validation:MaxItems=64 + // +kubebuilder:validation:items:MaxLength=1024 + // +listType=atomic + // +optional + Tags []string `json:"tags,omitempty"` + + NeutronStatusMetadata `json:",inline"` + + // adminStateUp is the administrative state of the network, + // which is up (true) or down (false). + // +optional + AdminStateUp *bool `json:"adminStateUp"` + + // availabilityZoneHints is the availability zone candidate for the + // network. + // +kubebuilder:validation:MaxItems=64 + // +kubebuilder:validation:items:MaxLength=1024 + // +listType=atomic + // +optional + AvailabilityZoneHints []string `json:"availabilityZoneHints,omitempty"` + + // dnsDomain is the DNS domain of the network + // +kubebuilder:validation:MaxLength=1024 + // +optional + DNSDomain string `json:"dnsDomain,omitempty"` + + // mtu is the the maximum transmission unit value to address + // fragmentation. Minimum value is 68 for IPv4, and 1280 for IPv6. + // +optional + MTU *int32 `json:"mtu,omitempty"` + + // portSecurityEnabled is the port security status of the network. + // Valid values are enabled (true) and disabled (false). This value is + // used as the default value of port_security_enabled field of a newly + // created port. + // +optional + PortSecurityEnabled *bool `json:"portSecurityEnabled,omitempty"` + + // provider contains provider-network properties. + // +optional + Provider *ProviderPropertiesStatus `json:"provider,omitempty"` + + // external defines whether the network may be used for creation of + // floating IPs. Only networks with this flag may be an external + // gateway for routers. The network must have an external routing + // facility that is not managed by the networking service. If the + // network is updated from external to internal the unused floating IPs + // of this network are automatically deleted when extension + // floatingip-autodelete-internal is present. + // +optional + External *bool `json:"external,omitempty"` + + // shared specifies whether the network resource can be accessed by any + // tenant. + // +optional + Shared *bool `json:"shared,omitempty"` + + // subnets associated with this network. + // +kubebuilder:validation:MaxItems=256 + // +kubebuilder:validation:items:MaxLength=1024 + // +listType=atomic + // +optional + Subnets []string `json:"subnets,omitempty"` +} diff --git a/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/openstack_types.go b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/openstack_types.go new file mode 100644 index 00000000000..936c79ed95c --- /dev/null +++ b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/openstack_types.go @@ -0,0 +1,26 @@ +/* +Copyright 2024 The ORC Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +// +kubebuilder:validation:Format:=uuid +// +kubebuilder:validation:MaxLength:=36 +type UUID string + +// +kubebuilder:validation:MinLength:=1 +// +kubebuilder:validation:MaxLength:=255 +// +kubebuilder:validation:Pattern:="^[^,]+$" +type OpenStackName string diff --git a/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/port_types.go b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/port_types.go new file mode 100644 index 00000000000..0c3594ac5a0 --- /dev/null +++ b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/port_types.go @@ -0,0 +1,268 @@ +/* +Copyright 2024 The ORC Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +// PortFilter specifies a filter to select a port. At least one parameter must be specified. +// +kubebuilder:validation:MinProperties:=1 +type PortFilter struct { + // name of the existing resource + // +optional + Name *OpenStackName `json:"name,omitempty"` + + // description of the existing resource + // +optional + Description *NeutronDescription `json:"description,omitempty"` + + // networkRef is a reference to the ORC Network which this port is associated with. + // +optional + NetworkRef KubernetesNameRef `json:"networkRef"` + + // projectRef is a reference to the ORC Project this resource is associated with. + // Typically, only used by admin. + // +optional + ProjectRef *KubernetesNameRef `json:"projectRef,omitempty"` + + FilterByNeutronTags `json:",inline"` +} + +type AllowedAddressPair struct { + // ip contains an IP address which a server connected to the port can + // send packets with. It can be an IP Address or a CIDR (if supported + // by the underlying extension plugin). + // +required + IP IPvAny `json:"ip,omitempty"` + + // mac contains a MAC address which a server connected to the port can + // send packets with. Defaults to the MAC address of the port. + // +optional + MAC *MAC `json:"mac,omitempty"` +} + +type AllowedAddressPairStatus struct { + // ip contains an IP address which a server connected to the port can + // send packets with. + // +kubebuilder:validation:MaxLength=1024 + // +optional + IP string `json:"ip,omitempty"` + + // mac contains a MAC address which a server connected to the port can + // send packets with. + // +kubebuilder:validation:MaxLength=1024 + // +optional + MAC string `json:"mac,omitempty"` +} + +type Address struct { + // ip contains a fixed IP address assigned to the port. It must belong + // to the referenced subnet's CIDR. If not specified, OpenStack + // allocates an available IP from the referenced subnet. + // +optional + IP *IPvAny `json:"ip,omitempty"` + + // subnetRef references the subnet from which to allocate the IP + // address. + // +required + SubnetRef KubernetesNameRef `json:"subnetRef,omitempty"` +} + +type FixedIPStatus struct { + // ip contains a fixed IP address assigned to the port. + // +kubebuilder:validation:MaxLength=1024 + // +optional + IP string `json:"ip,omitempty"` + + // subnetID is the ID of the subnet this IP is allocated from. + // +kubebuilder:validation:MaxLength=1024 + // +optional + SubnetID string `json:"subnetID,omitempty"` +} + +// +kubebuilder:validation:XValidation:rule="has(self.portSecurity) && self.portSecurity == 'Disabled' ? !has(self.securityGroupRefs) : true",message="securityGroupRefs must be empty when portSecurity is set to Disabled" +// +kubebuilder:validation:XValidation:rule="has(self.portSecurity) && self.portSecurity == 'Disabled' ? !has(self.allowedAddressPairs) : true",message="allowedAddressPairs must be empty when portSecurity is set to Disabled" +type PortResourceSpec struct { + // name is a human-readable name of the port. If not set, the object's name will be used. + // +optional + Name *OpenStackName `json:"name,omitempty"` + + // description is a human-readable description for the resource. + // +optional + Description *NeutronDescription `json:"description,omitempty"` + + // networkRef is a reference to the ORC Network which this port is associated with. + // +required + // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="networkRef is immutable" + NetworkRef KubernetesNameRef `json:"networkRef,omitempty"` + + // tags is a list of tags which will be applied to the port. + // +kubebuilder:validation:MaxItems:=64 + // +listType=set + // +optional + Tags []NeutronTag `json:"tags,omitempty"` + + // allowedAddressPairs are allowed addresses associated with this port. + // +kubebuilder:validation:MaxItems:=128 + // +listType=atomic + // +optional + AllowedAddressPairs []AllowedAddressPair `json:"allowedAddressPairs,omitempty"` + + // addresses are the IP addresses for the port. + // +kubebuilder:validation:MaxItems:=128 + // +listType=atomic + // +optional + // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="addresses is immutable" + Addresses []Address `json:"addresses,omitempty"` + + // securityGroupRefs are the names of the security groups associated + // with this port. + // +kubebuilder:validation:MaxItems:=64 + // +listType=set + // +optional + SecurityGroupRefs []OpenStackName `json:"securityGroupRefs,omitempty"` + + // vnicType specifies the type of vNIC which this port should be + // attached to. This is used to determine which mechanism driver(s) to + // be used to bind the port. The valid values are normal, macvtap, + // direct, baremetal, direct-physical, virtio-forwarder, smart-nic and + // remote-managed, although these values will not be validated in this + // API to ensure compatibility with future neutron changes or custom + // implementations. What type of vNIC is actually available depends on + // deployments. If not specified, the Neutron default value is used. + // +kubebuilder:validation:MaxLength:=64 + // +optional + VNICType string `json:"vnicType,omitempty"` + + // portSecurity controls port security for this port. + // When set to Enabled, port security is enabled. + // When set to Disabled, port security is disabled and SecurityGroupRefs must be empty. + // When set to Inherit (default), it takes the value from the network level. + // +kubebuilder:default=Inherit + // +optional + // +kubebuilder:validation:XValidation:rule="!(oldSelf != 'Inherit' && self == 'Inherit')",message="portSecurity cannot be changed to Inherit" + PortSecurity PortSecurityState `json:"portSecurity,omitempty"` + + // projectRef is a reference to the ORC Project this resource is associated with. + // Typically, only used by admin. + // +optional + // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="projectRef is immutable" + ProjectRef *KubernetesNameRef `json:"projectRef,omitempty"` +} + +type PortResourceStatus struct { + // name is the human-readable name of the resource. Might not be unique. + // +kubebuilder:validation:MaxLength=1024 + // +optional + Name string `json:"name,omitempty"` + + // description is a human-readable description for the resource. + // +kubebuilder:validation:MaxLength=1024 + // +optional + Description string `json:"description,omitempty"` + + // networkID is the ID of the attached network. + // +kubebuilder:validation:MaxLength=1024 + // +optional + NetworkID string `json:"networkID,omitempty"` + + // projectID is the project owner of the resource. + // +kubebuilder:validation:MaxLength=1024 + // +optional + ProjectID string `json:"projectID,omitempty"` + + // status indicates the current status of the resource. + // +kubebuilder:validation:MaxLength=1024 + // +optional + Status string `json:"status,omitempty"` + + // tags is the list of tags on the resource. + // +kubebuilder:validation:MaxItems=64 + // +kubebuilder:validation:items:MaxLength=1024 + // +listType=atomic + // +optional + Tags []string `json:"tags,omitempty"` + + // adminStateUp is the administrative state of the port, + // which is up (true) or down (false). + // +optional + AdminStateUp *bool `json:"adminStateUp,omitempty"` + + // macAddress is the MAC address of the port. + // +kubebuilder:validation:MaxLength=1024 + // +optional + MACAddress string `json:"macAddress,omitempty"` + + // deviceID is the ID of the device that uses this port. + // +kubebuilder:validation:MaxLength=1024 + // +optional + DeviceID string `json:"deviceID,omitempty"` + + // deviceOwner is the entity type that uses this port. + // +kubebuilder:validation:MaxLength=1024 + // +optional + DeviceOwner string `json:"deviceOwner,omitempty"` + + // allowedAddressPairs is a set of zero or more allowed address pair + // objects each where address pair object contains an IP address and + // MAC address. + // +kubebuilder:validation:MaxItems=128 + // +listType=atomic + // +optional + AllowedAddressPairs []AllowedAddressPairStatus `json:"allowedAddressPairs,omitempty"` + + // fixedIPs is a set of zero or more fixed IP objects each where fixed + // IP object contains an IP address and subnet ID from which the IP + // address is assigned. + // +kubebuilder:validation:MaxItems=128 + // +listType=atomic + // +optional + FixedIPs []FixedIPStatus `json:"fixedIPs,omitempty"` + + // securityGroups contains the IDs of security groups applied to the port. + // +kubebuilder:validation:MaxItems=64 + // +kubebuilder:validation:items:MaxLength=1024 + // +listType=atomic + // +optional + SecurityGroups []string `json:"securityGroups,omitempty"` + + // propagateUplinkStatus represents the uplink status propagation of + // the port. + // +optional + PropagateUplinkStatus *bool `json:"propagateUplinkStatus,omitempty"` + + // vnicType is the type of vNIC which this port is attached to. + // +kubebuilder:validation:MaxLength:=64 + // +optional + VNICType string `json:"vnicType,omitempty"` + + // portSecurityEnabled indicates whether port security is enabled or not. + // +optional + PortSecurityEnabled *bool `json:"portSecurityEnabled,omitempty"` + + NeutronStatusMetadata `json:",inline"` +} + +// PortSecurityState represents the security state of a port +// +kubebuilder:validation:Enum=Enabled;Disabled;Inherit +type PortSecurityState string + +const ( + // PortSecurityEnabled means port security is enabled + PortSecurityEnabled PortSecurityState = "Enabled" + // PortSecurityDisabled means port security is disabled + PortSecurityDisabled PortSecurityState = "Disabled" + // PortSecurityInherit means port security settings are inherited from the network + PortSecurityInherit PortSecurityState = "Inherit" +) diff --git a/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/project_types.go b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/project_types.go new file mode 100644 index 00000000000..3fa321c790e --- /dev/null +++ b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/project_types.go @@ -0,0 +1,111 @@ +/* +Copyright 2025 The ORC Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +// +kubebuilder:validation:MinLength:=1 +// +kubebuilder:validation:MaxLength:=255 +type KeystoneTag string + +type FilterByKeystoneTags struct { + // tags is a list of tags to filter by. If specified, the resource must + // have all of the tags specified to be included in the result. + // +listType=set + // +optional + // +kubebuilder:validation:MaxItems:=80 + Tags []KeystoneTag `json:"tags,omitempty"` + + // tagsAny is a list of tags to filter by. If specified, the resource + // must have at least one of the tags specified to be included in the + // result. + // +listType=set + // +optional + // +kubebuilder:validation:MaxItems:=80 + TagsAny []KeystoneTag `json:"tagsAny,omitempty"` + + // notTags is a list of tags to filter by. If specified, resources which + // contain all of the given tags will be excluded from the result. + // +listType=set + // +optional + // +kubebuilder:validation:MaxItems:=80 + NotTags []KeystoneTag `json:"notTags,omitempty"` + + // notTagsAny is a list of tags to filter by. If specified, resources + // which contain any of the given tags will be excluded from the result. + // +listType=set + // +optional + // +kubebuilder:validation:MaxItems:=80 + NotTagsAny []KeystoneTag `json:"notTagsAny,omitempty"` +} + +// ProjectResourceSpec contains the desired state of a project +type ProjectResourceSpec struct { + // name will be the name of the created resource. If not specified, the + // name of the ORC object will be used. + // +optional + Name *KeystoneName `json:"name,omitempty"` + + // description contains a free form description of the project. + // +kubebuilder:validation:MinLength:=1 + // +kubebuilder:validation:MaxLength:=65535 + // +optional + Description *string `json:"description,omitempty"` + + // enabled defines whether a project is enabled or not. Default is true. + // +optional + Enabled *bool `json:"enabled,omitempty"` + + // tags is list of simple strings assigned to a project. + // Tags can be used to classify projects into groups. + // +kubebuilder:validation:MaxItems:=80 + // +listType=set + // +optional + Tags []KeystoneTag `json:"tags,omitempty"` +} + +// ProjectFilter defines an existing resource by its properties +// +kubebuilder:validation:MinProperties:=1 +type ProjectFilter struct { + // name of the existing resource + // +optional + Name *KeystoneName `json:"name,omitempty"` + + FilterByKeystoneTags `json:",inline"` +} + +// ProjectResourceStatus represents the observed state of the resource. +type ProjectResourceStatus struct { + // name is a Human-readable name for the project. Might not be unique. + // +kubebuilder:validation:MaxLength=1024 + // +optional + Name string `json:"name,omitempty"` + + // description is a human-readable description for the resource. + // +kubebuilder:validation:MaxLength:=65535 + // +optional + Description string `json:"description,omitempty"` + + // enabled represents whether a project is enabled or not. + // +optional + Enabled *bool `json:"enabled,omitempty"` + + // tags is the list of tags on the resource. + // +kubebuilder:validation:MaxItems=80 + // +kubebuilder:validation:items:MaxLength=1024 + // +listType=atomic + // +optional + Tags []string `json:"tags,omitempty"` +} diff --git a/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/role_types.go b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/role_types.go new file mode 100644 index 00000000000..f4a961dd192 --- /dev/null +++ b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/role_types.go @@ -0,0 +1,66 @@ +/* +Copyright 2025 The ORC Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +// RoleResourceSpec contains the desired state of the resource. +type RoleResourceSpec struct { + // name will be the name of the created resource. If not specified, the + // name of the ORC object will be used. + // +optional + Name *KeystoneName `json:"name,omitempty"` + + // description is a human-readable description for the resource. + // +kubebuilder:validation:MinLength:=1 + // +kubebuilder:validation:MaxLength:=255 + // +optional + Description *string `json:"description,omitempty"` + + // domainRef is a reference to the ORC Domain which this resource is associated with. + // +optional + // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="domainRef is immutable" + DomainRef *KubernetesNameRef `json:"domainRef,omitempty"` +} + +// RoleFilter defines an existing resource by its properties +// +kubebuilder:validation:MinProperties:=1 +type RoleFilter struct { + // name of the existing resource + // +optional + Name *KeystoneName `json:"name,omitempty"` + + // domainRef is a reference to the ORC Domain which this resource is associated with. + // +optional + DomainRef *KubernetesNameRef `json:"domainRef,omitempty"` +} + +// RoleResourceStatus represents the observed state of the resource. +type RoleResourceStatus struct { + // name is a Human-readable name for the resource. Might not be unique. + // +kubebuilder:validation:MaxLength=1024 + // +optional + Name string `json:"name,omitempty"` + + // description is a human-readable description for the resource. + // +kubebuilder:validation:MaxLength=1024 + // +optional + Description string `json:"description,omitempty"` + + // domainID is the ID of the Domain to which the resource is associated. + // +kubebuilder:validation:MaxLength=1024 + // +optional + DomainID string `json:"domainID,omitempty"` +} diff --git a/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/router_interface_types.go b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/router_interface_types.go new file mode 100644 index 00000000000..2676d07bda1 --- /dev/null +++ b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/router_interface_types.go @@ -0,0 +1,131 @@ +/* +Copyright 2024 The ORC Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +kubebuilder:object:root=true +// +kubebuilder:resource:categories=openstack +// +kubebuilder:subresource:status +// +kubebuilder:printcolumn:name="Available",type="string",JSONPath=".status.conditions[?(@.type=='Available')].status",description="Availability status of resource" +// +kubebuilder:printcolumn:name="Message",type="string",JSONPath=".status.conditions[?(@.type=='Progressing')].message",description="Message describing current progress status" + +// RouterInterface is the Schema for an ORC resource. +type RouterInterface struct { + metav1.TypeMeta `json:",inline"` + + // metadata contains the object metadata. + // +optional + metav1.ObjectMeta `json:"metadata,omitempty"` + + // spec specifies the desired state of the resource. + // +optional + Spec RouterInterfaceSpec `json:"spec,omitempty"` + + // status defines the observed state of the resource. + // +optional + Status RouterInterfaceStatus `json:"status,omitempty"` +} + +// +kubebuilder:object:root=true + +// RouterInterfaceList contains a list of RouterInterface. +type RouterInterfaceList struct { + metav1.TypeMeta `json:",inline"` + + // metadata contains the list metadata. + // +optional + metav1.ListMeta `json:"metadata,omitempty"` + + // items contains a list of RouterInterface. + // +kubebuilder:validation:MaxItems:=64 + // +required + Items []RouterInterface `json:"items"` +} + +func (l *RouterInterfaceList) GetItems() []RouterInterface { + return l.Items +} + +// +kubebuilder:validation:Enum:=Subnet +// +kubebuilder:validation:MinLength:=1 +// +kubebuilder:validation:MaxLength:=8 +type RouterInterfaceType string + +const ( + RouterInterfaceTypeSubnet RouterInterfaceType = "Subnet" +) + +// +kubebuilder:validation:XValidation:rule="self.type == 'Subnet' ? has(self.subnetRef) : !has(self.subnetRef)",message="subnetRef is required when type is 'Subnet' and not permitted otherwise" +// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="RouterInterfaceResourceSpec is immutable" +type RouterInterfaceSpec struct { + // type specifies the type of the router interface. + // +required + // +unionDiscriminator + Type RouterInterfaceType `json:"type,omitempty"` + + // routerRef references the router to which this interface belongs. + // +required + RouterRef KubernetesNameRef `json:"routerRef,omitempty"` + + // subnetRef references the subnet the router interface is created on. + // +unionMember + // +optional + SubnetRef *KubernetesNameRef `json:"subnetRef,omitempty"` +} + +type RouterInterfaceStatus struct { + // conditions represents the observed status of the object. + // Known .status.conditions.type are: "Available", "Progressing" + // + // Available represents the availability of the OpenStack resource. If it is + // true then the resource is ready for use. + // + // Progressing indicates whether the controller is still attempting to + // reconcile the current state of the OpenStack resource to the desired + // state. Progressing will be False either because the desired state has + // been achieved, or because some terminal error prevents it from ever being + // achieved and the controller is no longer attempting to reconcile. If + // Progressing is True, an observer waiting on the resource should continue + // to wait. + // + // +kubebuilder:validation:MaxItems:=32 + // +patchMergeKey=type + // +patchStrategy=merge + // +listType=map + // +listMapKey=type + // +optional + Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"` + + // id is the unique identifier of the port created for the router interface + // +kubebuilder:validation:MaxLength=1024 + // +optional + ID *string `json:"id,omitempty"` +} + +var _ ObjectWithConditions = &Router{} + +func (i *RouterInterface) GetConditions() []metav1.Condition { + return i.Status.Conditions +} + +func init() { + SchemeBuilder.Register(&RouterInterface{}, &RouterInterfaceList{}) +} diff --git a/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/router_types.go b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/router_types.go new file mode 100644 index 00000000000..999404a3574 --- /dev/null +++ b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/router_types.go @@ -0,0 +1,147 @@ +/* +Copyright 2024 The ORC Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +// RouterFilter specifies a query to select an OpenStack router. At least one property must be set. +// +kubebuilder:validation:MinProperties:=1 +type RouterFilter struct { + // name of the existing resource + // +optional + Name *OpenStackName `json:"name,omitempty"` + + // description of the existing resource + // +optional + Description *NeutronDescription `json:"description,omitempty"` + + // projectRef is a reference to the ORC Project this resource is associated with. + // Typically, only used by admin. + // +optional + ProjectRef *KubernetesNameRef `json:"projectRef,omitempty"` + + FilterByNeutronTags `json:",inline"` +} + +type ExternalGateway struct { + // networkRef is a reference to the ORC Network which the external + // gateway is on. + // +required + NetworkRef KubernetesNameRef `json:"networkRef,omitempty"` +} + +type ExternalGatewayStatus struct { + // networkID is the ID of the network the gateway is on. + // +kubebuilder:validation:MaxLength=1024 + // +optional + NetworkID string `json:"networkID,omitempty"` +} + +type RouterResourceSpec struct { + // name is a human-readable name of the router. If not set, the + // object's name will be used. + // +optional + Name *OpenStackName `json:"name,omitempty"` + + // description is a human-readable description for the resource. + // +optional + Description *NeutronDescription `json:"description,omitempty"` + + // tags is a list of tags which will be applied to the router. + // +kubebuilder:validation:MaxItems:=64 + // +listType=set + // +optional + Tags []NeutronTag `json:"tags,omitempty"` + + // adminStateUp represents the administrative state of the resource, + // which is up (true) or down (false). Default is true. + // +optional + AdminStateUp *bool `json:"adminStateUp,omitempty"` + + // externalGateways is a list of external gateways for the router. + // Multiple gateways are not currently supported by ORC. + // +kubebuilder:validation:MaxItems:=1 + // +listType=atomic + // +optional + // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="externalGateways is immutable" + ExternalGateways []ExternalGateway `json:"externalGateways,omitempty"` + + // distributed indicates whether the router is distributed or not. It + // is available when dvr extension is enabled. + // +optional + // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="distributed is immutable" + Distributed *bool `json:"distributed,omitempty"` + + // availabilityZoneHints is the availability zone candidate for the router. + // +kubebuilder:validation:MaxItems:=64 + // +listType=set + // +optional + // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="availabilityZoneHints is immutable" + AvailabilityZoneHints []AvailabilityZoneHint `json:"availabilityZoneHints,omitempty"` + + // projectRef is a reference to the ORC Project this resource is associated with. + // Typically, only used by admin. + // +optional + // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="projectRef is immutable" + ProjectRef *KubernetesNameRef `json:"projectRef,omitempty"` +} + +type RouterResourceStatus struct { + // name is the human-readable name of the resource. Might not be unique. + // +kubebuilder:validation:MaxLength=1024 + // +optional + Name string `json:"name,omitempty"` + + // description is a human-readable description for the resource. + // +kubebuilder:validation:MaxLength=1024 + // +optional + Description string `json:"description,omitempty"` + + // projectID is the project owner of the resource. + // +kubebuilder:validation:MaxLength=1024 + // +optional + ProjectID string `json:"projectID,omitempty"` + + // status indicates the current status of the resource. + // +kubebuilder:validation:MaxLength=1024 + // +optional + Status string `json:"status,omitempty"` + + // tags is the list of tags on the resource. + // +kubebuilder:validation:MaxItems:=64 + // +kubebuilder:validation:items:MaxLength=1024 + // +listType=atomic + // +optional + Tags []string `json:"tags,omitempty"` + + // adminStateUp is the administrative state of the router, + // which is up (true) or down (false). + // +optional + AdminStateUp *bool `json:"adminStateUp"` + + // externalGateways is a list of external gateways for the router. + // +kubebuilder:validation:MaxItems:=32 + // +listType=atomic + // +optional + ExternalGateways []ExternalGatewayStatus `json:"externalGateways,omitempty"` + + // availabilityZoneHints is the availability zone candidate for the + // router. + // +kubebuilder:validation:MaxItems:=64 + // +kubebuilder:validation:items:MaxLength=1024 + // +listType=atomic + // +optional + AvailabilityZoneHints []string `json:"availabilityZoneHints,omitempty"` +} diff --git a/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/securitygroup_types.go b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/securitygroup_types.go new file mode 100644 index 00000000000..a3f97788343 --- /dev/null +++ b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/securitygroup_types.go @@ -0,0 +1,276 @@ +/* +Copyright 2024 The ORC Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +// +kubebuilder:validation:Enum:=ingress;egress +type RuleDirection string + +// +kubebuilder:validation:Enum:=ah;dccp;egp;esp;gre;icmp;icmpv6;igmp;ipip;ipv6-encap;ipv6-frag;ipv6-icmp;ipv6-nonxt;ipv6-opts;ipv6-route;ospf;pgm;rsvp;sctp;tcp;udp;udplite;vrrp +type Protocol string + +const ( + ProtocolAH Protocol = "ah" + ProtocolDCCP Protocol = "dccp" + ProtocolEGP Protocol = "egp" + ProtocolESP Protocol = "esp" + ProtocolGRE Protocol = "gre" + ProtocolICMP Protocol = "icmp" + ProtocolICMPV6 Protocol = "icmpv6" + ProtocolIGMP Protocol = "igmp" + ProtocolIPIP Protocol = "ipip" + ProtocolIPV6ENCAP Protocol = "ipv6-encap" + ProtocolIPV6FRAG Protocol = "ipv6-frag" + ProtocolIPV6ICMP Protocol = "ipv6-icmp" + ProtocolIPV6NONXT Protocol = "ipv6-nonxt" + ProtocolIPV6OPTS Protocol = "ipv6-opts" + ProtocolIPV6ROUTE Protocol = "ipv6-route" + ProtocolOSPF Protocol = "ospf" + ProtocolPGM Protocol = "pgm" + ProtocolRSVP Protocol = "rsvp" + ProtocolSCTP Protocol = "sctp" + ProtocolTCP Protocol = "tcp" + ProtocolUDP Protocol = "udp" + ProtocolUDPLITE Protocol = "udplite" + ProtocolVRRP Protocol = "vrrp" +) + +// +kubebuilder:validation:Enum:=IPv4;IPv6 +type Ethertype string + +const ( + EthertypeIPv4 Ethertype = "IPv4" + EthertypeIPv6 Ethertype = "IPv6" +) + +// +kubebuilder:validation:Minimum:=0 +// +kubebuilder:validation:Maximum:=65535 +type PortNumber int32 + +type PortRangeSpec struct { + // min is the minimum port number in the range that is matched by the security group rule. + // If the protocol is TCP, UDP, DCCP, SCTP or UDP-Lite this value must be less than or equal + // to the port_range_max attribute value. If the protocol is ICMP, this value must be an ICMP type + // +required + Min PortNumber `json:"min"` + // max is the maximum port number in the range that is matched by the security group rule. + // If the protocol is TCP, UDP, DCCP, SCTP or UDP-Lite this value must be greater than or equal + // to the port_range_min attribute value. If the protocol is ICMP, this value must be an ICMP code. + // +required + Max PortNumber `json:"max"` +} + +type PortRangeStatus struct { + // min is the minimum port number in the range that is matched by the security group rule. + // If the protocol is TCP, UDP, DCCP, SCTP or UDP-Lite this value must be less than or equal + // to the port_range_max attribute value. If the protocol is ICMP, this value must be an ICMP type + // +optional + Min int32 `json:"min"` + // max is the maximum port number in the range that is matched by the security group rule. + // If the protocol is TCP, UDP, DCCP, SCTP or UDP-Lite this value must be greater than or equal + // to the port_range_min attribute value. If the protocol is ICMP, this value must be an ICMP code. + // +optional + Max int32 `json:"max"` +} + +// NOTE: A validation was removed from SecurityGroupRule until we bump minimum k8s to at least v1.31: +// - remoteIPPrefix matches the address family defined in ethertype: PR #336 + +// SecurityGroupRule defines a Security Group rule +// +kubebuilder:validation:MinProperties:=1 +// +kubebuilder:validation:XValidation:rule="(!has(self.portRange)|| !(self.protocol == 'tcp'|| self.protocol == 'udp' || self.protocol == 'dccp' || self.protocol == 'sctp' || self.protocol == 'udplite') || (self.portRange.min <= self.portRange.max))",message="portRangeMax should be equal or greater than portRange.min" +// +kubebuilder:validation:XValidation:rule="!(self.protocol == 'icmp' || self.protocol == 'icmpv6') || !has(self.portRange)|| (self.portRange.min >= 0 && self.portRange.min <= 255)",message="When protocol is ICMP or ICMPv6 portRange.min should be between 0 and 255" +// +kubebuilder:validation:XValidation:rule="!(self.protocol == 'icmp' || self.protocol == 'icmpv6') || !has(self.portRange)|| (self.portRange.max >= 0 && self.portRange.max <= 255)",message="When protocol is ICMP or ICMPv6 portRange.max should be between 0 and 255" +type SecurityGroupRule struct { + // description is a human-readable description for the resource. + // +optional + Description *NeutronDescription `json:"description,omitempty"` + + // direction represents the direction in which the security group rule + // is applied. Can be ingress or egress. + // +optional + Direction *RuleDirection `json:"direction,omitempty"` + + // remoteIPPrefix is an IP address block. Should match the Ethertype (IPv4 or IPv6) + // +optional + RemoteIPPrefix *CIDR `json:"remoteIPPrefix,omitempty"` + + // protocol is the IP protocol is represented by a string + // +optional + Protocol *Protocol `json:"protocol,omitempty"` + + // ethertype must be IPv4 or IPv6, and addresses represented in CIDR + // must match the ingress or egress rules. + // +required + Ethertype Ethertype `json:"ethertype,omitempty"` + + // portRange sets the minimum and maximum ports range that the security group rule + // matches. If the protocol is [tcp, udp, dccp sctp,udplite] PortRange.Min must be less than + // or equal to the PortRange.Max attribute value. + // If the protocol is ICMP, this PortRamge.Min must be an ICMP code and PortRange.Max + // should be an ICMP type + // +optional + PortRange *PortRangeSpec `json:"portRange,omitempty"` +} + +type SecurityGroupRuleStatus struct { + // id is the ID of the security group rule. + // +kubebuilder:validation:MaxLength=1024 + // +optional + ID string `json:"id,omitempty"` + + // description is a human-readable description for the resource. + // +kubebuilder:validation:MaxLength=1024 + // +optional + Description string `json:"description,omitempty"` + + // direction represents the direction in which the security group rule + // is applied. Can be ingress or egress. + // +kubebuilder:validation:MaxLength=1024 + // +optional + Direction string `json:"direction,omitempty"` + + // RemoteAddressGroupId (Not in gophercloud) + + // remoteGroupID is the remote group UUID to associate with this security group rule + // RemoteGroupID + // +kubebuilder:validation:MaxLength=1024 + // +optional + RemoteGroupID string `json:"remoteGroupID,omitempty"` + + // remoteIPPrefix is an IP address block. Should match the Ethertype (IPv4 or IPv6) + // +kubebuilder:validation:MaxLength=1024 + // +optional + RemoteIPPrefix string `json:"remoteIPPrefix,omitempty"` + + // protocol is the IP protocol can be represented by a string, an + // integer, or null + // +kubebuilder:validation:MaxLength=1024 + // +optional + Protocol string `json:"protocol,omitempty"` + + // ethertype must be IPv4 or IPv6, and addresses represented in CIDR + // must match the ingress or egress rules. + // +kubebuilder:validation:MaxLength=1024 + // +optional + Ethertype string `json:"ethertype,omitempty"` + + // portRange sets the minimum and maximum ports range that the security group rule + // matches. If the protocol is [tcp, udp, dccp sctp,udplite] PortRange.Min must be less than + // or equal to the PortRange.Max attribute value. + // If the protocol is ICMP, this PortRamge.Min must be an ICMP code and PortRange.Max + // should be an ICMP type + // +optional + PortRange *PortRangeStatus `json:"portRange,omitempty"` + // FIXME(mandre) This field is not yet returned by gophercloud + // BelongsToDefaultSG bool `json:"belongsToDefaultSG,omitempty"` + + // FIXME(mandre) Technically, the neutron status metadata are returned + // for SG rules. Should we include them? Gophercloud does not + // implements this yet. + // NeutronStatusMetadata `json:",inline"` +} + +// SecurityGroupResourceSpec contains the desired state of a security group +type SecurityGroupResourceSpec struct { + // name will be the name of the created resource. If not specified, the + // name of the ORC object will be used. + // +optional + Name *OpenStackName `json:"name,omitempty"` + + // description is a human-readable description for the resource. + // +optional + Description *NeutronDescription `json:"description,omitempty"` + + // tags is a list of tags which will be applied to the security group. + // +kubebuilder:validation:MaxItems:=64 + // +listType=set + // +optional + Tags []NeutronTag `json:"tags,omitempty"` + + // stateful indicates if the security group is stateful or stateless. + // +optional + // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="stateful is immutable" + Stateful *bool `json:"stateful,omitempty"` + + // rules is a list of security group rules belonging to this SG. + // +kubebuilder:validation:MaxItems:=256 + // +listType=atomic + // +optional + Rules []SecurityGroupRule `json:"rules,omitempty"` + + // projectRef is a reference to the ORC Project this resource is associated with. + // Typically, only used by admin. + // +optional + // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="projectRef is immutable" + ProjectRef *KubernetesNameRef `json:"projectRef,omitempty"` +} + +// SecurityGroupFilter defines an existing resource by its properties +// +kubebuilder:validation:MinProperties:=1 +type SecurityGroupFilter struct { + // name of the existing resource + // +optional + Name *OpenStackName `json:"name,omitempty"` + + // description of the existing resource + // +optional + Description *NeutronDescription `json:"description,omitempty"` + + // projectRef is a reference to the ORC Project this resource is associated with. + // Typically, only used by admin. + // +optional + ProjectRef *KubernetesNameRef `json:"projectRef,omitempty"` + + FilterByNeutronTags `json:",inline"` +} + +// SecurityGroupResourceStatus represents the observed state of the resource. +type SecurityGroupResourceStatus struct { + // name is a Human-readable name for the security group. Might not be unique. + // +kubebuilder:validation:MaxLength=1024 + // +optional + Name string `json:"name,omitempty"` + + // description is a human-readable description for the resource. + // +kubebuilder:validation:MaxLength=1024 + // +optional + Description string `json:"description,omitempty"` + + // projectID is the project owner of the security group. + // +kubebuilder:validation:MaxLength=1024 + // +optional + ProjectID string `json:"projectID,omitempty"` + + // tags is the list of tags on the resource. + // +kubebuilder:validation:MaxItems:=64 + // +kubebuilder:validation:items:MaxLength=1024 + // +listType=atomic + // +optional + Tags []string `json:"tags,omitempty"` + + // stateful indicates if the security group is stateful or stateless. + // +optional + Stateful bool `json:"stateful,omitempty"` + + // rules is a list of security group rules belonging to this SG. + // +kubebuilder:validation:MaxItems:=256 + // +listType=atomic + // +optional + Rules []SecurityGroupRuleStatus `json:"rules,omitempty"` + + NeutronStatusMetadata `json:",inline"` +} diff --git a/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/server_types.go b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/server_types.go new file mode 100644 index 00000000000..7fefa5f38b1 --- /dev/null +++ b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/server_types.go @@ -0,0 +1,264 @@ +/* +Copyright 2024 The ORC Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +// +kubebuilder:validation:MinLength:=1 +// +kubebuilder:validation:MaxLength:=80 +type ServerTag string + +type FilterByServerTags struct { + // tags is a list of tags to filter by. If specified, the resource must + // have all of the tags specified to be included in the result. + // +listType=set + // +optional + // +kubebuilder:validation:MaxItems:=50 + Tags []ServerTag `json:"tags,omitempty"` + + // tagsAny is a list of tags to filter by. If specified, the resource + // must have at least one of the tags specified to be included in the + // result. + // +listType=set + // +optional + // +kubebuilder:validation:MaxItems:=50 + TagsAny []ServerTag `json:"tagsAny,omitempty"` + + // notTags is a list of tags to filter by. If specified, resources which + // contain all of the given tags will be excluded from the result. + // +listType=set + // +optional + // +kubebuilder:validation:MaxItems:=50 + NotTags []ServerTag `json:"notTags,omitempty"` + + // notTagsAny is a list of tags to filter by. If specified, resources + // which contain any of the given tags will be excluded from the result. + // +listType=set + // +optional + // +kubebuilder:validation:MaxItems:=50 + NotTagsAny []ServerTag `json:"notTagsAny,omitempty"` +} + +// +kubebuilder:validation:MinProperties:=1 +// +kubebuilder:validation:MaxProperties:=1 +type ServerPortSpec struct { + // portRef is a reference to a Port object. Server creation will wait for + // this port to be created and available. + // +optional + PortRef *KubernetesNameRef `json:"portRef,omitempty"` +} + +// +kubebuilder:validation:MinProperties:=1 +type ServerVolumeSpec struct { + // volumeRef is a reference to a Volume object. Server creation will wait for + // this volume to be created and available. + // +required + VolumeRef KubernetesNameRef `json:"volumeRef,omitempty"` + + // device is the name of the device, such as `/dev/vdb`. + // Omit for auto-assignment + // +kubebuilder:validation:MaxLength:=255 + // +optional + Device *string `json:"device,omitempty"` +} + +type ServerVolumeStatus struct { + // id is the ID of a volume attached to the server. + // +kubebuilder:validation:MaxLength:=1024 + // +optional + ID string `json:"id,omitempty"` +} + +type ServerInterfaceFixedIP struct { + // ipAddress is the IP address assigned to the port. + // +kubebuilder:validation:MaxLength:=1024 + // +optional + IPAddress string `json:"ipAddress,omitempty"` + + // subnetID is the ID of the subnet from which the IP address is allocated. + // +kubebuilder:validation:MaxLength:=1024 + // +optional + SubnetID string `json:"subnetID,omitempty"` +} + +type ServerInterfaceStatus struct { + // portID is the ID of a port attached to the server. + // +kubebuilder:validation:MaxLength:=1024 + // +optional + PortID string `json:"portID,omitempty"` + + // netID is the ID of the network to which the interface is attached. + // +kubebuilder:validation:MaxLength:=1024 + // +optional + NetID string `json:"netID,omitempty"` + + // macAddr is the MAC address of the interface. + // +kubebuilder:validation:MaxLength:=1024 + // +optional + MACAddr string `json:"macAddr,omitempty"` + + // portState is the state of the port (e.g., ACTIVE, DOWN). + // +kubebuilder:validation:MaxLength:=1024 + // +optional + PortState string `json:"portState,omitempty"` + + // fixedIPs is the list of fixed IP addresses assigned to the interface. + // +kubebuilder:validation:MaxItems:=32 + // +listType=atomic + // +optional + FixedIPs []ServerInterfaceFixedIP `json:"fixedIPs,omitempty"` +} + +// ServerResourceSpec contains the desired state of a server +type ServerResourceSpec struct { + // name will be the name of the created resource. If not specified, the + // name of the ORC object will be used. + // +optional + Name *OpenStackName `json:"name,omitempty"` + + // imageRef references the image to use for the server instance. + // NOTE: This is not required in case of boot from volume. + // +required + // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="imageRef is immutable" + ImageRef KubernetesNameRef `json:"imageRef,omitempty"` + + // flavorRef references the flavor to use for the server instance. + // +required + // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="flavorRef is immutable" + FlavorRef KubernetesNameRef `json:"flavorRef,omitempty"` + + // userData specifies data which will be made available to the server at + // boot time, either via the metadata service or a config drive. It is + // typically read by a configuration service such as cloud-init or ignition. + // +optional + // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="userData is immutable" + UserData *UserDataSpec `json:"userData,omitempty"` + + // ports defines a list of ports which will be attached to the server. + // +kubebuilder:validation:MaxItems:=64 + // +listType=atomic + // +required + Ports []ServerPortSpec `json:"ports,omitempty"` + + // volumes is a list of volumes attached to the server. + // +kubebuilder:validation:MaxItems:=64 + // +listType=atomic + // +optional + Volumes []ServerVolumeSpec `json:"volumes,omitempty"` + + // serverGroupRef is a reference to a ServerGroup object. The server + // will be created in the server group. + // +optional + // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="serverGroupRef is immutable" + ServerGroupRef *KubernetesNameRef `json:"serverGroupRef,omitempty"` + + // availabilityZone is the availability zone in which to create the server. + // +kubebuilder:validation:MaxLength=255 + // +optional + // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="availabilityZone is immutable" + AvailabilityZone string `json:"availabilityZone,omitempty"` + + // keypairRef is a reference to a KeyPair object. The server will be + // created with this keypair for SSH access. + // +optional + // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="keypairRef is immutable" + KeypairRef *KubernetesNameRef `json:"keypairRef,omitempty"` + + // tags is a list of tags which will be applied to the server. + // +kubebuilder:validation:MaxItems:=50 + // +listType=set + // +optional + Tags []ServerTag `json:"tags,omitempty"` +} + +// +kubebuilder:validation:MinProperties:=1 +// +kubebuilder:validation:MaxProperties:=1 +type UserDataSpec struct { + // secretRef is a reference to a Secret containing the user data for this server. + // +optional + SecretRef *KubernetesNameRef `json:"secretRef,omitempty"` +} + +// ServerFilter defines an existing resource by its properties +// +kubebuilder:validation:MinProperties:=1 +type ServerFilter struct { + // name of the existing resource + // +optional + Name *OpenStackName `json:"name,omitempty"` + + // availabilityZone is the availability zone of the existing resource + // +kubebuilder:validation:MaxLength=255 + // +optional + AvailabilityZone string `json:"availabilityZone,omitempty"` + + FilterByServerTags `json:",inline"` +} + +// ServerResourceStatus represents the observed state of the resource. +type ServerResourceStatus struct { + // name is the human-readable name of the resource. Might not be unique. + // +kubebuilder:validation:MaxLength=1024 + // +optional + Name string `json:"name,omitempty"` + + // hostID is the host where the server is located in the cloud. + // +kubebuilder:validation:MaxLength=1024 + // +optional + HostID string `json:"hostID,omitempty"` + + // status contains the current operational status of the server, + // such as IN_PROGRESS or ACTIVE. + // +kubebuilder:validation:MaxLength=1024 + // +optional + Status string `json:"status,omitempty"` + + // imageID indicates the OS image used to deploy the server. + // +kubebuilder:validation:MaxLength=1024 + // +optional + ImageID string `json:"imageID,omitempty"` + + // availabilityZone is the availability zone where the server is located. + // +kubebuilder:validation:MaxLength=1024 + // +optional + AvailabilityZone string `json:"availabilityZone,omitempty"` + + // serverGroups is a slice of strings containing the UUIDs of the + // server groups to which the server belongs. Currently this can + // contain at most one entry. + // +kubebuilder:validation:MaxItems:=32 + // +kubebuilder:validation:items:MaxLength=1024 + // +listType=atomic + // +optional + ServerGroups []string `json:"serverGroups,omitempty"` + + // volumes contains the volumes attached to the server. + // +kubebuilder:validation:MaxItems:=64 + // +listType=atomic + // +optional + Volumes []ServerVolumeStatus `json:"volumes,omitempty"` + + // interfaces contains the list of interfaces attached to the server. + // +kubebuilder:validation:MaxItems:=64 + // +listType=atomic + // +optional + Interfaces []ServerInterfaceStatus `json:"interfaces,omitempty"` + + // tags is the list of tags on the resource. + // +kubebuilder:validation:MaxItems:=50 + // +kubebuilder:validation:items:MaxLength=1024 + // +listType=atomic + // +optional + Tags []string `json:"tags,omitempty"` +} diff --git a/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/servergroup_types.go b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/servergroup_types.go new file mode 100644 index 00000000000..c8334709d9b --- /dev/null +++ b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/servergroup_types.go @@ -0,0 +1,100 @@ +/* +Copyright 2024 The ORC Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +// +kubebuilder:validation:Enum:=affinity;anti-affinity;soft-affinity;soft-anti-affinity +type ServerGroupPolicy string + +const ( + // ServerGroupPolicyAffinity is a server group policy that restricts instances belonging to the server group to the same host. + ServerGroupPolicyAffinity ServerGroupPolicy = "affinity" + // ServerGroupPolicyAntiAffinity is a server group policy that restricts instances belonging to the server group to separate hosts. + ServerGroupPolicyAntiAffinity ServerGroupPolicy = "anti-affinity" + // ServerGroupPolicySoftAffinity is a server group policy that attempts to restrict instances belonging to the server group to the same host. + // Where it is not possible to schedule all instances on one host, they will be scheduled together on as few hosts as possible. + ServerGroupPolicySoftAffinity ServerGroupPolicy = "soft-affinity" + // ServerGroupPolicySoftAntiAffinity is a server group policy that attempts to restrict instances belonging to the server group to separate hosts. + // Where it is not possible to schedule all instances to separate hosts, they will be scheduled on as many separate hosts as possible. + ServerGroupPolicySoftAntiAffinity ServerGroupPolicy = "soft-anti-affinity" +) + +type ServerGroupRules struct { + // maxServerPerHost specifies how many servers can reside on a single compute host. + // It can be used only with the "anti-affinity" policy. + // +optional + MaxServerPerHost int32 `json:"maxServerPerHost,omitempty"` +} + +// ServerGroupResourceSpec contains the desired state of a servergroup +// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="ServerGroupResourceSpec is immutable" +// +kubebuilder:validation:XValidation:rule="has(self.rules) && self.rules.maxServerPerHost > 0 ? self.policy == 'anti-affinity' : true",message="maxServerPerHost can only be used with the anti-affinity policy" +type ServerGroupResourceSpec struct { + // name will be the name of the created resource. If not specified, the + // name of the ORC object will be used. + // +optional + Name *OpenStackName `json:"name,omitempty"` + + // policy is the policy to use for the server group. + // +required + Policy ServerGroupPolicy `json:"policy,omitempty"` + + // rules is the rules to use for the server group. + // +optional + Rules *ServerGroupRules `json:"rules,omitempty"` +} + +// ServerGroupFilter defines an existing resource by its properties +// +kubebuilder:validation:MinProperties:=1 +type ServerGroupFilter struct { + // name of the existing resource + // +optional + Name *OpenStackName `json:"name,omitempty"` +} + +type ServerGroupRulesStatus struct { + // maxServerPerHost specifies how many servers can reside on a single compute host. + // It can be used only with the "anti-affinity" policy. + // +optional + MaxServerPerHost *int32 `json:"maxServerPerHost,omitempty"` +} + +// ServerGroupResourceStatus represents the observed state of the resource. +type ServerGroupResourceStatus struct { + // name is a Human-readable name for the servergroup. Might not be unique. + // +kubebuilder:validation:MaxLength=1024 + // +optional + Name string `json:"name,omitempty"` + + // policy is the policy of the servergroup. + // +kubebuilder:validation:MaxLength=1024 + // +optional + Policy string `json:"policy,omitempty"` + + // projectID is the project owner of the resource. + // +kubebuilder:validation:MaxLength=1024 + // +optional + ProjectID string `json:"projectID,omitempty"` + + // userID of the server group. + // +kubebuilder:validation:MaxLength=1024 + // +optional + UserID string `json:"userID,omitempty"` + + // rules is the rules of the server group. + // +optional + Rules *ServerGroupRulesStatus `json:"rules,omitempty"` +} diff --git a/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/service_types.go b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/service_types.go new file mode 100644 index 00000000000..328f4fbbfde --- /dev/null +++ b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/service_types.go @@ -0,0 +1,78 @@ +/* +Copyright 2025 The ORC Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +// ServiceResourceSpec contains the desired state of the resource. +type ServiceResourceSpec struct { + // name indicates the name of service. If not specified, the name of the ORC + // resource will be used. + // +optional + Name *OpenStackName `json:"name,omitempty"` + + // description indicates the description of service. + // +kubebuilder:validation:MinLength:=1 + // +kubebuilder:validation:MaxLength:=255 + // +optional + Description *string `json:"description,omitempty"` + + // type indicates which resource the service is responsible for. + // +kubebuilder:validation:MinLength:=1 + // +kubebuilder:validation:MaxLength:=255 + // +required + Type string `json:"type,omitempty"` + + // enabled indicates whether the service is enabled or not. + // +kubebuilder:default=true + // +optional + Enabled *bool `json:"enabled,omitempty"` +} + +// ServiceFilter defines an existing resource by its properties +// +kubebuilder:validation:MinProperties:=1 +type ServiceFilter struct { + // name of the existing resource + // +optional + Name *OpenStackName `json:"name,omitempty"` + + // type of the existing resource + // +kubebuilder:validation:MinLength:=1 + // +kubebuilder:validation:MaxLength:=255 + // +optional + Type *string `json:"type,omitempty"` +} + +// ServiceResourceStatus represents the observed state of the resource. +type ServiceResourceStatus struct { + // name indicates the name of service. + // +kubebuilder:validation:MaxLength:=255 + // +optional + Name string `json:"name,omitempty"` + + // description indicates the description of service. + // +kubebuilder:validation:MaxLength:=255 + // +optional + Description string `json:"description,omitempty"` + + // type indicates which resource the service is responsible for. + // +kubebuilder:validation:MaxLength:=255 + // +optional + Type string `json:"type,omitempty"` + + // enabled indicates whether the service is enabled or not. + // +optional + Enabled *bool `json:"enabled,omitempty"` +} diff --git a/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/subnet_types.go b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/subnet_types.go new file mode 100644 index 00000000000..1a8450d0315 --- /dev/null +++ b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/subnet_types.go @@ -0,0 +1,338 @@ +/* +Copyright 2024 The ORC Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +// TODO validations: +// +// * IP addresses in CIDR, AllocationPools, Gateway, DNSNameserver(?), and +// HostRoutes match the version in IPVersion (Spec and SubnetFilter) +// * IPv6 may only be set if IPVersion is 6 (Spec and SubnetFilter) +// * AllocationPools must be in CIDR + +// SubnetFilter specifies a filter to select a subnet. At least one parameter must be specified. +// +kubebuilder:validation:MinProperties:=1 +type SubnetFilter struct { + // name of the existing resource + // +optional + Name *OpenStackName `json:"name,omitempty"` + + // description of the existing resource + // +optional + Description *NeutronDescription `json:"description,omitempty"` + + // ipVersion of the existing resource + // +optional + IPVersion *IPVersion `json:"ipVersion,omitempty"` + + // gatewayIP is the IP address of the gateway of the existing resource + // +optional + GatewayIP *IPvAny `json:"gatewayIP,omitempty"` + + // cidr of the existing resource + // +optional + CIDR *CIDR `json:"cidr,omitempty"` + + // ipv6 options of the existing resource + // +optional + IPv6 *IPv6Options `json:"ipv6,omitempty"` + + // networkRef is a reference to the ORC Network which this subnet is associated with. + // +optional + NetworkRef KubernetesNameRef `json:"networkRef"` + + // projectRef is a reference to the ORC Project this resource is associated with. + // Typically, only used by admin. + // +optional + ProjectRef *KubernetesNameRef `json:"projectRef,omitempty"` + + FilterByNeutronTags `json:",inline"` +} + +type SubnetResourceSpec struct { + // name is a human-readable name of the subnet. If not set, the object's name will be used. + // +optional + Name *OpenStackName `json:"name,omitempty"` + + // description is a human-readable description for the resource. + // +optional + Description *NeutronDescription `json:"description,omitempty"` + + // networkRef is a reference to the ORC Network which this subnet is associated with. + // +required + // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="networkRef is immutable" + NetworkRef KubernetesNameRef `json:"networkRef,omitempty"` + + // tags is a list of tags which will be applied to the subnet. + // +kubebuilder:validation:MaxItems:=64 + // +listType=set + // +optional + Tags []NeutronTag `json:"tags,omitempty"` + + // ipVersion is the IP version for the subnet. + // +required + // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="ipVersion is immutable" + IPVersion IPVersion `json:"ipVersion"` + + // cidr is the address CIDR of the subnet. It must match the IP version specified in IPVersion. + // +required + // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="cidr is immutable" + CIDR CIDR `json:"cidr,omitempty"` + + // allocationPools are IP Address pools that will be available for DHCP. IP + // addresses must be in CIDR. + // +kubebuilder:validation:MaxItems:=32 + // +listType=atomic + // +optional + AllocationPools []AllocationPool `json:"allocationPools,omitempty"` + + // gateway specifies the default gateway of the subnet. If not specified, + // neutron will add one automatically. To disable this behaviour, specify a + // gateway with a type of None. + // +optional + Gateway *SubnetGateway `json:"gateway,omitempty"` + + // enableDHCP will either enable to disable the DHCP service. + // +optional + EnableDHCP *bool `json:"enableDHCP,omitempty"` + + // dnsNameservers are the nameservers to be set via DHCP. + // +kubebuilder:validation:MaxItems:=16 + // +listType=set + // +optional + DNSNameservers []IPvAny `json:"dnsNameservers,omitempty"` + + // dnsPublishFixedIP will either enable or disable the publication of + // fixed IPs to the DNS. Defaults to false. + // +optional + // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="dnsPublishFixedIP is immutable" + DNSPublishFixedIP *bool `json:"dnsPublishFixedIP,omitempty"` + + // hostRoutes are any static host routes to be set via DHCP. + // +kubebuilder:validation:MaxItems:=256 + // +listType=atomic + // +optional + HostRoutes []HostRoute `json:"hostRoutes,omitempty"` + + // ipv6 contains IPv6-specific options. It may only be set if IPVersion is 6. + // +optional + // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="ipv6 is immutable" + IPv6 *IPv6Options `json:"ipv6,omitempty"` + + // routerRef specifies a router to attach the subnet to + // +optional + // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="routerRef is immutable" + RouterRef *KubernetesNameRef `json:"routerRef,omitempty"` + + // projectRef is a reference to the ORC Project this resource is associated with. + // Typically, only used by admin. + // +optional + // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="projectRef is immutable" + ProjectRef *KubernetesNameRef `json:"projectRef,omitempty"` + + // TODO: Support service types + // TODO: Support subnet pools +} + +type SubnetResourceStatus struct { + // name is the human-readable name of the subnet. Might not be unique. + // +kubebuilder:validation:MaxLength=1024 + // +optional + Name string `json:"name,omitempty"` + + // description is a human-readable description for the resource. + // +kubebuilder:validation:MaxLength=1024 + // +optional + Description string `json:"description,omitempty"` + + // ipVersion specifies IP version, either `4' or `6'. + // +optional + IPVersion *int32 `json:"ipVersion,omitempty"` + + // cidr representing IP range for this subnet, based on IP version. + // +kubebuilder:validation:MaxLength=1024 + // +optional + CIDR string `json:"cidr,omitempty"` + + // gatewayIP is the default gateway used by devices in this subnet, if any. + // +kubebuilder:validation:MaxLength=1024 + // +optional + GatewayIP string `json:"gatewayIP,omitempty"` + + // dnsNameservers is a list of name servers used by hosts in this subnet. + // +kubebuilder:validation:MaxItems:=16 + // +kubebuilder:validation:items:MaxLength=1024 + // +listType=atomic + // +optional + DNSNameservers []string `json:"dnsNameservers,omitempty"` + + // dnsPublishFixedIP specifies whether the fixed IP addresses are published to the DNS. + // +optional + DNSPublishFixedIP *bool `json:"dnsPublishFixedIP,omitempty"` + + // allocationPools is a list of sub-ranges within CIDR available for dynamic + // allocation to ports. + // +kubebuilder:validation:MaxItems:=32 + // +listType=atomic + // +optional + AllocationPools []AllocationPoolStatus `json:"allocationPools,omitempty"` + + // hostRoutes is a list of routes that should be used by devices with IPs + // from this subnet (not including local subnet route). + // +kubebuilder:validation:MaxItems:=256 + // +listType=atomic + // +optional + HostRoutes []HostRouteStatus `json:"hostRoutes,omitempty"` + + // enableDHCP specifies whether DHCP is enabled for this subnet or not. + // +optional + EnableDHCP *bool `json:"enableDHCP,omitempty"` + + // networkID is the ID of the network to which the subnet belongs. + // +kubebuilder:validation:MaxLength=1024 + // +optional + NetworkID string `json:"networkID,omitempty"` + + // projectID is the project owner of the subnet. + // +kubebuilder:validation:MaxLength=1024 + // +optional + ProjectID string `json:"projectID,omitempty"` + + // ipv6AddressMode specifies mechanisms for assigning IPv6 IP addresses. + // +kubebuilder:validation:MaxLength=1024 + // +optional + IPv6AddressMode string `json:"ipv6AddressMode,omitempty"` + + // ipv6RAMode is the IPv6 router advertisement mode. It specifies + // whether the networking service should transmit ICMPv6 packets. + // +kubebuilder:validation:MaxLength=1024 + // +optional + IPv6RAMode string `json:"ipv6RAMode,omitempty"` + + // subnetPoolID is the id of the subnet pool associated with the subnet. + // +kubebuilder:validation:MaxLength=1024 + // +optional + SubnetPoolID string `json:"subnetPoolID,omitempty"` + + // tags optionally set via extensions/attributestags + // +kubebuilder:validation:MaxItems:=64 + // +kubebuilder:validation:items:MaxLength=1024 + // +listType=atomic + // +optional + Tags []string `json:"tags,omitempty"` + + NeutronStatusMetadata `json:",inline"` +} + +// +kubebuilder:validation:Enum:=slaac;dhcpv6-stateful;dhcpv6-stateless +type IPv6AddressMode string + +const ( + IPv6AddressModeSLAAC = "slaac" + IPv6AddressModeDHCPv6Stateful = "dhcpv6-stateful" + IPv6AddressModeDHCPv6Stateless = "dhcpv6-stateless" +) + +// +kubebuilder:validation:Enum:=slaac;dhcpv6-stateful;dhcpv6-stateless +type IPv6RAMode string + +const ( + IPv6RAModeSLAAC = "slaac" + IPv6RAModeDHCPv6Stateful = "dhcpv6-stateful" + IPv6RAModeDHCPv6Stateless = "dhcpv6-stateless" +) + +// +kubebuilder:validation:MinProperties:=1 +type IPv6Options struct { + // addressMode specifies mechanisms for assigning IPv6 IP addresses. + // +optional + AddressMode *IPv6AddressMode `json:"addressMode,omitempty"` + + // raMode specifies the IPv6 router advertisement mode. It specifies whether + // the networking service should transmit ICMPv6 packets. + // +optional + RAMode *IPv6RAMode `json:"raMode,omitempty"` +} + +type SubnetGatewayType string + +const ( + SubnetGatewayTypeNone = "None" + SubnetGatewayTypeAutomatic = "Automatic" + SubnetGatewayTypeIP = "IP" +) + +type SubnetGateway struct { + // type specifies how the default gateway will be created. `Automatic` + // specifies that neutron will automatically add a default gateway. This is + // also the default if no Gateway is specified. `None` specifies that the + // subnet will not have a default gateway. `IP` specifies that the subnet + // will use a specific address as the default gateway, which must be + // specified in `IP`. + // +kubebuilder:validation:Enum:=None;Automatic;IP + // +required + Type SubnetGatewayType `json:"type,omitempty"` + + // ip is the IP address of the default gateway, which must be specified if + // Type is `IP`. It must be a valid IP address, either IPv4 or IPv6, + // matching the IPVersion in SubnetResourceSpec. + // +optional + IP *IPvAny `json:"ip,omitempty"` +} + +type AllocationPool struct { + // start is the first IP address in the allocation pool. + // +required + Start IPvAny `json:"start,omitempty"` + + // end is the last IP address in the allocation pool. + // +required + End IPvAny `json:"end,omitempty"` +} + +type AllocationPoolStatus struct { + // start is the first IP address in the allocation pool. + // +kubebuilder:validation:MaxLength=1024 + // +optional + Start string `json:"start,omitempty"` + + // end is the last IP address in the allocation pool. + // +kubebuilder:validation:MaxLength=1024 + // +optional + End string `json:"end,omitempty"` +} + +type HostRoute struct { + // destination for the additional route. + // +required + Destination CIDR `json:"destination,omitempty"` + + // nextHop for the additional route. + // +required + NextHop IPvAny `json:"nextHop,omitempty"` +} + +type HostRouteStatus struct { + // destination for the additional route. + // +kubebuilder:validation:MaxLength=1024 + // +optional + Destination string `json:"destination,omitempty"` + + // nextHop for the additional route. + // +kubebuilder:validation:MaxLength=1024 + // +optional + NextHop string `json:"nextHop,omitempty"` +} diff --git a/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/volume_types.go b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/volume_types.go new file mode 100644 index 00000000000..f50f83daa8a --- /dev/null +++ b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/volume_types.go @@ -0,0 +1,238 @@ +/* +Copyright 2025 The ORC Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + +// VolumeResourceSpec contains the desired state of the resource. +type VolumeResourceSpec struct { + // name will be the name of the created resource. If not specified, the + // name of the ORC object will be used. + // +optional + Name *OpenStackName `json:"name,omitempty"` + + // description is a human-readable description for the resource. + // +kubebuilder:validation:MinLength:=1 + // +kubebuilder:validation:MaxLength:=255 + // +optional + Description *string `json:"description,omitempty"` + + // size is the size of the volume, in gibibytes (GiB). + // +kubebuilder:validation:Minimum=1 + // +required + // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="size is immutable" + Size int32 `json:"size,omitempty"` + + // volumeTypeRef is a reference to the ORC VolumeType which this resource is associated with. + // +optional + // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="volumeTypeRef is immutable" + VolumeTypeRef *KubernetesNameRef `json:"volumeTypeRef,omitempty"` + + // availabilityZone is the availability zone in which to create the volume. + // +kubebuilder:validation:MaxLength:=255 + // +optional + // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="availabilityZone is immutable" + AvailabilityZone string `json:"availabilityZone,omitempty"` + + // metadata key and value pairs to be associated with the volume. + // NOTE(mandre): gophercloud can't clear all metadata at the moment, we thus can't allow + // mutability for metadata as we might end up in a state that is not reconciliable + // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="metadata is immutable" + // +kubebuilder:validation:MaxItems:=64 + // +listType=atomic + // +optional + Metadata []VolumeMetadata `json:"metadata,omitempty"` +} + +// VolumeFilter defines an existing resource by its properties +// +kubebuilder:validation:MinProperties:=1 +type VolumeFilter struct { + // name of the existing resource + // +optional + Name *OpenStackName `json:"name,omitempty"` + + // description of the existing resource + // +kubebuilder:validation:MinLength:=1 + // +kubebuilder:validation:MaxLength:=255 + // +optional + Description *string `json:"description,omitempty"` + + // size is the size of the volume in GiB. + // +kubebuilder:validation:Minimum=1 + // +optional + Size *int32 `json:"size,omitempty"` + + // availabilityZone is the availability zone of the existing resource + // +kubebuilder:validation:MaxLength:=255 + // +optional + AvailabilityZone string `json:"availabilityZone,omitempty"` +} + +type VolumeAttachmentStatus struct { + // attachmentID represents the attachment UUID. + // +kubebuilder:validation:MaxLength=1024 + // +optional + AttachmentID string `json:"attachmentID"` + + // serverID is the UUID of the server to which the volume is attached. + // +kubebuilder:validation:MaxLength=1024 + // +optional + ServerID string `json:"serverID"` + + // device is the name of the device in the instance. + // +kubebuilder:validation:MaxLength=1024 + // +optional + Device string `json:"device"` + + // attachedAt shows the date and time when the resource was attached. The date and time stamp format is ISO 8601. + // +optional + AttachedAt *metav1.Time `json:"attachedAt"` +} + +// VolumeResourceStatus represents the observed state of the resource. +type VolumeResourceStatus struct { + // name is a Human-readable name for the resource. Might not be unique. + // +kubebuilder:validation:MaxLength=1024 + // +optional + Name string `json:"name,omitempty"` + + // description is a human-readable description for the resource. + // +kubebuilder:validation:MaxLength=1024 + // +optional + Description string `json:"description,omitempty"` + + // size is the size of the volume in GiB. + // +optional + Size *int32 `json:"size,omitempty"` + + // status represents the current status of the volume. + // +kubebuilder:validation:MaxLength=1024 + // +optional + Status string `json:"status,omitempty"` + + // availabilityZone is which availability zone the volume is in. + // +kubebuilder:validation:MaxLength=1024 + // +optional + AvailabilityZone string `json:"availabilityZone,omitempty"` + + // attachments is a list of attachments for the volume. + // +kubebuilder:validation:MaxItems:=32 + // +listType=atomic + // +optional + Attachments []VolumeAttachmentStatus `json:"attachments"` + + // volumeType is the name of associated the volume type. + // +kubebuilder:validation:MaxLength=1024 + // +optional + VolumeType string `json:"volumeType,omitempty"` + + // FIXME(mandre) Gophercloud doesn't return this field + // // volumeTypeID is the ID of the volumetype to which the resource is associated. + // // +kubebuilder:validation:MaxLength=1024 + // // +optional + // VolumeTypeID string `json:"volumeTypeID,omitempty"` + + // snapshotID is the ID of the snapshot from which the volume was created + // +kubebuilder:validation:MaxLength=1024 + // +optional + SnapshotID string `json:"snapshotID,omitempty"` + + // sourceVolID is the ID of another block storage volume from which the current volume was created + // +kubebuilder:validation:MaxLength=1024 + // +optional + SourceVolID string `json:"sourceVolID,omitempty"` + + // backupID is the ID of the backup from which the volume was restored + // +kubebuilder:validation:MaxLength=1024 + // +optional + BackupID string `json:"backupID,omitempty"` + + // metadata key and value pairs to be associated with the volume. + // +kubebuilder:validation:MaxItems:=64 + // +listType=atomic + // +optional + Metadata []VolumeMetadataStatus `json:"metadata,omitempty"` + + // userID is the ID of the user who created the volume. + // +kubebuilder:validation:MaxLength=1024 + // +optional + UserID string `json:"userID,omitempty"` + + // bootable indicates whether this is a bootable volume. + // +optional + Bootable *bool `json:"bootable,omitempty"` + + // encrypted denotes if the volume is encrypted. + // +optional + Encrypted *bool `json:"encrypted,omitempty"` + + // replicationStatus is the status of replication. + // +kubebuilder:validation:MaxLength=1024 + // +optional + ReplicationStatus string `json:"replicationStatus,omitempty"` + + // consistencyGroupID is the consistency group ID. + // +kubebuilder:validation:MaxLength=1024 + // +optional + ConsistencyGroupID string `json:"consistencyGroupID,omitempty"` + + // multiattach denotes if the volume is multi-attach capable. + // +optional + Multiattach *bool `json:"multiattach,omitempty"` + + // host is the identifier of the host holding the volume. + // +kubebuilder:validation:MaxLength=1024 + // +optional + Host string `json:"host,omitempty"` + + // tenantID is the ID of the project that owns the volume. + // +kubebuilder:validation:MaxLength=1024 + // +optional + TenantID string `json:"tenantID,omitempty"` + + // createdAt shows the date and time when the resource was created. The date and time stamp format is ISO 8601 + // +optional + CreatedAt *metav1.Time `json:"createdAt,omitempty"` + + // updatedAt shows the date and time when the resource was updated. The date and time stamp format is ISO 8601 + // +optional + UpdatedAt *metav1.Time `json:"updatedAt,omitempty"` +} + +type VolumeMetadata struct { + // name is the name of the metadata + // +kubebuilder:validation:MaxLength:=255 + // +required + Name string `json:"name"` + + // value is the value of the metadata + // +kubebuilder:validation:MaxLength:=255 + // +required + Value string `json:"value"` +} + +type VolumeMetadataStatus struct { + // name is the name of the metadata + // +kubebuilder:validation:MaxLength:=255 + // +optional + Name string `json:"name,omitempty"` + + // value is the value of the metadata + // +kubebuilder:validation:MaxLength:=255 + // +optional + Value string `json:"value,omitempty"` +} diff --git a/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/volumetype_types.go b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/volumetype_types.go new file mode 100644 index 00000000000..76bdb210bbd --- /dev/null +++ b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/volumetype_types.go @@ -0,0 +1,106 @@ +/* +Copyright 2025 The ORC Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +// VolumeTypeResourceSpec contains the desired state of the resource. +type VolumeTypeResourceSpec struct { + // name will be the name of the created resource. If not specified, the + // name of the ORC object will be used. + // +optional + Name *OpenStackName `json:"name,omitempty"` + + // description is a human-readable description for the resource. + // +kubebuilder:validation:MinLength:=1 + // +kubebuilder:validation:MaxLength:=255 + // +optional + Description *string `json:"description,omitempty"` + + // extraSpecs is a map of key-value pairs that define extra specifications for the volume type. + // +kubebuilder:validation:MaxItems:=64 + // +listType=atomic + // +optional + ExtraSpecs []VolumeTypeExtraSpec `json:"extraSpecs,omitempty"` + + // isPublic indicates whether the volume type is public. + // +optional + IsPublic *bool `json:"isPublic,omitempty"` +} + +// VolumeTypeFilter defines an existing resource by its properties +// +kubebuilder:validation:MinProperties:=1 +type VolumeTypeFilter struct { + // name of the existing resource + // +optional + Name *OpenStackName `json:"name,omitempty"` + + // description of the existing resource + // +kubebuilder:validation:MinLength:=1 + // +kubebuilder:validation:MaxLength:=255 + // +optional + Description *string `json:"description,omitempty"` + + // isPublic indicates whether the VolumeType is public. + // +optional + IsPublic *bool `json:"isPublic,omitempty"` +} + +// VolumeTypeResourceStatus represents the observed state of the resource. +type VolumeTypeResourceStatus struct { + // name is a Human-readable name for the resource. Might not be unique. + // +kubebuilder:validation:MaxLength=1024 + // +optional + Name string `json:"name,omitempty"` + + // description is a human-readable description for the resource. + // +kubebuilder:validation:MaxLength=1024 + // +optional + Description string `json:"description,omitempty"` + + // extraSpecs is a map of key-value pairs that define extra specifications for the volume type. + // +kubebuilder:validation:MaxItems:=64 + // +listType=atomic + // +optional + ExtraSpecs []VolumeTypeExtraSpecStatus `json:"extraSpecs"` + + // isPublic indicates whether the VolumeType is public. + // +optional + IsPublic *bool `json:"isPublic"` +} + +type VolumeTypeExtraSpec struct { + // name is the name of the extraspec + // +kubebuilder:validation:MaxLength:=255 + // +required + Name string `json:"name"` + + // value is the value of the extraspec + // +kubebuilder:validation:MaxLength:=255 + // +required + Value string `json:"value"` +} + +type VolumeTypeExtraSpecStatus struct { + // name is the name of the extraspec + // +kubebuilder:validation:MaxLength:=255 + // +optional + Name string `json:"name,omitempty"` + + // value is the value of the extraspec + // +kubebuilder:validation:MaxLength:=255 + // +optional + Value string `json:"value,omitempty"` +} diff --git a/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/zz_generated.deepcopy.go b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/zz_generated.deepcopy.go new file mode 100644 index 00000000000..67bfeab8a1f --- /dev/null +++ b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/zz_generated.deepcopy.go @@ -0,0 +1,5563 @@ +//go:build !ignore_autogenerated + +/* +Copyright 2025 The ORC Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by controller-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Address) DeepCopyInto(out *Address) { + *out = *in + if in.IP != nil { + in, out := &in.IP, &out.IP + *out = new(IPvAny) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Address. +func (in *Address) DeepCopy() *Address { + if in == nil { + return nil + } + out := new(Address) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AllocationPool) DeepCopyInto(out *AllocationPool) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AllocationPool. +func (in *AllocationPool) DeepCopy() *AllocationPool { + if in == nil { + return nil + } + out := new(AllocationPool) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AllocationPoolStatus) DeepCopyInto(out *AllocationPoolStatus) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AllocationPoolStatus. +func (in *AllocationPoolStatus) DeepCopy() *AllocationPoolStatus { + if in == nil { + return nil + } + out := new(AllocationPoolStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AllowedAddressPair) DeepCopyInto(out *AllowedAddressPair) { + *out = *in + if in.MAC != nil { + in, out := &in.MAC, &out.MAC + *out = new(MAC) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AllowedAddressPair. +func (in *AllowedAddressPair) DeepCopy() *AllowedAddressPair { + if in == nil { + return nil + } + out := new(AllowedAddressPair) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AllowedAddressPairStatus) DeepCopyInto(out *AllowedAddressPairStatus) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AllowedAddressPairStatus. +func (in *AllowedAddressPairStatus) DeepCopy() *AllowedAddressPairStatus { + if in == nil { + return nil + } + out := new(AllowedAddressPairStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CloudCredentialsReference) DeepCopyInto(out *CloudCredentialsReference) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CloudCredentialsReference. +func (in *CloudCredentialsReference) DeepCopy() *CloudCredentialsReference { + if in == nil { + return nil + } + out := new(CloudCredentialsReference) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Domain) DeepCopyInto(out *Domain) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Domain. +func (in *Domain) DeepCopy() *Domain { + if in == nil { + return nil + } + out := new(Domain) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Domain) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DomainFilter) DeepCopyInto(out *DomainFilter) { + *out = *in + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(KeystoneName) + **out = **in + } + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = new(bool) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DomainFilter. +func (in *DomainFilter) DeepCopy() *DomainFilter { + if in == nil { + return nil + } + out := new(DomainFilter) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DomainImport) DeepCopyInto(out *DomainImport) { + *out = *in + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } + if in.Filter != nil { + in, out := &in.Filter, &out.Filter + *out = new(DomainFilter) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DomainImport. +func (in *DomainImport) DeepCopy() *DomainImport { + if in == nil { + return nil + } + out := new(DomainImport) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DomainList) DeepCopyInto(out *DomainList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Domain, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DomainList. +func (in *DomainList) DeepCopy() *DomainList { + if in == nil { + return nil + } + out := new(DomainList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *DomainList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DomainResourceSpec) DeepCopyInto(out *DomainResourceSpec) { + *out = *in + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(KeystoneName) + **out = **in + } + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(string) + **out = **in + } + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = new(bool) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DomainResourceSpec. +func (in *DomainResourceSpec) DeepCopy() *DomainResourceSpec { + if in == nil { + return nil + } + out := new(DomainResourceSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DomainResourceStatus) DeepCopyInto(out *DomainResourceStatus) { + *out = *in + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = new(bool) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DomainResourceStatus. +func (in *DomainResourceStatus) DeepCopy() *DomainResourceStatus { + if in == nil { + return nil + } + out := new(DomainResourceStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DomainSpec) DeepCopyInto(out *DomainSpec) { + *out = *in + if in.Import != nil { + in, out := &in.Import, &out.Import + *out = new(DomainImport) + (*in).DeepCopyInto(*out) + } + if in.Resource != nil { + in, out := &in.Resource, &out.Resource + *out = new(DomainResourceSpec) + (*in).DeepCopyInto(*out) + } + if in.ManagedOptions != nil { + in, out := &in.ManagedOptions, &out.ManagedOptions + *out = new(ManagedOptions) + **out = **in + } + out.CloudCredentialsRef = in.CloudCredentialsRef +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DomainSpec. +func (in *DomainSpec) DeepCopy() *DomainSpec { + if in == nil { + return nil + } + out := new(DomainSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DomainStatus) DeepCopyInto(out *DomainStatus) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]v1.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } + if in.Resource != nil { + in, out := &in.Resource, &out.Resource + *out = new(DomainResourceStatus) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DomainStatus. +func (in *DomainStatus) DeepCopy() *DomainStatus { + if in == nil { + return nil + } + out := new(DomainStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ExternalGateway) DeepCopyInto(out *ExternalGateway) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExternalGateway. +func (in *ExternalGateway) DeepCopy() *ExternalGateway { + if in == nil { + return nil + } + out := new(ExternalGateway) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ExternalGatewayStatus) DeepCopyInto(out *ExternalGatewayStatus) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExternalGatewayStatus. +func (in *ExternalGatewayStatus) DeepCopy() *ExternalGatewayStatus { + if in == nil { + return nil + } + out := new(ExternalGatewayStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *FilterByKeystoneTags) DeepCopyInto(out *FilterByKeystoneTags) { + *out = *in + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make([]KeystoneTag, len(*in)) + copy(*out, *in) + } + if in.TagsAny != nil { + in, out := &in.TagsAny, &out.TagsAny + *out = make([]KeystoneTag, len(*in)) + copy(*out, *in) + } + if in.NotTags != nil { + in, out := &in.NotTags, &out.NotTags + *out = make([]KeystoneTag, len(*in)) + copy(*out, *in) + } + if in.NotTagsAny != nil { + in, out := &in.NotTagsAny, &out.NotTagsAny + *out = make([]KeystoneTag, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FilterByKeystoneTags. +func (in *FilterByKeystoneTags) DeepCopy() *FilterByKeystoneTags { + if in == nil { + return nil + } + out := new(FilterByKeystoneTags) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *FilterByNeutronTags) DeepCopyInto(out *FilterByNeutronTags) { + *out = *in + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make([]NeutronTag, len(*in)) + copy(*out, *in) + } + if in.TagsAny != nil { + in, out := &in.TagsAny, &out.TagsAny + *out = make([]NeutronTag, len(*in)) + copy(*out, *in) + } + if in.NotTags != nil { + in, out := &in.NotTags, &out.NotTags + *out = make([]NeutronTag, len(*in)) + copy(*out, *in) + } + if in.NotTagsAny != nil { + in, out := &in.NotTagsAny, &out.NotTagsAny + *out = make([]NeutronTag, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FilterByNeutronTags. +func (in *FilterByNeutronTags) DeepCopy() *FilterByNeutronTags { + if in == nil { + return nil + } + out := new(FilterByNeutronTags) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *FilterByServerTags) DeepCopyInto(out *FilterByServerTags) { + *out = *in + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make([]ServerTag, len(*in)) + copy(*out, *in) + } + if in.TagsAny != nil { + in, out := &in.TagsAny, &out.TagsAny + *out = make([]ServerTag, len(*in)) + copy(*out, *in) + } + if in.NotTags != nil { + in, out := &in.NotTags, &out.NotTags + *out = make([]ServerTag, len(*in)) + copy(*out, *in) + } + if in.NotTagsAny != nil { + in, out := &in.NotTagsAny, &out.NotTagsAny + *out = make([]ServerTag, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FilterByServerTags. +func (in *FilterByServerTags) DeepCopy() *FilterByServerTags { + if in == nil { + return nil + } + out := new(FilterByServerTags) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *FixedIPStatus) DeepCopyInto(out *FixedIPStatus) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FixedIPStatus. +func (in *FixedIPStatus) DeepCopy() *FixedIPStatus { + if in == nil { + return nil + } + out := new(FixedIPStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Flavor) DeepCopyInto(out *Flavor) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Flavor. +func (in *Flavor) DeepCopy() *Flavor { + if in == nil { + return nil + } + out := new(Flavor) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Flavor) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *FlavorFilter) DeepCopyInto(out *FlavorFilter) { + *out = *in + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(OpenStackName) + **out = **in + } + if in.RAM != nil { + in, out := &in.RAM, &out.RAM + *out = new(int32) + **out = **in + } + if in.Vcpus != nil { + in, out := &in.Vcpus, &out.Vcpus + *out = new(int32) + **out = **in + } + if in.Disk != nil { + in, out := &in.Disk, &out.Disk + *out = new(int32) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FlavorFilter. +func (in *FlavorFilter) DeepCopy() *FlavorFilter { + if in == nil { + return nil + } + out := new(FlavorFilter) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *FlavorImport) DeepCopyInto(out *FlavorImport) { + *out = *in + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } + if in.Filter != nil { + in, out := &in.Filter, &out.Filter + *out = new(FlavorFilter) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FlavorImport. +func (in *FlavorImport) DeepCopy() *FlavorImport { + if in == nil { + return nil + } + out := new(FlavorImport) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *FlavorList) DeepCopyInto(out *FlavorList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Flavor, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FlavorList. +func (in *FlavorList) DeepCopy() *FlavorList { + if in == nil { + return nil + } + out := new(FlavorList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *FlavorList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *FlavorResourceSpec) DeepCopyInto(out *FlavorResourceSpec) { + *out = *in + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(OpenStackName) + **out = **in + } + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(string) + **out = **in + } + if in.IsPublic != nil { + in, out := &in.IsPublic, &out.IsPublic + *out = new(bool) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FlavorResourceSpec. +func (in *FlavorResourceSpec) DeepCopy() *FlavorResourceSpec { + if in == nil { + return nil + } + out := new(FlavorResourceSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *FlavorResourceStatus) DeepCopyInto(out *FlavorResourceStatus) { + *out = *in + if in.RAM != nil { + in, out := &in.RAM, &out.RAM + *out = new(int32) + **out = **in + } + if in.Vcpus != nil { + in, out := &in.Vcpus, &out.Vcpus + *out = new(int32) + **out = **in + } + if in.Disk != nil { + in, out := &in.Disk, &out.Disk + *out = new(int32) + **out = **in + } + if in.Swap != nil { + in, out := &in.Swap, &out.Swap + *out = new(int32) + **out = **in + } + if in.IsPublic != nil { + in, out := &in.IsPublic, &out.IsPublic + *out = new(bool) + **out = **in + } + if in.Ephemeral != nil { + in, out := &in.Ephemeral, &out.Ephemeral + *out = new(int32) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FlavorResourceStatus. +func (in *FlavorResourceStatus) DeepCopy() *FlavorResourceStatus { + if in == nil { + return nil + } + out := new(FlavorResourceStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *FlavorSpec) DeepCopyInto(out *FlavorSpec) { + *out = *in + if in.Import != nil { + in, out := &in.Import, &out.Import + *out = new(FlavorImport) + (*in).DeepCopyInto(*out) + } + if in.Resource != nil { + in, out := &in.Resource, &out.Resource + *out = new(FlavorResourceSpec) + (*in).DeepCopyInto(*out) + } + if in.ManagedOptions != nil { + in, out := &in.ManagedOptions, &out.ManagedOptions + *out = new(ManagedOptions) + **out = **in + } + out.CloudCredentialsRef = in.CloudCredentialsRef +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FlavorSpec. +func (in *FlavorSpec) DeepCopy() *FlavorSpec { + if in == nil { + return nil + } + out := new(FlavorSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *FlavorStatus) DeepCopyInto(out *FlavorStatus) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]v1.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } + if in.Resource != nil { + in, out := &in.Resource, &out.Resource + *out = new(FlavorResourceStatus) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FlavorStatus. +func (in *FlavorStatus) DeepCopy() *FlavorStatus { + if in == nil { + return nil + } + out := new(FlavorStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *FloatingIP) DeepCopyInto(out *FloatingIP) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FloatingIP. +func (in *FloatingIP) DeepCopy() *FloatingIP { + if in == nil { + return nil + } + out := new(FloatingIP) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *FloatingIP) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *FloatingIPFilter) DeepCopyInto(out *FloatingIPFilter) { + *out = *in + if in.FloatingIP != nil { + in, out := &in.FloatingIP, &out.FloatingIP + *out = new(IPvAny) + **out = **in + } + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(NeutronDescription) + **out = **in + } + if in.FloatingNetworkRef != nil { + in, out := &in.FloatingNetworkRef, &out.FloatingNetworkRef + *out = new(KubernetesNameRef) + **out = **in + } + if in.PortRef != nil { + in, out := &in.PortRef, &out.PortRef + *out = new(KubernetesNameRef) + **out = **in + } + if in.ProjectRef != nil { + in, out := &in.ProjectRef, &out.ProjectRef + *out = new(KubernetesNameRef) + **out = **in + } + in.FilterByNeutronTags.DeepCopyInto(&out.FilterByNeutronTags) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FloatingIPFilter. +func (in *FloatingIPFilter) DeepCopy() *FloatingIPFilter { + if in == nil { + return nil + } + out := new(FloatingIPFilter) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *FloatingIPImport) DeepCopyInto(out *FloatingIPImport) { + *out = *in + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } + if in.Filter != nil { + in, out := &in.Filter, &out.Filter + *out = new(FloatingIPFilter) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FloatingIPImport. +func (in *FloatingIPImport) DeepCopy() *FloatingIPImport { + if in == nil { + return nil + } + out := new(FloatingIPImport) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *FloatingIPList) DeepCopyInto(out *FloatingIPList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]FloatingIP, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FloatingIPList. +func (in *FloatingIPList) DeepCopy() *FloatingIPList { + if in == nil { + return nil + } + out := new(FloatingIPList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *FloatingIPList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *FloatingIPResourceSpec) DeepCopyInto(out *FloatingIPResourceSpec) { + *out = *in + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(NeutronDescription) + **out = **in + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make([]NeutronTag, len(*in)) + copy(*out, *in) + } + if in.FloatingNetworkRef != nil { + in, out := &in.FloatingNetworkRef, &out.FloatingNetworkRef + *out = new(KubernetesNameRef) + **out = **in + } + if in.FloatingSubnetRef != nil { + in, out := &in.FloatingSubnetRef, &out.FloatingSubnetRef + *out = new(KubernetesNameRef) + **out = **in + } + if in.FloatingIP != nil { + in, out := &in.FloatingIP, &out.FloatingIP + *out = new(IPvAny) + **out = **in + } + if in.PortRef != nil { + in, out := &in.PortRef, &out.PortRef + *out = new(KubernetesNameRef) + **out = **in + } + if in.FixedIP != nil { + in, out := &in.FixedIP, &out.FixedIP + *out = new(IPvAny) + **out = **in + } + if in.ProjectRef != nil { + in, out := &in.ProjectRef, &out.ProjectRef + *out = new(KubernetesNameRef) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FloatingIPResourceSpec. +func (in *FloatingIPResourceSpec) DeepCopy() *FloatingIPResourceSpec { + if in == nil { + return nil + } + out := new(FloatingIPResourceSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *FloatingIPResourceStatus) DeepCopyInto(out *FloatingIPResourceStatus) { + *out = *in + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make([]string, len(*in)) + copy(*out, *in) + } + in.NeutronStatusMetadata.DeepCopyInto(&out.NeutronStatusMetadata) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FloatingIPResourceStatus. +func (in *FloatingIPResourceStatus) DeepCopy() *FloatingIPResourceStatus { + if in == nil { + return nil + } + out := new(FloatingIPResourceStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *FloatingIPSpec) DeepCopyInto(out *FloatingIPSpec) { + *out = *in + if in.Import != nil { + in, out := &in.Import, &out.Import + *out = new(FloatingIPImport) + (*in).DeepCopyInto(*out) + } + if in.Resource != nil { + in, out := &in.Resource, &out.Resource + *out = new(FloatingIPResourceSpec) + (*in).DeepCopyInto(*out) + } + if in.ManagedOptions != nil { + in, out := &in.ManagedOptions, &out.ManagedOptions + *out = new(ManagedOptions) + **out = **in + } + out.CloudCredentialsRef = in.CloudCredentialsRef +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FloatingIPSpec. +func (in *FloatingIPSpec) DeepCopy() *FloatingIPSpec { + if in == nil { + return nil + } + out := new(FloatingIPSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *FloatingIPStatus) DeepCopyInto(out *FloatingIPStatus) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]v1.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } + if in.Resource != nil { + in, out := &in.Resource, &out.Resource + *out = new(FloatingIPResourceStatus) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FloatingIPStatus. +func (in *FloatingIPStatus) DeepCopy() *FloatingIPStatus { + if in == nil { + return nil + } + out := new(FloatingIPStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Group) DeepCopyInto(out *Group) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Group. +func (in *Group) DeepCopy() *Group { + if in == nil { + return nil + } + out := new(Group) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Group) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GroupFilter) DeepCopyInto(out *GroupFilter) { + *out = *in + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(KeystoneName) + **out = **in + } + if in.DomainRef != nil { + in, out := &in.DomainRef, &out.DomainRef + *out = new(KubernetesNameRef) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GroupFilter. +func (in *GroupFilter) DeepCopy() *GroupFilter { + if in == nil { + return nil + } + out := new(GroupFilter) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GroupImport) DeepCopyInto(out *GroupImport) { + *out = *in + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } + if in.Filter != nil { + in, out := &in.Filter, &out.Filter + *out = new(GroupFilter) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GroupImport. +func (in *GroupImport) DeepCopy() *GroupImport { + if in == nil { + return nil + } + out := new(GroupImport) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GroupList) DeepCopyInto(out *GroupList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Group, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GroupList. +func (in *GroupList) DeepCopy() *GroupList { + if in == nil { + return nil + } + out := new(GroupList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *GroupList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GroupResourceSpec) DeepCopyInto(out *GroupResourceSpec) { + *out = *in + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(KeystoneName) + **out = **in + } + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(string) + **out = **in + } + if in.DomainRef != nil { + in, out := &in.DomainRef, &out.DomainRef + *out = new(KubernetesNameRef) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GroupResourceSpec. +func (in *GroupResourceSpec) DeepCopy() *GroupResourceSpec { + if in == nil { + return nil + } + out := new(GroupResourceSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GroupResourceStatus) DeepCopyInto(out *GroupResourceStatus) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GroupResourceStatus. +func (in *GroupResourceStatus) DeepCopy() *GroupResourceStatus { + if in == nil { + return nil + } + out := new(GroupResourceStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GroupSpec) DeepCopyInto(out *GroupSpec) { + *out = *in + if in.Import != nil { + in, out := &in.Import, &out.Import + *out = new(GroupImport) + (*in).DeepCopyInto(*out) + } + if in.Resource != nil { + in, out := &in.Resource, &out.Resource + *out = new(GroupResourceSpec) + (*in).DeepCopyInto(*out) + } + if in.ManagedOptions != nil { + in, out := &in.ManagedOptions, &out.ManagedOptions + *out = new(ManagedOptions) + **out = **in + } + out.CloudCredentialsRef = in.CloudCredentialsRef +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GroupSpec. +func (in *GroupSpec) DeepCopy() *GroupSpec { + if in == nil { + return nil + } + out := new(GroupSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GroupStatus) DeepCopyInto(out *GroupStatus) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]v1.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } + if in.Resource != nil { + in, out := &in.Resource, &out.Resource + *out = new(GroupResourceStatus) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GroupStatus. +func (in *GroupStatus) DeepCopy() *GroupStatus { + if in == nil { + return nil + } + out := new(GroupStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *HostRoute) DeepCopyInto(out *HostRoute) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HostRoute. +func (in *HostRoute) DeepCopy() *HostRoute { + if in == nil { + return nil + } + out := new(HostRoute) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *HostRouteStatus) DeepCopyInto(out *HostRouteStatus) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HostRouteStatus. +func (in *HostRouteStatus) DeepCopy() *HostRouteStatus { + if in == nil { + return nil + } + out := new(HostRouteStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *IPv6Options) DeepCopyInto(out *IPv6Options) { + *out = *in + if in.AddressMode != nil { + in, out := &in.AddressMode, &out.AddressMode + *out = new(IPv6AddressMode) + **out = **in + } + if in.RAMode != nil { + in, out := &in.RAMode, &out.RAMode + *out = new(IPv6RAMode) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPv6Options. +func (in *IPv6Options) DeepCopy() *IPv6Options { + if in == nil { + return nil + } + out := new(IPv6Options) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Image) DeepCopyInto(out *Image) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Image. +func (in *Image) DeepCopy() *Image { + if in == nil { + return nil + } + out := new(Image) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Image) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ImageContent) DeepCopyInto(out *ImageContent) { + *out = *in + if in.Download != nil { + in, out := &in.Download, &out.Download + *out = new(ImageContentSourceDownload) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageContent. +func (in *ImageContent) DeepCopy() *ImageContent { + if in == nil { + return nil + } + out := new(ImageContent) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ImageContentSourceDownload) DeepCopyInto(out *ImageContentSourceDownload) { + *out = *in + if in.Decompress != nil { + in, out := &in.Decompress, &out.Decompress + *out = new(ImageCompression) + **out = **in + } + if in.Hash != nil { + in, out := &in.Hash, &out.Hash + *out = new(ImageHash) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageContentSourceDownload. +func (in *ImageContentSourceDownload) DeepCopy() *ImageContentSourceDownload { + if in == nil { + return nil + } + out := new(ImageContentSourceDownload) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ImageFilter) DeepCopyInto(out *ImageFilter) { + *out = *in + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(OpenStackName) + **out = **in + } + if in.Visibility != nil { + in, out := &in.Visibility, &out.Visibility + *out = new(ImageVisibility) + **out = **in + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make([]ImageTag, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageFilter. +func (in *ImageFilter) DeepCopy() *ImageFilter { + if in == nil { + return nil + } + out := new(ImageFilter) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ImageHash) DeepCopyInto(out *ImageHash) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageHash. +func (in *ImageHash) DeepCopy() *ImageHash { + if in == nil { + return nil + } + out := new(ImageHash) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ImageImport) DeepCopyInto(out *ImageImport) { + *out = *in + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } + if in.Filter != nil { + in, out := &in.Filter, &out.Filter + *out = new(ImageFilter) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageImport. +func (in *ImageImport) DeepCopy() *ImageImport { + if in == nil { + return nil + } + out := new(ImageImport) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ImageList) DeepCopyInto(out *ImageList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Image, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageList. +func (in *ImageList) DeepCopy() *ImageList { + if in == nil { + return nil + } + out := new(ImageList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ImageList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ImageProperties) DeepCopyInto(out *ImageProperties) { + *out = *in + if in.Architecture != nil { + in, out := &in.Architecture, &out.Architecture + *out = new(string) + **out = **in + } + if in.HypervisorType != nil { + in, out := &in.HypervisorType, &out.HypervisorType + *out = new(string) + **out = **in + } + if in.MinDiskGB != nil { + in, out := &in.MinDiskGB, &out.MinDiskGB + *out = new(int32) + **out = **in + } + if in.MinMemoryMB != nil { + in, out := &in.MinMemoryMB, &out.MinMemoryMB + *out = new(int32) + **out = **in + } + if in.Hardware != nil { + in, out := &in.Hardware, &out.Hardware + *out = new(ImagePropertiesHardware) + (*in).DeepCopyInto(*out) + } + if in.OperatingSystem != nil { + in, out := &in.OperatingSystem, &out.OperatingSystem + *out = new(ImagePropertiesOperatingSystem) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageProperties. +func (in *ImageProperties) DeepCopy() *ImageProperties { + if in == nil { + return nil + } + out := new(ImageProperties) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ImagePropertiesHardware) DeepCopyInto(out *ImagePropertiesHardware) { + *out = *in + if in.CPUSockets != nil { + in, out := &in.CPUSockets, &out.CPUSockets + *out = new(int32) + **out = **in + } + if in.CPUCores != nil { + in, out := &in.CPUCores, &out.CPUCores + *out = new(int32) + **out = **in + } + if in.CPUThreads != nil { + in, out := &in.CPUThreads, &out.CPUThreads + *out = new(int32) + **out = **in + } + if in.CPUPolicy != nil { + in, out := &in.CPUPolicy, &out.CPUPolicy + *out = new(string) + **out = **in + } + if in.CPUThreadPolicy != nil { + in, out := &in.CPUThreadPolicy, &out.CPUThreadPolicy + *out = new(string) + **out = **in + } + if in.CDROMBus != nil { + in, out := &in.CDROMBus, &out.CDROMBus + *out = new(ImageHWBus) + **out = **in + } + if in.DiskBus != nil { + in, out := &in.DiskBus, &out.DiskBus + *out = new(ImageHWBus) + **out = **in + } + if in.SCSIModel != nil { + in, out := &in.SCSIModel, &out.SCSIModel + *out = new(string) + **out = **in + } + if in.VIFModel != nil { + in, out := &in.VIFModel, &out.VIFModel + *out = new(string) + **out = **in + } + if in.RngModel != nil { + in, out := &in.RngModel, &out.RngModel + *out = new(string) + **out = **in + } + if in.QemuGuestAgent != nil { + in, out := &in.QemuGuestAgent, &out.QemuGuestAgent + *out = new(bool) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImagePropertiesHardware. +func (in *ImagePropertiesHardware) DeepCopy() *ImagePropertiesHardware { + if in == nil { + return nil + } + out := new(ImagePropertiesHardware) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ImagePropertiesOperatingSystem) DeepCopyInto(out *ImagePropertiesOperatingSystem) { + *out = *in + if in.Distro != nil { + in, out := &in.Distro, &out.Distro + *out = new(string) + **out = **in + } + if in.Version != nil { + in, out := &in.Version, &out.Version + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImagePropertiesOperatingSystem. +func (in *ImagePropertiesOperatingSystem) DeepCopy() *ImagePropertiesOperatingSystem { + if in == nil { + return nil + } + out := new(ImagePropertiesOperatingSystem) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ImageResourceSpec) DeepCopyInto(out *ImageResourceSpec) { + *out = *in + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(OpenStackName) + **out = **in + } + if in.Protected != nil { + in, out := &in.Protected, &out.Protected + *out = new(bool) + **out = **in + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make([]ImageTag, len(*in)) + copy(*out, *in) + } + if in.Visibility != nil { + in, out := &in.Visibility, &out.Visibility + *out = new(ImageVisibility) + **out = **in + } + if in.Properties != nil { + in, out := &in.Properties, &out.Properties + *out = new(ImageProperties) + (*in).DeepCopyInto(*out) + } + if in.Content != nil { + in, out := &in.Content, &out.Content + *out = new(ImageContent) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageResourceSpec. +func (in *ImageResourceSpec) DeepCopy() *ImageResourceSpec { + if in == nil { + return nil + } + out := new(ImageResourceSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ImageResourceStatus) DeepCopyInto(out *ImageResourceStatus) { + *out = *in + if in.Hash != nil { + in, out := &in.Hash, &out.Hash + *out = new(ImageHash) + **out = **in + } + if in.SizeB != nil { + in, out := &in.SizeB, &out.SizeB + *out = new(int64) + **out = **in + } + if in.VirtualSizeB != nil { + in, out := &in.VirtualSizeB, &out.VirtualSizeB + *out = new(int64) + **out = **in + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make([]string, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageResourceStatus. +func (in *ImageResourceStatus) DeepCopy() *ImageResourceStatus { + if in == nil { + return nil + } + out := new(ImageResourceStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ImageSpec) DeepCopyInto(out *ImageSpec) { + *out = *in + if in.Import != nil { + in, out := &in.Import, &out.Import + *out = new(ImageImport) + (*in).DeepCopyInto(*out) + } + if in.Resource != nil { + in, out := &in.Resource, &out.Resource + *out = new(ImageResourceSpec) + (*in).DeepCopyInto(*out) + } + if in.ManagedOptions != nil { + in, out := &in.ManagedOptions, &out.ManagedOptions + *out = new(ManagedOptions) + **out = **in + } + out.CloudCredentialsRef = in.CloudCredentialsRef +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageSpec. +func (in *ImageSpec) DeepCopy() *ImageSpec { + if in == nil { + return nil + } + out := new(ImageSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ImageStatus) DeepCopyInto(out *ImageStatus) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]v1.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } + if in.Resource != nil { + in, out := &in.Resource, &out.Resource + *out = new(ImageResourceStatus) + (*in).DeepCopyInto(*out) + } + in.ImageStatusExtra.DeepCopyInto(&out.ImageStatusExtra) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageStatus. +func (in *ImageStatus) DeepCopy() *ImageStatus { + if in == nil { + return nil + } + out := new(ImageStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ImageStatusExtra) DeepCopyInto(out *ImageStatusExtra) { + *out = *in + if in.DownloadAttempts != nil { + in, out := &in.DownloadAttempts, &out.DownloadAttempts + *out = new(int32) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageStatusExtra. +func (in *ImageStatusExtra) DeepCopy() *ImageStatusExtra { + if in == nil { + return nil + } + out := new(ImageStatusExtra) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KeyPair) DeepCopyInto(out *KeyPair) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KeyPair. +func (in *KeyPair) DeepCopy() *KeyPair { + if in == nil { + return nil + } + out := new(KeyPair) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *KeyPair) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KeyPairFilter) DeepCopyInto(out *KeyPairFilter) { + *out = *in + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(OpenStackName) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KeyPairFilter. +func (in *KeyPairFilter) DeepCopy() *KeyPairFilter { + if in == nil { + return nil + } + out := new(KeyPairFilter) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KeyPairImport) DeepCopyInto(out *KeyPairImport) { + *out = *in + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } + if in.Filter != nil { + in, out := &in.Filter, &out.Filter + *out = new(KeyPairFilter) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KeyPairImport. +func (in *KeyPairImport) DeepCopy() *KeyPairImport { + if in == nil { + return nil + } + out := new(KeyPairImport) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KeyPairList) DeepCopyInto(out *KeyPairList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]KeyPair, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KeyPairList. +func (in *KeyPairList) DeepCopy() *KeyPairList { + if in == nil { + return nil + } + out := new(KeyPairList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *KeyPairList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KeyPairResourceSpec) DeepCopyInto(out *KeyPairResourceSpec) { + *out = *in + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(OpenStackName) + **out = **in + } + if in.Type != nil { + in, out := &in.Type, &out.Type + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KeyPairResourceSpec. +func (in *KeyPairResourceSpec) DeepCopy() *KeyPairResourceSpec { + if in == nil { + return nil + } + out := new(KeyPairResourceSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KeyPairResourceStatus) DeepCopyInto(out *KeyPairResourceStatus) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KeyPairResourceStatus. +func (in *KeyPairResourceStatus) DeepCopy() *KeyPairResourceStatus { + if in == nil { + return nil + } + out := new(KeyPairResourceStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KeyPairSpec) DeepCopyInto(out *KeyPairSpec) { + *out = *in + if in.Import != nil { + in, out := &in.Import, &out.Import + *out = new(KeyPairImport) + (*in).DeepCopyInto(*out) + } + if in.Resource != nil { + in, out := &in.Resource, &out.Resource + *out = new(KeyPairResourceSpec) + (*in).DeepCopyInto(*out) + } + if in.ManagedOptions != nil { + in, out := &in.ManagedOptions, &out.ManagedOptions + *out = new(ManagedOptions) + **out = **in + } + out.CloudCredentialsRef = in.CloudCredentialsRef +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KeyPairSpec. +func (in *KeyPairSpec) DeepCopy() *KeyPairSpec { + if in == nil { + return nil + } + out := new(KeyPairSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KeyPairStatus) DeepCopyInto(out *KeyPairStatus) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]v1.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } + if in.Resource != nil { + in, out := &in.Resource, &out.Resource + *out = new(KeyPairResourceStatus) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KeyPairStatus. +func (in *KeyPairStatus) DeepCopy() *KeyPairStatus { + if in == nil { + return nil + } + out := new(KeyPairStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ManagedOptions) DeepCopyInto(out *ManagedOptions) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagedOptions. +func (in *ManagedOptions) DeepCopy() *ManagedOptions { + if in == nil { + return nil + } + out := new(ManagedOptions) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Network) DeepCopyInto(out *Network) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Network. +func (in *Network) DeepCopy() *Network { + if in == nil { + return nil + } + out := new(Network) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Network) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NetworkFilter) DeepCopyInto(out *NetworkFilter) { + *out = *in + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(OpenStackName) + **out = **in + } + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(NeutronDescription) + **out = **in + } + if in.External != nil { + in, out := &in.External, &out.External + *out = new(bool) + **out = **in + } + if in.ProjectRef != nil { + in, out := &in.ProjectRef, &out.ProjectRef + *out = new(KubernetesNameRef) + **out = **in + } + in.FilterByNeutronTags.DeepCopyInto(&out.FilterByNeutronTags) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkFilter. +func (in *NetworkFilter) DeepCopy() *NetworkFilter { + if in == nil { + return nil + } + out := new(NetworkFilter) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NetworkImport) DeepCopyInto(out *NetworkImport) { + *out = *in + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } + if in.Filter != nil { + in, out := &in.Filter, &out.Filter + *out = new(NetworkFilter) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkImport. +func (in *NetworkImport) DeepCopy() *NetworkImport { + if in == nil { + return nil + } + out := new(NetworkImport) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NetworkList) DeepCopyInto(out *NetworkList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Network, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkList. +func (in *NetworkList) DeepCopy() *NetworkList { + if in == nil { + return nil + } + out := new(NetworkList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *NetworkList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NetworkResourceSpec) DeepCopyInto(out *NetworkResourceSpec) { + *out = *in + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(OpenStackName) + **out = **in + } + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(NeutronDescription) + **out = **in + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make([]NeutronTag, len(*in)) + copy(*out, *in) + } + if in.AdminStateUp != nil { + in, out := &in.AdminStateUp, &out.AdminStateUp + *out = new(bool) + **out = **in + } + if in.DNSDomain != nil { + in, out := &in.DNSDomain, &out.DNSDomain + *out = new(DNSDomain) + **out = **in + } + if in.MTU != nil { + in, out := &in.MTU, &out.MTU + *out = new(MTU) + **out = **in + } + if in.PortSecurityEnabled != nil { + in, out := &in.PortSecurityEnabled, &out.PortSecurityEnabled + *out = new(bool) + **out = **in + } + if in.External != nil { + in, out := &in.External, &out.External + *out = new(bool) + **out = **in + } + if in.Shared != nil { + in, out := &in.Shared, &out.Shared + *out = new(bool) + **out = **in + } + if in.AvailabilityZoneHints != nil { + in, out := &in.AvailabilityZoneHints, &out.AvailabilityZoneHints + *out = make([]AvailabilityZoneHint, len(*in)) + copy(*out, *in) + } + if in.ProjectRef != nil { + in, out := &in.ProjectRef, &out.ProjectRef + *out = new(KubernetesNameRef) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkResourceSpec. +func (in *NetworkResourceSpec) DeepCopy() *NetworkResourceSpec { + if in == nil { + return nil + } + out := new(NetworkResourceSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NetworkResourceStatus) DeepCopyInto(out *NetworkResourceStatus) { + *out = *in + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make([]string, len(*in)) + copy(*out, *in) + } + in.NeutronStatusMetadata.DeepCopyInto(&out.NeutronStatusMetadata) + if in.AdminStateUp != nil { + in, out := &in.AdminStateUp, &out.AdminStateUp + *out = new(bool) + **out = **in + } + if in.AvailabilityZoneHints != nil { + in, out := &in.AvailabilityZoneHints, &out.AvailabilityZoneHints + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.MTU != nil { + in, out := &in.MTU, &out.MTU + *out = new(int32) + **out = **in + } + if in.PortSecurityEnabled != nil { + in, out := &in.PortSecurityEnabled, &out.PortSecurityEnabled + *out = new(bool) + **out = **in + } + if in.Provider != nil { + in, out := &in.Provider, &out.Provider + *out = new(ProviderPropertiesStatus) + (*in).DeepCopyInto(*out) + } + if in.External != nil { + in, out := &in.External, &out.External + *out = new(bool) + **out = **in + } + if in.Shared != nil { + in, out := &in.Shared, &out.Shared + *out = new(bool) + **out = **in + } + if in.Subnets != nil { + in, out := &in.Subnets, &out.Subnets + *out = make([]string, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkResourceStatus. +func (in *NetworkResourceStatus) DeepCopy() *NetworkResourceStatus { + if in == nil { + return nil + } + out := new(NetworkResourceStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NetworkSpec) DeepCopyInto(out *NetworkSpec) { + *out = *in + if in.Import != nil { + in, out := &in.Import, &out.Import + *out = new(NetworkImport) + (*in).DeepCopyInto(*out) + } + if in.Resource != nil { + in, out := &in.Resource, &out.Resource + *out = new(NetworkResourceSpec) + (*in).DeepCopyInto(*out) + } + if in.ManagedOptions != nil { + in, out := &in.ManagedOptions, &out.ManagedOptions + *out = new(ManagedOptions) + **out = **in + } + out.CloudCredentialsRef = in.CloudCredentialsRef +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkSpec. +func (in *NetworkSpec) DeepCopy() *NetworkSpec { + if in == nil { + return nil + } + out := new(NetworkSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NetworkStatus) DeepCopyInto(out *NetworkStatus) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]v1.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } + if in.Resource != nil { + in, out := &in.Resource, &out.Resource + *out = new(NetworkResourceStatus) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkStatus. +func (in *NetworkStatus) DeepCopy() *NetworkStatus { + if in == nil { + return nil + } + out := new(NetworkStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NeutronStatusMetadata) DeepCopyInto(out *NeutronStatusMetadata) { + *out = *in + if in.CreatedAt != nil { + in, out := &in.CreatedAt, &out.CreatedAt + *out = (*in).DeepCopy() + } + if in.UpdatedAt != nil { + in, out := &in.UpdatedAt, &out.UpdatedAt + *out = (*in).DeepCopy() + } + if in.RevisionNumber != nil { + in, out := &in.RevisionNumber, &out.RevisionNumber + *out = new(int64) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NeutronStatusMetadata. +func (in *NeutronStatusMetadata) DeepCopy() *NeutronStatusMetadata { + if in == nil { + return nil + } + out := new(NeutronStatusMetadata) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Port) DeepCopyInto(out *Port) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Port. +func (in *Port) DeepCopy() *Port { + if in == nil { + return nil + } + out := new(Port) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Port) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PortFilter) DeepCopyInto(out *PortFilter) { + *out = *in + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(OpenStackName) + **out = **in + } + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(NeutronDescription) + **out = **in + } + if in.ProjectRef != nil { + in, out := &in.ProjectRef, &out.ProjectRef + *out = new(KubernetesNameRef) + **out = **in + } + in.FilterByNeutronTags.DeepCopyInto(&out.FilterByNeutronTags) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PortFilter. +func (in *PortFilter) DeepCopy() *PortFilter { + if in == nil { + return nil + } + out := new(PortFilter) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PortImport) DeepCopyInto(out *PortImport) { + *out = *in + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } + if in.Filter != nil { + in, out := &in.Filter, &out.Filter + *out = new(PortFilter) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PortImport. +func (in *PortImport) DeepCopy() *PortImport { + if in == nil { + return nil + } + out := new(PortImport) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PortList) DeepCopyInto(out *PortList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Port, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PortList. +func (in *PortList) DeepCopy() *PortList { + if in == nil { + return nil + } + out := new(PortList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *PortList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PortRangeSpec) DeepCopyInto(out *PortRangeSpec) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PortRangeSpec. +func (in *PortRangeSpec) DeepCopy() *PortRangeSpec { + if in == nil { + return nil + } + out := new(PortRangeSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PortRangeStatus) DeepCopyInto(out *PortRangeStatus) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PortRangeStatus. +func (in *PortRangeStatus) DeepCopy() *PortRangeStatus { + if in == nil { + return nil + } + out := new(PortRangeStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PortResourceSpec) DeepCopyInto(out *PortResourceSpec) { + *out = *in + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(OpenStackName) + **out = **in + } + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(NeutronDescription) + **out = **in + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make([]NeutronTag, len(*in)) + copy(*out, *in) + } + if in.AllowedAddressPairs != nil { + in, out := &in.AllowedAddressPairs, &out.AllowedAddressPairs + *out = make([]AllowedAddressPair, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Addresses != nil { + in, out := &in.Addresses, &out.Addresses + *out = make([]Address, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.SecurityGroupRefs != nil { + in, out := &in.SecurityGroupRefs, &out.SecurityGroupRefs + *out = make([]OpenStackName, len(*in)) + copy(*out, *in) + } + if in.ProjectRef != nil { + in, out := &in.ProjectRef, &out.ProjectRef + *out = new(KubernetesNameRef) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PortResourceSpec. +func (in *PortResourceSpec) DeepCopy() *PortResourceSpec { + if in == nil { + return nil + } + out := new(PortResourceSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PortResourceStatus) DeepCopyInto(out *PortResourceStatus) { + *out = *in + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.AdminStateUp != nil { + in, out := &in.AdminStateUp, &out.AdminStateUp + *out = new(bool) + **out = **in + } + if in.AllowedAddressPairs != nil { + in, out := &in.AllowedAddressPairs, &out.AllowedAddressPairs + *out = make([]AllowedAddressPairStatus, len(*in)) + copy(*out, *in) + } + if in.FixedIPs != nil { + in, out := &in.FixedIPs, &out.FixedIPs + *out = make([]FixedIPStatus, len(*in)) + copy(*out, *in) + } + if in.SecurityGroups != nil { + in, out := &in.SecurityGroups, &out.SecurityGroups + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.PropagateUplinkStatus != nil { + in, out := &in.PropagateUplinkStatus, &out.PropagateUplinkStatus + *out = new(bool) + **out = **in + } + if in.PortSecurityEnabled != nil { + in, out := &in.PortSecurityEnabled, &out.PortSecurityEnabled + *out = new(bool) + **out = **in + } + in.NeutronStatusMetadata.DeepCopyInto(&out.NeutronStatusMetadata) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PortResourceStatus. +func (in *PortResourceStatus) DeepCopy() *PortResourceStatus { + if in == nil { + return nil + } + out := new(PortResourceStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PortSpec) DeepCopyInto(out *PortSpec) { + *out = *in + if in.Import != nil { + in, out := &in.Import, &out.Import + *out = new(PortImport) + (*in).DeepCopyInto(*out) + } + if in.Resource != nil { + in, out := &in.Resource, &out.Resource + *out = new(PortResourceSpec) + (*in).DeepCopyInto(*out) + } + if in.ManagedOptions != nil { + in, out := &in.ManagedOptions, &out.ManagedOptions + *out = new(ManagedOptions) + **out = **in + } + out.CloudCredentialsRef = in.CloudCredentialsRef +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PortSpec. +func (in *PortSpec) DeepCopy() *PortSpec { + if in == nil { + return nil + } + out := new(PortSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PortStatus) DeepCopyInto(out *PortStatus) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]v1.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } + if in.Resource != nil { + in, out := &in.Resource, &out.Resource + *out = new(PortResourceStatus) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PortStatus. +func (in *PortStatus) DeepCopy() *PortStatus { + if in == nil { + return nil + } + out := new(PortStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Project) DeepCopyInto(out *Project) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Project. +func (in *Project) DeepCopy() *Project { + if in == nil { + return nil + } + out := new(Project) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Project) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProjectFilter) DeepCopyInto(out *ProjectFilter) { + *out = *in + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(KeystoneName) + **out = **in + } + in.FilterByKeystoneTags.DeepCopyInto(&out.FilterByKeystoneTags) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectFilter. +func (in *ProjectFilter) DeepCopy() *ProjectFilter { + if in == nil { + return nil + } + out := new(ProjectFilter) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProjectImport) DeepCopyInto(out *ProjectImport) { + *out = *in + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } + if in.Filter != nil { + in, out := &in.Filter, &out.Filter + *out = new(ProjectFilter) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectImport. +func (in *ProjectImport) DeepCopy() *ProjectImport { + if in == nil { + return nil + } + out := new(ProjectImport) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProjectList) DeepCopyInto(out *ProjectList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Project, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectList. +func (in *ProjectList) DeepCopy() *ProjectList { + if in == nil { + return nil + } + out := new(ProjectList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ProjectList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProjectResourceSpec) DeepCopyInto(out *ProjectResourceSpec) { + *out = *in + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(KeystoneName) + **out = **in + } + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(string) + **out = **in + } + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = new(bool) + **out = **in + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make([]KeystoneTag, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectResourceSpec. +func (in *ProjectResourceSpec) DeepCopy() *ProjectResourceSpec { + if in == nil { + return nil + } + out := new(ProjectResourceSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProjectResourceStatus) DeepCopyInto(out *ProjectResourceStatus) { + *out = *in + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = new(bool) + **out = **in + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make([]string, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectResourceStatus. +func (in *ProjectResourceStatus) DeepCopy() *ProjectResourceStatus { + if in == nil { + return nil + } + out := new(ProjectResourceStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProjectSpec) DeepCopyInto(out *ProjectSpec) { + *out = *in + if in.Import != nil { + in, out := &in.Import, &out.Import + *out = new(ProjectImport) + (*in).DeepCopyInto(*out) + } + if in.Resource != nil { + in, out := &in.Resource, &out.Resource + *out = new(ProjectResourceSpec) + (*in).DeepCopyInto(*out) + } + if in.ManagedOptions != nil { + in, out := &in.ManagedOptions, &out.ManagedOptions + *out = new(ManagedOptions) + **out = **in + } + out.CloudCredentialsRef = in.CloudCredentialsRef +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectSpec. +func (in *ProjectSpec) DeepCopy() *ProjectSpec { + if in == nil { + return nil + } + out := new(ProjectSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProjectStatus) DeepCopyInto(out *ProjectStatus) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]v1.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } + if in.Resource != nil { + in, out := &in.Resource, &out.Resource + *out = new(ProjectResourceStatus) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectStatus. +func (in *ProjectStatus) DeepCopy() *ProjectStatus { + if in == nil { + return nil + } + out := new(ProjectStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProviderPropertiesStatus) DeepCopyInto(out *ProviderPropertiesStatus) { + *out = *in + if in.SegmentationID != nil { + in, out := &in.SegmentationID, &out.SegmentationID + *out = new(int32) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProviderPropertiesStatus. +func (in *ProviderPropertiesStatus) DeepCopy() *ProviderPropertiesStatus { + if in == nil { + return nil + } + out := new(ProviderPropertiesStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Role) DeepCopyInto(out *Role) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Role. +func (in *Role) DeepCopy() *Role { + if in == nil { + return nil + } + out := new(Role) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Role) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RoleFilter) DeepCopyInto(out *RoleFilter) { + *out = *in + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(KeystoneName) + **out = **in + } + if in.DomainRef != nil { + in, out := &in.DomainRef, &out.DomainRef + *out = new(KubernetesNameRef) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RoleFilter. +func (in *RoleFilter) DeepCopy() *RoleFilter { + if in == nil { + return nil + } + out := new(RoleFilter) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RoleImport) DeepCopyInto(out *RoleImport) { + *out = *in + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } + if in.Filter != nil { + in, out := &in.Filter, &out.Filter + *out = new(RoleFilter) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RoleImport. +func (in *RoleImport) DeepCopy() *RoleImport { + if in == nil { + return nil + } + out := new(RoleImport) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RoleList) DeepCopyInto(out *RoleList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Role, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RoleList. +func (in *RoleList) DeepCopy() *RoleList { + if in == nil { + return nil + } + out := new(RoleList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *RoleList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RoleResourceSpec) DeepCopyInto(out *RoleResourceSpec) { + *out = *in + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(KeystoneName) + **out = **in + } + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(string) + **out = **in + } + if in.DomainRef != nil { + in, out := &in.DomainRef, &out.DomainRef + *out = new(KubernetesNameRef) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RoleResourceSpec. +func (in *RoleResourceSpec) DeepCopy() *RoleResourceSpec { + if in == nil { + return nil + } + out := new(RoleResourceSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RoleResourceStatus) DeepCopyInto(out *RoleResourceStatus) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RoleResourceStatus. +func (in *RoleResourceStatus) DeepCopy() *RoleResourceStatus { + if in == nil { + return nil + } + out := new(RoleResourceStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RoleSpec) DeepCopyInto(out *RoleSpec) { + *out = *in + if in.Import != nil { + in, out := &in.Import, &out.Import + *out = new(RoleImport) + (*in).DeepCopyInto(*out) + } + if in.Resource != nil { + in, out := &in.Resource, &out.Resource + *out = new(RoleResourceSpec) + (*in).DeepCopyInto(*out) + } + if in.ManagedOptions != nil { + in, out := &in.ManagedOptions, &out.ManagedOptions + *out = new(ManagedOptions) + **out = **in + } + out.CloudCredentialsRef = in.CloudCredentialsRef +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RoleSpec. +func (in *RoleSpec) DeepCopy() *RoleSpec { + if in == nil { + return nil + } + out := new(RoleSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RoleStatus) DeepCopyInto(out *RoleStatus) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]v1.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } + if in.Resource != nil { + in, out := &in.Resource, &out.Resource + *out = new(RoleResourceStatus) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RoleStatus. +func (in *RoleStatus) DeepCopy() *RoleStatus { + if in == nil { + return nil + } + out := new(RoleStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Router) DeepCopyInto(out *Router) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Router. +func (in *Router) DeepCopy() *Router { + if in == nil { + return nil + } + out := new(Router) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Router) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RouterFilter) DeepCopyInto(out *RouterFilter) { + *out = *in + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(OpenStackName) + **out = **in + } + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(NeutronDescription) + **out = **in + } + if in.ProjectRef != nil { + in, out := &in.ProjectRef, &out.ProjectRef + *out = new(KubernetesNameRef) + **out = **in + } + in.FilterByNeutronTags.DeepCopyInto(&out.FilterByNeutronTags) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RouterFilter. +func (in *RouterFilter) DeepCopy() *RouterFilter { + if in == nil { + return nil + } + out := new(RouterFilter) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RouterImport) DeepCopyInto(out *RouterImport) { + *out = *in + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } + if in.Filter != nil { + in, out := &in.Filter, &out.Filter + *out = new(RouterFilter) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RouterImport. +func (in *RouterImport) DeepCopy() *RouterImport { + if in == nil { + return nil + } + out := new(RouterImport) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RouterInterface) DeepCopyInto(out *RouterInterface) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RouterInterface. +func (in *RouterInterface) DeepCopy() *RouterInterface { + if in == nil { + return nil + } + out := new(RouterInterface) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *RouterInterface) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RouterInterfaceList) DeepCopyInto(out *RouterInterfaceList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]RouterInterface, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RouterInterfaceList. +func (in *RouterInterfaceList) DeepCopy() *RouterInterfaceList { + if in == nil { + return nil + } + out := new(RouterInterfaceList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *RouterInterfaceList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RouterInterfaceSpec) DeepCopyInto(out *RouterInterfaceSpec) { + *out = *in + if in.SubnetRef != nil { + in, out := &in.SubnetRef, &out.SubnetRef + *out = new(KubernetesNameRef) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RouterInterfaceSpec. +func (in *RouterInterfaceSpec) DeepCopy() *RouterInterfaceSpec { + if in == nil { + return nil + } + out := new(RouterInterfaceSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RouterInterfaceStatus) DeepCopyInto(out *RouterInterfaceStatus) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]v1.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RouterInterfaceStatus. +func (in *RouterInterfaceStatus) DeepCopy() *RouterInterfaceStatus { + if in == nil { + return nil + } + out := new(RouterInterfaceStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RouterList) DeepCopyInto(out *RouterList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Router, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RouterList. +func (in *RouterList) DeepCopy() *RouterList { + if in == nil { + return nil + } + out := new(RouterList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *RouterList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RouterResourceSpec) DeepCopyInto(out *RouterResourceSpec) { + *out = *in + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(OpenStackName) + **out = **in + } + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(NeutronDescription) + **out = **in + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make([]NeutronTag, len(*in)) + copy(*out, *in) + } + if in.AdminStateUp != nil { + in, out := &in.AdminStateUp, &out.AdminStateUp + *out = new(bool) + **out = **in + } + if in.ExternalGateways != nil { + in, out := &in.ExternalGateways, &out.ExternalGateways + *out = make([]ExternalGateway, len(*in)) + copy(*out, *in) + } + if in.Distributed != nil { + in, out := &in.Distributed, &out.Distributed + *out = new(bool) + **out = **in + } + if in.AvailabilityZoneHints != nil { + in, out := &in.AvailabilityZoneHints, &out.AvailabilityZoneHints + *out = make([]AvailabilityZoneHint, len(*in)) + copy(*out, *in) + } + if in.ProjectRef != nil { + in, out := &in.ProjectRef, &out.ProjectRef + *out = new(KubernetesNameRef) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RouterResourceSpec. +func (in *RouterResourceSpec) DeepCopy() *RouterResourceSpec { + if in == nil { + return nil + } + out := new(RouterResourceSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RouterResourceStatus) DeepCopyInto(out *RouterResourceStatus) { + *out = *in + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.AdminStateUp != nil { + in, out := &in.AdminStateUp, &out.AdminStateUp + *out = new(bool) + **out = **in + } + if in.ExternalGateways != nil { + in, out := &in.ExternalGateways, &out.ExternalGateways + *out = make([]ExternalGatewayStatus, len(*in)) + copy(*out, *in) + } + if in.AvailabilityZoneHints != nil { + in, out := &in.AvailabilityZoneHints, &out.AvailabilityZoneHints + *out = make([]string, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RouterResourceStatus. +func (in *RouterResourceStatus) DeepCopy() *RouterResourceStatus { + if in == nil { + return nil + } + out := new(RouterResourceStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RouterSpec) DeepCopyInto(out *RouterSpec) { + *out = *in + if in.Import != nil { + in, out := &in.Import, &out.Import + *out = new(RouterImport) + (*in).DeepCopyInto(*out) + } + if in.Resource != nil { + in, out := &in.Resource, &out.Resource + *out = new(RouterResourceSpec) + (*in).DeepCopyInto(*out) + } + if in.ManagedOptions != nil { + in, out := &in.ManagedOptions, &out.ManagedOptions + *out = new(ManagedOptions) + **out = **in + } + out.CloudCredentialsRef = in.CloudCredentialsRef +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RouterSpec. +func (in *RouterSpec) DeepCopy() *RouterSpec { + if in == nil { + return nil + } + out := new(RouterSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RouterStatus) DeepCopyInto(out *RouterStatus) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]v1.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } + if in.Resource != nil { + in, out := &in.Resource, &out.Resource + *out = new(RouterResourceStatus) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RouterStatus. +func (in *RouterStatus) DeepCopy() *RouterStatus { + if in == nil { + return nil + } + out := new(RouterStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SecurityGroup) DeepCopyInto(out *SecurityGroup) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecurityGroup. +func (in *SecurityGroup) DeepCopy() *SecurityGroup { + if in == nil { + return nil + } + out := new(SecurityGroup) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *SecurityGroup) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SecurityGroupFilter) DeepCopyInto(out *SecurityGroupFilter) { + *out = *in + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(OpenStackName) + **out = **in + } + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(NeutronDescription) + **out = **in + } + if in.ProjectRef != nil { + in, out := &in.ProjectRef, &out.ProjectRef + *out = new(KubernetesNameRef) + **out = **in + } + in.FilterByNeutronTags.DeepCopyInto(&out.FilterByNeutronTags) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecurityGroupFilter. +func (in *SecurityGroupFilter) DeepCopy() *SecurityGroupFilter { + if in == nil { + return nil + } + out := new(SecurityGroupFilter) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SecurityGroupImport) DeepCopyInto(out *SecurityGroupImport) { + *out = *in + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } + if in.Filter != nil { + in, out := &in.Filter, &out.Filter + *out = new(SecurityGroupFilter) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecurityGroupImport. +func (in *SecurityGroupImport) DeepCopy() *SecurityGroupImport { + if in == nil { + return nil + } + out := new(SecurityGroupImport) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SecurityGroupList) DeepCopyInto(out *SecurityGroupList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]SecurityGroup, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecurityGroupList. +func (in *SecurityGroupList) DeepCopy() *SecurityGroupList { + if in == nil { + return nil + } + out := new(SecurityGroupList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *SecurityGroupList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SecurityGroupResourceSpec) DeepCopyInto(out *SecurityGroupResourceSpec) { + *out = *in + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(OpenStackName) + **out = **in + } + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(NeutronDescription) + **out = **in + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make([]NeutronTag, len(*in)) + copy(*out, *in) + } + if in.Stateful != nil { + in, out := &in.Stateful, &out.Stateful + *out = new(bool) + **out = **in + } + if in.Rules != nil { + in, out := &in.Rules, &out.Rules + *out = make([]SecurityGroupRule, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.ProjectRef != nil { + in, out := &in.ProjectRef, &out.ProjectRef + *out = new(KubernetesNameRef) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecurityGroupResourceSpec. +func (in *SecurityGroupResourceSpec) DeepCopy() *SecurityGroupResourceSpec { + if in == nil { + return nil + } + out := new(SecurityGroupResourceSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SecurityGroupResourceStatus) DeepCopyInto(out *SecurityGroupResourceStatus) { + *out = *in + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Rules != nil { + in, out := &in.Rules, &out.Rules + *out = make([]SecurityGroupRuleStatus, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + in.NeutronStatusMetadata.DeepCopyInto(&out.NeutronStatusMetadata) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecurityGroupResourceStatus. +func (in *SecurityGroupResourceStatus) DeepCopy() *SecurityGroupResourceStatus { + if in == nil { + return nil + } + out := new(SecurityGroupResourceStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SecurityGroupRule) DeepCopyInto(out *SecurityGroupRule) { + *out = *in + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(NeutronDescription) + **out = **in + } + if in.Direction != nil { + in, out := &in.Direction, &out.Direction + *out = new(RuleDirection) + **out = **in + } + if in.RemoteIPPrefix != nil { + in, out := &in.RemoteIPPrefix, &out.RemoteIPPrefix + *out = new(CIDR) + **out = **in + } + if in.Protocol != nil { + in, out := &in.Protocol, &out.Protocol + *out = new(Protocol) + **out = **in + } + if in.PortRange != nil { + in, out := &in.PortRange, &out.PortRange + *out = new(PortRangeSpec) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecurityGroupRule. +func (in *SecurityGroupRule) DeepCopy() *SecurityGroupRule { + if in == nil { + return nil + } + out := new(SecurityGroupRule) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SecurityGroupRuleStatus) DeepCopyInto(out *SecurityGroupRuleStatus) { + *out = *in + if in.PortRange != nil { + in, out := &in.PortRange, &out.PortRange + *out = new(PortRangeStatus) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecurityGroupRuleStatus. +func (in *SecurityGroupRuleStatus) DeepCopy() *SecurityGroupRuleStatus { + if in == nil { + return nil + } + out := new(SecurityGroupRuleStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SecurityGroupSpec) DeepCopyInto(out *SecurityGroupSpec) { + *out = *in + if in.Import != nil { + in, out := &in.Import, &out.Import + *out = new(SecurityGroupImport) + (*in).DeepCopyInto(*out) + } + if in.Resource != nil { + in, out := &in.Resource, &out.Resource + *out = new(SecurityGroupResourceSpec) + (*in).DeepCopyInto(*out) + } + if in.ManagedOptions != nil { + in, out := &in.ManagedOptions, &out.ManagedOptions + *out = new(ManagedOptions) + **out = **in + } + out.CloudCredentialsRef = in.CloudCredentialsRef +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecurityGroupSpec. +func (in *SecurityGroupSpec) DeepCopy() *SecurityGroupSpec { + if in == nil { + return nil + } + out := new(SecurityGroupSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SecurityGroupStatus) DeepCopyInto(out *SecurityGroupStatus) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]v1.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } + if in.Resource != nil { + in, out := &in.Resource, &out.Resource + *out = new(SecurityGroupResourceStatus) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecurityGroupStatus. +func (in *SecurityGroupStatus) DeepCopy() *SecurityGroupStatus { + if in == nil { + return nil + } + out := new(SecurityGroupStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Server) DeepCopyInto(out *Server) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Server. +func (in *Server) DeepCopy() *Server { + if in == nil { + return nil + } + out := new(Server) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Server) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ServerFilter) DeepCopyInto(out *ServerFilter) { + *out = *in + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(OpenStackName) + **out = **in + } + in.FilterByServerTags.DeepCopyInto(&out.FilterByServerTags) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServerFilter. +func (in *ServerFilter) DeepCopy() *ServerFilter { + if in == nil { + return nil + } + out := new(ServerFilter) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ServerGroup) DeepCopyInto(out *ServerGroup) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServerGroup. +func (in *ServerGroup) DeepCopy() *ServerGroup { + if in == nil { + return nil + } + out := new(ServerGroup) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ServerGroup) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ServerGroupFilter) DeepCopyInto(out *ServerGroupFilter) { + *out = *in + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(OpenStackName) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServerGroupFilter. +func (in *ServerGroupFilter) DeepCopy() *ServerGroupFilter { + if in == nil { + return nil + } + out := new(ServerGroupFilter) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ServerGroupImport) DeepCopyInto(out *ServerGroupImport) { + *out = *in + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } + if in.Filter != nil { + in, out := &in.Filter, &out.Filter + *out = new(ServerGroupFilter) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServerGroupImport. +func (in *ServerGroupImport) DeepCopy() *ServerGroupImport { + if in == nil { + return nil + } + out := new(ServerGroupImport) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ServerGroupList) DeepCopyInto(out *ServerGroupList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ServerGroup, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServerGroupList. +func (in *ServerGroupList) DeepCopy() *ServerGroupList { + if in == nil { + return nil + } + out := new(ServerGroupList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ServerGroupList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ServerGroupResourceSpec) DeepCopyInto(out *ServerGroupResourceSpec) { + *out = *in + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(OpenStackName) + **out = **in + } + if in.Rules != nil { + in, out := &in.Rules, &out.Rules + *out = new(ServerGroupRules) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServerGroupResourceSpec. +func (in *ServerGroupResourceSpec) DeepCopy() *ServerGroupResourceSpec { + if in == nil { + return nil + } + out := new(ServerGroupResourceSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ServerGroupResourceStatus) DeepCopyInto(out *ServerGroupResourceStatus) { + *out = *in + if in.Rules != nil { + in, out := &in.Rules, &out.Rules + *out = new(ServerGroupRulesStatus) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServerGroupResourceStatus. +func (in *ServerGroupResourceStatus) DeepCopy() *ServerGroupResourceStatus { + if in == nil { + return nil + } + out := new(ServerGroupResourceStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ServerGroupRules) DeepCopyInto(out *ServerGroupRules) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServerGroupRules. +func (in *ServerGroupRules) DeepCopy() *ServerGroupRules { + if in == nil { + return nil + } + out := new(ServerGroupRules) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ServerGroupRulesStatus) DeepCopyInto(out *ServerGroupRulesStatus) { + *out = *in + if in.MaxServerPerHost != nil { + in, out := &in.MaxServerPerHost, &out.MaxServerPerHost + *out = new(int32) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServerGroupRulesStatus. +func (in *ServerGroupRulesStatus) DeepCopy() *ServerGroupRulesStatus { + if in == nil { + return nil + } + out := new(ServerGroupRulesStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ServerGroupSpec) DeepCopyInto(out *ServerGroupSpec) { + *out = *in + if in.Import != nil { + in, out := &in.Import, &out.Import + *out = new(ServerGroupImport) + (*in).DeepCopyInto(*out) + } + if in.Resource != nil { + in, out := &in.Resource, &out.Resource + *out = new(ServerGroupResourceSpec) + (*in).DeepCopyInto(*out) + } + if in.ManagedOptions != nil { + in, out := &in.ManagedOptions, &out.ManagedOptions + *out = new(ManagedOptions) + **out = **in + } + out.CloudCredentialsRef = in.CloudCredentialsRef +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServerGroupSpec. +func (in *ServerGroupSpec) DeepCopy() *ServerGroupSpec { + if in == nil { + return nil + } + out := new(ServerGroupSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ServerGroupStatus) DeepCopyInto(out *ServerGroupStatus) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]v1.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } + if in.Resource != nil { + in, out := &in.Resource, &out.Resource + *out = new(ServerGroupResourceStatus) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServerGroupStatus. +func (in *ServerGroupStatus) DeepCopy() *ServerGroupStatus { + if in == nil { + return nil + } + out := new(ServerGroupStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ServerImport) DeepCopyInto(out *ServerImport) { + *out = *in + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } + if in.Filter != nil { + in, out := &in.Filter, &out.Filter + *out = new(ServerFilter) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServerImport. +func (in *ServerImport) DeepCopy() *ServerImport { + if in == nil { + return nil + } + out := new(ServerImport) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ServerInterfaceFixedIP) DeepCopyInto(out *ServerInterfaceFixedIP) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServerInterfaceFixedIP. +func (in *ServerInterfaceFixedIP) DeepCopy() *ServerInterfaceFixedIP { + if in == nil { + return nil + } + out := new(ServerInterfaceFixedIP) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ServerInterfaceStatus) DeepCopyInto(out *ServerInterfaceStatus) { + *out = *in + if in.FixedIPs != nil { + in, out := &in.FixedIPs, &out.FixedIPs + *out = make([]ServerInterfaceFixedIP, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServerInterfaceStatus. +func (in *ServerInterfaceStatus) DeepCopy() *ServerInterfaceStatus { + if in == nil { + return nil + } + out := new(ServerInterfaceStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ServerList) DeepCopyInto(out *ServerList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Server, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServerList. +func (in *ServerList) DeepCopy() *ServerList { + if in == nil { + return nil + } + out := new(ServerList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ServerList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ServerPortSpec) DeepCopyInto(out *ServerPortSpec) { + *out = *in + if in.PortRef != nil { + in, out := &in.PortRef, &out.PortRef + *out = new(KubernetesNameRef) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServerPortSpec. +func (in *ServerPortSpec) DeepCopy() *ServerPortSpec { + if in == nil { + return nil + } + out := new(ServerPortSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ServerResourceSpec) DeepCopyInto(out *ServerResourceSpec) { + *out = *in + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(OpenStackName) + **out = **in + } + if in.UserData != nil { + in, out := &in.UserData, &out.UserData + *out = new(UserDataSpec) + (*in).DeepCopyInto(*out) + } + if in.Ports != nil { + in, out := &in.Ports, &out.Ports + *out = make([]ServerPortSpec, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Volumes != nil { + in, out := &in.Volumes, &out.Volumes + *out = make([]ServerVolumeSpec, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.ServerGroupRef != nil { + in, out := &in.ServerGroupRef, &out.ServerGroupRef + *out = new(KubernetesNameRef) + **out = **in + } + if in.KeypairRef != nil { + in, out := &in.KeypairRef, &out.KeypairRef + *out = new(KubernetesNameRef) + **out = **in + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make([]ServerTag, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServerResourceSpec. +func (in *ServerResourceSpec) DeepCopy() *ServerResourceSpec { + if in == nil { + return nil + } + out := new(ServerResourceSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ServerResourceStatus) DeepCopyInto(out *ServerResourceStatus) { + *out = *in + if in.ServerGroups != nil { + in, out := &in.ServerGroups, &out.ServerGroups + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Volumes != nil { + in, out := &in.Volumes, &out.Volumes + *out = make([]ServerVolumeStatus, len(*in)) + copy(*out, *in) + } + if in.Interfaces != nil { + in, out := &in.Interfaces, &out.Interfaces + *out = make([]ServerInterfaceStatus, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make([]string, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServerResourceStatus. +func (in *ServerResourceStatus) DeepCopy() *ServerResourceStatus { + if in == nil { + return nil + } + out := new(ServerResourceStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ServerSpec) DeepCopyInto(out *ServerSpec) { + *out = *in + if in.Import != nil { + in, out := &in.Import, &out.Import + *out = new(ServerImport) + (*in).DeepCopyInto(*out) + } + if in.Resource != nil { + in, out := &in.Resource, &out.Resource + *out = new(ServerResourceSpec) + (*in).DeepCopyInto(*out) + } + if in.ManagedOptions != nil { + in, out := &in.ManagedOptions, &out.ManagedOptions + *out = new(ManagedOptions) + **out = **in + } + out.CloudCredentialsRef = in.CloudCredentialsRef +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServerSpec. +func (in *ServerSpec) DeepCopy() *ServerSpec { + if in == nil { + return nil + } + out := new(ServerSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ServerStatus) DeepCopyInto(out *ServerStatus) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]v1.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } + if in.Resource != nil { + in, out := &in.Resource, &out.Resource + *out = new(ServerResourceStatus) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServerStatus. +func (in *ServerStatus) DeepCopy() *ServerStatus { + if in == nil { + return nil + } + out := new(ServerStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ServerVolumeSpec) DeepCopyInto(out *ServerVolumeSpec) { + *out = *in + if in.Device != nil { + in, out := &in.Device, &out.Device + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServerVolumeSpec. +func (in *ServerVolumeSpec) DeepCopy() *ServerVolumeSpec { + if in == nil { + return nil + } + out := new(ServerVolumeSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ServerVolumeStatus) DeepCopyInto(out *ServerVolumeStatus) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServerVolumeStatus. +func (in *ServerVolumeStatus) DeepCopy() *ServerVolumeStatus { + if in == nil { + return nil + } + out := new(ServerVolumeStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Service) DeepCopyInto(out *Service) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Service. +func (in *Service) DeepCopy() *Service { + if in == nil { + return nil + } + out := new(Service) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Service) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ServiceFilter) DeepCopyInto(out *ServiceFilter) { + *out = *in + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(OpenStackName) + **out = **in + } + if in.Type != nil { + in, out := &in.Type, &out.Type + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceFilter. +func (in *ServiceFilter) DeepCopy() *ServiceFilter { + if in == nil { + return nil + } + out := new(ServiceFilter) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ServiceImport) DeepCopyInto(out *ServiceImport) { + *out = *in + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } + if in.Filter != nil { + in, out := &in.Filter, &out.Filter + *out = new(ServiceFilter) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceImport. +func (in *ServiceImport) DeepCopy() *ServiceImport { + if in == nil { + return nil + } + out := new(ServiceImport) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ServiceList) DeepCopyInto(out *ServiceList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Service, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceList. +func (in *ServiceList) DeepCopy() *ServiceList { + if in == nil { + return nil + } + out := new(ServiceList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ServiceList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ServiceResourceSpec) DeepCopyInto(out *ServiceResourceSpec) { + *out = *in + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(OpenStackName) + **out = **in + } + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(string) + **out = **in + } + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = new(bool) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceResourceSpec. +func (in *ServiceResourceSpec) DeepCopy() *ServiceResourceSpec { + if in == nil { + return nil + } + out := new(ServiceResourceSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ServiceResourceStatus) DeepCopyInto(out *ServiceResourceStatus) { + *out = *in + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = new(bool) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceResourceStatus. +func (in *ServiceResourceStatus) DeepCopy() *ServiceResourceStatus { + if in == nil { + return nil + } + out := new(ServiceResourceStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ServiceSpec) DeepCopyInto(out *ServiceSpec) { + *out = *in + if in.Import != nil { + in, out := &in.Import, &out.Import + *out = new(ServiceImport) + (*in).DeepCopyInto(*out) + } + if in.Resource != nil { + in, out := &in.Resource, &out.Resource + *out = new(ServiceResourceSpec) + (*in).DeepCopyInto(*out) + } + if in.ManagedOptions != nil { + in, out := &in.ManagedOptions, &out.ManagedOptions + *out = new(ManagedOptions) + **out = **in + } + out.CloudCredentialsRef = in.CloudCredentialsRef +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceSpec. +func (in *ServiceSpec) DeepCopy() *ServiceSpec { + if in == nil { + return nil + } + out := new(ServiceSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ServiceStatus) DeepCopyInto(out *ServiceStatus) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]v1.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } + if in.Resource != nil { + in, out := &in.Resource, &out.Resource + *out = new(ServiceResourceStatus) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceStatus. +func (in *ServiceStatus) DeepCopy() *ServiceStatus { + if in == nil { + return nil + } + out := new(ServiceStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Subnet) DeepCopyInto(out *Subnet) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Subnet. +func (in *Subnet) DeepCopy() *Subnet { + if in == nil { + return nil + } + out := new(Subnet) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Subnet) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SubnetFilter) DeepCopyInto(out *SubnetFilter) { + *out = *in + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(OpenStackName) + **out = **in + } + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(NeutronDescription) + **out = **in + } + if in.IPVersion != nil { + in, out := &in.IPVersion, &out.IPVersion + *out = new(IPVersion) + **out = **in + } + if in.GatewayIP != nil { + in, out := &in.GatewayIP, &out.GatewayIP + *out = new(IPvAny) + **out = **in + } + if in.CIDR != nil { + in, out := &in.CIDR, &out.CIDR + *out = new(CIDR) + **out = **in + } + if in.IPv6 != nil { + in, out := &in.IPv6, &out.IPv6 + *out = new(IPv6Options) + (*in).DeepCopyInto(*out) + } + if in.ProjectRef != nil { + in, out := &in.ProjectRef, &out.ProjectRef + *out = new(KubernetesNameRef) + **out = **in + } + in.FilterByNeutronTags.DeepCopyInto(&out.FilterByNeutronTags) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubnetFilter. +func (in *SubnetFilter) DeepCopy() *SubnetFilter { + if in == nil { + return nil + } + out := new(SubnetFilter) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SubnetGateway) DeepCopyInto(out *SubnetGateway) { + *out = *in + if in.IP != nil { + in, out := &in.IP, &out.IP + *out = new(IPvAny) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubnetGateway. +func (in *SubnetGateway) DeepCopy() *SubnetGateway { + if in == nil { + return nil + } + out := new(SubnetGateway) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SubnetImport) DeepCopyInto(out *SubnetImport) { + *out = *in + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } + if in.Filter != nil { + in, out := &in.Filter, &out.Filter + *out = new(SubnetFilter) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubnetImport. +func (in *SubnetImport) DeepCopy() *SubnetImport { + if in == nil { + return nil + } + out := new(SubnetImport) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SubnetList) DeepCopyInto(out *SubnetList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Subnet, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubnetList. +func (in *SubnetList) DeepCopy() *SubnetList { + if in == nil { + return nil + } + out := new(SubnetList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *SubnetList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SubnetResourceSpec) DeepCopyInto(out *SubnetResourceSpec) { + *out = *in + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(OpenStackName) + **out = **in + } + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(NeutronDescription) + **out = **in + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make([]NeutronTag, len(*in)) + copy(*out, *in) + } + if in.AllocationPools != nil { + in, out := &in.AllocationPools, &out.AllocationPools + *out = make([]AllocationPool, len(*in)) + copy(*out, *in) + } + if in.Gateway != nil { + in, out := &in.Gateway, &out.Gateway + *out = new(SubnetGateway) + (*in).DeepCopyInto(*out) + } + if in.EnableDHCP != nil { + in, out := &in.EnableDHCP, &out.EnableDHCP + *out = new(bool) + **out = **in + } + if in.DNSNameservers != nil { + in, out := &in.DNSNameservers, &out.DNSNameservers + *out = make([]IPvAny, len(*in)) + copy(*out, *in) + } + if in.DNSPublishFixedIP != nil { + in, out := &in.DNSPublishFixedIP, &out.DNSPublishFixedIP + *out = new(bool) + **out = **in + } + if in.HostRoutes != nil { + in, out := &in.HostRoutes, &out.HostRoutes + *out = make([]HostRoute, len(*in)) + copy(*out, *in) + } + if in.IPv6 != nil { + in, out := &in.IPv6, &out.IPv6 + *out = new(IPv6Options) + (*in).DeepCopyInto(*out) + } + if in.RouterRef != nil { + in, out := &in.RouterRef, &out.RouterRef + *out = new(KubernetesNameRef) + **out = **in + } + if in.ProjectRef != nil { + in, out := &in.ProjectRef, &out.ProjectRef + *out = new(KubernetesNameRef) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubnetResourceSpec. +func (in *SubnetResourceSpec) DeepCopy() *SubnetResourceSpec { + if in == nil { + return nil + } + out := new(SubnetResourceSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SubnetResourceStatus) DeepCopyInto(out *SubnetResourceStatus) { + *out = *in + if in.IPVersion != nil { + in, out := &in.IPVersion, &out.IPVersion + *out = new(int32) + **out = **in + } + if in.DNSNameservers != nil { + in, out := &in.DNSNameservers, &out.DNSNameservers + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.DNSPublishFixedIP != nil { + in, out := &in.DNSPublishFixedIP, &out.DNSPublishFixedIP + *out = new(bool) + **out = **in + } + if in.AllocationPools != nil { + in, out := &in.AllocationPools, &out.AllocationPools + *out = make([]AllocationPoolStatus, len(*in)) + copy(*out, *in) + } + if in.HostRoutes != nil { + in, out := &in.HostRoutes, &out.HostRoutes + *out = make([]HostRouteStatus, len(*in)) + copy(*out, *in) + } + if in.EnableDHCP != nil { + in, out := &in.EnableDHCP, &out.EnableDHCP + *out = new(bool) + **out = **in + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make([]string, len(*in)) + copy(*out, *in) + } + in.NeutronStatusMetadata.DeepCopyInto(&out.NeutronStatusMetadata) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubnetResourceStatus. +func (in *SubnetResourceStatus) DeepCopy() *SubnetResourceStatus { + if in == nil { + return nil + } + out := new(SubnetResourceStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SubnetSpec) DeepCopyInto(out *SubnetSpec) { + *out = *in + if in.Import != nil { + in, out := &in.Import, &out.Import + *out = new(SubnetImport) + (*in).DeepCopyInto(*out) + } + if in.Resource != nil { + in, out := &in.Resource, &out.Resource + *out = new(SubnetResourceSpec) + (*in).DeepCopyInto(*out) + } + if in.ManagedOptions != nil { + in, out := &in.ManagedOptions, &out.ManagedOptions + *out = new(ManagedOptions) + **out = **in + } + out.CloudCredentialsRef = in.CloudCredentialsRef +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubnetSpec. +func (in *SubnetSpec) DeepCopy() *SubnetSpec { + if in == nil { + return nil + } + out := new(SubnetSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SubnetStatus) DeepCopyInto(out *SubnetStatus) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]v1.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } + if in.Resource != nil { + in, out := &in.Resource, &out.Resource + *out = new(SubnetResourceStatus) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubnetStatus. +func (in *SubnetStatus) DeepCopy() *SubnetStatus { + if in == nil { + return nil + } + out := new(SubnetStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *UserDataSpec) DeepCopyInto(out *UserDataSpec) { + *out = *in + if in.SecretRef != nil { + in, out := &in.SecretRef, &out.SecretRef + *out = new(KubernetesNameRef) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserDataSpec. +func (in *UserDataSpec) DeepCopy() *UserDataSpec { + if in == nil { + return nil + } + out := new(UserDataSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Volume) DeepCopyInto(out *Volume) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Volume. +func (in *Volume) DeepCopy() *Volume { + if in == nil { + return nil + } + out := new(Volume) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Volume) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VolumeAttachmentStatus) DeepCopyInto(out *VolumeAttachmentStatus) { + *out = *in + if in.AttachedAt != nil { + in, out := &in.AttachedAt, &out.AttachedAt + *out = (*in).DeepCopy() + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeAttachmentStatus. +func (in *VolumeAttachmentStatus) DeepCopy() *VolumeAttachmentStatus { + if in == nil { + return nil + } + out := new(VolumeAttachmentStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VolumeFilter) DeepCopyInto(out *VolumeFilter) { + *out = *in + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(OpenStackName) + **out = **in + } + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(string) + **out = **in + } + if in.Size != nil { + in, out := &in.Size, &out.Size + *out = new(int32) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeFilter. +func (in *VolumeFilter) DeepCopy() *VolumeFilter { + if in == nil { + return nil + } + out := new(VolumeFilter) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VolumeImport) DeepCopyInto(out *VolumeImport) { + *out = *in + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } + if in.Filter != nil { + in, out := &in.Filter, &out.Filter + *out = new(VolumeFilter) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeImport. +func (in *VolumeImport) DeepCopy() *VolumeImport { + if in == nil { + return nil + } + out := new(VolumeImport) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VolumeList) DeepCopyInto(out *VolumeList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Volume, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeList. +func (in *VolumeList) DeepCopy() *VolumeList { + if in == nil { + return nil + } + out := new(VolumeList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *VolumeList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VolumeMetadata) DeepCopyInto(out *VolumeMetadata) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeMetadata. +func (in *VolumeMetadata) DeepCopy() *VolumeMetadata { + if in == nil { + return nil + } + out := new(VolumeMetadata) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VolumeMetadataStatus) DeepCopyInto(out *VolumeMetadataStatus) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeMetadataStatus. +func (in *VolumeMetadataStatus) DeepCopy() *VolumeMetadataStatus { + if in == nil { + return nil + } + out := new(VolumeMetadataStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VolumeResourceSpec) DeepCopyInto(out *VolumeResourceSpec) { + *out = *in + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(OpenStackName) + **out = **in + } + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(string) + **out = **in + } + if in.VolumeTypeRef != nil { + in, out := &in.VolumeTypeRef, &out.VolumeTypeRef + *out = new(KubernetesNameRef) + **out = **in + } + if in.Metadata != nil { + in, out := &in.Metadata, &out.Metadata + *out = make([]VolumeMetadata, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeResourceSpec. +func (in *VolumeResourceSpec) DeepCopy() *VolumeResourceSpec { + if in == nil { + return nil + } + out := new(VolumeResourceSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VolumeResourceStatus) DeepCopyInto(out *VolumeResourceStatus) { + *out = *in + if in.Size != nil { + in, out := &in.Size, &out.Size + *out = new(int32) + **out = **in + } + if in.Attachments != nil { + in, out := &in.Attachments, &out.Attachments + *out = make([]VolumeAttachmentStatus, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Metadata != nil { + in, out := &in.Metadata, &out.Metadata + *out = make([]VolumeMetadataStatus, len(*in)) + copy(*out, *in) + } + if in.Bootable != nil { + in, out := &in.Bootable, &out.Bootable + *out = new(bool) + **out = **in + } + if in.Encrypted != nil { + in, out := &in.Encrypted, &out.Encrypted + *out = new(bool) + **out = **in + } + if in.Multiattach != nil { + in, out := &in.Multiattach, &out.Multiattach + *out = new(bool) + **out = **in + } + if in.CreatedAt != nil { + in, out := &in.CreatedAt, &out.CreatedAt + *out = (*in).DeepCopy() + } + if in.UpdatedAt != nil { + in, out := &in.UpdatedAt, &out.UpdatedAt + *out = (*in).DeepCopy() + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeResourceStatus. +func (in *VolumeResourceStatus) DeepCopy() *VolumeResourceStatus { + if in == nil { + return nil + } + out := new(VolumeResourceStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VolumeSpec) DeepCopyInto(out *VolumeSpec) { + *out = *in + if in.Import != nil { + in, out := &in.Import, &out.Import + *out = new(VolumeImport) + (*in).DeepCopyInto(*out) + } + if in.Resource != nil { + in, out := &in.Resource, &out.Resource + *out = new(VolumeResourceSpec) + (*in).DeepCopyInto(*out) + } + if in.ManagedOptions != nil { + in, out := &in.ManagedOptions, &out.ManagedOptions + *out = new(ManagedOptions) + **out = **in + } + out.CloudCredentialsRef = in.CloudCredentialsRef +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeSpec. +func (in *VolumeSpec) DeepCopy() *VolumeSpec { + if in == nil { + return nil + } + out := new(VolumeSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VolumeStatus) DeepCopyInto(out *VolumeStatus) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]v1.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } + if in.Resource != nil { + in, out := &in.Resource, &out.Resource + *out = new(VolumeResourceStatus) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeStatus. +func (in *VolumeStatus) DeepCopy() *VolumeStatus { + if in == nil { + return nil + } + out := new(VolumeStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VolumeType) DeepCopyInto(out *VolumeType) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeType. +func (in *VolumeType) DeepCopy() *VolumeType { + if in == nil { + return nil + } + out := new(VolumeType) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *VolumeType) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VolumeTypeExtraSpec) DeepCopyInto(out *VolumeTypeExtraSpec) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeTypeExtraSpec. +func (in *VolumeTypeExtraSpec) DeepCopy() *VolumeTypeExtraSpec { + if in == nil { + return nil + } + out := new(VolumeTypeExtraSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VolumeTypeExtraSpecStatus) DeepCopyInto(out *VolumeTypeExtraSpecStatus) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeTypeExtraSpecStatus. +func (in *VolumeTypeExtraSpecStatus) DeepCopy() *VolumeTypeExtraSpecStatus { + if in == nil { + return nil + } + out := new(VolumeTypeExtraSpecStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VolumeTypeFilter) DeepCopyInto(out *VolumeTypeFilter) { + *out = *in + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(OpenStackName) + **out = **in + } + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(string) + **out = **in + } + if in.IsPublic != nil { + in, out := &in.IsPublic, &out.IsPublic + *out = new(bool) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeTypeFilter. +func (in *VolumeTypeFilter) DeepCopy() *VolumeTypeFilter { + if in == nil { + return nil + } + out := new(VolumeTypeFilter) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VolumeTypeImport) DeepCopyInto(out *VolumeTypeImport) { + *out = *in + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } + if in.Filter != nil { + in, out := &in.Filter, &out.Filter + *out = new(VolumeTypeFilter) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeTypeImport. +func (in *VolumeTypeImport) DeepCopy() *VolumeTypeImport { + if in == nil { + return nil + } + out := new(VolumeTypeImport) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VolumeTypeList) DeepCopyInto(out *VolumeTypeList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]VolumeType, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeTypeList. +func (in *VolumeTypeList) DeepCopy() *VolumeTypeList { + if in == nil { + return nil + } + out := new(VolumeTypeList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *VolumeTypeList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VolumeTypeResourceSpec) DeepCopyInto(out *VolumeTypeResourceSpec) { + *out = *in + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(OpenStackName) + **out = **in + } + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(string) + **out = **in + } + if in.ExtraSpecs != nil { + in, out := &in.ExtraSpecs, &out.ExtraSpecs + *out = make([]VolumeTypeExtraSpec, len(*in)) + copy(*out, *in) + } + if in.IsPublic != nil { + in, out := &in.IsPublic, &out.IsPublic + *out = new(bool) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeTypeResourceSpec. +func (in *VolumeTypeResourceSpec) DeepCopy() *VolumeTypeResourceSpec { + if in == nil { + return nil + } + out := new(VolumeTypeResourceSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VolumeTypeResourceStatus) DeepCopyInto(out *VolumeTypeResourceStatus) { + *out = *in + if in.ExtraSpecs != nil { + in, out := &in.ExtraSpecs, &out.ExtraSpecs + *out = make([]VolumeTypeExtraSpecStatus, len(*in)) + copy(*out, *in) + } + if in.IsPublic != nil { + in, out := &in.IsPublic, &out.IsPublic + *out = new(bool) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeTypeResourceStatus. +func (in *VolumeTypeResourceStatus) DeepCopy() *VolumeTypeResourceStatus { + if in == nil { + return nil + } + out := new(VolumeTypeResourceStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VolumeTypeSpec) DeepCopyInto(out *VolumeTypeSpec) { + *out = *in + if in.Import != nil { + in, out := &in.Import, &out.Import + *out = new(VolumeTypeImport) + (*in).DeepCopyInto(*out) + } + if in.Resource != nil { + in, out := &in.Resource, &out.Resource + *out = new(VolumeTypeResourceSpec) + (*in).DeepCopyInto(*out) + } + if in.ManagedOptions != nil { + in, out := &in.ManagedOptions, &out.ManagedOptions + *out = new(ManagedOptions) + **out = **in + } + out.CloudCredentialsRef = in.CloudCredentialsRef +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeTypeSpec. +func (in *VolumeTypeSpec) DeepCopy() *VolumeTypeSpec { + if in == nil { + return nil + } + out := new(VolumeTypeSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VolumeTypeStatus) DeepCopyInto(out *VolumeTypeStatus) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]v1.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } + if in.Resource != nil { + in, out := &in.Resource, &out.Resource + *out = new(VolumeTypeResourceStatus) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeTypeStatus. +func (in *VolumeTypeStatus) DeepCopy() *VolumeTypeStatus { + if in == nil { + return nil + } + out := new(VolumeTypeStatus) + in.DeepCopyInto(out) + return out +} diff --git a/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/zz_generated.domain-resource.go b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/zz_generated.domain-resource.go new file mode 100644 index 00000000000..60b3357d630 --- /dev/null +++ b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/zz_generated.domain-resource.go @@ -0,0 +1,177 @@ +// Code generated by resource-generator. DO NOT EDIT. +/* +Copyright 2025 The ORC Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// DomainImport specifies an existing resource which will be imported instead of +// creating a new one +// +kubebuilder:validation:MinProperties:=1 +// +kubebuilder:validation:MaxProperties:=1 +type DomainImport struct { + // id contains the unique identifier of an existing OpenStack resource. Note + // that when specifying an import by ID, the resource MUST already exist. + // The ORC object will enter an error state if the resource does not exist. + // +optional + // +kubebuilder:validation:Format:=uuid + ID *string `json:"id,omitempty"` + + // filter contains a resource query which is expected to return a single + // result. The controller will continue to retry if filter returns no + // results. If filter returns multiple results the controller will set an + // error state and will not continue to retry. + // +optional + Filter *DomainFilter `json:"filter,omitempty"` +} + +// DomainSpec defines the desired state of an ORC object. +// +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'managed' ? has(self.resource) : true",message="resource must be specified when policy is managed" +// +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'managed' ? !has(self.__import__) : true",message="import may not be specified when policy is managed" +// +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'unmanaged' ? !has(self.resource) : true",message="resource may not be specified when policy is unmanaged" +// +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'unmanaged' ? has(self.__import__) : true",message="import must be specified when policy is unmanaged" +// +kubebuilder:validation:XValidation:rule="has(self.managedOptions) ? self.managementPolicy == 'managed' : true",message="managedOptions may only be provided when policy is managed" +type DomainSpec struct { + // import refers to an existing OpenStack resource which will be imported instead of + // creating a new one. + // +optional + Import *DomainImport `json:"import,omitempty"` + + // resource specifies the desired state of the resource. + // + // resource may not be specified if the management policy is `unmanaged`. + // + // resource must be specified if the management policy is `managed`. + // +optional + Resource *DomainResourceSpec `json:"resource,omitempty"` + + // managementPolicy defines how ORC will treat the object. Valid values are + // `managed`: ORC will create, update, and delete the resource; `unmanaged`: + // ORC will import an existing resource, and will not apply updates to it or + // delete it. + // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="managementPolicy is immutable" + // +kubebuilder:default:=managed + // +optional + ManagementPolicy ManagementPolicy `json:"managementPolicy,omitempty"` + + // managedOptions specifies options which may be applied to managed objects. + // +optional + ManagedOptions *ManagedOptions `json:"managedOptions,omitempty"` + + // cloudCredentialsRef points to a secret containing OpenStack credentials + // +required + CloudCredentialsRef CloudCredentialsReference `json:"cloudCredentialsRef"` +} + +// DomainStatus defines the observed state of an ORC resource. +type DomainStatus struct { + // conditions represents the observed status of the object. + // Known .status.conditions.type are: "Available", "Progressing" + // + // Available represents the availability of the OpenStack resource. If it is + // true then the resource is ready for use. + // + // Progressing indicates whether the controller is still attempting to + // reconcile the current state of the OpenStack resource to the desired + // state. Progressing will be False either because the desired state has + // been achieved, or because some terminal error prevents it from ever being + // achieved and the controller is no longer attempting to reconcile. If + // Progressing is True, an observer waiting on the resource should continue + // to wait. + // + // +kubebuilder:validation:MaxItems:=32 + // +patchMergeKey=type + // +patchStrategy=merge + // +listType=map + // +listMapKey=type + // +optional + Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"` + + // id is the unique identifier of the OpenStack resource. + // +optional + ID *string `json:"id,omitempty"` + + // resource contains the observed state of the OpenStack resource. + // +optional + Resource *DomainResourceStatus `json:"resource,omitempty"` +} + +var _ ObjectWithConditions = &Domain{} + +func (i *Domain) GetConditions() []metav1.Condition { + return i.Status.Conditions +} + +// +genclient +// +kubebuilder:object:root=true +// +kubebuilder:resource:categories=openstack +// +kubebuilder:subresource:status +// +kubebuilder:printcolumn:name="ID",type="string",JSONPath=".status.id",description="Resource ID" +// +kubebuilder:printcolumn:name="Available",type="string",JSONPath=".status.conditions[?(@.type=='Available')].status",description="Availability status of resource" +// +kubebuilder:printcolumn:name="Message",type="string",JSONPath=".status.conditions[?(@.type=='Progressing')].message",description="Message describing current progress status" + +// Domain is the Schema for an ORC resource. +type Domain struct { + metav1.TypeMeta `json:",inline"` + + // metadata contains the object metadata + // +optional + metav1.ObjectMeta `json:"metadata,omitempty"` + + // spec specifies the desired state of the resource. + // +optional + Spec DomainSpec `json:"spec,omitempty"` + + // status defines the observed state of the resource. + // +optional + Status DomainStatus `json:"status,omitempty"` +} + +// +kubebuilder:object:root=true + +// DomainList contains a list of Domain. +type DomainList struct { + metav1.TypeMeta `json:",inline"` + + // metadata contains the list metadata + // +optional + metav1.ListMeta `json:"metadata,omitempty"` + + // items contains a list of Domain. + // +required + Items []Domain `json:"items"` +} + +func (l *DomainList) GetItems() []Domain { + return l.Items +} + +func init() { + SchemeBuilder.Register(&Domain{}, &DomainList{}) +} + +func (i *Domain) GetCloudCredentialsRef() (*string, *CloudCredentialsReference) { + if i == nil { + return nil, nil + } + + return &i.Namespace, &i.Spec.CloudCredentialsRef +} + +var _ CloudCredentialsRefProvider = &Domain{} diff --git a/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/zz_generated.flavor-resource.go b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/zz_generated.flavor-resource.go new file mode 100644 index 00000000000..6577cfb6429 --- /dev/null +++ b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/zz_generated.flavor-resource.go @@ -0,0 +1,177 @@ +// Code generated by resource-generator. DO NOT EDIT. +/* +Copyright 2025 The ORC Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// FlavorImport specifies an existing resource which will be imported instead of +// creating a new one +// +kubebuilder:validation:MinProperties:=1 +// +kubebuilder:validation:MaxProperties:=1 +type FlavorImport struct { + // id contains the unique identifier of an existing OpenStack resource. Note + // that when specifying an import by ID, the resource MUST already exist. + // The ORC object will enter an error state if the resource does not exist. + // +optional + // +kubebuilder:validation:Format:=uuid + ID *string `json:"id,omitempty"` + + // filter contains a resource query which is expected to return a single + // result. The controller will continue to retry if filter returns no + // results. If filter returns multiple results the controller will set an + // error state and will not continue to retry. + // +optional + Filter *FlavorFilter `json:"filter,omitempty"` +} + +// FlavorSpec defines the desired state of an ORC object. +// +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'managed' ? has(self.resource) : true",message="resource must be specified when policy is managed" +// +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'managed' ? !has(self.__import__) : true",message="import may not be specified when policy is managed" +// +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'unmanaged' ? !has(self.resource) : true",message="resource may not be specified when policy is unmanaged" +// +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'unmanaged' ? has(self.__import__) : true",message="import must be specified when policy is unmanaged" +// +kubebuilder:validation:XValidation:rule="has(self.managedOptions) ? self.managementPolicy == 'managed' : true",message="managedOptions may only be provided when policy is managed" +type FlavorSpec struct { + // import refers to an existing OpenStack resource which will be imported instead of + // creating a new one. + // +optional + Import *FlavorImport `json:"import,omitempty"` + + // resource specifies the desired state of the resource. + // + // resource may not be specified if the management policy is `unmanaged`. + // + // resource must be specified if the management policy is `managed`. + // +optional + Resource *FlavorResourceSpec `json:"resource,omitempty"` + + // managementPolicy defines how ORC will treat the object. Valid values are + // `managed`: ORC will create, update, and delete the resource; `unmanaged`: + // ORC will import an existing resource, and will not apply updates to it or + // delete it. + // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="managementPolicy is immutable" + // +kubebuilder:default:=managed + // +optional + ManagementPolicy ManagementPolicy `json:"managementPolicy,omitempty"` + + // managedOptions specifies options which may be applied to managed objects. + // +optional + ManagedOptions *ManagedOptions `json:"managedOptions,omitempty"` + + // cloudCredentialsRef points to a secret containing OpenStack credentials + // +required + CloudCredentialsRef CloudCredentialsReference `json:"cloudCredentialsRef"` +} + +// FlavorStatus defines the observed state of an ORC resource. +type FlavorStatus struct { + // conditions represents the observed status of the object. + // Known .status.conditions.type are: "Available", "Progressing" + // + // Available represents the availability of the OpenStack resource. If it is + // true then the resource is ready for use. + // + // Progressing indicates whether the controller is still attempting to + // reconcile the current state of the OpenStack resource to the desired + // state. Progressing will be False either because the desired state has + // been achieved, or because some terminal error prevents it from ever being + // achieved and the controller is no longer attempting to reconcile. If + // Progressing is True, an observer waiting on the resource should continue + // to wait. + // + // +kubebuilder:validation:MaxItems:=32 + // +patchMergeKey=type + // +patchStrategy=merge + // +listType=map + // +listMapKey=type + // +optional + Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"` + + // id is the unique identifier of the OpenStack resource. + // +optional + ID *string `json:"id,omitempty"` + + // resource contains the observed state of the OpenStack resource. + // +optional + Resource *FlavorResourceStatus `json:"resource,omitempty"` +} + +var _ ObjectWithConditions = &Flavor{} + +func (i *Flavor) GetConditions() []metav1.Condition { + return i.Status.Conditions +} + +// +genclient +// +kubebuilder:object:root=true +// +kubebuilder:resource:categories=openstack +// +kubebuilder:subresource:status +// +kubebuilder:printcolumn:name="ID",type="string",JSONPath=".status.id",description="Resource ID" +// +kubebuilder:printcolumn:name="Available",type="string",JSONPath=".status.conditions[?(@.type=='Available')].status",description="Availability status of resource" +// +kubebuilder:printcolumn:name="Message",type="string",JSONPath=".status.conditions[?(@.type=='Progressing')].message",description="Message describing current progress status" + +// Flavor is the Schema for an ORC resource. +type Flavor struct { + metav1.TypeMeta `json:",inline"` + + // metadata contains the object metadata + // +optional + metav1.ObjectMeta `json:"metadata,omitempty"` + + // spec specifies the desired state of the resource. + // +optional + Spec FlavorSpec `json:"spec,omitempty"` + + // status defines the observed state of the resource. + // +optional + Status FlavorStatus `json:"status,omitempty"` +} + +// +kubebuilder:object:root=true + +// FlavorList contains a list of Flavor. +type FlavorList struct { + metav1.TypeMeta `json:",inline"` + + // metadata contains the list metadata + // +optional + metav1.ListMeta `json:"metadata,omitempty"` + + // items contains a list of Flavor. + // +required + Items []Flavor `json:"items"` +} + +func (l *FlavorList) GetItems() []Flavor { + return l.Items +} + +func init() { + SchemeBuilder.Register(&Flavor{}, &FlavorList{}) +} + +func (i *Flavor) GetCloudCredentialsRef() (*string, *CloudCredentialsReference) { + if i == nil { + return nil, nil + } + + return &i.Namespace, &i.Spec.CloudCredentialsRef +} + +var _ CloudCredentialsRefProvider = &Flavor{} diff --git a/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/zz_generated.floatingip-resource.go b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/zz_generated.floatingip-resource.go new file mode 100644 index 00000000000..ec90dd026ae --- /dev/null +++ b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/zz_generated.floatingip-resource.go @@ -0,0 +1,178 @@ +// Code generated by resource-generator. DO NOT EDIT. +/* +Copyright 2025 The ORC Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// FloatingIPImport specifies an existing resource which will be imported instead of +// creating a new one +// +kubebuilder:validation:MinProperties:=1 +// +kubebuilder:validation:MaxProperties:=1 +type FloatingIPImport struct { + // id contains the unique identifier of an existing OpenStack resource. Note + // that when specifying an import by ID, the resource MUST already exist. + // The ORC object will enter an error state if the resource does not exist. + // +optional + // +kubebuilder:validation:Format:=uuid + ID *string `json:"id,omitempty"` + + // filter contains a resource query which is expected to return a single + // result. The controller will continue to retry if filter returns no + // results. If filter returns multiple results the controller will set an + // error state and will not continue to retry. + // +optional + Filter *FloatingIPFilter `json:"filter,omitempty"` +} + +// FloatingIPSpec defines the desired state of an ORC object. +// +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'managed' ? has(self.resource) : true",message="resource must be specified when policy is managed" +// +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'managed' ? !has(self.__import__) : true",message="import may not be specified when policy is managed" +// +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'unmanaged' ? !has(self.resource) : true",message="resource may not be specified when policy is unmanaged" +// +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'unmanaged' ? has(self.__import__) : true",message="import must be specified when policy is unmanaged" +// +kubebuilder:validation:XValidation:rule="has(self.managedOptions) ? self.managementPolicy == 'managed' : true",message="managedOptions may only be provided when policy is managed" +type FloatingIPSpec struct { + // import refers to an existing OpenStack resource which will be imported instead of + // creating a new one. + // +optional + Import *FloatingIPImport `json:"import,omitempty"` + + // resource specifies the desired state of the resource. + // + // resource may not be specified if the management policy is `unmanaged`. + // + // resource must be specified if the management policy is `managed`. + // +optional + Resource *FloatingIPResourceSpec `json:"resource,omitempty"` + + // managementPolicy defines how ORC will treat the object. Valid values are + // `managed`: ORC will create, update, and delete the resource; `unmanaged`: + // ORC will import an existing resource, and will not apply updates to it or + // delete it. + // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="managementPolicy is immutable" + // +kubebuilder:default:=managed + // +optional + ManagementPolicy ManagementPolicy `json:"managementPolicy,omitempty"` + + // managedOptions specifies options which may be applied to managed objects. + // +optional + ManagedOptions *ManagedOptions `json:"managedOptions,omitempty"` + + // cloudCredentialsRef points to a secret containing OpenStack credentials + // +required + CloudCredentialsRef CloudCredentialsReference `json:"cloudCredentialsRef"` +} + +// FloatingIPStatus defines the observed state of an ORC resource. +type FloatingIPStatus struct { + // conditions represents the observed status of the object. + // Known .status.conditions.type are: "Available", "Progressing" + // + // Available represents the availability of the OpenStack resource. If it is + // true then the resource is ready for use. + // + // Progressing indicates whether the controller is still attempting to + // reconcile the current state of the OpenStack resource to the desired + // state. Progressing will be False either because the desired state has + // been achieved, or because some terminal error prevents it from ever being + // achieved and the controller is no longer attempting to reconcile. If + // Progressing is True, an observer waiting on the resource should continue + // to wait. + // + // +kubebuilder:validation:MaxItems:=32 + // +patchMergeKey=type + // +patchStrategy=merge + // +listType=map + // +listMapKey=type + // +optional + Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"` + + // id is the unique identifier of the OpenStack resource. + // +optional + ID *string `json:"id,omitempty"` + + // resource contains the observed state of the OpenStack resource. + // +optional + Resource *FloatingIPResourceStatus `json:"resource,omitempty"` +} + +var _ ObjectWithConditions = &FloatingIP{} + +func (i *FloatingIP) GetConditions() []metav1.Condition { + return i.Status.Conditions +} + +// +genclient +// +kubebuilder:object:root=true +// +kubebuilder:resource:categories=openstack +// +kubebuilder:subresource:status +// +kubebuilder:printcolumn:name="ID",type="string",JSONPath=".status.id",description="Resource ID" +// +kubebuilder:printcolumn:name="Available",type="string",JSONPath=".status.conditions[?(@.type=='Available')].status",description="Availability status of resource" +// +kubebuilder:printcolumn:name="Address",type="string",JSONPath=".status.resource.floatingIP",description="Allocated IP address" +// +kubebuilder:printcolumn:name="Message",type="string",JSONPath=".status.conditions[?(@.type=='Progressing')].message",description="Message describing current progress status" + +// FloatingIP is the Schema for an ORC resource. +type FloatingIP struct { + metav1.TypeMeta `json:",inline"` + + // metadata contains the object metadata + // +optional + metav1.ObjectMeta `json:"metadata,omitempty"` + + // spec specifies the desired state of the resource. + // +optional + Spec FloatingIPSpec `json:"spec,omitempty"` + + // status defines the observed state of the resource. + // +optional + Status FloatingIPStatus `json:"status,omitempty"` +} + +// +kubebuilder:object:root=true + +// FloatingIPList contains a list of FloatingIP. +type FloatingIPList struct { + metav1.TypeMeta `json:",inline"` + + // metadata contains the list metadata + // +optional + metav1.ListMeta `json:"metadata,omitempty"` + + // items contains a list of FloatingIP. + // +required + Items []FloatingIP `json:"items"` +} + +func (l *FloatingIPList) GetItems() []FloatingIP { + return l.Items +} + +func init() { + SchemeBuilder.Register(&FloatingIP{}, &FloatingIPList{}) +} + +func (i *FloatingIP) GetCloudCredentialsRef() (*string, *CloudCredentialsReference) { + if i == nil { + return nil, nil + } + + return &i.Namespace, &i.Spec.CloudCredentialsRef +} + +var _ CloudCredentialsRefProvider = &FloatingIP{} diff --git a/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/zz_generated.group-resource.go b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/zz_generated.group-resource.go new file mode 100644 index 00000000000..c93a74b8845 --- /dev/null +++ b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/zz_generated.group-resource.go @@ -0,0 +1,177 @@ +// Code generated by resource-generator. DO NOT EDIT. +/* +Copyright 2025 The ORC Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// GroupImport specifies an existing resource which will be imported instead of +// creating a new one +// +kubebuilder:validation:MinProperties:=1 +// +kubebuilder:validation:MaxProperties:=1 +type GroupImport struct { + // id contains the unique identifier of an existing OpenStack resource. Note + // that when specifying an import by ID, the resource MUST already exist. + // The ORC object will enter an error state if the resource does not exist. + // +optional + // +kubebuilder:validation:Format:=uuid + ID *string `json:"id,omitempty"` + + // filter contains a resource query which is expected to return a single + // result. The controller will continue to retry if filter returns no + // results. If filter returns multiple results the controller will set an + // error state and will not continue to retry. + // +optional + Filter *GroupFilter `json:"filter,omitempty"` +} + +// GroupSpec defines the desired state of an ORC object. +// +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'managed' ? has(self.resource) : true",message="resource must be specified when policy is managed" +// +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'managed' ? !has(self.__import__) : true",message="import may not be specified when policy is managed" +// +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'unmanaged' ? !has(self.resource) : true",message="resource may not be specified when policy is unmanaged" +// +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'unmanaged' ? has(self.__import__) : true",message="import must be specified when policy is unmanaged" +// +kubebuilder:validation:XValidation:rule="has(self.managedOptions) ? self.managementPolicy == 'managed' : true",message="managedOptions may only be provided when policy is managed" +type GroupSpec struct { + // import refers to an existing OpenStack resource which will be imported instead of + // creating a new one. + // +optional + Import *GroupImport `json:"import,omitempty"` + + // resource specifies the desired state of the resource. + // + // resource may not be specified if the management policy is `unmanaged`. + // + // resource must be specified if the management policy is `managed`. + // +optional + Resource *GroupResourceSpec `json:"resource,omitempty"` + + // managementPolicy defines how ORC will treat the object. Valid values are + // `managed`: ORC will create, update, and delete the resource; `unmanaged`: + // ORC will import an existing resource, and will not apply updates to it or + // delete it. + // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="managementPolicy is immutable" + // +kubebuilder:default:=managed + // +optional + ManagementPolicy ManagementPolicy `json:"managementPolicy,omitempty"` + + // managedOptions specifies options which may be applied to managed objects. + // +optional + ManagedOptions *ManagedOptions `json:"managedOptions,omitempty"` + + // cloudCredentialsRef points to a secret containing OpenStack credentials + // +required + CloudCredentialsRef CloudCredentialsReference `json:"cloudCredentialsRef"` +} + +// GroupStatus defines the observed state of an ORC resource. +type GroupStatus struct { + // conditions represents the observed status of the object. + // Known .status.conditions.type are: "Available", "Progressing" + // + // Available represents the availability of the OpenStack resource. If it is + // true then the resource is ready for use. + // + // Progressing indicates whether the controller is still attempting to + // reconcile the current state of the OpenStack resource to the desired + // state. Progressing will be False either because the desired state has + // been achieved, or because some terminal error prevents it from ever being + // achieved and the controller is no longer attempting to reconcile. If + // Progressing is True, an observer waiting on the resource should continue + // to wait. + // + // +kubebuilder:validation:MaxItems:=32 + // +patchMergeKey=type + // +patchStrategy=merge + // +listType=map + // +listMapKey=type + // +optional + Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"` + + // id is the unique identifier of the OpenStack resource. + // +optional + ID *string `json:"id,omitempty"` + + // resource contains the observed state of the OpenStack resource. + // +optional + Resource *GroupResourceStatus `json:"resource,omitempty"` +} + +var _ ObjectWithConditions = &Group{} + +func (i *Group) GetConditions() []metav1.Condition { + return i.Status.Conditions +} + +// +genclient +// +kubebuilder:object:root=true +// +kubebuilder:resource:categories=openstack +// +kubebuilder:subresource:status +// +kubebuilder:printcolumn:name="ID",type="string",JSONPath=".status.id",description="Resource ID" +// +kubebuilder:printcolumn:name="Available",type="string",JSONPath=".status.conditions[?(@.type=='Available')].status",description="Availability status of resource" +// +kubebuilder:printcolumn:name="Message",type="string",JSONPath=".status.conditions[?(@.type=='Progressing')].message",description="Message describing current progress status" + +// Group is the Schema for an ORC resource. +type Group struct { + metav1.TypeMeta `json:",inline"` + + // metadata contains the object metadata + // +optional + metav1.ObjectMeta `json:"metadata,omitempty"` + + // spec specifies the desired state of the resource. + // +optional + Spec GroupSpec `json:"spec,omitempty"` + + // status defines the observed state of the resource. + // +optional + Status GroupStatus `json:"status,omitempty"` +} + +// +kubebuilder:object:root=true + +// GroupList contains a list of Group. +type GroupList struct { + metav1.TypeMeta `json:",inline"` + + // metadata contains the list metadata + // +optional + metav1.ListMeta `json:"metadata,omitempty"` + + // items contains a list of Group. + // +required + Items []Group `json:"items"` +} + +func (l *GroupList) GetItems() []Group { + return l.Items +} + +func init() { + SchemeBuilder.Register(&Group{}, &GroupList{}) +} + +func (i *Group) GetCloudCredentialsRef() (*string, *CloudCredentialsReference) { + if i == nil { + return nil, nil + } + + return &i.Namespace, &i.Spec.CloudCredentialsRef +} + +var _ CloudCredentialsRefProvider = &Group{} diff --git a/vendor/github.com/k-orc/openstack-resource-controller/api/v1alpha1/zz_generated.image-resource.go b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/zz_generated.image-resource.go similarity index 79% rename from vendor/github.com/k-orc/openstack-resource-controller/api/v1alpha1/zz_generated.image-resource.go rename to vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/zz_generated.image-resource.go index 21bb4fb4954..41e5785f166 100644 --- a/vendor/github.com/k-orc/openstack-resource-controller/api/v1alpha1/zz_generated.image-resource.go +++ b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/zz_generated.image-resource.go @@ -1,6 +1,6 @@ // Code generated by resource-generator. DO NOT EDIT. /* -Copyright 2024 The Kubernetes Authors. +Copyright 2025 The ORC Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -26,14 +26,14 @@ import ( // +kubebuilder:validation:MinProperties:=1 // +kubebuilder:validation:MaxProperties:=1 type ImageImport struct { - // ID contains the unique identifier of an existing OpenStack resource. Note + // id contains the unique identifier of an existing OpenStack resource. Note // that when specifying an import by ID, the resource MUST already exist. // The ORC object will enter an error state if the resource does not exist. // +optional // +kubebuilder:validation:Format:=uuid ID *string `json:"id,omitempty"` - // Filter contains a resource query which is expected to return a single + // filter contains a resource query which is expected to return a single // result. The controller will continue to retry if filter returns no // results. If filter returns multiple results the controller will set an // error state and will not continue to retry. @@ -49,20 +49,20 @@ type ImageImport struct { // +kubebuilder:validation:XValidation:rule="has(self.managedOptions) ? self.managementPolicy == 'managed' : true",message="managedOptions may only be provided when policy is managed" // +kubebuilder:validation:XValidation:rule="!has(self.__import__) ? has(self.resource.content) : true",message="resource content must be specified when not importing" type ImageSpec struct { - // Import refers to an existing OpenStack resource which will be imported instead of + // import refers to an existing OpenStack resource which will be imported instead of // creating a new one. // +optional Import *ImageImport `json:"import,omitempty"` - // Resource specifies the desired state of the resource. + // resource specifies the desired state of the resource. // - // Resource may not be specified if the management policy is `unmanaged`. + // resource may not be specified if the management policy is `unmanaged`. // - // Resource must be specified if the management policy is `managed`. + // resource must be specified if the management policy is `managed`. // +optional Resource *ImageResourceSpec `json:"resource,omitempty"` - // ManagementPolicy defines how ORC will treat the object. Valid values are + // managementPolicy defines how ORC will treat the object. Valid values are // `managed`: ORC will create, update, and delete the resource; `unmanaged`: // ORC will import an existing resource, and will not apply updates to it or // delete it. @@ -71,18 +71,18 @@ type ImageSpec struct { // +optional ManagementPolicy ManagementPolicy `json:"managementPolicy,omitempty"` - // ManagedOptions specifies options which may be applied to managed objects. + // managedOptions specifies options which may be applied to managed objects. // +optional ManagedOptions *ManagedOptions `json:"managedOptions,omitempty"` - // CloudCredentialsRef points to a secret containing OpenStack credentials - // +kubebuilder:validation:Required + // cloudCredentialsRef points to a secret containing OpenStack credentials + // +required CloudCredentialsRef CloudCredentialsReference `json:"cloudCredentialsRef"` } // ImageStatus defines the observed state of an ORC resource. type ImageStatus struct { - // Conditions represents the observed status of the object. + // conditions represents the observed status of the object. // Known .status.conditions.type are: "Available", "Progressing" // // Available represents the availability of the OpenStack resource. If it is @@ -96,17 +96,19 @@ type ImageStatus struct { // Progressing is True, an observer waiting on the resource should continue // to wait. // + // +kubebuilder:validation:MaxItems:=32 // +patchMergeKey=type // +patchStrategy=merge // +listType=map // +listMapKey=type + // +optional Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"` - // ID is the unique identifier of the OpenStack resource. + // id is the unique identifier of the OpenStack resource. // +optional ID *string `json:"id,omitempty"` - // Resource contains the observed state of the OpenStack resource. + // resource contains the observed state of the OpenStack resource. // +optional Resource *ImageResourceStatus `json:"resource,omitempty"` @@ -121,18 +123,26 @@ func (i *Image) GetConditions() []metav1.Condition { // +genclient // +kubebuilder:object:root=true +// +kubebuilder:resource:categories=openstack // +kubebuilder:subresource:status // +kubebuilder:printcolumn:name="ID",type="string",JSONPath=".status.id",description="Resource ID" // +kubebuilder:printcolumn:name="Available",type="string",JSONPath=".status.conditions[?(@.type=='Available')].status",description="Availability status of resource" -// +kubebuilder:printcolumn:name="Message",type="string",JSONPath=".status.conditions[?(@.type=='Available')].message",description="Message describing current availability status" -// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Time duration since creation" +// +kubebuilder:printcolumn:name="Message",type="string",JSONPath=".status.conditions[?(@.type=='Progressing')].message",description="Message describing current progress status" // Image is the Schema for an ORC resource. type Image struct { - metav1.TypeMeta `json:",inline"` + metav1.TypeMeta `json:",inline"` + + // metadata contains the object metadata + // +optional metav1.ObjectMeta `json:"metadata,omitempty"` - Spec ImageSpec `json:"spec,omitempty"` + // spec specifies the desired state of the resource. + // +optional + Spec ImageSpec `json:"spec,omitempty"` + + // status defines the observed state of the resource. + // +optional Status ImageStatus `json:"status,omitempty"` } @@ -141,8 +151,18 @@ type Image struct { // ImageList contains a list of Image. type ImageList struct { metav1.TypeMeta `json:",inline"` + + // metadata contains the list metadata + // +optional metav1.ListMeta `json:"metadata,omitempty"` - Items []Image `json:"items"` + + // items contains a list of Image. + // +required + Items []Image `json:"items"` +} + +func (l *ImageList) GetItems() []Image { + return l.Items } func init() { diff --git a/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/zz_generated.keypair-resource.go b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/zz_generated.keypair-resource.go new file mode 100644 index 00000000000..e0e39301a62 --- /dev/null +++ b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/zz_generated.keypair-resource.go @@ -0,0 +1,177 @@ +// Code generated by resource-generator. DO NOT EDIT. +/* +Copyright 2025 The ORC Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// KeyPairImport specifies an existing resource which will be imported instead of +// creating a new one +// +kubebuilder:validation:MinProperties:=1 +// +kubebuilder:validation:MaxProperties:=1 +type KeyPairImport struct { + // id contains the name of an existing resource. Note: This resource uses + // the resource name as the unique identifier, not a UUID. + // When specifying an import by ID, the resource MUST already exist. + // The ORC object will enter an error state if the resource does not exist. + // +optional + ID *string `json:"id,omitempty"` + + // filter contains a resource query which is expected to return a single + // result. The controller will continue to retry if filter returns no + // results. If filter returns multiple results the controller will set an + // error state and will not continue to retry. + // +optional + Filter *KeyPairFilter `json:"filter,omitempty"` +} + +// KeyPairSpec defines the desired state of an ORC object. +// +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'managed' ? has(self.resource) : true",message="resource must be specified when policy is managed" +// +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'managed' ? !has(self.__import__) : true",message="import may not be specified when policy is managed" +// +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'unmanaged' ? !has(self.resource) : true",message="resource may not be specified when policy is unmanaged" +// +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'unmanaged' ? has(self.__import__) : true",message="import must be specified when policy is unmanaged" +// +kubebuilder:validation:XValidation:rule="has(self.managedOptions) ? self.managementPolicy == 'managed' : true",message="managedOptions may only be provided when policy is managed" +type KeyPairSpec struct { + // import refers to an existing OpenStack resource which will be imported instead of + // creating a new one. + // +optional + Import *KeyPairImport `json:"import,omitempty"` + + // resource specifies the desired state of the resource. + // + // resource may not be specified if the management policy is `unmanaged`. + // + // resource must be specified if the management policy is `managed`. + // +optional + Resource *KeyPairResourceSpec `json:"resource,omitempty"` + + // managementPolicy defines how ORC will treat the object. Valid values are + // `managed`: ORC will create, update, and delete the resource; `unmanaged`: + // ORC will import an existing resource, and will not apply updates to it or + // delete it. + // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="managementPolicy is immutable" + // +kubebuilder:default:=managed + // +optional + ManagementPolicy ManagementPolicy `json:"managementPolicy,omitempty"` + + // managedOptions specifies options which may be applied to managed objects. + // +optional + ManagedOptions *ManagedOptions `json:"managedOptions,omitempty"` + + // cloudCredentialsRef points to a secret containing OpenStack credentials + // +required + CloudCredentialsRef CloudCredentialsReference `json:"cloudCredentialsRef"` +} + +// KeyPairStatus defines the observed state of an ORC resource. +type KeyPairStatus struct { + // conditions represents the observed status of the object. + // Known .status.conditions.type are: "Available", "Progressing" + // + // Available represents the availability of the OpenStack resource. If it is + // true then the resource is ready for use. + // + // Progressing indicates whether the controller is still attempting to + // reconcile the current state of the OpenStack resource to the desired + // state. Progressing will be False either because the desired state has + // been achieved, or because some terminal error prevents it from ever being + // achieved and the controller is no longer attempting to reconcile. If + // Progressing is True, an observer waiting on the resource should continue + // to wait. + // + // +kubebuilder:validation:MaxItems:=32 + // +patchMergeKey=type + // +patchStrategy=merge + // +listType=map + // +listMapKey=type + // +optional + Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"` + + // id is the unique identifier of the OpenStack resource. + // +optional + ID *string `json:"id,omitempty"` + + // resource contains the observed state of the OpenStack resource. + // +optional + Resource *KeyPairResourceStatus `json:"resource,omitempty"` +} + +var _ ObjectWithConditions = &KeyPair{} + +func (i *KeyPair) GetConditions() []metav1.Condition { + return i.Status.Conditions +} + +// +genclient +// +kubebuilder:object:root=true +// +kubebuilder:resource:categories=openstack +// +kubebuilder:subresource:status +// +kubebuilder:printcolumn:name="ID",type="string",JSONPath=".status.id",description="Resource ID" +// +kubebuilder:printcolumn:name="Available",type="string",JSONPath=".status.conditions[?(@.type=='Available')].status",description="Availability status of resource" +// +kubebuilder:printcolumn:name="Message",type="string",JSONPath=".status.conditions[?(@.type=='Progressing')].message",description="Message describing current progress status" + +// KeyPair is the Schema for an ORC resource. +type KeyPair struct { + metav1.TypeMeta `json:",inline"` + + // metadata contains the object metadata + // +optional + metav1.ObjectMeta `json:"metadata,omitempty"` + + // spec specifies the desired state of the resource. + // +optional + Spec KeyPairSpec `json:"spec,omitempty"` + + // status defines the observed state of the resource. + // +optional + Status KeyPairStatus `json:"status,omitempty"` +} + +// +kubebuilder:object:root=true + +// KeyPairList contains a list of KeyPair. +type KeyPairList struct { + metav1.TypeMeta `json:",inline"` + + // metadata contains the list metadata + // +optional + metav1.ListMeta `json:"metadata,omitempty"` + + // items contains a list of KeyPair. + // +required + Items []KeyPair `json:"items"` +} + +func (l *KeyPairList) GetItems() []KeyPair { + return l.Items +} + +func init() { + SchemeBuilder.Register(&KeyPair{}, &KeyPairList{}) +} + +func (i *KeyPair) GetCloudCredentialsRef() (*string, *CloudCredentialsReference) { + if i == nil { + return nil, nil + } + + return &i.Namespace, &i.Spec.CloudCredentialsRef +} + +var _ CloudCredentialsRefProvider = &KeyPair{} diff --git a/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/zz_generated.network-resource.go b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/zz_generated.network-resource.go new file mode 100644 index 00000000000..bc5a017b14e --- /dev/null +++ b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/zz_generated.network-resource.go @@ -0,0 +1,177 @@ +// Code generated by resource-generator. DO NOT EDIT. +/* +Copyright 2025 The ORC Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// NetworkImport specifies an existing resource which will be imported instead of +// creating a new one +// +kubebuilder:validation:MinProperties:=1 +// +kubebuilder:validation:MaxProperties:=1 +type NetworkImport struct { + // id contains the unique identifier of an existing OpenStack resource. Note + // that when specifying an import by ID, the resource MUST already exist. + // The ORC object will enter an error state if the resource does not exist. + // +optional + // +kubebuilder:validation:Format:=uuid + ID *string `json:"id,omitempty"` + + // filter contains a resource query which is expected to return a single + // result. The controller will continue to retry if filter returns no + // results. If filter returns multiple results the controller will set an + // error state and will not continue to retry. + // +optional + Filter *NetworkFilter `json:"filter,omitempty"` +} + +// NetworkSpec defines the desired state of an ORC object. +// +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'managed' ? has(self.resource) : true",message="resource must be specified when policy is managed" +// +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'managed' ? !has(self.__import__) : true",message="import may not be specified when policy is managed" +// +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'unmanaged' ? !has(self.resource) : true",message="resource may not be specified when policy is unmanaged" +// +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'unmanaged' ? has(self.__import__) : true",message="import must be specified when policy is unmanaged" +// +kubebuilder:validation:XValidation:rule="has(self.managedOptions) ? self.managementPolicy == 'managed' : true",message="managedOptions may only be provided when policy is managed" +type NetworkSpec struct { + // import refers to an existing OpenStack resource which will be imported instead of + // creating a new one. + // +optional + Import *NetworkImport `json:"import,omitempty"` + + // resource specifies the desired state of the resource. + // + // resource may not be specified if the management policy is `unmanaged`. + // + // resource must be specified if the management policy is `managed`. + // +optional + Resource *NetworkResourceSpec `json:"resource,omitempty"` + + // managementPolicy defines how ORC will treat the object. Valid values are + // `managed`: ORC will create, update, and delete the resource; `unmanaged`: + // ORC will import an existing resource, and will not apply updates to it or + // delete it. + // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="managementPolicy is immutable" + // +kubebuilder:default:=managed + // +optional + ManagementPolicy ManagementPolicy `json:"managementPolicy,omitempty"` + + // managedOptions specifies options which may be applied to managed objects. + // +optional + ManagedOptions *ManagedOptions `json:"managedOptions,omitempty"` + + // cloudCredentialsRef points to a secret containing OpenStack credentials + // +required + CloudCredentialsRef CloudCredentialsReference `json:"cloudCredentialsRef"` +} + +// NetworkStatus defines the observed state of an ORC resource. +type NetworkStatus struct { + // conditions represents the observed status of the object. + // Known .status.conditions.type are: "Available", "Progressing" + // + // Available represents the availability of the OpenStack resource. If it is + // true then the resource is ready for use. + // + // Progressing indicates whether the controller is still attempting to + // reconcile the current state of the OpenStack resource to the desired + // state. Progressing will be False either because the desired state has + // been achieved, or because some terminal error prevents it from ever being + // achieved and the controller is no longer attempting to reconcile. If + // Progressing is True, an observer waiting on the resource should continue + // to wait. + // + // +kubebuilder:validation:MaxItems:=32 + // +patchMergeKey=type + // +patchStrategy=merge + // +listType=map + // +listMapKey=type + // +optional + Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"` + + // id is the unique identifier of the OpenStack resource. + // +optional + ID *string `json:"id,omitempty"` + + // resource contains the observed state of the OpenStack resource. + // +optional + Resource *NetworkResourceStatus `json:"resource,omitempty"` +} + +var _ ObjectWithConditions = &Network{} + +func (i *Network) GetConditions() []metav1.Condition { + return i.Status.Conditions +} + +// +genclient +// +kubebuilder:object:root=true +// +kubebuilder:resource:categories=openstack +// +kubebuilder:subresource:status +// +kubebuilder:printcolumn:name="ID",type="string",JSONPath=".status.id",description="Resource ID" +// +kubebuilder:printcolumn:name="Available",type="string",JSONPath=".status.conditions[?(@.type=='Available')].status",description="Availability status of resource" +// +kubebuilder:printcolumn:name="Message",type="string",JSONPath=".status.conditions[?(@.type=='Progressing')].message",description="Message describing current progress status" + +// Network is the Schema for an ORC resource. +type Network struct { + metav1.TypeMeta `json:",inline"` + + // metadata contains the object metadata + // +optional + metav1.ObjectMeta `json:"metadata,omitempty"` + + // spec specifies the desired state of the resource. + // +optional + Spec NetworkSpec `json:"spec,omitempty"` + + // status defines the observed state of the resource. + // +optional + Status NetworkStatus `json:"status,omitempty"` +} + +// +kubebuilder:object:root=true + +// NetworkList contains a list of Network. +type NetworkList struct { + metav1.TypeMeta `json:",inline"` + + // metadata contains the list metadata + // +optional + metav1.ListMeta `json:"metadata,omitempty"` + + // items contains a list of Network. + // +required + Items []Network `json:"items"` +} + +func (l *NetworkList) GetItems() []Network { + return l.Items +} + +func init() { + SchemeBuilder.Register(&Network{}, &NetworkList{}) +} + +func (i *Network) GetCloudCredentialsRef() (*string, *CloudCredentialsReference) { + if i == nil { + return nil, nil + } + + return &i.Namespace, &i.Spec.CloudCredentialsRef +} + +var _ CloudCredentialsRefProvider = &Network{} diff --git a/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/zz_generated.port-resource.go b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/zz_generated.port-resource.go new file mode 100644 index 00000000000..631ec707be8 --- /dev/null +++ b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/zz_generated.port-resource.go @@ -0,0 +1,178 @@ +// Code generated by resource-generator. DO NOT EDIT. +/* +Copyright 2025 The ORC Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// PortImport specifies an existing resource which will be imported instead of +// creating a new one +// +kubebuilder:validation:MinProperties:=1 +// +kubebuilder:validation:MaxProperties:=1 +type PortImport struct { + // id contains the unique identifier of an existing OpenStack resource. Note + // that when specifying an import by ID, the resource MUST already exist. + // The ORC object will enter an error state if the resource does not exist. + // +optional + // +kubebuilder:validation:Format:=uuid + ID *string `json:"id,omitempty"` + + // filter contains a resource query which is expected to return a single + // result. The controller will continue to retry if filter returns no + // results. If filter returns multiple results the controller will set an + // error state and will not continue to retry. + // +optional + Filter *PortFilter `json:"filter,omitempty"` +} + +// PortSpec defines the desired state of an ORC object. +// +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'managed' ? has(self.resource) : true",message="resource must be specified when policy is managed" +// +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'managed' ? !has(self.__import__) : true",message="import may not be specified when policy is managed" +// +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'unmanaged' ? !has(self.resource) : true",message="resource may not be specified when policy is unmanaged" +// +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'unmanaged' ? has(self.__import__) : true",message="import must be specified when policy is unmanaged" +// +kubebuilder:validation:XValidation:rule="has(self.managedOptions) ? self.managementPolicy == 'managed' : true",message="managedOptions may only be provided when policy is managed" +type PortSpec struct { + // import refers to an existing OpenStack resource which will be imported instead of + // creating a new one. + // +optional + Import *PortImport `json:"import,omitempty"` + + // resource specifies the desired state of the resource. + // + // resource may not be specified if the management policy is `unmanaged`. + // + // resource must be specified if the management policy is `managed`. + // +optional + Resource *PortResourceSpec `json:"resource,omitempty"` + + // managementPolicy defines how ORC will treat the object. Valid values are + // `managed`: ORC will create, update, and delete the resource; `unmanaged`: + // ORC will import an existing resource, and will not apply updates to it or + // delete it. + // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="managementPolicy is immutable" + // +kubebuilder:default:=managed + // +optional + ManagementPolicy ManagementPolicy `json:"managementPolicy,omitempty"` + + // managedOptions specifies options which may be applied to managed objects. + // +optional + ManagedOptions *ManagedOptions `json:"managedOptions,omitempty"` + + // cloudCredentialsRef points to a secret containing OpenStack credentials + // +required + CloudCredentialsRef CloudCredentialsReference `json:"cloudCredentialsRef"` +} + +// PortStatus defines the observed state of an ORC resource. +type PortStatus struct { + // conditions represents the observed status of the object. + // Known .status.conditions.type are: "Available", "Progressing" + // + // Available represents the availability of the OpenStack resource. If it is + // true then the resource is ready for use. + // + // Progressing indicates whether the controller is still attempting to + // reconcile the current state of the OpenStack resource to the desired + // state. Progressing will be False either because the desired state has + // been achieved, or because some terminal error prevents it from ever being + // achieved and the controller is no longer attempting to reconcile. If + // Progressing is True, an observer waiting on the resource should continue + // to wait. + // + // +kubebuilder:validation:MaxItems:=32 + // +patchMergeKey=type + // +patchStrategy=merge + // +listType=map + // +listMapKey=type + // +optional + Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"` + + // id is the unique identifier of the OpenStack resource. + // +optional + ID *string `json:"id,omitempty"` + + // resource contains the observed state of the OpenStack resource. + // +optional + Resource *PortResourceStatus `json:"resource,omitempty"` +} + +var _ ObjectWithConditions = &Port{} + +func (i *Port) GetConditions() []metav1.Condition { + return i.Status.Conditions +} + +// +genclient +// +kubebuilder:object:root=true +// +kubebuilder:resource:categories=openstack +// +kubebuilder:subresource:status +// +kubebuilder:printcolumn:name="ID",type="string",JSONPath=".status.id",description="Resource ID" +// +kubebuilder:printcolumn:name="Available",type="string",JSONPath=".status.conditions[?(@.type=='Available')].status",description="Availability status of resource" +// +kubebuilder:printcolumn:name="Addresses",type="string",JSONPath=".status.resource.fixedIPs[*].ip",description="Allocated IP addresses" +// +kubebuilder:printcolumn:name="Message",type="string",JSONPath=".status.conditions[?(@.type=='Progressing')].message",description="Message describing current progress status" + +// Port is the Schema for an ORC resource. +type Port struct { + metav1.TypeMeta `json:",inline"` + + // metadata contains the object metadata + // +optional + metav1.ObjectMeta `json:"metadata,omitempty"` + + // spec specifies the desired state of the resource. + // +optional + Spec PortSpec `json:"spec,omitempty"` + + // status defines the observed state of the resource. + // +optional + Status PortStatus `json:"status,omitempty"` +} + +// +kubebuilder:object:root=true + +// PortList contains a list of Port. +type PortList struct { + metav1.TypeMeta `json:",inline"` + + // metadata contains the list metadata + // +optional + metav1.ListMeta `json:"metadata,omitempty"` + + // items contains a list of Port. + // +required + Items []Port `json:"items"` +} + +func (l *PortList) GetItems() []Port { + return l.Items +} + +func init() { + SchemeBuilder.Register(&Port{}, &PortList{}) +} + +func (i *Port) GetCloudCredentialsRef() (*string, *CloudCredentialsReference) { + if i == nil { + return nil, nil + } + + return &i.Namespace, &i.Spec.CloudCredentialsRef +} + +var _ CloudCredentialsRefProvider = &Port{} diff --git a/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/zz_generated.project-resource.go b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/zz_generated.project-resource.go new file mode 100644 index 00000000000..ffd861f4fe6 --- /dev/null +++ b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/zz_generated.project-resource.go @@ -0,0 +1,177 @@ +// Code generated by resource-generator. DO NOT EDIT. +/* +Copyright 2025 The ORC Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// ProjectImport specifies an existing resource which will be imported instead of +// creating a new one +// +kubebuilder:validation:MinProperties:=1 +// +kubebuilder:validation:MaxProperties:=1 +type ProjectImport struct { + // id contains the unique identifier of an existing OpenStack resource. Note + // that when specifying an import by ID, the resource MUST already exist. + // The ORC object will enter an error state if the resource does not exist. + // +optional + // +kubebuilder:validation:Format:=uuid + ID *string `json:"id,omitempty"` + + // filter contains a resource query which is expected to return a single + // result. The controller will continue to retry if filter returns no + // results. If filter returns multiple results the controller will set an + // error state and will not continue to retry. + // +optional + Filter *ProjectFilter `json:"filter,omitempty"` +} + +// ProjectSpec defines the desired state of an ORC object. +// +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'managed' ? has(self.resource) : true",message="resource must be specified when policy is managed" +// +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'managed' ? !has(self.__import__) : true",message="import may not be specified when policy is managed" +// +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'unmanaged' ? !has(self.resource) : true",message="resource may not be specified when policy is unmanaged" +// +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'unmanaged' ? has(self.__import__) : true",message="import must be specified when policy is unmanaged" +// +kubebuilder:validation:XValidation:rule="has(self.managedOptions) ? self.managementPolicy == 'managed' : true",message="managedOptions may only be provided when policy is managed" +type ProjectSpec struct { + // import refers to an existing OpenStack resource which will be imported instead of + // creating a new one. + // +optional + Import *ProjectImport `json:"import,omitempty"` + + // resource specifies the desired state of the resource. + // + // resource may not be specified if the management policy is `unmanaged`. + // + // resource must be specified if the management policy is `managed`. + // +optional + Resource *ProjectResourceSpec `json:"resource,omitempty"` + + // managementPolicy defines how ORC will treat the object. Valid values are + // `managed`: ORC will create, update, and delete the resource; `unmanaged`: + // ORC will import an existing resource, and will not apply updates to it or + // delete it. + // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="managementPolicy is immutable" + // +kubebuilder:default:=managed + // +optional + ManagementPolicy ManagementPolicy `json:"managementPolicy,omitempty"` + + // managedOptions specifies options which may be applied to managed objects. + // +optional + ManagedOptions *ManagedOptions `json:"managedOptions,omitempty"` + + // cloudCredentialsRef points to a secret containing OpenStack credentials + // +required + CloudCredentialsRef CloudCredentialsReference `json:"cloudCredentialsRef"` +} + +// ProjectStatus defines the observed state of an ORC resource. +type ProjectStatus struct { + // conditions represents the observed status of the object. + // Known .status.conditions.type are: "Available", "Progressing" + // + // Available represents the availability of the OpenStack resource. If it is + // true then the resource is ready for use. + // + // Progressing indicates whether the controller is still attempting to + // reconcile the current state of the OpenStack resource to the desired + // state. Progressing will be False either because the desired state has + // been achieved, or because some terminal error prevents it from ever being + // achieved and the controller is no longer attempting to reconcile. If + // Progressing is True, an observer waiting on the resource should continue + // to wait. + // + // +kubebuilder:validation:MaxItems:=32 + // +patchMergeKey=type + // +patchStrategy=merge + // +listType=map + // +listMapKey=type + // +optional + Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"` + + // id is the unique identifier of the OpenStack resource. + // +optional + ID *string `json:"id,omitempty"` + + // resource contains the observed state of the OpenStack resource. + // +optional + Resource *ProjectResourceStatus `json:"resource,omitempty"` +} + +var _ ObjectWithConditions = &Project{} + +func (i *Project) GetConditions() []metav1.Condition { + return i.Status.Conditions +} + +// +genclient +// +kubebuilder:object:root=true +// +kubebuilder:resource:categories=openstack +// +kubebuilder:subresource:status +// +kubebuilder:printcolumn:name="ID",type="string",JSONPath=".status.id",description="Resource ID" +// +kubebuilder:printcolumn:name="Available",type="string",JSONPath=".status.conditions[?(@.type=='Available')].status",description="Availability status of resource" +// +kubebuilder:printcolumn:name="Message",type="string",JSONPath=".status.conditions[?(@.type=='Progressing')].message",description="Message describing current progress status" + +// Project is the Schema for an ORC resource. +type Project struct { + metav1.TypeMeta `json:",inline"` + + // metadata contains the object metadata + // +optional + metav1.ObjectMeta `json:"metadata,omitempty"` + + // spec specifies the desired state of the resource. + // +optional + Spec ProjectSpec `json:"spec,omitempty"` + + // status defines the observed state of the resource. + // +optional + Status ProjectStatus `json:"status,omitempty"` +} + +// +kubebuilder:object:root=true + +// ProjectList contains a list of Project. +type ProjectList struct { + metav1.TypeMeta `json:",inline"` + + // metadata contains the list metadata + // +optional + metav1.ListMeta `json:"metadata,omitempty"` + + // items contains a list of Project. + // +required + Items []Project `json:"items"` +} + +func (l *ProjectList) GetItems() []Project { + return l.Items +} + +func init() { + SchemeBuilder.Register(&Project{}, &ProjectList{}) +} + +func (i *Project) GetCloudCredentialsRef() (*string, *CloudCredentialsReference) { + if i == nil { + return nil, nil + } + + return &i.Namespace, &i.Spec.CloudCredentialsRef +} + +var _ CloudCredentialsRefProvider = &Project{} diff --git a/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/zz_generated.role-resource.go b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/zz_generated.role-resource.go new file mode 100644 index 00000000000..6161c0421b1 --- /dev/null +++ b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/zz_generated.role-resource.go @@ -0,0 +1,177 @@ +// Code generated by resource-generator. DO NOT EDIT. +/* +Copyright 2025 The ORC Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// RoleImport specifies an existing resource which will be imported instead of +// creating a new one +// +kubebuilder:validation:MinProperties:=1 +// +kubebuilder:validation:MaxProperties:=1 +type RoleImport struct { + // id contains the unique identifier of an existing OpenStack resource. Note + // that when specifying an import by ID, the resource MUST already exist. + // The ORC object will enter an error state if the resource does not exist. + // +optional + // +kubebuilder:validation:Format:=uuid + ID *string `json:"id,omitempty"` + + // filter contains a resource query which is expected to return a single + // result. The controller will continue to retry if filter returns no + // results. If filter returns multiple results the controller will set an + // error state and will not continue to retry. + // +optional + Filter *RoleFilter `json:"filter,omitempty"` +} + +// RoleSpec defines the desired state of an ORC object. +// +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'managed' ? has(self.resource) : true",message="resource must be specified when policy is managed" +// +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'managed' ? !has(self.__import__) : true",message="import may not be specified when policy is managed" +// +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'unmanaged' ? !has(self.resource) : true",message="resource may not be specified when policy is unmanaged" +// +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'unmanaged' ? has(self.__import__) : true",message="import must be specified when policy is unmanaged" +// +kubebuilder:validation:XValidation:rule="has(self.managedOptions) ? self.managementPolicy == 'managed' : true",message="managedOptions may only be provided when policy is managed" +type RoleSpec struct { + // import refers to an existing OpenStack resource which will be imported instead of + // creating a new one. + // +optional + Import *RoleImport `json:"import,omitempty"` + + // resource specifies the desired state of the resource. + // + // resource may not be specified if the management policy is `unmanaged`. + // + // resource must be specified if the management policy is `managed`. + // +optional + Resource *RoleResourceSpec `json:"resource,omitempty"` + + // managementPolicy defines how ORC will treat the object. Valid values are + // `managed`: ORC will create, update, and delete the resource; `unmanaged`: + // ORC will import an existing resource, and will not apply updates to it or + // delete it. + // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="managementPolicy is immutable" + // +kubebuilder:default:=managed + // +optional + ManagementPolicy ManagementPolicy `json:"managementPolicy,omitempty"` + + // managedOptions specifies options which may be applied to managed objects. + // +optional + ManagedOptions *ManagedOptions `json:"managedOptions,omitempty"` + + // cloudCredentialsRef points to a secret containing OpenStack credentials + // +required + CloudCredentialsRef CloudCredentialsReference `json:"cloudCredentialsRef"` +} + +// RoleStatus defines the observed state of an ORC resource. +type RoleStatus struct { + // conditions represents the observed status of the object. + // Known .status.conditions.type are: "Available", "Progressing" + // + // Available represents the availability of the OpenStack resource. If it is + // true then the resource is ready for use. + // + // Progressing indicates whether the controller is still attempting to + // reconcile the current state of the OpenStack resource to the desired + // state. Progressing will be False either because the desired state has + // been achieved, or because some terminal error prevents it from ever being + // achieved and the controller is no longer attempting to reconcile. If + // Progressing is True, an observer waiting on the resource should continue + // to wait. + // + // +kubebuilder:validation:MaxItems:=32 + // +patchMergeKey=type + // +patchStrategy=merge + // +listType=map + // +listMapKey=type + // +optional + Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"` + + // id is the unique identifier of the OpenStack resource. + // +optional + ID *string `json:"id,omitempty"` + + // resource contains the observed state of the OpenStack resource. + // +optional + Resource *RoleResourceStatus `json:"resource,omitempty"` +} + +var _ ObjectWithConditions = &Role{} + +func (i *Role) GetConditions() []metav1.Condition { + return i.Status.Conditions +} + +// +genclient +// +kubebuilder:object:root=true +// +kubebuilder:resource:categories=openstack +// +kubebuilder:subresource:status +// +kubebuilder:printcolumn:name="ID",type="string",JSONPath=".status.id",description="Resource ID" +// +kubebuilder:printcolumn:name="Available",type="string",JSONPath=".status.conditions[?(@.type=='Available')].status",description="Availability status of resource" +// +kubebuilder:printcolumn:name="Message",type="string",JSONPath=".status.conditions[?(@.type=='Progressing')].message",description="Message describing current progress status" + +// Role is the Schema for an ORC resource. +type Role struct { + metav1.TypeMeta `json:",inline"` + + // metadata contains the object metadata + // +optional + metav1.ObjectMeta `json:"metadata,omitempty"` + + // spec specifies the desired state of the resource. + // +optional + Spec RoleSpec `json:"spec,omitempty"` + + // status defines the observed state of the resource. + // +optional + Status RoleStatus `json:"status,omitempty"` +} + +// +kubebuilder:object:root=true + +// RoleList contains a list of Role. +type RoleList struct { + metav1.TypeMeta `json:",inline"` + + // metadata contains the list metadata + // +optional + metav1.ListMeta `json:"metadata,omitempty"` + + // items contains a list of Role. + // +required + Items []Role `json:"items"` +} + +func (l *RoleList) GetItems() []Role { + return l.Items +} + +func init() { + SchemeBuilder.Register(&Role{}, &RoleList{}) +} + +func (i *Role) GetCloudCredentialsRef() (*string, *CloudCredentialsReference) { + if i == nil { + return nil, nil + } + + return &i.Namespace, &i.Spec.CloudCredentialsRef +} + +var _ CloudCredentialsRefProvider = &Role{} diff --git a/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/zz_generated.router-resource.go b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/zz_generated.router-resource.go new file mode 100644 index 00000000000..45ca8887cf1 --- /dev/null +++ b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/zz_generated.router-resource.go @@ -0,0 +1,177 @@ +// Code generated by resource-generator. DO NOT EDIT. +/* +Copyright 2025 The ORC Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// RouterImport specifies an existing resource which will be imported instead of +// creating a new one +// +kubebuilder:validation:MinProperties:=1 +// +kubebuilder:validation:MaxProperties:=1 +type RouterImport struct { + // id contains the unique identifier of an existing OpenStack resource. Note + // that when specifying an import by ID, the resource MUST already exist. + // The ORC object will enter an error state if the resource does not exist. + // +optional + // +kubebuilder:validation:Format:=uuid + ID *string `json:"id,omitempty"` + + // filter contains a resource query which is expected to return a single + // result. The controller will continue to retry if filter returns no + // results. If filter returns multiple results the controller will set an + // error state and will not continue to retry. + // +optional + Filter *RouterFilter `json:"filter,omitempty"` +} + +// RouterSpec defines the desired state of an ORC object. +// +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'managed' ? has(self.resource) : true",message="resource must be specified when policy is managed" +// +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'managed' ? !has(self.__import__) : true",message="import may not be specified when policy is managed" +// +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'unmanaged' ? !has(self.resource) : true",message="resource may not be specified when policy is unmanaged" +// +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'unmanaged' ? has(self.__import__) : true",message="import must be specified when policy is unmanaged" +// +kubebuilder:validation:XValidation:rule="has(self.managedOptions) ? self.managementPolicy == 'managed' : true",message="managedOptions may only be provided when policy is managed" +type RouterSpec struct { + // import refers to an existing OpenStack resource which will be imported instead of + // creating a new one. + // +optional + Import *RouterImport `json:"import,omitempty"` + + // resource specifies the desired state of the resource. + // + // resource may not be specified if the management policy is `unmanaged`. + // + // resource must be specified if the management policy is `managed`. + // +optional + Resource *RouterResourceSpec `json:"resource,omitempty"` + + // managementPolicy defines how ORC will treat the object. Valid values are + // `managed`: ORC will create, update, and delete the resource; `unmanaged`: + // ORC will import an existing resource, and will not apply updates to it or + // delete it. + // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="managementPolicy is immutable" + // +kubebuilder:default:=managed + // +optional + ManagementPolicy ManagementPolicy `json:"managementPolicy,omitempty"` + + // managedOptions specifies options which may be applied to managed objects. + // +optional + ManagedOptions *ManagedOptions `json:"managedOptions,omitempty"` + + // cloudCredentialsRef points to a secret containing OpenStack credentials + // +required + CloudCredentialsRef CloudCredentialsReference `json:"cloudCredentialsRef"` +} + +// RouterStatus defines the observed state of an ORC resource. +type RouterStatus struct { + // conditions represents the observed status of the object. + // Known .status.conditions.type are: "Available", "Progressing" + // + // Available represents the availability of the OpenStack resource. If it is + // true then the resource is ready for use. + // + // Progressing indicates whether the controller is still attempting to + // reconcile the current state of the OpenStack resource to the desired + // state. Progressing will be False either because the desired state has + // been achieved, or because some terminal error prevents it from ever being + // achieved and the controller is no longer attempting to reconcile. If + // Progressing is True, an observer waiting on the resource should continue + // to wait. + // + // +kubebuilder:validation:MaxItems:=32 + // +patchMergeKey=type + // +patchStrategy=merge + // +listType=map + // +listMapKey=type + // +optional + Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"` + + // id is the unique identifier of the OpenStack resource. + // +optional + ID *string `json:"id,omitempty"` + + // resource contains the observed state of the OpenStack resource. + // +optional + Resource *RouterResourceStatus `json:"resource,omitempty"` +} + +var _ ObjectWithConditions = &Router{} + +func (i *Router) GetConditions() []metav1.Condition { + return i.Status.Conditions +} + +// +genclient +// +kubebuilder:object:root=true +// +kubebuilder:resource:categories=openstack +// +kubebuilder:subresource:status +// +kubebuilder:printcolumn:name="ID",type="string",JSONPath=".status.id",description="Resource ID" +// +kubebuilder:printcolumn:name="Available",type="string",JSONPath=".status.conditions[?(@.type=='Available')].status",description="Availability status of resource" +// +kubebuilder:printcolumn:name="Message",type="string",JSONPath=".status.conditions[?(@.type=='Progressing')].message",description="Message describing current progress status" + +// Router is the Schema for an ORC resource. +type Router struct { + metav1.TypeMeta `json:",inline"` + + // metadata contains the object metadata + // +optional + metav1.ObjectMeta `json:"metadata,omitempty"` + + // spec specifies the desired state of the resource. + // +optional + Spec RouterSpec `json:"spec,omitempty"` + + // status defines the observed state of the resource. + // +optional + Status RouterStatus `json:"status,omitempty"` +} + +// +kubebuilder:object:root=true + +// RouterList contains a list of Router. +type RouterList struct { + metav1.TypeMeta `json:",inline"` + + // metadata contains the list metadata + // +optional + metav1.ListMeta `json:"metadata,omitempty"` + + // items contains a list of Router. + // +required + Items []Router `json:"items"` +} + +func (l *RouterList) GetItems() []Router { + return l.Items +} + +func init() { + SchemeBuilder.Register(&Router{}, &RouterList{}) +} + +func (i *Router) GetCloudCredentialsRef() (*string, *CloudCredentialsReference) { + if i == nil { + return nil, nil + } + + return &i.Namespace, &i.Spec.CloudCredentialsRef +} + +var _ CloudCredentialsRefProvider = &Router{} diff --git a/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/zz_generated.securitygroup-resource.go b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/zz_generated.securitygroup-resource.go new file mode 100644 index 00000000000..33f221ec0b4 --- /dev/null +++ b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/zz_generated.securitygroup-resource.go @@ -0,0 +1,177 @@ +// Code generated by resource-generator. DO NOT EDIT. +/* +Copyright 2025 The ORC Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// SecurityGroupImport specifies an existing resource which will be imported instead of +// creating a new one +// +kubebuilder:validation:MinProperties:=1 +// +kubebuilder:validation:MaxProperties:=1 +type SecurityGroupImport struct { + // id contains the unique identifier of an existing OpenStack resource. Note + // that when specifying an import by ID, the resource MUST already exist. + // The ORC object will enter an error state if the resource does not exist. + // +optional + // +kubebuilder:validation:Format:=uuid + ID *string `json:"id,omitempty"` + + // filter contains a resource query which is expected to return a single + // result. The controller will continue to retry if filter returns no + // results. If filter returns multiple results the controller will set an + // error state and will not continue to retry. + // +optional + Filter *SecurityGroupFilter `json:"filter,omitempty"` +} + +// SecurityGroupSpec defines the desired state of an ORC object. +// +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'managed' ? has(self.resource) : true",message="resource must be specified when policy is managed" +// +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'managed' ? !has(self.__import__) : true",message="import may not be specified when policy is managed" +// +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'unmanaged' ? !has(self.resource) : true",message="resource may not be specified when policy is unmanaged" +// +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'unmanaged' ? has(self.__import__) : true",message="import must be specified when policy is unmanaged" +// +kubebuilder:validation:XValidation:rule="has(self.managedOptions) ? self.managementPolicy == 'managed' : true",message="managedOptions may only be provided when policy is managed" +type SecurityGroupSpec struct { + // import refers to an existing OpenStack resource which will be imported instead of + // creating a new one. + // +optional + Import *SecurityGroupImport `json:"import,omitempty"` + + // resource specifies the desired state of the resource. + // + // resource may not be specified if the management policy is `unmanaged`. + // + // resource must be specified if the management policy is `managed`. + // +optional + Resource *SecurityGroupResourceSpec `json:"resource,omitempty"` + + // managementPolicy defines how ORC will treat the object. Valid values are + // `managed`: ORC will create, update, and delete the resource; `unmanaged`: + // ORC will import an existing resource, and will not apply updates to it or + // delete it. + // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="managementPolicy is immutable" + // +kubebuilder:default:=managed + // +optional + ManagementPolicy ManagementPolicy `json:"managementPolicy,omitempty"` + + // managedOptions specifies options which may be applied to managed objects. + // +optional + ManagedOptions *ManagedOptions `json:"managedOptions,omitempty"` + + // cloudCredentialsRef points to a secret containing OpenStack credentials + // +required + CloudCredentialsRef CloudCredentialsReference `json:"cloudCredentialsRef"` +} + +// SecurityGroupStatus defines the observed state of an ORC resource. +type SecurityGroupStatus struct { + // conditions represents the observed status of the object. + // Known .status.conditions.type are: "Available", "Progressing" + // + // Available represents the availability of the OpenStack resource. If it is + // true then the resource is ready for use. + // + // Progressing indicates whether the controller is still attempting to + // reconcile the current state of the OpenStack resource to the desired + // state. Progressing will be False either because the desired state has + // been achieved, or because some terminal error prevents it from ever being + // achieved and the controller is no longer attempting to reconcile. If + // Progressing is True, an observer waiting on the resource should continue + // to wait. + // + // +kubebuilder:validation:MaxItems:=32 + // +patchMergeKey=type + // +patchStrategy=merge + // +listType=map + // +listMapKey=type + // +optional + Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"` + + // id is the unique identifier of the OpenStack resource. + // +optional + ID *string `json:"id,omitempty"` + + // resource contains the observed state of the OpenStack resource. + // +optional + Resource *SecurityGroupResourceStatus `json:"resource,omitempty"` +} + +var _ ObjectWithConditions = &SecurityGroup{} + +func (i *SecurityGroup) GetConditions() []metav1.Condition { + return i.Status.Conditions +} + +// +genclient +// +kubebuilder:object:root=true +// +kubebuilder:resource:categories=openstack +// +kubebuilder:subresource:status +// +kubebuilder:printcolumn:name="ID",type="string",JSONPath=".status.id",description="Resource ID" +// +kubebuilder:printcolumn:name="Available",type="string",JSONPath=".status.conditions[?(@.type=='Available')].status",description="Availability status of resource" +// +kubebuilder:printcolumn:name="Message",type="string",JSONPath=".status.conditions[?(@.type=='Progressing')].message",description="Message describing current progress status" + +// SecurityGroup is the Schema for an ORC resource. +type SecurityGroup struct { + metav1.TypeMeta `json:",inline"` + + // metadata contains the object metadata + // +optional + metav1.ObjectMeta `json:"metadata,omitempty"` + + // spec specifies the desired state of the resource. + // +optional + Spec SecurityGroupSpec `json:"spec,omitempty"` + + // status defines the observed state of the resource. + // +optional + Status SecurityGroupStatus `json:"status,omitempty"` +} + +// +kubebuilder:object:root=true + +// SecurityGroupList contains a list of SecurityGroup. +type SecurityGroupList struct { + metav1.TypeMeta `json:",inline"` + + // metadata contains the list metadata + // +optional + metav1.ListMeta `json:"metadata,omitempty"` + + // items contains a list of SecurityGroup. + // +required + Items []SecurityGroup `json:"items"` +} + +func (l *SecurityGroupList) GetItems() []SecurityGroup { + return l.Items +} + +func init() { + SchemeBuilder.Register(&SecurityGroup{}, &SecurityGroupList{}) +} + +func (i *SecurityGroup) GetCloudCredentialsRef() (*string, *CloudCredentialsReference) { + if i == nil { + return nil, nil + } + + return &i.Namespace, &i.Spec.CloudCredentialsRef +} + +var _ CloudCredentialsRefProvider = &SecurityGroup{} diff --git a/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/zz_generated.server-resource.go b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/zz_generated.server-resource.go new file mode 100644 index 00000000000..347cd215962 --- /dev/null +++ b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/zz_generated.server-resource.go @@ -0,0 +1,177 @@ +// Code generated by resource-generator. DO NOT EDIT. +/* +Copyright 2025 The ORC Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// ServerImport specifies an existing resource which will be imported instead of +// creating a new one +// +kubebuilder:validation:MinProperties:=1 +// +kubebuilder:validation:MaxProperties:=1 +type ServerImport struct { + // id contains the unique identifier of an existing OpenStack resource. Note + // that when specifying an import by ID, the resource MUST already exist. + // The ORC object will enter an error state if the resource does not exist. + // +optional + // +kubebuilder:validation:Format:=uuid + ID *string `json:"id,omitempty"` + + // filter contains a resource query which is expected to return a single + // result. The controller will continue to retry if filter returns no + // results. If filter returns multiple results the controller will set an + // error state and will not continue to retry. + // +optional + Filter *ServerFilter `json:"filter,omitempty"` +} + +// ServerSpec defines the desired state of an ORC object. +// +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'managed' ? has(self.resource) : true",message="resource must be specified when policy is managed" +// +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'managed' ? !has(self.__import__) : true",message="import may not be specified when policy is managed" +// +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'unmanaged' ? !has(self.resource) : true",message="resource may not be specified when policy is unmanaged" +// +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'unmanaged' ? has(self.__import__) : true",message="import must be specified when policy is unmanaged" +// +kubebuilder:validation:XValidation:rule="has(self.managedOptions) ? self.managementPolicy == 'managed' : true",message="managedOptions may only be provided when policy is managed" +type ServerSpec struct { + // import refers to an existing OpenStack resource which will be imported instead of + // creating a new one. + // +optional + Import *ServerImport `json:"import,omitempty"` + + // resource specifies the desired state of the resource. + // + // resource may not be specified if the management policy is `unmanaged`. + // + // resource must be specified if the management policy is `managed`. + // +optional + Resource *ServerResourceSpec `json:"resource,omitempty"` + + // managementPolicy defines how ORC will treat the object. Valid values are + // `managed`: ORC will create, update, and delete the resource; `unmanaged`: + // ORC will import an existing resource, and will not apply updates to it or + // delete it. + // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="managementPolicy is immutable" + // +kubebuilder:default:=managed + // +optional + ManagementPolicy ManagementPolicy `json:"managementPolicy,omitempty"` + + // managedOptions specifies options which may be applied to managed objects. + // +optional + ManagedOptions *ManagedOptions `json:"managedOptions,omitempty"` + + // cloudCredentialsRef points to a secret containing OpenStack credentials + // +required + CloudCredentialsRef CloudCredentialsReference `json:"cloudCredentialsRef"` +} + +// ServerStatus defines the observed state of an ORC resource. +type ServerStatus struct { + // conditions represents the observed status of the object. + // Known .status.conditions.type are: "Available", "Progressing" + // + // Available represents the availability of the OpenStack resource. If it is + // true then the resource is ready for use. + // + // Progressing indicates whether the controller is still attempting to + // reconcile the current state of the OpenStack resource to the desired + // state. Progressing will be False either because the desired state has + // been achieved, or because some terminal error prevents it from ever being + // achieved and the controller is no longer attempting to reconcile. If + // Progressing is True, an observer waiting on the resource should continue + // to wait. + // + // +kubebuilder:validation:MaxItems:=32 + // +patchMergeKey=type + // +patchStrategy=merge + // +listType=map + // +listMapKey=type + // +optional + Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"` + + // id is the unique identifier of the OpenStack resource. + // +optional + ID *string `json:"id,omitempty"` + + // resource contains the observed state of the OpenStack resource. + // +optional + Resource *ServerResourceStatus `json:"resource,omitempty"` +} + +var _ ObjectWithConditions = &Server{} + +func (i *Server) GetConditions() []metav1.Condition { + return i.Status.Conditions +} + +// +genclient +// +kubebuilder:object:root=true +// +kubebuilder:resource:categories=openstack +// +kubebuilder:subresource:status +// +kubebuilder:printcolumn:name="ID",type="string",JSONPath=".status.id",description="Resource ID" +// +kubebuilder:printcolumn:name="Available",type="string",JSONPath=".status.conditions[?(@.type=='Available')].status",description="Availability status of resource" +// +kubebuilder:printcolumn:name="Message",type="string",JSONPath=".status.conditions[?(@.type=='Progressing')].message",description="Message describing current progress status" + +// Server is the Schema for an ORC resource. +type Server struct { + metav1.TypeMeta `json:",inline"` + + // metadata contains the object metadata + // +optional + metav1.ObjectMeta `json:"metadata,omitempty"` + + // spec specifies the desired state of the resource. + // +optional + Spec ServerSpec `json:"spec,omitempty"` + + // status defines the observed state of the resource. + // +optional + Status ServerStatus `json:"status,omitempty"` +} + +// +kubebuilder:object:root=true + +// ServerList contains a list of Server. +type ServerList struct { + metav1.TypeMeta `json:",inline"` + + // metadata contains the list metadata + // +optional + metav1.ListMeta `json:"metadata,omitempty"` + + // items contains a list of Server. + // +required + Items []Server `json:"items"` +} + +func (l *ServerList) GetItems() []Server { + return l.Items +} + +func init() { + SchemeBuilder.Register(&Server{}, &ServerList{}) +} + +func (i *Server) GetCloudCredentialsRef() (*string, *CloudCredentialsReference) { + if i == nil { + return nil, nil + } + + return &i.Namespace, &i.Spec.CloudCredentialsRef +} + +var _ CloudCredentialsRefProvider = &Server{} diff --git a/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/zz_generated.servergroup-resource.go b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/zz_generated.servergroup-resource.go new file mode 100644 index 00000000000..6bc16a63a8e --- /dev/null +++ b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/zz_generated.servergroup-resource.go @@ -0,0 +1,177 @@ +// Code generated by resource-generator. DO NOT EDIT. +/* +Copyright 2025 The ORC Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// ServerGroupImport specifies an existing resource which will be imported instead of +// creating a new one +// +kubebuilder:validation:MinProperties:=1 +// +kubebuilder:validation:MaxProperties:=1 +type ServerGroupImport struct { + // id contains the unique identifier of an existing OpenStack resource. Note + // that when specifying an import by ID, the resource MUST already exist. + // The ORC object will enter an error state if the resource does not exist. + // +optional + // +kubebuilder:validation:Format:=uuid + ID *string `json:"id,omitempty"` + + // filter contains a resource query which is expected to return a single + // result. The controller will continue to retry if filter returns no + // results. If filter returns multiple results the controller will set an + // error state and will not continue to retry. + // +optional + Filter *ServerGroupFilter `json:"filter,omitempty"` +} + +// ServerGroupSpec defines the desired state of an ORC object. +// +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'managed' ? has(self.resource) : true",message="resource must be specified when policy is managed" +// +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'managed' ? !has(self.__import__) : true",message="import may not be specified when policy is managed" +// +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'unmanaged' ? !has(self.resource) : true",message="resource may not be specified when policy is unmanaged" +// +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'unmanaged' ? has(self.__import__) : true",message="import must be specified when policy is unmanaged" +// +kubebuilder:validation:XValidation:rule="has(self.managedOptions) ? self.managementPolicy == 'managed' : true",message="managedOptions may only be provided when policy is managed" +type ServerGroupSpec struct { + // import refers to an existing OpenStack resource which will be imported instead of + // creating a new one. + // +optional + Import *ServerGroupImport `json:"import,omitempty"` + + // resource specifies the desired state of the resource. + // + // resource may not be specified if the management policy is `unmanaged`. + // + // resource must be specified if the management policy is `managed`. + // +optional + Resource *ServerGroupResourceSpec `json:"resource,omitempty"` + + // managementPolicy defines how ORC will treat the object. Valid values are + // `managed`: ORC will create, update, and delete the resource; `unmanaged`: + // ORC will import an existing resource, and will not apply updates to it or + // delete it. + // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="managementPolicy is immutable" + // +kubebuilder:default:=managed + // +optional + ManagementPolicy ManagementPolicy `json:"managementPolicy,omitempty"` + + // managedOptions specifies options which may be applied to managed objects. + // +optional + ManagedOptions *ManagedOptions `json:"managedOptions,omitempty"` + + // cloudCredentialsRef points to a secret containing OpenStack credentials + // +required + CloudCredentialsRef CloudCredentialsReference `json:"cloudCredentialsRef"` +} + +// ServerGroupStatus defines the observed state of an ORC resource. +type ServerGroupStatus struct { + // conditions represents the observed status of the object. + // Known .status.conditions.type are: "Available", "Progressing" + // + // Available represents the availability of the OpenStack resource. If it is + // true then the resource is ready for use. + // + // Progressing indicates whether the controller is still attempting to + // reconcile the current state of the OpenStack resource to the desired + // state. Progressing will be False either because the desired state has + // been achieved, or because some terminal error prevents it from ever being + // achieved and the controller is no longer attempting to reconcile. If + // Progressing is True, an observer waiting on the resource should continue + // to wait. + // + // +kubebuilder:validation:MaxItems:=32 + // +patchMergeKey=type + // +patchStrategy=merge + // +listType=map + // +listMapKey=type + // +optional + Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"` + + // id is the unique identifier of the OpenStack resource. + // +optional + ID *string `json:"id,omitempty"` + + // resource contains the observed state of the OpenStack resource. + // +optional + Resource *ServerGroupResourceStatus `json:"resource,omitempty"` +} + +var _ ObjectWithConditions = &ServerGroup{} + +func (i *ServerGroup) GetConditions() []metav1.Condition { + return i.Status.Conditions +} + +// +genclient +// +kubebuilder:object:root=true +// +kubebuilder:resource:categories=openstack +// +kubebuilder:subresource:status +// +kubebuilder:printcolumn:name="ID",type="string",JSONPath=".status.id",description="Resource ID" +// +kubebuilder:printcolumn:name="Available",type="string",JSONPath=".status.conditions[?(@.type=='Available')].status",description="Availability status of resource" +// +kubebuilder:printcolumn:name="Message",type="string",JSONPath=".status.conditions[?(@.type=='Progressing')].message",description="Message describing current progress status" + +// ServerGroup is the Schema for an ORC resource. +type ServerGroup struct { + metav1.TypeMeta `json:",inline"` + + // metadata contains the object metadata + // +optional + metav1.ObjectMeta `json:"metadata,omitempty"` + + // spec specifies the desired state of the resource. + // +optional + Spec ServerGroupSpec `json:"spec,omitempty"` + + // status defines the observed state of the resource. + // +optional + Status ServerGroupStatus `json:"status,omitempty"` +} + +// +kubebuilder:object:root=true + +// ServerGroupList contains a list of ServerGroup. +type ServerGroupList struct { + metav1.TypeMeta `json:",inline"` + + // metadata contains the list metadata + // +optional + metav1.ListMeta `json:"metadata,omitempty"` + + // items contains a list of ServerGroup. + // +required + Items []ServerGroup `json:"items"` +} + +func (l *ServerGroupList) GetItems() []ServerGroup { + return l.Items +} + +func init() { + SchemeBuilder.Register(&ServerGroup{}, &ServerGroupList{}) +} + +func (i *ServerGroup) GetCloudCredentialsRef() (*string, *CloudCredentialsReference) { + if i == nil { + return nil, nil + } + + return &i.Namespace, &i.Spec.CloudCredentialsRef +} + +var _ CloudCredentialsRefProvider = &ServerGroup{} diff --git a/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/zz_generated.service-resource.go b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/zz_generated.service-resource.go new file mode 100644 index 00000000000..93faf35caa3 --- /dev/null +++ b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/zz_generated.service-resource.go @@ -0,0 +1,177 @@ +// Code generated by resource-generator. DO NOT EDIT. +/* +Copyright 2025 The ORC Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// ServiceImport specifies an existing resource which will be imported instead of +// creating a new one +// +kubebuilder:validation:MinProperties:=1 +// +kubebuilder:validation:MaxProperties:=1 +type ServiceImport struct { + // id contains the unique identifier of an existing OpenStack resource. Note + // that when specifying an import by ID, the resource MUST already exist. + // The ORC object will enter an error state if the resource does not exist. + // +optional + // +kubebuilder:validation:Format:=uuid + ID *string `json:"id,omitempty"` + + // filter contains a resource query which is expected to return a single + // result. The controller will continue to retry if filter returns no + // results. If filter returns multiple results the controller will set an + // error state and will not continue to retry. + // +optional + Filter *ServiceFilter `json:"filter,omitempty"` +} + +// ServiceSpec defines the desired state of an ORC object. +// +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'managed' ? has(self.resource) : true",message="resource must be specified when policy is managed" +// +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'managed' ? !has(self.__import__) : true",message="import may not be specified when policy is managed" +// +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'unmanaged' ? !has(self.resource) : true",message="resource may not be specified when policy is unmanaged" +// +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'unmanaged' ? has(self.__import__) : true",message="import must be specified when policy is unmanaged" +// +kubebuilder:validation:XValidation:rule="has(self.managedOptions) ? self.managementPolicy == 'managed' : true",message="managedOptions may only be provided when policy is managed" +type ServiceSpec struct { + // import refers to an existing OpenStack resource which will be imported instead of + // creating a new one. + // +optional + Import *ServiceImport `json:"import,omitempty"` + + // resource specifies the desired state of the resource. + // + // resource may not be specified if the management policy is `unmanaged`. + // + // resource must be specified if the management policy is `managed`. + // +optional + Resource *ServiceResourceSpec `json:"resource,omitempty"` + + // managementPolicy defines how ORC will treat the object. Valid values are + // `managed`: ORC will create, update, and delete the resource; `unmanaged`: + // ORC will import an existing resource, and will not apply updates to it or + // delete it. + // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="managementPolicy is immutable" + // +kubebuilder:default:=managed + // +optional + ManagementPolicy ManagementPolicy `json:"managementPolicy,omitempty"` + + // managedOptions specifies options which may be applied to managed objects. + // +optional + ManagedOptions *ManagedOptions `json:"managedOptions,omitempty"` + + // cloudCredentialsRef points to a secret containing OpenStack credentials + // +required + CloudCredentialsRef CloudCredentialsReference `json:"cloudCredentialsRef"` +} + +// ServiceStatus defines the observed state of an ORC resource. +type ServiceStatus struct { + // conditions represents the observed status of the object. + // Known .status.conditions.type are: "Available", "Progressing" + // + // Available represents the availability of the OpenStack resource. If it is + // true then the resource is ready for use. + // + // Progressing indicates whether the controller is still attempting to + // reconcile the current state of the OpenStack resource to the desired + // state. Progressing will be False either because the desired state has + // been achieved, or because some terminal error prevents it from ever being + // achieved and the controller is no longer attempting to reconcile. If + // Progressing is True, an observer waiting on the resource should continue + // to wait. + // + // +kubebuilder:validation:MaxItems:=32 + // +patchMergeKey=type + // +patchStrategy=merge + // +listType=map + // +listMapKey=type + // +optional + Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"` + + // id is the unique identifier of the OpenStack resource. + // +optional + ID *string `json:"id,omitempty"` + + // resource contains the observed state of the OpenStack resource. + // +optional + Resource *ServiceResourceStatus `json:"resource,omitempty"` +} + +var _ ObjectWithConditions = &Service{} + +func (i *Service) GetConditions() []metav1.Condition { + return i.Status.Conditions +} + +// +genclient +// +kubebuilder:object:root=true +// +kubebuilder:resource:categories=openstack +// +kubebuilder:subresource:status +// +kubebuilder:printcolumn:name="ID",type="string",JSONPath=".status.id",description="Resource ID" +// +kubebuilder:printcolumn:name="Available",type="string",JSONPath=".status.conditions[?(@.type=='Available')].status",description="Availability status of resource" +// +kubebuilder:printcolumn:name="Message",type="string",JSONPath=".status.conditions[?(@.type=='Progressing')].message",description="Message describing current progress status" + +// Service is the Schema for an ORC resource. +type Service struct { + metav1.TypeMeta `json:",inline"` + + // metadata contains the object metadata + // +optional + metav1.ObjectMeta `json:"metadata,omitempty"` + + // spec specifies the desired state of the resource. + // +optional + Spec ServiceSpec `json:"spec,omitempty"` + + // status defines the observed state of the resource. + // +optional + Status ServiceStatus `json:"status,omitempty"` +} + +// +kubebuilder:object:root=true + +// ServiceList contains a list of Service. +type ServiceList struct { + metav1.TypeMeta `json:",inline"` + + // metadata contains the list metadata + // +optional + metav1.ListMeta `json:"metadata,omitempty"` + + // items contains a list of Service. + // +required + Items []Service `json:"items"` +} + +func (l *ServiceList) GetItems() []Service { + return l.Items +} + +func init() { + SchemeBuilder.Register(&Service{}, &ServiceList{}) +} + +func (i *Service) GetCloudCredentialsRef() (*string, *CloudCredentialsReference) { + if i == nil { + return nil, nil + } + + return &i.Namespace, &i.Spec.CloudCredentialsRef +} + +var _ CloudCredentialsRefProvider = &Service{} diff --git a/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/zz_generated.subnet-resource.go b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/zz_generated.subnet-resource.go new file mode 100644 index 00000000000..072cbc30722 --- /dev/null +++ b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/zz_generated.subnet-resource.go @@ -0,0 +1,177 @@ +// Code generated by resource-generator. DO NOT EDIT. +/* +Copyright 2025 The ORC Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// SubnetImport specifies an existing resource which will be imported instead of +// creating a new one +// +kubebuilder:validation:MinProperties:=1 +// +kubebuilder:validation:MaxProperties:=1 +type SubnetImport struct { + // id contains the unique identifier of an existing OpenStack resource. Note + // that when specifying an import by ID, the resource MUST already exist. + // The ORC object will enter an error state if the resource does not exist. + // +optional + // +kubebuilder:validation:Format:=uuid + ID *string `json:"id,omitempty"` + + // filter contains a resource query which is expected to return a single + // result. The controller will continue to retry if filter returns no + // results. If filter returns multiple results the controller will set an + // error state and will not continue to retry. + // +optional + Filter *SubnetFilter `json:"filter,omitempty"` +} + +// SubnetSpec defines the desired state of an ORC object. +// +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'managed' ? has(self.resource) : true",message="resource must be specified when policy is managed" +// +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'managed' ? !has(self.__import__) : true",message="import may not be specified when policy is managed" +// +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'unmanaged' ? !has(self.resource) : true",message="resource may not be specified when policy is unmanaged" +// +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'unmanaged' ? has(self.__import__) : true",message="import must be specified when policy is unmanaged" +// +kubebuilder:validation:XValidation:rule="has(self.managedOptions) ? self.managementPolicy == 'managed' : true",message="managedOptions may only be provided when policy is managed" +type SubnetSpec struct { + // import refers to an existing OpenStack resource which will be imported instead of + // creating a new one. + // +optional + Import *SubnetImport `json:"import,omitempty"` + + // resource specifies the desired state of the resource. + // + // resource may not be specified if the management policy is `unmanaged`. + // + // resource must be specified if the management policy is `managed`. + // +optional + Resource *SubnetResourceSpec `json:"resource,omitempty"` + + // managementPolicy defines how ORC will treat the object. Valid values are + // `managed`: ORC will create, update, and delete the resource; `unmanaged`: + // ORC will import an existing resource, and will not apply updates to it or + // delete it. + // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="managementPolicy is immutable" + // +kubebuilder:default:=managed + // +optional + ManagementPolicy ManagementPolicy `json:"managementPolicy,omitempty"` + + // managedOptions specifies options which may be applied to managed objects. + // +optional + ManagedOptions *ManagedOptions `json:"managedOptions,omitempty"` + + // cloudCredentialsRef points to a secret containing OpenStack credentials + // +required + CloudCredentialsRef CloudCredentialsReference `json:"cloudCredentialsRef"` +} + +// SubnetStatus defines the observed state of an ORC resource. +type SubnetStatus struct { + // conditions represents the observed status of the object. + // Known .status.conditions.type are: "Available", "Progressing" + // + // Available represents the availability of the OpenStack resource. If it is + // true then the resource is ready for use. + // + // Progressing indicates whether the controller is still attempting to + // reconcile the current state of the OpenStack resource to the desired + // state. Progressing will be False either because the desired state has + // been achieved, or because some terminal error prevents it from ever being + // achieved and the controller is no longer attempting to reconcile. If + // Progressing is True, an observer waiting on the resource should continue + // to wait. + // + // +kubebuilder:validation:MaxItems:=32 + // +patchMergeKey=type + // +patchStrategy=merge + // +listType=map + // +listMapKey=type + // +optional + Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"` + + // id is the unique identifier of the OpenStack resource. + // +optional + ID *string `json:"id,omitempty"` + + // resource contains the observed state of the OpenStack resource. + // +optional + Resource *SubnetResourceStatus `json:"resource,omitempty"` +} + +var _ ObjectWithConditions = &Subnet{} + +func (i *Subnet) GetConditions() []metav1.Condition { + return i.Status.Conditions +} + +// +genclient +// +kubebuilder:object:root=true +// +kubebuilder:resource:categories=openstack +// +kubebuilder:subresource:status +// +kubebuilder:printcolumn:name="ID",type="string",JSONPath=".status.id",description="Resource ID" +// +kubebuilder:printcolumn:name="Available",type="string",JSONPath=".status.conditions[?(@.type=='Available')].status",description="Availability status of resource" +// +kubebuilder:printcolumn:name="Message",type="string",JSONPath=".status.conditions[?(@.type=='Progressing')].message",description="Message describing current progress status" + +// Subnet is the Schema for an ORC resource. +type Subnet struct { + metav1.TypeMeta `json:",inline"` + + // metadata contains the object metadata + // +optional + metav1.ObjectMeta `json:"metadata,omitempty"` + + // spec specifies the desired state of the resource. + // +optional + Spec SubnetSpec `json:"spec,omitempty"` + + // status defines the observed state of the resource. + // +optional + Status SubnetStatus `json:"status,omitempty"` +} + +// +kubebuilder:object:root=true + +// SubnetList contains a list of Subnet. +type SubnetList struct { + metav1.TypeMeta `json:",inline"` + + // metadata contains the list metadata + // +optional + metav1.ListMeta `json:"metadata,omitempty"` + + // items contains a list of Subnet. + // +required + Items []Subnet `json:"items"` +} + +func (l *SubnetList) GetItems() []Subnet { + return l.Items +} + +func init() { + SchemeBuilder.Register(&Subnet{}, &SubnetList{}) +} + +func (i *Subnet) GetCloudCredentialsRef() (*string, *CloudCredentialsReference) { + if i == nil { + return nil, nil + } + + return &i.Namespace, &i.Spec.CloudCredentialsRef +} + +var _ CloudCredentialsRefProvider = &Subnet{} diff --git a/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/zz_generated.volume-resource.go b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/zz_generated.volume-resource.go new file mode 100644 index 00000000000..da525c450dc --- /dev/null +++ b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/zz_generated.volume-resource.go @@ -0,0 +1,177 @@ +// Code generated by resource-generator. DO NOT EDIT. +/* +Copyright 2025 The ORC Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// VolumeImport specifies an existing resource which will be imported instead of +// creating a new one +// +kubebuilder:validation:MinProperties:=1 +// +kubebuilder:validation:MaxProperties:=1 +type VolumeImport struct { + // id contains the unique identifier of an existing OpenStack resource. Note + // that when specifying an import by ID, the resource MUST already exist. + // The ORC object will enter an error state if the resource does not exist. + // +optional + // +kubebuilder:validation:Format:=uuid + ID *string `json:"id,omitempty"` + + // filter contains a resource query which is expected to return a single + // result. The controller will continue to retry if filter returns no + // results. If filter returns multiple results the controller will set an + // error state and will not continue to retry. + // +optional + Filter *VolumeFilter `json:"filter,omitempty"` +} + +// VolumeSpec defines the desired state of an ORC object. +// +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'managed' ? has(self.resource) : true",message="resource must be specified when policy is managed" +// +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'managed' ? !has(self.__import__) : true",message="import may not be specified when policy is managed" +// +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'unmanaged' ? !has(self.resource) : true",message="resource may not be specified when policy is unmanaged" +// +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'unmanaged' ? has(self.__import__) : true",message="import must be specified when policy is unmanaged" +// +kubebuilder:validation:XValidation:rule="has(self.managedOptions) ? self.managementPolicy == 'managed' : true",message="managedOptions may only be provided when policy is managed" +type VolumeSpec struct { + // import refers to an existing OpenStack resource which will be imported instead of + // creating a new one. + // +optional + Import *VolumeImport `json:"import,omitempty"` + + // resource specifies the desired state of the resource. + // + // resource may not be specified if the management policy is `unmanaged`. + // + // resource must be specified if the management policy is `managed`. + // +optional + Resource *VolumeResourceSpec `json:"resource,omitempty"` + + // managementPolicy defines how ORC will treat the object. Valid values are + // `managed`: ORC will create, update, and delete the resource; `unmanaged`: + // ORC will import an existing resource, and will not apply updates to it or + // delete it. + // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="managementPolicy is immutable" + // +kubebuilder:default:=managed + // +optional + ManagementPolicy ManagementPolicy `json:"managementPolicy,omitempty"` + + // managedOptions specifies options which may be applied to managed objects. + // +optional + ManagedOptions *ManagedOptions `json:"managedOptions,omitempty"` + + // cloudCredentialsRef points to a secret containing OpenStack credentials + // +required + CloudCredentialsRef CloudCredentialsReference `json:"cloudCredentialsRef"` +} + +// VolumeStatus defines the observed state of an ORC resource. +type VolumeStatus struct { + // conditions represents the observed status of the object. + // Known .status.conditions.type are: "Available", "Progressing" + // + // Available represents the availability of the OpenStack resource. If it is + // true then the resource is ready for use. + // + // Progressing indicates whether the controller is still attempting to + // reconcile the current state of the OpenStack resource to the desired + // state. Progressing will be False either because the desired state has + // been achieved, or because some terminal error prevents it from ever being + // achieved and the controller is no longer attempting to reconcile. If + // Progressing is True, an observer waiting on the resource should continue + // to wait. + // + // +kubebuilder:validation:MaxItems:=32 + // +patchMergeKey=type + // +patchStrategy=merge + // +listType=map + // +listMapKey=type + // +optional + Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"` + + // id is the unique identifier of the OpenStack resource. + // +optional + ID *string `json:"id,omitempty"` + + // resource contains the observed state of the OpenStack resource. + // +optional + Resource *VolumeResourceStatus `json:"resource,omitempty"` +} + +var _ ObjectWithConditions = &Volume{} + +func (i *Volume) GetConditions() []metav1.Condition { + return i.Status.Conditions +} + +// +genclient +// +kubebuilder:object:root=true +// +kubebuilder:resource:categories=openstack +// +kubebuilder:subresource:status +// +kubebuilder:printcolumn:name="ID",type="string",JSONPath=".status.id",description="Resource ID" +// +kubebuilder:printcolumn:name="Available",type="string",JSONPath=".status.conditions[?(@.type=='Available')].status",description="Availability status of resource" +// +kubebuilder:printcolumn:name="Message",type="string",JSONPath=".status.conditions[?(@.type=='Progressing')].message",description="Message describing current progress status" + +// Volume is the Schema for an ORC resource. +type Volume struct { + metav1.TypeMeta `json:",inline"` + + // metadata contains the object metadata + // +optional + metav1.ObjectMeta `json:"metadata,omitempty"` + + // spec specifies the desired state of the resource. + // +optional + Spec VolumeSpec `json:"spec,omitempty"` + + // status defines the observed state of the resource. + // +optional + Status VolumeStatus `json:"status,omitempty"` +} + +// +kubebuilder:object:root=true + +// VolumeList contains a list of Volume. +type VolumeList struct { + metav1.TypeMeta `json:",inline"` + + // metadata contains the list metadata + // +optional + metav1.ListMeta `json:"metadata,omitempty"` + + // items contains a list of Volume. + // +required + Items []Volume `json:"items"` +} + +func (l *VolumeList) GetItems() []Volume { + return l.Items +} + +func init() { + SchemeBuilder.Register(&Volume{}, &VolumeList{}) +} + +func (i *Volume) GetCloudCredentialsRef() (*string, *CloudCredentialsReference) { + if i == nil { + return nil, nil + } + + return &i.Namespace, &i.Spec.CloudCredentialsRef +} + +var _ CloudCredentialsRefProvider = &Volume{} diff --git a/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/zz_generated.volumetype-resource.go b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/zz_generated.volumetype-resource.go new file mode 100644 index 00000000000..e2567a48898 --- /dev/null +++ b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/zz_generated.volumetype-resource.go @@ -0,0 +1,177 @@ +// Code generated by resource-generator. DO NOT EDIT. +/* +Copyright 2025 The ORC Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// VolumeTypeImport specifies an existing resource which will be imported instead of +// creating a new one +// +kubebuilder:validation:MinProperties:=1 +// +kubebuilder:validation:MaxProperties:=1 +type VolumeTypeImport struct { + // id contains the unique identifier of an existing OpenStack resource. Note + // that when specifying an import by ID, the resource MUST already exist. + // The ORC object will enter an error state if the resource does not exist. + // +optional + // +kubebuilder:validation:Format:=uuid + ID *string `json:"id,omitempty"` + + // filter contains a resource query which is expected to return a single + // result. The controller will continue to retry if filter returns no + // results. If filter returns multiple results the controller will set an + // error state and will not continue to retry. + // +optional + Filter *VolumeTypeFilter `json:"filter,omitempty"` +} + +// VolumeTypeSpec defines the desired state of an ORC object. +// +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'managed' ? has(self.resource) : true",message="resource must be specified when policy is managed" +// +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'managed' ? !has(self.__import__) : true",message="import may not be specified when policy is managed" +// +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'unmanaged' ? !has(self.resource) : true",message="resource may not be specified when policy is unmanaged" +// +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'unmanaged' ? has(self.__import__) : true",message="import must be specified when policy is unmanaged" +// +kubebuilder:validation:XValidation:rule="has(self.managedOptions) ? self.managementPolicy == 'managed' : true",message="managedOptions may only be provided when policy is managed" +type VolumeTypeSpec struct { + // import refers to an existing OpenStack resource which will be imported instead of + // creating a new one. + // +optional + Import *VolumeTypeImport `json:"import,omitempty"` + + // resource specifies the desired state of the resource. + // + // resource may not be specified if the management policy is `unmanaged`. + // + // resource must be specified if the management policy is `managed`. + // +optional + Resource *VolumeTypeResourceSpec `json:"resource,omitempty"` + + // managementPolicy defines how ORC will treat the object. Valid values are + // `managed`: ORC will create, update, and delete the resource; `unmanaged`: + // ORC will import an existing resource, and will not apply updates to it or + // delete it. + // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="managementPolicy is immutable" + // +kubebuilder:default:=managed + // +optional + ManagementPolicy ManagementPolicy `json:"managementPolicy,omitempty"` + + // managedOptions specifies options which may be applied to managed objects. + // +optional + ManagedOptions *ManagedOptions `json:"managedOptions,omitempty"` + + // cloudCredentialsRef points to a secret containing OpenStack credentials + // +required + CloudCredentialsRef CloudCredentialsReference `json:"cloudCredentialsRef"` +} + +// VolumeTypeStatus defines the observed state of an ORC resource. +type VolumeTypeStatus struct { + // conditions represents the observed status of the object. + // Known .status.conditions.type are: "Available", "Progressing" + // + // Available represents the availability of the OpenStack resource. If it is + // true then the resource is ready for use. + // + // Progressing indicates whether the controller is still attempting to + // reconcile the current state of the OpenStack resource to the desired + // state. Progressing will be False either because the desired state has + // been achieved, or because some terminal error prevents it from ever being + // achieved and the controller is no longer attempting to reconcile. If + // Progressing is True, an observer waiting on the resource should continue + // to wait. + // + // +kubebuilder:validation:MaxItems:=32 + // +patchMergeKey=type + // +patchStrategy=merge + // +listType=map + // +listMapKey=type + // +optional + Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"` + + // id is the unique identifier of the OpenStack resource. + // +optional + ID *string `json:"id,omitempty"` + + // resource contains the observed state of the OpenStack resource. + // +optional + Resource *VolumeTypeResourceStatus `json:"resource,omitempty"` +} + +var _ ObjectWithConditions = &VolumeType{} + +func (i *VolumeType) GetConditions() []metav1.Condition { + return i.Status.Conditions +} + +// +genclient +// +kubebuilder:object:root=true +// +kubebuilder:resource:categories=openstack +// +kubebuilder:subresource:status +// +kubebuilder:printcolumn:name="ID",type="string",JSONPath=".status.id",description="Resource ID" +// +kubebuilder:printcolumn:name="Available",type="string",JSONPath=".status.conditions[?(@.type=='Available')].status",description="Availability status of resource" +// +kubebuilder:printcolumn:name="Message",type="string",JSONPath=".status.conditions[?(@.type=='Progressing')].message",description="Message describing current progress status" + +// VolumeType is the Schema for an ORC resource. +type VolumeType struct { + metav1.TypeMeta `json:",inline"` + + // metadata contains the object metadata + // +optional + metav1.ObjectMeta `json:"metadata,omitempty"` + + // spec specifies the desired state of the resource. + // +optional + Spec VolumeTypeSpec `json:"spec,omitempty"` + + // status defines the observed state of the resource. + // +optional + Status VolumeTypeStatus `json:"status,omitempty"` +} + +// +kubebuilder:object:root=true + +// VolumeTypeList contains a list of VolumeType. +type VolumeTypeList struct { + metav1.TypeMeta `json:",inline"` + + // metadata contains the list metadata + // +optional + metav1.ListMeta `json:"metadata,omitempty"` + + // items contains a list of VolumeType. + // +required + Items []VolumeType `json:"items"` +} + +func (l *VolumeTypeList) GetItems() []VolumeType { + return l.Items +} + +func init() { + SchemeBuilder.Register(&VolumeType{}, &VolumeTypeList{}) +} + +func (i *VolumeType) GetCloudCredentialsRef() (*string, *CloudCredentialsReference) { + if i == nil { + return nil, nil + } + + return &i.Namespace, &i.Spec.CloudCredentialsRef +} + +var _ CloudCredentialsRefProvider = &VolumeType{} diff --git a/vendor/modules.txt b/vendor/modules.txt index 984535e5c1e..285b95e1e42 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -895,9 +895,9 @@ github.com/jonboulle/clockwork # github.com/json-iterator/go v1.1.12 ## explicit; go 1.12 github.com/json-iterator/go -# github.com/k-orc/openstack-resource-controller v1.0.0 => sigs.k8s.io/cluster-api-provider-openstack/orc v0.0.0-20250113192833-e4f56a2b4f32 -## explicit; go 1.22.0 -github.com/k-orc/openstack-resource-controller/api/v1alpha1 +# github.com/k-orc/openstack-resource-controller/v2 v2.4.0 +## explicit; go 1.24.0 +github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1 # github.com/krishicks/yaml-patch v0.0.10 ## explicit # github.com/kubernetes-csi/external-snapshotter/client/v6 v6.3.0 @@ -2572,7 +2572,7 @@ sigs.k8s.io/apiserver-network-proxy/konnectivity-client/pkg/client sigs.k8s.io/apiserver-network-proxy/konnectivity-client/pkg/client/metrics sigs.k8s.io/apiserver-network-proxy/konnectivity-client/pkg/common/metrics sigs.k8s.io/apiserver-network-proxy/konnectivity-client/proto/client -# sigs.k8s.io/cluster-api v1.11.7 +# sigs.k8s.io/cluster-api v1.12.7 ## explicit; go 1.24.0 sigs.k8s.io/cluster-api/api/addons/v1beta1 sigs.k8s.io/cluster-api/api/addons/v1beta2 @@ -2620,13 +2620,13 @@ sigs.k8s.io/cluster-api-provider-ibmcloud/api/v1beta2 # sigs.k8s.io/cluster-api-provider-kubevirt v0.11.1 ## explicit; go 1.24.0 sigs.k8s.io/cluster-api-provider-kubevirt/api/v1alpha1 -# sigs.k8s.io/cluster-api-provider-openstack v0.13.3 +# sigs.k8s.io/cluster-api-provider-openstack v0.14.4 ## explicit; go 1.24.0 sigs.k8s.io/cluster-api-provider-openstack/api/v1alpha1 sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1 sigs.k8s.io/cluster-api-provider-openstack/pkg/utils/errors sigs.k8s.io/cluster-api-provider-openstack/pkg/utils/optional -# sigs.k8s.io/controller-runtime v0.22.4 => sigs.k8s.io/controller-runtime v0.19.7 +# sigs.k8s.io/controller-runtime v0.22.5 => sigs.k8s.io/controller-runtime v0.19.7 ## explicit; go 1.22.0 sigs.k8s.io/controller-runtime sigs.k8s.io/controller-runtime/pkg/builder @@ -2799,7 +2799,6 @@ sigs.k8s.io/yaml sigs.k8s.io/yaml/goyaml.v2 sigs.k8s.io/yaml/kyaml # github.com/openshift/hypershift/api => ./api -# github.com/k-orc/openstack-resource-controller => sigs.k8s.io/cluster-api-provider-openstack/orc v0.0.0-20250113192833-e4f56a2b4f32 # github.com/golang-jwt/jwt/v4 => github.com/golang-jwt/jwt/v4 v4.5.2 # sigs.k8s.io/controller-runtime => sigs.k8s.io/controller-runtime v0.19.7 # github.com/aws/karpenter-provider-aws => github.com/openshift/aws-karpenter-provider-aws v0.0.0-20260311064431-f0be9c72e5bf diff --git a/vendor/sigs.k8s.io/cluster-api-provider-openstack/api/v1alpha1/openstackclusteridentity_types.go b/vendor/sigs.k8s.io/cluster-api-provider-openstack/api/v1alpha1/openstackclusteridentity_types.go new file mode 100644 index 00000000000..d8dbff3f543 --- /dev/null +++ b/vendor/sigs.k8s.io/cluster-api-provider-openstack/api/v1alpha1/openstackclusteridentity_types.go @@ -0,0 +1,68 @@ +/* +Copyright 2025 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// OpenStackCredentialSecretReference references a Secret containing OpenStack credentials. +type OpenStackCredentialSecretReference struct { + // Name of the Secret which contains a `clouds.yaml` key (and optionally `cacert`). + // +kubebuilder:validation:Required + Name string `json:"name"` + + // Namespace where the Secret resides. + // +kubebuilder:validation:Required + Namespace string `json:"namespace"` +} + +// OpenStackClusterIdentitySpec defines the desired state for an OpenStackClusterIdentity. +type OpenStackClusterIdentitySpec struct { + // SecretRef references the credentials Secret containing a `clouds.yaml` file. + // +kubebuilder:validation:Required + SecretRef OpenStackCredentialSecretReference `json:"secretRef"` + + // NamespaceSelector limits which namespaces may use this identity. If nil, all namespaces are allowed. + // +optional + NamespaceSelector *metav1.LabelSelector `json:"namespaceSelector,omitempty"` +} + +// +genclient +// +kubebuilder:object:root=true +// +kubebuilder:resource:path=openstackclusteridentities,scope=Cluster,categories=cluster-api,shortName=osci + +// OpenStackClusterIdentity is a cluster-scoped identity that centralizes OpenStack credentials. +type OpenStackClusterIdentity struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec OpenStackClusterIdentitySpec `json:"spec,omitempty"` +} + +// +kubebuilder:object:root=true + +// OpenStackClusterIdentityList contains a list of OpenStackClusterIdentity. +type OpenStackClusterIdentityList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []OpenStackClusterIdentity `json:"items"` +} + +func init() { + SchemeBuilder.Register(&OpenStackClusterIdentity{}, &OpenStackClusterIdentityList{}) +} diff --git a/vendor/sigs.k8s.io/cluster-api-provider-openstack/api/v1alpha1/zz_generated.deepcopy.go b/vendor/sigs.k8s.io/cluster-api-provider-openstack/api/v1alpha1/zz_generated.deepcopy.go index 6a2484af9ec..079f5330858 100644 --- a/vendor/sigs.k8s.io/cluster-api-provider-openstack/api/v1alpha1/zz_generated.deepcopy.go +++ b/vendor/sigs.k8s.io/cluster-api-provider-openstack/api/v1alpha1/zz_generated.deepcopy.go @@ -21,12 +21,107 @@ limitations under the License. package v1alpha1 import ( - "k8s.io/api/core/v1" + corev1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1" corev1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1" ) +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OpenStackClusterIdentity) DeepCopyInto(out *OpenStackClusterIdentity) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenStackClusterIdentity. +func (in *OpenStackClusterIdentity) DeepCopy() *OpenStackClusterIdentity { + if in == nil { + return nil + } + out := new(OpenStackClusterIdentity) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *OpenStackClusterIdentity) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OpenStackClusterIdentityList) DeepCopyInto(out *OpenStackClusterIdentityList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]OpenStackClusterIdentity, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenStackClusterIdentityList. +func (in *OpenStackClusterIdentityList) DeepCopy() *OpenStackClusterIdentityList { + if in == nil { + return nil + } + out := new(OpenStackClusterIdentityList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *OpenStackClusterIdentityList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OpenStackClusterIdentitySpec) DeepCopyInto(out *OpenStackClusterIdentitySpec) { + *out = *in + out.SecretRef = in.SecretRef + if in.NamespaceSelector != nil { + in, out := &in.NamespaceSelector, &out.NamespaceSelector + *out = new(v1.LabelSelector) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenStackClusterIdentitySpec. +func (in *OpenStackClusterIdentitySpec) DeepCopy() *OpenStackClusterIdentitySpec { + if in == nil { + return nil + } + out := new(OpenStackClusterIdentitySpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OpenStackCredentialSecretReference) DeepCopyInto(out *OpenStackCredentialSecretReference) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenStackCredentialSecretReference. +func (in *OpenStackCredentialSecretReference) DeepCopy() *OpenStackCredentialSecretReference { + if in == nil { + return nil + } + out := new(OpenStackCredentialSecretReference) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *OpenStackFloatingIPPool) DeepCopyInto(out *OpenStackFloatingIPPool) { *out = *in @@ -250,7 +345,7 @@ func (in *OpenStackServerSpec) DeepCopyInto(out *OpenStackServerSpec) { } if in.FloatingIPPoolRef != nil { in, out := &in.FloatingIPPoolRef, &out.FloatingIPPoolRef - *out = new(v1.TypedLocalObjectReference) + *out = new(corev1.TypedLocalObjectReference) (*in).DeepCopyInto(*out) } out.IdentityRef = in.IdentityRef @@ -296,7 +391,7 @@ func (in *OpenStackServerSpec) DeepCopyInto(out *OpenStackServerSpec) { } if in.UserDataRef != nil { in, out := &in.UserDataRef, &out.UserDataRef - *out = new(v1.LocalObjectReference) + *out = new(corev1.LocalObjectReference) **out = **in } if in.SchedulerHintAdditionalProperties != nil { @@ -333,7 +428,7 @@ func (in *OpenStackServerStatus) DeepCopyInto(out *OpenStackServerStatus) { } if in.Addresses != nil { in, out := &in.Addresses, &out.Addresses - *out = make([]v1.NodeAddress, len(*in)) + *out = make([]corev1.NodeAddress, len(*in)) copy(*out, *in) } if in.Resolved != nil { diff --git a/vendor/sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1/conditions_consts.go b/vendor/sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1/conditions_consts.go index d84500772f1..86dcc086f0f 100644 --- a/vendor/sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1/conditions_consts.go +++ b/vendor/sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1/conditions_consts.go @@ -69,3 +69,32 @@ const ( // UnableToFindFloatingIPNetworkReason is used when the floating ip network is not found. UnableToFindFloatingIPNetworkReason = "UnableToFindFloatingIPNetwork" ) + +const ( + // NetworkReadyCondition reports on the current status of the cluster network infrastructure. + // Ready indicates that the network, subnets, and related resources have been successfully provisioned. + NetworkReadyCondition clusterv1beta1.ConditionType = "NetworkReady" + + // RouterReadyCondition reports on the current status of the cluster router infrastructure. + // Ready indicates that the router and its interfaces have been successfully provisioned. + RouterReadyCondition clusterv1beta1.ConditionType = "RouterReady" + + // SecurityGroupsReadyCondition reports on the current status of the cluster security groups. + // Ready indicates that all required security groups have been successfully provisioned. + SecurityGroupsReadyCondition clusterv1beta1.ConditionType = "SecurityGroupsReady" + + // APIEndpointReadyCondition reports on the current status of the cluster API endpoint. + // Ready indicates that the control plane endpoint has been successfully configured. + APIEndpointReadyCondition clusterv1beta1.ConditionType = "APIEndpointReady" + + // NetworkReconcileFailedReason is used when network reconciliation fails. + NetworkReconcileFailedReason = "NetworkCreateFailed" + // SubnetReconcileFailedReason is used when subnet reconciliation fails. + SubnetReconcileFailedReason = "SubnetCreateFailed" + // RouterReconcileFailedReason is used when router reconciliation fails. + RouterReconcileFailedReason = "RouterCreateFailed" + // SecurityGroupReconcileFailedReason is used when security group reconciliation fails. + SecurityGroupReconcileFailedReason = "SecurityGroupCreateFailed" + // APIEndpointConfigFailedReason is used when API endpoint configuration fails. + APIEndpointConfigFailedReason = "APIEndpointConfigFailed" +) diff --git a/vendor/sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1/identity_types.go b/vendor/sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1/identity_types.go index 41a74bf6866..85add4f6267 100644 --- a/vendor/sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1/identity_types.go +++ b/vendor/sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1/identity_types.go @@ -20,14 +20,23 @@ package v1beta1 // provider identity to be used to provision cluster resources. // +kubebuilder:validation:XValidation:rule="(!has(self.region) && !has(oldSelf.region)) || self.region == oldSelf.region",message="region is immutable" type OpenStackIdentityReference struct { - // Name is the name of a secret in the same namespace as the resource being provisioned. - // The secret must contain a key named `clouds.yaml` which contains an OpenStack clouds.yaml file. - // The secret may optionally contain a key named `cacert` containing a PEM-encoded CA certificate. + // Type specifies the identity reference type. Defaults to Secret for backward compatibility. + // +kubebuilder:validation:Enum=Secret;ClusterIdentity + // +kubebuilder:default=Secret // +kubebuilder:validation:Required + Type string `json:"type,omitempty"` + + // Name is the name of a Secret (type=Secret) in the same namespace as the resource being provisioned, + // or the name of an OpenStackClusterIdentity (type=ClusterIdentity). + // The Secret must contain a key named `clouds.yaml` which contains an OpenStack clouds.yaml file. + // The Secret may optionally contain a key named `cacert` containing a PEM-encoded CA certificate. + // +kubebuilder:validation:Required + // +kubebuilder:validation:MinLength=1 Name string `json:"name"` // CloudName specifies the name of the entry in the clouds.yaml file to use. // +kubebuilder:validation:Required + // +kubebuilder:validation:MinLength=1 CloudName string `json:"cloudName"` // Region specifies an OpenStack region to use. If specified, it overrides diff --git a/vendor/sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1/openstackcluster_types.go b/vendor/sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1/openstackcluster_types.go index 02833b1ea22..3c35efcf358 100644 --- a/vendor/sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1/openstackcluster_types.go +++ b/vendor/sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1/openstackcluster_types.go @@ -196,12 +196,27 @@ type OpenStackClusterSpec struct { IdentityRef OpenStackIdentityReference `json:"identityRef"` } +// ClusterInitialization represents the initialization status of the cluster. +type ClusterInitialization struct { + // Provisioned is set to true when the initial provisioning of the cluster infrastructure is completed. + // The value of this field is never updated after provisioning is completed. + // +optional + Provisioned bool `json:"provisioned,omitempty"` +} + // OpenStackClusterStatus defines the observed state of OpenStackCluster. type OpenStackClusterStatus struct { // Ready is true when the cluster infrastructure is ready. + // + // Deprecated: This field is deprecated and will be removed in a future API version. + // Use status.conditions to determine the ready state of the cluster. // +kubebuilder:default=false Ready bool `json:"ready"` + // Initialization contains information about the initialization status of the cluster. + // +optional + Initialization *ClusterInitialization `json:"initialization,omitempty"` + // Network contains information about the created OpenStack Network. // +optional Network *NetworkStatusWithSubnets `json:"network,omitempty"` @@ -257,6 +272,9 @@ type OpenStackClusterStatus struct { // Any transient errors that occur during the reconciliation of // OpenStackClusters can be added as events to the OpenStackCluster object // and/or logged in the controller's output. + // + // Deprecated: This field is deprecated and will be removed in a future API version. + // Use status.conditions to report failures. // +optional FailureReason *capoerrors.DeprecatedCAPIClusterStatusError `json:"failureReason,omitempty"` @@ -276,8 +294,18 @@ type OpenStackClusterStatus struct { // Any transient errors that occur during the reconciliation of // OpenStackClusters can be added as events to the OpenStackCluster object // and/or logged in the controller's output. + // + // Deprecated: This field is deprecated and will be removed in a future API version. + // Use status.conditions to report failures. // +optional FailureMessage *string `json:"failureMessage,omitempty"` + + // Conditions defines current service state of the OpenStackCluster. + // This field surfaces into Cluster's status.conditions[InfrastructureReady] condition. + // The Ready condition must surface issues during the entire lifecycle of the OpenStackCluster + // (both during initial provisioning and after the initial provisioning is completed). + // +optional + Conditions clusterv1beta1.Conditions `json:"conditions,omitempty"` } // +genclient @@ -344,6 +372,16 @@ type ManagedSecurityGroups struct { var _ IdentityRefProvider = &OpenStackCluster{} +// GetConditions returns the observations of the operational state of the OpenStackCluster resource. +func (c *OpenStackCluster) GetConditions() clusterv1beta1.Conditions { + return c.Status.Conditions +} + +// SetConditions sets the underlying service state of the OpenStackCluster to the predescribed clusterv1.Conditions. +func (c *OpenStackCluster) SetConditions(conditions clusterv1beta1.Conditions) { + c.Status.Conditions = conditions +} + // GetIdentifyRef returns the cluster's namespace and IdentityRef. func (c *OpenStackCluster) GetIdentityRef() (*string, *OpenStackIdentityReference) { return &c.Namespace, &c.Spec.IdentityRef diff --git a/vendor/sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1/openstackmachine_types.go b/vendor/sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1/openstackmachine_types.go index 8b52e62a49b..615a47f7358 100644 --- a/vendor/sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1/openstackmachine_types.go +++ b/vendor/sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1/openstackmachine_types.go @@ -185,12 +185,27 @@ type ServerMetadata struct { Value string `json:"value"` } +// MachineInitialization contains information about the initialization status of the machine. +type MachineInitialization struct { + // Provisioned is set to true when the initial provisioning of the machine infrastructure is completed. + // The value of this field is never updated after provisioning is completed. + // +optional + Provisioned bool `json:"provisioned,omitempty"` +} + // OpenStackMachineStatus defines the observed state of OpenStackMachine. type OpenStackMachineStatus struct { // Ready is true when the provider resource is ready. + // + // Deprecated: This field is deprecated and will be removed in a future API version. + // Use status.conditions to determine the ready state of the machine. // +optional Ready bool `json:"ready"` + // Initialization contains information about the initialization status of the machine. + // +optional + Initialization *MachineInitialization `json:"initialization,omitempty"` + // InstanceID is the OpenStack instance ID for this machine. // +optional InstanceID optional.String `json:"instanceID,omitempty"` @@ -213,6 +228,11 @@ type OpenStackMachineStatus struct { // +optional Resources *MachineResources `json:"resources,omitempty"` + // FailureReason explains the reson behind a failure. + // + // Deprecated: This field is deprecated and will be removed in a future API version. + // Use status.conditions to report failures. + // +optional FailureReason *capoerrors.DeprecatedCAPIMachineStatusError `json:"failureReason,omitempty"` // FailureMessage will be set in the event that there is a terminal problem @@ -231,9 +251,17 @@ type OpenStackMachineStatus struct { // Any transient errors that occur during the reconciliation of Machines // can be added as events to the Machine object and/or logged in the // controller's output. + // + // Deprecated: This field is deprecated and will be removed in a future API version. + // Use status.conditions to report failures. // +optional FailureMessage *string `json:"failureMessage,omitempty"` + // Conditions defines current service state of the OpenStackMachine. + // This field surfaces into Machine's status.conditions[InfrastructureReady] condition. + // The Ready condition must surface issues during the entire lifecycle of the OpenStackMachine + // (both during initial provisioning and after the initial provisioning is completed). + // +optional Conditions clusterv1beta1.Conditions `json:"conditions,omitempty"` } diff --git a/vendor/sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1/openstackmachinetemplate_types.go b/vendor/sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1/openstackmachinetemplate_types.go index a02f0210254..334b9d40bc3 100644 --- a/vendor/sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1/openstackmachinetemplate_types.go +++ b/vendor/sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1/openstackmachinetemplate_types.go @@ -17,6 +17,7 @@ limitations under the License. package v1beta1 import ( + corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) @@ -25,17 +26,39 @@ type OpenStackMachineTemplateSpec struct { Template OpenStackMachineTemplateResource `json:"template"` } +// OpenStackMachineTemplateStatus defines the observed state of OpenStackMachineTemplate. +type OpenStackMachineTemplateStatus struct { + // Capacity defines the resource capacity for this machine. + // This value is used for autoscaling from zero operations as defined in: + // https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20210310-opt-in-autoscaling-from-zero.md + // +optional + Capacity corev1.ResourceList `json:"capacity,omitempty"` + // +optional + NodeInfo NodeInfo `json:"nodeInfo,omitempty,omitzero"` +} + +// NodeInfo contains information about the node's architecture and operating system. +// +kubebuilder:validation:MinProperties=1 +type NodeInfo struct { + // operatingSystem is a string representing the operating system of the node. + // This may be a string like 'linux' or 'windows'. + // +optional + OperatingSystem string `json:"operatingSystem,omitempty"` +} + // +genclient // +kubebuilder:object:root=true // +kubebuilder:storageversion // +kubebuilder:resource:path=openstackmachinetemplates,scope=Namespaced,categories=cluster-api,shortName=osmt +// +kubebuilder:subresource:status // OpenStackMachineTemplate is the Schema for the openstackmachinetemplates API. type OpenStackMachineTemplate struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - Spec OpenStackMachineTemplateSpec `json:"spec,omitempty"` + Spec OpenStackMachineTemplateSpec `json:"spec,omitempty"` + Status OpenStackMachineTemplateStatus `json:"status,omitempty"` } // +kubebuilder:object:root=true @@ -50,3 +73,11 @@ type OpenStackMachineTemplateList struct { func init() { objectTypes = append(objectTypes, &OpenStackMachineTemplate{}, &OpenStackMachineTemplateList{}) } + +// GetIdentifyRef returns the object's namespace and IdentityRef if it has an IdentityRef, or nulls if it does not. +func (r *OpenStackMachineTemplate) GetIdentityRef() (*string, *OpenStackIdentityReference) { + if r.Spec.Template.Spec.IdentityRef != nil { + return &r.Namespace, r.Spec.Template.Spec.IdentityRef + } + return nil, nil +} diff --git a/vendor/sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1/types.go b/vendor/sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1/types.go index 5cb066219e7..8232d64d7a5 100644 --- a/vendor/sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1/types.go +++ b/vendor/sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1/types.go @@ -792,6 +792,11 @@ var ( // InstanceStateDeleted is the string representing an instance in a deleted state. InstanceStateDeleted = InstanceState("DELETED") + // InstanceStateSoftDeleted is the string representing an instance in a soft-deleted state. + // This state occurs when OpenStack is configured with a reclaim_instance_interval > 0, + // allowing recovery of deleted instances within the reclaim period. + InstanceStateSoftDeleted = InstanceState("SOFT_DELETED") + // InstanceStateUndefined is the string representing an undefined instance state. InstanceStateUndefined = InstanceState("") ) diff --git a/vendor/sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1/zz_generated.deepcopy.go b/vendor/sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1/zz_generated.deepcopy.go index b93422b7a33..2b6915b82ec 100644 --- a/vendor/sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1/zz_generated.deepcopy.go +++ b/vendor/sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1/zz_generated.deepcopy.go @@ -23,7 +23,7 @@ package v1beta1 import ( "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/runtime" - "sigs.k8s.io/cluster-api-provider-openstack/pkg/utils/errors" + errors "sigs.k8s.io/cluster-api-provider-openstack/pkg/utils/errors" corev1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1" ) @@ -280,6 +280,21 @@ func (in *BlockDeviceVolume) DeepCopy() *BlockDeviceVolume { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterInitialization) DeepCopyInto(out *ClusterInitialization) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterInitialization. +func (in *ClusterInitialization) DeepCopy() *ClusterInitialization { + if in == nil { + return nil + } + out := new(ClusterInitialization) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ExternalRouterIPParam) DeepCopyInto(out *ExternalRouterIPParam) { *out = *in @@ -441,6 +456,21 @@ func (in *LoadBalancer) DeepCopy() *LoadBalancer { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MachineInitialization) DeepCopyInto(out *MachineInitialization) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineInitialization. +func (in *MachineInitialization) DeepCopy() *MachineInitialization { + if in == nil { + return nil + } + out := new(MachineInitialization) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *MachineResources) DeepCopyInto(out *MachineResources) { *out = *in @@ -581,6 +611,21 @@ func (in *NetworkStatusWithSubnets) DeepCopy() *NetworkStatusWithSubnets { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NodeInfo) DeepCopyInto(out *NodeInfo) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeInfo. +func (in *NodeInfo) DeepCopy() *NodeInfo { + if in == nil { + return nil + } + out := new(NodeInfo) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *OpenStackCluster) DeepCopyInto(out *OpenStackCluster) { *out = *in @@ -765,6 +810,11 @@ func (in *OpenStackClusterSpec) DeepCopy() *OpenStackClusterSpec { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *OpenStackClusterStatus) DeepCopyInto(out *OpenStackClusterStatus) { *out = *in + if in.Initialization != nil { + in, out := &in.Initialization, &out.Initialization + *out = new(ClusterInitialization) + **out = **in + } if in.Network != nil { in, out := &in.Network, &out.Network *out = new(NetworkStatusWithSubnets) @@ -822,6 +872,13 @@ func (in *OpenStackClusterStatus) DeepCopyInto(out *OpenStackClusterStatus) { *out = new(string) **out = **in } + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make(corev1beta1.Conditions, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenStackClusterStatus. @@ -1095,6 +1152,11 @@ func (in *OpenStackMachineSpec) DeepCopy() *OpenStackMachineSpec { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *OpenStackMachineStatus) DeepCopyInto(out *OpenStackMachineStatus) { *out = *in + if in.Initialization != nil { + in, out := &in.Initialization, &out.Initialization + *out = new(MachineInitialization) + **out = **in + } if in.InstanceID != nil { in, out := &in.InstanceID, &out.InstanceID *out = new(string) @@ -1155,6 +1217,7 @@ func (in *OpenStackMachineTemplate) DeepCopyInto(out *OpenStackMachineTemplate) out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenStackMachineTemplate. @@ -1239,6 +1302,29 @@ func (in *OpenStackMachineTemplateSpec) DeepCopy() *OpenStackMachineTemplateSpec return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OpenStackMachineTemplateStatus) DeepCopyInto(out *OpenStackMachineTemplateStatus) { + *out = *in + if in.Capacity != nil { + in, out := &in.Capacity, &out.Capacity + *out = make(v1.ResourceList, len(*in)) + for key, val := range *in { + (*out)[key] = val.DeepCopy() + } + } + out.NodeInfo = in.NodeInfo +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenStackMachineTemplateStatus. +func (in *OpenStackMachineTemplateStatus) DeepCopy() *OpenStackMachineTemplateStatus { + if in == nil { + return nil + } + out := new(OpenStackMachineTemplateStatus) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *PortOpts) DeepCopyInto(out *PortOpts) { *out = *in diff --git a/vendor/sigs.k8s.io/cluster-api-provider-openstack/pkg/utils/errors/errors.go b/vendor/sigs.k8s.io/cluster-api-provider-openstack/pkg/utils/errors/errors.go index 5c7b18d0cbf..aed3639d64f 100644 --- a/vendor/sigs.k8s.io/cluster-api-provider-openstack/pkg/utils/errors/errors.go +++ b/vendor/sigs.k8s.io/cluster-api-provider-openstack/pkg/utils/errors/errors.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package errors +package capoerrors import ( "errors" diff --git a/vendor/sigs.k8s.io/cluster-api-provider-openstack/pkg/utils/errors/terminal.go b/vendor/sigs.k8s.io/cluster-api-provider-openstack/pkg/utils/errors/terminal.go index 4e88356d93d..52f5b20bb9e 100644 --- a/vendor/sigs.k8s.io/cluster-api-provider-openstack/pkg/utils/errors/terminal.go +++ b/vendor/sigs.k8s.io/cluster-api-provider-openstack/pkg/utils/errors/terminal.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package errors +package capoerrors import ( goerrors "errors" diff --git a/vendor/sigs.k8s.io/cluster-api/api/core/v1beta1/cluster_types.go b/vendor/sigs.k8s.io/cluster-api/api/core/v1beta1/cluster_types.go index c6ff0853b18..5d6d69a9b36 100644 --- a/vendor/sigs.k8s.io/cluster-api/api/core/v1beta1/cluster_types.go +++ b/vendor/sigs.k8s.io/cluster-api/api/core/v1beta1/cluster_types.go @@ -1092,12 +1092,12 @@ func (c *ClusterStatus) GetTypedPhase() ClusterPhase { type APIEndpoint struct { // host is the hostname on which the API server is serving. // TODO: Can't set MinLength=1 for now, because this struct is not always used in pointer fields so today we have cases where host is set to an empty string. - // +required + // +optional // +kubebuilder:validation:MaxLength=512 Host string `json:"host"` // port is the port on which the API server is serving. - // +required + // +optional Port int32 `json:"port"` } diff --git a/vendor/sigs.k8s.io/cluster-api/api/core/v1beta1/conversion.go b/vendor/sigs.k8s.io/cluster-api/api/core/v1beta1/conversion.go index 03d7a7a9ad8..7d289566db8 100644 --- a/vendor/sigs.k8s.io/cluster-api/api/core/v1beta1/conversion.go +++ b/vendor/sigs.k8s.io/cluster-api/api/core/v1beta1/conversion.go @@ -73,6 +73,17 @@ func (src *Cluster) ConvertTo(dstRaw conversion.Hub) error { return err } + if ok { + dst.Spec.Topology.ControlPlane.HealthCheck.Checks.UnhealthyMachineConditions = restored.Spec.Topology.ControlPlane.HealthCheck.Checks.UnhealthyMachineConditions + for _, restoredMD := range restored.Spec.Topology.Workers.MachineDeployments { + for i, dstMD := range dst.Spec.Topology.Workers.MachineDeployments { + if restoredMD.Name == dstMD.Name { + dst.Spec.Topology.Workers.MachineDeployments[i].HealthCheck.Checks.UnhealthyMachineConditions = restoredMD.HealthCheck.Checks.UnhealthyMachineConditions + } + } + } + } + // Recover intent for bool values converted to *bool. clusterv1.Convert_bool_To_Pointer_bool(src.Spec.Paused, ok, restored.Spec.Paused, &dst.Spec.Paused) @@ -145,6 +156,17 @@ func (src *ClusterClass) ConvertTo(dstRaw conversion.Hub) error { return err } + if ok { + dst.Spec.ControlPlane.HealthCheck.Checks.UnhealthyMachineConditions = restored.Spec.ControlPlane.HealthCheck.Checks.UnhealthyMachineConditions + for _, restoredMD := range restored.Spec.Workers.MachineDeployments { + for i, dstMD := range dst.Spec.Workers.MachineDeployments { + if restoredMD.Class == dstMD.Class { + dst.Spec.Workers.MachineDeployments[i].HealthCheck.Checks.UnhealthyMachineConditions = restoredMD.HealthCheck.Checks.UnhealthyMachineConditions + } + } + } + } + // Recover intent for bool values converted to *bool. for i, patch := range dst.Spec.Patches { for j, definition := range patch.Definitions { @@ -248,6 +270,10 @@ func (src *ClusterClass) ConvertTo(dstRaw conversion.Hub) error { dst.Status.Variables[i] = variable } + dst.Spec.KubernetesVersions = restored.Spec.KubernetesVersions + + dst.Spec.Upgrade.External.GenerateUpgradePlanExtension = restored.Spec.Upgrade.External.GenerateUpgradePlanExtension + return nil } @@ -394,6 +420,11 @@ func (src *Machine) ConvertTo(dstRaw conversion.Hub) error { // Recover other values. if ok { dst.Spec.MinReadySeconds = restored.Spec.MinReadySeconds + dst.Spec.Taints = restored.Spec.Taints + // Restore the phase, this also means that any client using v1beta1 during a round-trip + // won't be able to write the Phase field. But that's okay as the only client writing the Phase + // field should be the Machine controller. + dst.Status.Phase = restored.Status.Phase } return nil @@ -432,6 +463,17 @@ func (src *MachineSet) ConvertTo(dstRaw conversion.Hub) error { dst.Spec.Template.Spec.MinReadySeconds = &src.Spec.MinReadySeconds } + restored := &clusterv1.MachineSet{} + ok, err := utilconversion.UnmarshalData(src, restored) + if err != nil { + return err + } + + // Recover other values + if ok { + dst.Spec.Template.Spec.Taints = restored.Spec.Template.Spec.Taints + } + return nil } @@ -449,7 +491,8 @@ func (dst *MachineSet) ConvertFrom(srcRaw conversion.Hub) error { dst.Spec.MinReadySeconds = ptr.Deref(src.Spec.Template.Spec.MinReadySeconds, 0) dropEmptyStringsMachineSpec(&dst.Spec.Template.Spec) - return nil + + return utilconversion.MarshalData(src, dst) } func (src *MachineDeployment) ConvertTo(dstRaw conversion.Hub) error { @@ -474,6 +517,11 @@ func (src *MachineDeployment) ConvertTo(dstRaw conversion.Hub) error { // Recover intent for bool values converted to *bool. clusterv1.Convert_bool_To_Pointer_bool(src.Spec.Paused, ok, restored.Spec.Paused, &dst.Spec.Paused) + // Recover other values + if ok { + dst.Spec.Template.Spec.Taints = restored.Spec.Template.Spec.Taints + } + return nil } @@ -509,6 +557,8 @@ func (src *MachineHealthCheck) ConvertTo(dstRaw conversion.Hub) error { return err } + dst.Spec.Checks.UnhealthyMachineConditions = restored.Spec.Checks.UnhealthyMachineConditions + clusterv1.Convert_int32_To_Pointer_int32(src.Status.ExpectedMachines, ok, restored.Status.ExpectedMachines, &dst.Status.ExpectedMachines) clusterv1.Convert_int32_To_Pointer_int32(src.Status.CurrentHealthy, ok, restored.Status.CurrentHealthy, &dst.Status.CurrentHealthy) clusterv1.Convert_int32_To_Pointer_int32(src.Status.RemediationsAllowed, ok, restored.Status.RemediationsAllowed, &dst.Status.RemediationsAllowed) @@ -558,6 +608,11 @@ func (src *MachinePool) ConvertTo(dstRaw conversion.Hub) error { dst.Status.Initialization = initialization } + // Recover other values + if ok { + dst.Spec.Template.Spec.Taints = restored.Spec.Template.Spec.Taints + } + return nil } @@ -1637,6 +1692,13 @@ func Convert_v1beta2_MachineStatus_To_v1beta1_MachineStatus(in *clusterv1.Machin if err := autoConvert_v1beta2_MachineStatus_To_v1beta1_MachineStatus(in, out, s); err != nil { return err } + + // Convert v1beta2 Updating phase to v1beta1 Running as Updating did not exist in v1beta1. + // We don't have to support a round-trip as only the core CAPI controller should write the Phase field. + if out.Phase == "Updating" { + out.Phase = "Running" + } + if !reflect.DeepEqual(in.LastUpdated, metav1.Time{}) { out.LastUpdated = ptr.To(in.LastUpdated) } @@ -2285,8 +2347,6 @@ func convertToObjectReference(ref clusterv1.ContractVersionedObjectReference, na } func Convert_v1beta1_JSONSchemaProps_To_v1beta2_JSONSchemaProps(in *JSONSchemaProps, out *clusterv1.JSONSchemaProps, s apimachineryconversion.Scope) error { - // This conversion func is also required due to a bug in conversion gen that does not recognize the changes for converting bool to *bool. - // By implementing this func, autoConvert_v1beta1_JSONSchemaProps_To_v1beta2_JSONSchemaProps is generated properly. if err := autoConvert_v1beta1_JSONSchemaProps_To_v1beta2_JSONSchemaProps(in, out, s); err != nil { return err } diff --git a/vendor/sigs.k8s.io/cluster-api/api/core/v1beta1/machine_types.go b/vendor/sigs.k8s.io/cluster-api/api/core/v1beta1/machine_types.go index 9665953dd4d..5a37f75427e 100644 --- a/vendor/sigs.k8s.io/cluster-api/api/core/v1beta1/machine_types.go +++ b/vendor/sigs.k8s.io/cluster-api/api/core/v1beta1/machine_types.go @@ -66,10 +66,10 @@ const ( // * KCP adds its own pre-terminate hook on all Machines it controls. This is done to ensure it can later remove // the etcd member right before Machine termination (i.e. before InfraMachine deletion). // * Starting with Kubernetes v1.31 the KCP pre-terminate hook will wait for all other pre-terminate hooks to finish to - // ensure it runs last (thus ensuring that kubelet is still working while other pre-terminate hooks run). This is only done - // for v1.31 or above because the kubeadm ControlPlaneKubeletLocalMode was introduced with kubeadm 1.31. This feature configures - // the kubelet to communicate with the local apiserver. Only because of that the kubelet immediately starts failing after the etcd - // member is removed. We need the ControlPlaneKubeletLocalMode feature with 1.31 to adhere to the kubelet skew policy. + // ensure it runs last (thus ensuring that kubelet is still working while other pre-terminate hooks run). This is done + // for v1.31 or above because the kubeadm ControlPlaneKubeletLocalMode was introduced with kubeadm 1.31 (graduated to GA in 1.36). + // This feature configures the kubelet to communicate with the local apiserver. Only because of that the kubelet immediately + // starts failing after the etcd member is removed. We need the ControlPlaneKubeletLocalMode feature with 1.31+ to adhere to the kubelet skew policy. PreTerminateDeleteHookAnnotationPrefix = "pre-terminate.delete.hook.machine.cluster.x-k8s.io" // MachineCertificatesExpiryDateAnnotation annotation specifies the expiry date of the machine certificates in RFC3339 format. diff --git a/vendor/sigs.k8s.io/cluster-api/api/core/v1beta1/zz_generated.conversion.go b/vendor/sigs.k8s.io/cluster-api/api/core/v1beta1/zz_generated.conversion.go index eb54f254dd5..c0514e67d22 100644 --- a/vendor/sigs.k8s.io/cluster-api/api/core/v1beta1/zz_generated.conversion.go +++ b/vendor/sigs.k8s.io/cluster-api/api/core/v1beta1/zz_generated.conversion.go @@ -1207,6 +1207,8 @@ func autoConvert_v1beta2_ClusterClassSpec_To_v1beta1_ClusterClassSpec(in *v1beta } else { out.Patches = nil } + // WARNING: in.Upgrade requires manual conversion: does not exist in peer-type + // WARNING: in.KubernetesVersions requires manual conversion: does not exist in peer-type return nil } @@ -3165,6 +3167,7 @@ func autoConvert_v1beta2_MachineSpec_To_v1beta1_MachineSpec(in *v1beta2.MachineS // WARNING: in.MinReadySeconds requires manual conversion: does not exist in peer-type out.ReadinessGates = *(*[]MachineReadinessGate)(unsafe.Pointer(&in.ReadinessGates)) // WARNING: in.Deletion requires manual conversion: does not exist in peer-type + // WARNING: in.Taints requires manual conversion: does not exist in peer-type return nil } diff --git a/vendor/sigs.k8s.io/cluster-api/api/core/v1beta1/zz_generated.openapi.go b/vendor/sigs.k8s.io/cluster-api/api/core/v1beta1/zz_generated.openapi.go index 13a78b23719..723cf5a90c9 100644 --- a/vendor/sigs.k8s.io/cluster-api/api/core/v1beta1/zz_generated.openapi.go +++ b/vendor/sigs.k8s.io/cluster-api/api/core/v1beta1/zz_generated.openapi.go @@ -154,7 +154,6 @@ func schema_cluster_api_api_core_v1beta1_APIEndpoint(ref common.ReferenceCallbac }, }, }, - Required: []string{"host", "port"}, }, }, } diff --git a/vendor/sigs.k8s.io/cluster-api/api/core/v1beta2/cluster_types.go b/vendor/sigs.k8s.io/cluster-api/api/core/v1beta2/cluster_types.go index af096985315..9666455e903 100644 --- a/vendor/sigs.k8s.io/cluster-api/api/core/v1beta2/cluster_types.go +++ b/vendor/sigs.k8s.io/cluster-api/api/core/v1beta2/cluster_types.go @@ -80,17 +80,27 @@ const ( // failing due to an error. ClusterTopologyReconciledFailedReason = "ReconcileFailed" + // ClusterTopologyReconciledClusterCreatingReason documents reconciliation of a Cluster topology + // not yet created because the BeforeClusterCreate hook is blocking. + ClusterTopologyReconciledClusterCreatingReason = "ClusterCreating" + // ClusterTopologyReconciledControlPlaneUpgradePendingReason documents reconciliation of a Cluster topology // not yet completed because Control Plane is not yet updated to match the desired topology spec. + // + // Deprecated: please use ClusterUpgrading instead. ClusterTopologyReconciledControlPlaneUpgradePendingReason = "ControlPlaneUpgradePending" // ClusterTopologyReconciledMachineDeploymentsCreatePendingReason documents reconciliation of a Cluster topology // not yet completed because at least one of the MachineDeployments is yet to be created. // This generally happens because new MachineDeployment creations are held off while the ControlPlane is not stable. + // + // Deprecated: please use ClusterUpgrading instead. ClusterTopologyReconciledMachineDeploymentsCreatePendingReason = "MachineDeploymentsCreatePending" // ClusterTopologyReconciledMachineDeploymentsUpgradePendingReason documents reconciliation of a Cluster topology // not yet completed because at least one of the MachineDeployments is not yet updated to match the desired topology spec. + // + // Deprecated: please use ClusterUpgrading instead. ClusterTopologyReconciledMachineDeploymentsUpgradePendingReason = "MachineDeploymentsUpgradePending" // ClusterTopologyReconciledMachineDeploymentsUpgradeDeferredReason documents reconciliation of a Cluster topology @@ -99,11 +109,15 @@ const ( // ClusterTopologyReconciledMachinePoolsUpgradePendingReason documents reconciliation of a Cluster topology // not yet completed because at least one of the MachinePools is not yet updated to match the desired topology spec. + // + // Deprecated: please use ClusterUpgrading instead. ClusterTopologyReconciledMachinePoolsUpgradePendingReason = "MachinePoolsUpgradePending" // ClusterTopologyReconciledMachinePoolsCreatePendingReason documents reconciliation of a Cluster topology // not yet completed because at least one of the MachinePools is yet to be created. // This generally happens because new MachinePool creations are held off while the ControlPlane is not stable. + // + // Deprecated: please use ClusterUpgrading instead. ClusterTopologyReconciledMachinePoolsCreatePendingReason = "MachinePoolsCreatePending" // ClusterTopologyReconciledMachinePoolsUpgradeDeferredReason documents reconciliation of a Cluster topology @@ -112,8 +126,13 @@ const ( // ClusterTopologyReconciledHookBlockingReason documents reconciliation of a Cluster topology // not yet completed because at least one of the lifecycle hooks is blocking. + // + // Deprecated: please use ClusterUpgrading instead. ClusterTopologyReconciledHookBlockingReason = "LifecycleHookBlocking" + // ClusterTopologyReconciledClusterUpgradingReason documents reconciliation of a Cluster topology + // not yet completed because a cluster upgrade is still in progress. + ClusterTopologyReconciledClusterUpgradingReason = "ClusterUpgrading" // ClusterTopologyReconciledClusterClassNotReconciledReason documents reconciliation of a Cluster topology not // yet completed because the ClusterClass has not reconciled yet. If this condition persists there may be an issue // with the ClusterClass surfaced in the ClusterClass status or controller logs. @@ -725,6 +744,16 @@ type ControlPlaneTopologyHealthCheckChecks struct { // +kubebuilder:validation:MinItems=1 // +kubebuilder:validation:MaxItems=100 UnhealthyNodeConditions []UnhealthyNodeCondition `json:"unhealthyNodeConditions,omitempty"` + + // unhealthyMachineConditions contains a list of the machine conditions that determine + // whether a machine is considered unhealthy. The conditions are combined in a + // logical OR, i.e. if any of the conditions is met, the machine is unhealthy. + // + // +optional + // +listType=atomic + // +kubebuilder:validation:MinItems=1 + // +kubebuilder:validation:MaxItems=100 + UnhealthyMachineConditions []UnhealthyMachineCondition `json:"unhealthyMachineConditions,omitempty"` } // ControlPlaneTopologyHealthCheckRemediation configures if and how remediations are triggered if a control plane Machine is unhealthy. @@ -975,6 +1004,16 @@ type MachineDeploymentTopologyHealthCheckChecks struct { // +kubebuilder:validation:MinItems=1 // +kubebuilder:validation:MaxItems=100 UnhealthyNodeConditions []UnhealthyNodeCondition `json:"unhealthyNodeConditions,omitempty"` + + // unhealthyMachineConditions contains a list of the machine conditions that determine + // whether a machine is considered unhealthy. The conditions are combined in a + // logical OR, i.e. if any of the conditions is met, the machine is unhealthy. + // + // +optional + // +listType=atomic + // +kubebuilder:validation:MinItems=1 + // +kubebuilder:validation:MaxItems=100 + UnhealthyMachineConditions []UnhealthyMachineCondition `json:"unhealthyMachineConditions,omitempty"` } // MachineDeploymentTopologyHealthCheckRemediation configures if and how remediations are triggered if a MachineDeployment Machine is unhealthy. diff --git a/vendor/sigs.k8s.io/cluster-api/api/core/v1beta2/clusterclass_types.go b/vendor/sigs.k8s.io/cluster-api/api/core/v1beta2/clusterclass_types.go index 80d78f35855..12e8cc19c5d 100644 --- a/vendor/sigs.k8s.io/cluster-api/api/core/v1beta2/clusterclass_types.go +++ b/vendor/sigs.k8s.io/cluster-api/api/core/v1beta2/clusterclass_types.go @@ -135,6 +135,22 @@ type ClusterClassSpec struct { // +kubebuilder:validation:MinItems=1 // +kubebuilder:validation:MaxItems=1000 Patches []ClusterClassPatch `json:"patches,omitempty"` + + // upgrade defines the upgrade configuration for clusters using this ClusterClass. + // +optional + Upgrade ClusterClassUpgrade `json:"upgrade,omitempty,omitzero"` + + // kubernetesVersions is the list of Kubernetes versions that can be + // used for clusters using this ClusterClass. + // The list of version must be ordered from the older to the newer version, and there should be + // at least one version for every minor in between the first and the last version. + // +optional + // +listType=atomic + // +kubebuilder:validation:MinItems=1 + // +kubebuilder:validation:MaxItems=100 + // +kubebuilder:validation:items:MinLength=1 + // +kubebuilder:validation:items:MaxLength=256 + KubernetesVersions []string `json:"kubernetesVersions,omitempty"` } // InfrastructureClass defines the class for the infrastructure cluster. @@ -265,6 +281,16 @@ type ControlPlaneClassHealthCheckChecks struct { // +kubebuilder:validation:MinItems=1 // +kubebuilder:validation:MaxItems=100 UnhealthyNodeConditions []UnhealthyNodeCondition `json:"unhealthyNodeConditions,omitempty"` + + // unhealthyMachineConditions contains a list of the machine conditions that determine + // whether a machine is considered unhealthy. The conditions are combined in a + // logical OR, i.e. if any of the conditions is met, the machine is unhealthy. + // + // +optional + // +listType=atomic + // +kubebuilder:validation:MinItems=1 + // +kubebuilder:validation:MaxItems=100 + UnhealthyMachineConditions []UnhealthyMachineCondition `json:"unhealthyMachineConditions,omitempty"` } // ControlPlaneClassHealthCheckRemediation configures if and how remediations are triggered if a control plane Machine is unhealthy. @@ -526,6 +552,16 @@ type MachineDeploymentClassHealthCheckChecks struct { // +kubebuilder:validation:MinItems=1 // +kubebuilder:validation:MaxItems=100 UnhealthyNodeConditions []UnhealthyNodeCondition `json:"unhealthyNodeConditions,omitempty"` + + // unhealthyMachineConditions contains a list of the machine conditions that determine + // whether a machine is considered unhealthy. The conditions are combined in a + // logical OR, i.e. if any of the conditions is met, the machine is unhealthy. + // + // +optional + // +listType=atomic + // +kubebuilder:validation:MinItems=1 + // +kubebuilder:validation:MaxItems=100 + UnhealthyMachineConditions []UnhealthyMachineCondition `json:"unhealthyMachineConditions,omitempty"` } // MachineDeploymentClassHealthCheckRemediation configures if and how remediations are triggered if a MachineDeployment Machine is unhealthy. @@ -1240,6 +1276,24 @@ type ClusterClassPatch struct { External *ExternalPatchDefinition `json:"external,omitempty"` } +// ClusterClassUpgrade defines the upgrade configuration for clusters using the ClusterClass. +// +kubebuilder:validation:MinProperties=1 +type ClusterClassUpgrade struct { + // external defines external runtime extensions for upgrade operations. + // +optional + External ClusterClassUpgradeExternal `json:"external,omitempty,omitzero"` +} + +// ClusterClassUpgradeExternal defines external runtime extensions for upgrade operations. +// +kubebuilder:validation:MinProperties=1 +type ClusterClassUpgradeExternal struct { + // generateUpgradePlanExtension references an extension which is called to generate upgrade plan. + // +optional + // +kubebuilder:validation:MinLength=1 + // +kubebuilder:validation:MaxLength=512 + GenerateUpgradePlanExtension string `json:"generateUpgradePlanExtension,omitempty"` +} + // PatchDefinition defines a patch which is applied to customize the referenced templates. type PatchDefinition struct { // selector defines on which templates the patch should be applied. diff --git a/vendor/sigs.k8s.io/cluster-api/api/core/v1beta2/common_types.go b/vendor/sigs.k8s.io/cluster-api/api/core/v1beta2/common_types.go index c0d39fd02c4..13b591c1823 100644 --- a/vendor/sigs.k8s.io/cluster-api/api/core/v1beta2/common_types.go +++ b/vendor/sigs.k8s.io/cluster-api/api/core/v1beta2/common_types.go @@ -36,6 +36,10 @@ const ( // to track the name of the MachineDeployment topology it represents. ClusterTopologyMachineDeploymentNameLabel = "topology.cluster.x-k8s.io/deployment-name" + // ClusterTopologyUpgradeStepAnnotation tracks the version of the current upgrade step. + // It is only set when an upgrade is in progress, and it contains the control plane version computed by topology controller. + ClusterTopologyUpgradeStepAnnotation = "topology.internal.cluster.x-k8s.io/upgrade-step" + // ClusterTopologyHoldUpgradeSequenceAnnotation can be used to hold the entire MachineDeployment upgrade sequence. // If the annotation is set on a MachineDeployment topology in Cluster.spec.topology.workers, the Kubernetes upgrade // for this MachineDeployment topology and all subsequent ones is deferred. @@ -95,6 +99,9 @@ const ( // AnnotationsFromMachineAnnotation is the annotation set on nodes to track the annotations that originated from machines. AnnotationsFromMachineAnnotation = "cluster.x-k8s.io/annotations-from-machine" + // TaintsFromMachineAnnotation is the annotation set on nodes to track the taints that originated from machines. + TaintsFromMachineAnnotation = "cluster.x-k8s.io/taints-from-machine" + // OwnerNameAnnotation is the annotation set on nodes identifying the owner name. OwnerNameAnnotation = "cluster.x-k8s.io/owner-name" @@ -401,3 +408,58 @@ func (r *ContractVersionedObjectReference) GroupKind() schema.GroupKind { Kind: r.Kind, } } + +// MachineTaint defines a taint equivalent to corev1.Taint, but additionally having a propagation field. +type MachineTaint struct { + // key is the taint key to be applied to a node. + // Must be a valid qualified name of maximum size 63 characters + // with an optional subdomain prefix of maximum size 253 characters, + // separated by a `/`. + // +required + // +kubebuilder:validation:MinLength=1 + // +kubebuilder:validation:MaxLength=317 + // +kubebuilder:validation: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]$ + // +kubebuilder:validation:XValidation:rule="self.contains('/') ? ( self.split('/') [0].size() <= 253 && self.split('/') [1].size() <= 63 && self.split('/').size() == 2 ) : self.size() <= 63",message="key must be a valid qualified name of max size 63 characters with an optional subdomain prefix of max size 253 characters" + Key string `json:"key,omitempty"` + + // value is the taint value corresponding to the taint key. + // It must be a valid label value of maximum size 63 characters. + // +optional + // +kubebuilder:validation:MinLength=1 + // +kubebuilder:validation:MaxLength=63 + // +kubebuilder:validation:Pattern=^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$ + Value string `json:"value,omitempty"` + + // effect is the effect for the taint. Valid values are NoSchedule, PreferNoSchedule and NoExecute. + // +required + // +kubebuilder:validation:Enum=NoSchedule;PreferNoSchedule;NoExecute + Effect corev1.TaintEffect `json:"effect,omitempty"` + + // propagation defines how this taint should be propagated to nodes. + // Valid values are 'Always' and 'OnInitialization'. + // Always: The taint will be continuously reconciled. If it is not set for a node, it will be added during reconciliation. + // OnInitialization: The taint will be added during node initialization. If it gets removed from the node later on it will not get added again. + // +required + Propagation MachineTaintPropagation `json:"propagation,omitempty"` +} + +// MachineTaintPropagation defines when a taint should be propagated to nodes. +// +kubebuilder:validation:Enum=Always;OnInitialization +type MachineTaintPropagation string + +const ( + // MachineTaintPropagationAlways means the taint should be continuously reconciled and kept on the node. + // - If an Always taint is added to the Machine, the taint will be added to the node. + // - If an Always taint is removed from the Machine, the taint will be removed from the node. + // - If an OnInitialization taint is changed to Always, the Machine controller will ensure the taint is set on the node. + // - If an Always taint is removed from the node, it will be re-added during reconciliation. + MachineTaintPropagationAlways MachineTaintPropagation = "Always" + + // MachineTaintPropagationOnInitialization means the taint should be set once during initialization and then + // left alone. + // - If an OnInitialization taint is added to the Machine, the taint will only be added to the node on initialization. + // - If an OnInitialization taint is removed from the Machine nothing will be changed on the node. + // - If an Always taint is changed to OnInitialization, the taint will only be added to the node on initialization. + // - If an OnInitialization taint is removed from the node, it will not be re-added during reconciliation. + MachineTaintPropagationOnInitialization MachineTaintPropagation = "OnInitialization" +) diff --git a/vendor/sigs.k8s.io/cluster-api/api/core/v1beta2/machine_phase_types.go b/vendor/sigs.k8s.io/cluster-api/api/core/v1beta2/machine_phase_types.go index 1ca95515644..b849ea61d65 100644 --- a/vendor/sigs.k8s.io/cluster-api/api/core/v1beta2/machine_phase_types.go +++ b/vendor/sigs.k8s.io/cluster-api/api/core/v1beta2/machine_phase_types.go @@ -45,6 +45,10 @@ const ( // become a Kubernetes Node in a Ready state. MachinePhaseRunning = MachinePhase("Running") + // MachinePhaseUpdating is the Machine state when the Machine + // is updating. + MachinePhaseUpdating = MachinePhase("Updating") + // MachinePhaseDeleting is the Machine state when a delete // request has been sent to the API Server, // but its infrastructure has not yet been fully deleted. diff --git a/vendor/sigs.k8s.io/cluster-api/api/core/v1beta2/machine_types.go b/vendor/sigs.k8s.io/cluster-api/api/core/v1beta2/machine_types.go index a60f736ba21..16f4bf07a70 100644 --- a/vendor/sigs.k8s.io/cluster-api/api/core/v1beta2/machine_types.go +++ b/vendor/sigs.k8s.io/cluster-api/api/core/v1beta2/machine_types.go @@ -66,10 +66,10 @@ const ( // * KCP adds its own pre-terminate hook on all Machines it controls. This is done to ensure it can later remove // the etcd member right before Machine termination (i.e. before InfraMachine deletion). // * Starting with Kubernetes v1.31 the KCP pre-terminate hook will wait for all other pre-terminate hooks to finish to - // ensure it runs last (thus ensuring that kubelet is still working while other pre-terminate hooks run). This is only done - // for v1.31 or above because the kubeadm ControlPlaneKubeletLocalMode was introduced with kubeadm 1.31. This feature configures - // the kubelet to communicate with the local apiserver. Only because of that the kubelet immediately starts failing after the etcd - // member is removed. We need the ControlPlaneKubeletLocalMode feature with 1.31 to adhere to the kubelet skew policy. + // ensure it runs last (thus ensuring that kubelet is still working while other pre-terminate hooks run). This is done + // for v1.31 or above because the kubeadm ControlPlaneKubeletLocalMode was introduced with kubeadm 1.31 (graduated to GA in 1.36). + // This feature configures the kubelet to communicate with the local apiserver. Only because of that the kubelet immediately + // starts failing after the etcd member is removed. We need the ControlPlaneKubeletLocalMode feature with 1.31+ to adhere to the kubelet skew policy. PreTerminateDeleteHookAnnotationPrefix = "pre-terminate.delete.hook.machine.cluster.x-k8s.io" // MachineCertificatesExpiryDateAnnotation annotation specifies the expiry date of the machine certificates in RFC3339 format. @@ -87,6 +87,17 @@ const ( // ManagedNodeAnnotationDomain is one of the CAPI managed Node annotation domains. ManagedNodeAnnotationDomain = "node.cluster.x-k8s.io" + + // PendingAcknowledgeMoveAnnotation is an internal annotation added by the MS controller to a machine when being + // moved from the oldMS to the newMS. The annotation is removed as soon as the MS controller get the acknowledgment about the + // replica being accounted from the corresponding MD. + // Note: The annotation is added when reconciling the oldMS, and it is removed when reconciling the newMS. + // Note: This annotation is used in pair with AcknowledgedMoveAnnotation on MachineSets. + PendingAcknowledgeMoveAnnotation = "in-place-updates.internal.cluster.x-k8s.io/pending-acknowledge-move" + + // UpdateInProgressAnnotation is an internal annotation added to machines by the controller owning the Machine when in-place update + // is started, e.g. by the MachineSet controller; the annotation will be removed by the Machine controller when in-place update is completed. + UpdateInProgressAnnotation = "in-place-updates.internal.cluster.x-k8s.io/update-in-progress" ) // Machine's Available condition and corresponding reasons. @@ -109,7 +120,7 @@ const ( // Machine's Ready condition and corresponding reasons. const ( // MachineReadyCondition is true if the Machine's deletionTimestamp is not set, Machine's BootstrapConfigReady, InfrastructureReady, - // NodeHealthy and HealthCheckSucceeded (if present) conditions are true; if other conditions are defined in spec.readinessGates, + // NodeHealthy and HealthCheckSucceeded (if present) conditions are true, Updating condition is false; if other conditions are defined in spec.readinessGates, // these conditions must be true as well. // Note: // - When summarizing the Deleting condition: @@ -151,6 +162,28 @@ const ( // MachineNotUpToDateReason surface when a Machine spec does not match the spec of the Machine's owner resource, e.g. KubeadmControlPlane or MachineDeployment. MachineNotUpToDateReason = "NotUpToDate" + + // MachineUpToDateUpdatingReason surface when a Machine spec matches the spec of the Machine's owner resource, + // but the Machine is still updating in-place. + MachineUpToDateUpdatingReason = "Updating" +) + +// Machine's Updating condition and corresponding reasons. +// Note: Updating condition is set by the Machine controller during in-place updates. +const ( + // MachineUpdatingCondition is true while an in-place update is in progress on the Machine. + // The condition is owned by the Machine controller and is used to track the progress of in-place updates. + // This condition is considered when computing the UpToDate condition. + MachineUpdatingCondition = "Updating" + + // MachineNotUpdatingReason surfaces when the Machine is not performing an in-place update. + MachineNotUpdatingReason = "NotUpdating" + + // MachineInPlaceUpdatingReason surfaces when the Machine is waiting for in-place update to complete. + MachineInPlaceUpdatingReason = "InPlaceUpdating" + + // MachineInPlaceUpdateFailedReason surfaces when the in-place update has failed. + MachineInPlaceUpdateFailedReason = "InPlaceUpdateFailed" ) // Machine's BootstrapConfigReady condition and corresponding reasons. @@ -276,6 +309,10 @@ const ( // defined by a MachineHealthCheck object. MachineHealthCheckUnhealthyNodeReason = "UnhealthyNode" + // MachineHealthCheckUnhealthyMachineReason surfaces when the machine does not pass the health checks + // defined by a MachineHealthCheck object. + MachineHealthCheckUnhealthyMachineReason = "UnhealthyMachine" + // MachineHealthCheckNodeStartupTimeoutReason surfaces when the node hosted on the machine does not appear within // the timeout defined by a MachineHealthCheck object. MachineHealthCheckNodeStartupTimeoutReason = "NodeStartupTimeout" @@ -451,6 +488,23 @@ type MachineSpec struct { // deletion contains configuration options for Machine deletion. // +optional Deletion MachineDeletionSpec `json:"deletion,omitempty,omitzero"` + + // taints are the node taints that Cluster API will manage. + // This list is not necessarily complete: other Kubernetes components may add or remove other taints from nodes, + // e.g. the node controller might add the node.kubernetes.io/not-ready taint. + // Only those taints defined in this list will be added or removed by core Cluster API controllers. + // + // There can be at most 64 taints. + // A pod would have to tolerate all existing taints to run on the corresponding node. + // + // NOTE: This list is implemented as a "map" type, meaning that individual elements can be managed by different owners. + // +optional + // +listType=map + // +listMapKey=key + // +listMapKey=effect + // +kubebuilder:validation:MinItems=1 + // +kubebuilder:validation:MaxItems=64 + Taints []MachineTaint `json:"taints,omitempty"` } // MachineDeletionSpec contains configuration options for Machine deletion. @@ -502,7 +556,7 @@ type MachineReadinessGate struct { type MachineStatus struct { // conditions represents the observations of a Machine's current state. // Known condition types are Available, Ready, UpToDate, BootstrapConfigReady, InfrastructureReady, NodeReady, - // NodeHealthy, Deleting, Paused. + // NodeHealthy, Updating, Deleting, Paused. // If a MachineHealthCheck is targeting this machine, also HealthCheckSucceeded, OwnerRemediated conditions are added. // Additionally control plane Machines controlled by KubeadmControlPlane will have following additional conditions: // APIServerPodHealthy, ControllerManagerPodHealthy, SchedulerPodHealthy, EtcdPodHealthy, EtcdMemberHealthy. @@ -537,7 +591,7 @@ type MachineStatus struct { // phase represents the current phase of machine actuation. // +optional - // +kubebuilder:validation:Enum=Pending;Provisioning;Provisioned;Running;Deleting;Deleted;Failed;Unknown + // +kubebuilder:validation:Enum=Pending;Provisioning;Provisioned;Running;Updating;Deleting;Deleted;Failed;Unknown Phase string `json:"phase,omitempty"` // certificatesExpiryDate is the expiry date of the machine certificates. @@ -695,6 +749,7 @@ func (m *MachineStatus) GetTypedPhase() MachinePhase { MachinePhaseProvisioning, MachinePhaseProvisioned, MachinePhaseRunning, + MachinePhaseUpdating, MachinePhaseDeleting, MachinePhaseDeleted, MachinePhaseFailed: diff --git a/vendor/sigs.k8s.io/cluster-api/api/core/v1beta2/machinehealthcheck_types.go b/vendor/sigs.k8s.io/cluster-api/api/core/v1beta2/machinehealthcheck_types.go index 9a7e31cae44..9a1f66bc8b0 100644 --- a/vendor/sigs.k8s.io/cluster-api/api/core/v1beta2/machinehealthcheck_types.go +++ b/vendor/sigs.k8s.io/cluster-api/api/core/v1beta2/machinehealthcheck_types.go @@ -111,6 +111,16 @@ type MachineHealthCheckChecks struct { // +kubebuilder:validation:MinItems=1 // +kubebuilder:validation:MaxItems=100 UnhealthyNodeConditions []UnhealthyNodeCondition `json:"unhealthyNodeConditions,omitempty"` + + // unhealthyMachineConditions contains a list of the machine conditions that determine + // whether a machine is considered unhealthy. The conditions are combined in a + // logical OR, i.e. if any of the conditions is met, the machine is unhealthy. + // + // +optional + // +listType=atomic + // +kubebuilder:validation:MinItems=1 + // +kubebuilder:validation:MaxItems=100 + UnhealthyMachineConditions []UnhealthyMachineCondition `json:"unhealthyMachineConditions,omitempty"` } // MachineHealthCheckRemediation configures if and how remediations are triggered if a Machine is unhealthy. @@ -227,7 +237,33 @@ type UnhealthyNodeCondition struct { // timeoutSeconds is the duration that a node must be in a given status for, // after which the node is considered unhealthy. - // For example, with a value of "1h", the node must match the status + // For example, with a value of "3600", the node must match the status + // for at least 1 hour before being considered unhealthy. + // +required + // +kubebuilder:validation:Minimum=0 + TimeoutSeconds *int32 `json:"timeoutSeconds,omitempty"` +} + +// UnhealthyMachineCondition represents a Machine condition type and value with a timeout +// specified as a duration. When the named condition has been in the given +// status for at least the timeout value, a machine is considered unhealthy. +type UnhealthyMachineCondition struct { + // type of Machine condition + // +kubebuilder:validation: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])$` + // +kubebuilder:validation:MinLength=1 + // +kubebuilder:validation:MaxLength=316 + // +kubebuilder:validation:XValidation:rule="!(self in ['Ready','Available','HealthCheckSucceeded','OwnerRemediated','ExternallyRemediated'])",message="type must not be one of: Ready, Available, HealthCheckSucceeded, OwnerRemediated, ExternallyRemediated" + // +required + Type string `json:"type,omitempty"` + + // status of the condition, one of True, False, Unknown. + // +required + // +kubebuilder:validation:Enum=True;False;Unknown + Status metav1.ConditionStatus `json:"status,omitempty"` + + // timeoutSeconds is the duration that a machine must be in a given status for, + // after which the machine is considered unhealthy. + // For example, with a value of "3600", the machine must match the status // for at least 1 hour before being considered unhealthy. // +required // +kubebuilder:validation:Minimum=0 diff --git a/vendor/sigs.k8s.io/cluster-api/api/core/v1beta2/machineset_types.go b/vendor/sigs.k8s.io/cluster-api/api/core/v1beta2/machineset_types.go index 8a5a92db7d1..80cb19d3625 100644 --- a/vendor/sigs.k8s.io/cluster-api/api/core/v1beta2/machineset_types.go +++ b/vendor/sigs.k8s.io/cluster-api/api/core/v1beta2/machineset_types.go @@ -33,6 +33,29 @@ const ( // MachineSetFinalizer is the finalizer used by the MachineSet controller to // ensure ordered cleanup of corresponding Machines when a Machineset is being deleted. MachineSetFinalizer = "cluster.x-k8s.io/machineset" + + // MachineSetMoveMachinesToMachineSetAnnotation is an internal annotation added by the MD controller to the oldMS + // when it should scale down by moving machines that can be updated in-place to the newMS instead of deleting them. + // The annotation value is the newMS name. + // Note: This annotation is used in pair with MachineSetReceiveMachinesFromMachineSetsAnnotation to perform a two-ways check before moving a machine from oldMS to newMS: + // + // "oldMS must have: move to newMS" and "newMS must have: receive replicas from oldMS" + MachineSetMoveMachinesToMachineSetAnnotation = "in-place-updates.internal.cluster.x-k8s.io/move-machines-to-machineset" + + // MachineSetReceiveMachinesFromMachineSetsAnnotation is an internal annotation added by the MD controller to the newMS + // when it should receive replicas from oldMSs as a first step of an in-place update operation + // The annotation value is a comma separated list of oldMSs. + // Note: This annotation is used in pair with MachineSetMoveMachinesToMachineSetAnnotation to perform a two-ways check before moving a machine from oldMS to newMS: + // + // "oldMS must have: move to newMS" and "newMS must have: receive replicas from oldMS" + MachineSetReceiveMachinesFromMachineSetsAnnotation = "in-place-updates.internal.cluster.x-k8s.io/receive-machines-from-machinesets" + + // AcknowledgedMoveAnnotation is an internal annotation with a list of machines added by the MD controller + // to a MachineSet when it acknowledges a machine pending acknowledge after being moved from an oldMS. + // The annotation value is a comma separated list of Machines already acknowledged; a machine is dropped + // from this annotation as soon as pending-acknowledge-move is removed from the machine; the annotation is dropped when empty. + // Note: This annotation is used in pair with PendingAcknowledgeMoveAnnotation on Machines. + AcknowledgedMoveAnnotation = "in-place-updates.internal.cluster.x-k8s.io/acknowledged-move" ) // MachineSetSpec defines the desired state of MachineSet. diff --git a/vendor/sigs.k8s.io/cluster-api/api/core/v1beta2/v1beta1_condition_consts.go b/vendor/sigs.k8s.io/cluster-api/api/core/v1beta2/v1beta1_condition_consts.go index aef565c0aa2..b619c6e0d7f 100644 --- a/vendor/sigs.k8s.io/cluster-api/api/core/v1beta2/v1beta1_condition_consts.go +++ b/vendor/sigs.k8s.io/cluster-api/api/core/v1beta2/v1beta1_condition_consts.go @@ -157,6 +157,11 @@ const ( // UnhealthyNodeConditionV1Beta1Reason is the reason used when a machine's node has one of the MachineHealthCheck's unhealthy conditions. UnhealthyNodeConditionV1Beta1Reason = "UnhealthyNode" + + // UnhealthyMachineConditionV1Beta1Reason is the reason used when a machine has one of the MachineHealthCheck's unhealthy conditions. + // When both machine and node issues are detected, this reason takes precedence over node-related reasons + // (NodeNotFoundV1Beta1Reason, NodeStartupTimeoutV1Beta1Reason, UnhealthyNodeConditionV1Beta1Reason). + UnhealthyMachineConditionV1Beta1Reason = "UnhealthyMachine" ) const ( @@ -295,17 +300,27 @@ const ( // failing due to an error. TopologyReconcileFailedV1Beta1Reason = "TopologyReconcileFailed" + // TopologyReconciledClusterCreatingV1Beta1Reason documents reconciliation of a Cluster topology + // not yet created because the BeforeClusterCreate hook is blocking. + TopologyReconciledClusterCreatingV1Beta1Reason = "ClusterCreating" + // TopologyReconciledControlPlaneUpgradePendingV1Beta1Reason (Severity=Info) documents reconciliation of a Cluster topology // not yet completed because Control Plane is not yet updated to match the desired topology spec. + // + // Deprecated: please use ClusterUpgrading instead. TopologyReconciledControlPlaneUpgradePendingV1Beta1Reason = "ControlPlaneUpgradePending" // TopologyReconciledMachineDeploymentsCreatePendingV1Beta1Reason (Severity=Info) documents reconciliation of a Cluster topology // not yet completed because at least one of the MachineDeployments is yet to be created. // This generally happens because new MachineDeployment creations are held off while the ControlPlane is not stable. + // + // Deprecated: please use ClusterUpgrading instead. TopologyReconciledMachineDeploymentsCreatePendingV1Beta1Reason = "MachineDeploymentsCreatePending" // TopologyReconciledMachineDeploymentsUpgradePendingV1Beta1Reason (Severity=Info) documents reconciliation of a Cluster topology // not yet completed because at least one of the MachineDeployments is not yet updated to match the desired topology spec. + // + // Deprecated: please use ClusterUpgrading instead. TopologyReconciledMachineDeploymentsUpgradePendingV1Beta1Reason = "MachineDeploymentsUpgradePending" // TopologyReconciledMachineDeploymentsUpgradeDeferredV1Beta1Reason (Severity=Info) documents reconciliation of a Cluster topology @@ -314,11 +329,15 @@ const ( // TopologyReconciledMachinePoolsUpgradePendingV1Beta1Reason (Severity=Info) documents reconciliation of a Cluster topology // not yet completed because at least one of the MachinePools is not yet updated to match the desired topology spec. + // + // Deprecated: please use ClusterUpgrading instead. TopologyReconciledMachinePoolsUpgradePendingV1Beta1Reason = "MachinePoolsUpgradePending" // TopologyReconciledMachinePoolsCreatePendingV1Beta1Reason (Severity=Info) documents reconciliation of a Cluster topology // not yet completed because at least one of the MachinePools is yet to be created. // This generally happens because new MachinePool creations are held off while the ControlPlane is not stable. + // + // Deprecated: please use ClusterUpgrading instead. TopologyReconciledMachinePoolsCreatePendingV1Beta1Reason = "MachinePoolsCreatePending" // TopologyReconciledMachinePoolsUpgradeDeferredV1Beta1Reason (Severity=Info) documents reconciliation of a Cluster topology @@ -327,8 +346,14 @@ const ( // TopologyReconciledHookBlockingV1Beta1Reason (Severity=Info) documents reconciliation of a Cluster topology // not yet completed because at least one of the lifecycle hooks is blocking. + // + // Deprecated: please use ClusterUpgrading instead. TopologyReconciledHookBlockingV1Beta1Reason = "LifecycleHookBlocking" + // TopologyReconciledClusterUpgradingV1Beta1Reason documents reconciliation of a Cluster topology + // not yet completed because a cluster upgrade is still in progress. + TopologyReconciledClusterUpgradingV1Beta1Reason = "ClusterUpgrading" + // TopologyReconciledClusterClassNotReconciledV1Beta1Reason (Severity=Info) documents reconciliation of a Cluster topology not // yet completed because the ClusterClass has not reconciled yet. If this condition persists there may be an issue // with the ClusterClass surfaced in the ClusterClass status or controller logs. diff --git a/vendor/sigs.k8s.io/cluster-api/api/core/v1beta2/zz_generated.deepcopy.go b/vendor/sigs.k8s.io/cluster-api/api/core/v1beta2/zz_generated.deepcopy.go index 49d1f665525..5adb8a56c45 100644 --- a/vendor/sigs.k8s.io/cluster-api/api/core/v1beta2/zz_generated.deepcopy.go +++ b/vendor/sigs.k8s.io/cluster-api/api/core/v1beta2/zz_generated.deepcopy.go @@ -253,6 +253,12 @@ func (in *ClusterClassSpec) DeepCopyInto(out *ClusterClassSpec) { (*in)[i].DeepCopyInto(&(*out)[i]) } } + out.Upgrade = in.Upgrade + if in.KubernetesVersions != nil { + in, out := &in.KubernetesVersions, &out.KubernetesVersions + *out = make([]string, len(*in)) + copy(*out, *in) + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterClassSpec. @@ -363,6 +369,37 @@ func (in *ClusterClassTemplateReference) DeepCopy() *ClusterClassTemplateReferen return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterClassUpgrade) DeepCopyInto(out *ClusterClassUpgrade) { + *out = *in + out.External = in.External +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterClassUpgrade. +func (in *ClusterClassUpgrade) DeepCopy() *ClusterClassUpgrade { + if in == nil { + return nil + } + out := new(ClusterClassUpgrade) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterClassUpgradeExternal) DeepCopyInto(out *ClusterClassUpgradeExternal) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterClassUpgradeExternal. +func (in *ClusterClassUpgradeExternal) DeepCopy() *ClusterClassUpgradeExternal { + if in == nil { + return nil + } + out := new(ClusterClassUpgradeExternal) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ClusterClassV1Beta1DeprecatedStatus) DeepCopyInto(out *ClusterClassV1Beta1DeprecatedStatus) { *out = *in @@ -803,6 +840,13 @@ func (in *ControlPlaneClassHealthCheckChecks) DeepCopyInto(out *ControlPlaneClas (*in)[i].DeepCopyInto(&(*out)[i]) } } + if in.UnhealthyMachineConditions != nil { + in, out := &in.UnhealthyMachineConditions, &out.UnhealthyMachineConditions + *out = make([]UnhealthyMachineCondition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControlPlaneClassHealthCheckChecks. @@ -979,6 +1023,13 @@ func (in *ControlPlaneTopologyHealthCheckChecks) DeepCopyInto(out *ControlPlaneT (*in)[i].DeepCopyInto(&(*out)[i]) } } + if in.UnhealthyMachineConditions != nil { + in, out := &in.UnhealthyMachineConditions, &out.UnhealthyMachineConditions + *out = make([]UnhealthyMachineCondition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControlPlaneTopologyHealthCheckChecks. @@ -1567,6 +1618,13 @@ func (in *MachineDeploymentClassHealthCheckChecks) DeepCopyInto(out *MachineDepl (*in)[i].DeepCopyInto(&(*out)[i]) } } + if in.UnhealthyMachineConditions != nil { + in, out := &in.UnhealthyMachineConditions, &out.UnhealthyMachineConditions + *out = make([]UnhealthyMachineCondition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineDeploymentClassHealthCheckChecks. @@ -2034,6 +2092,13 @@ func (in *MachineDeploymentTopologyHealthCheckChecks) DeepCopyInto(out *MachineD (*in)[i].DeepCopyInto(&(*out)[i]) } } + if in.UnhealthyMachineConditions != nil { + in, out := &in.UnhealthyMachineConditions, &out.UnhealthyMachineConditions + *out = make([]UnhealthyMachineCondition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineDeploymentTopologyHealthCheckChecks. @@ -2439,6 +2504,13 @@ func (in *MachineHealthCheckChecks) DeepCopyInto(out *MachineHealthCheckChecks) (*in)[i].DeepCopyInto(&(*out)[i]) } } + if in.UnhealthyMachineConditions != nil { + in, out := &in.UnhealthyMachineConditions, &out.UnhealthyMachineConditions + *out = make([]UnhealthyMachineCondition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineHealthCheckChecks. @@ -3369,6 +3441,11 @@ func (in *MachineSpec) DeepCopyInto(out *MachineSpec) { copy(*out, *in) } in.Deletion.DeepCopyInto(&out.Deletion) + if in.Taints != nil { + in, out := &in.Taints, &out.Taints + *out = make([]MachineTaint, len(*in)) + copy(*out, *in) + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineSpec. @@ -3427,6 +3504,21 @@ func (in *MachineStatus) DeepCopy() *MachineStatus { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MachineTaint) DeepCopyInto(out *MachineTaint) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineTaint. +func (in *MachineTaint) DeepCopy() *MachineTaint { + if in == nil { + return nil + } + out := new(MachineTaint) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *MachineTemplateSpec) DeepCopyInto(out *MachineTemplateSpec) { *out = *in @@ -3664,6 +3756,26 @@ func (in *Topology) DeepCopy() *Topology { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *UnhealthyMachineCondition) DeepCopyInto(out *UnhealthyMachineCondition) { + *out = *in + if in.TimeoutSeconds != nil { + in, out := &in.TimeoutSeconds, &out.TimeoutSeconds + *out = new(int32) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UnhealthyMachineCondition. +func (in *UnhealthyMachineCondition) DeepCopy() *UnhealthyMachineCondition { + if in == nil { + return nil + } + out := new(UnhealthyMachineCondition) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *UnhealthyNodeCondition) DeepCopyInto(out *UnhealthyNodeCondition) { *out = *in diff --git a/vendor/sigs.k8s.io/cluster-api/api/core/v1beta2/zz_generated.openapi.go b/vendor/sigs.k8s.io/cluster-api/api/core/v1beta2/zz_generated.openapi.go index 6ada26c78cd..6eecc0d326c 100644 --- a/vendor/sigs.k8s.io/cluster-api/api/core/v1beta2/zz_generated.openapi.go +++ b/vendor/sigs.k8s.io/cluster-api/api/core/v1beta2/zz_generated.openapi.go @@ -42,6 +42,8 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterClassStatusVariable": schema_cluster_api_api_core_v1beta2_ClusterClassStatusVariable(ref), "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterClassStatusVariableDefinition": schema_cluster_api_api_core_v1beta2_ClusterClassStatusVariableDefinition(ref), "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterClassTemplateReference": schema_cluster_api_api_core_v1beta2_ClusterClassTemplateReference(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterClassUpgrade": schema_cluster_api_api_core_v1beta2_ClusterClassUpgrade(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterClassUpgradeExternal": schema_cluster_api_api_core_v1beta2_ClusterClassUpgradeExternal(ref), "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterClassV1Beta1DeprecatedStatus": schema_cluster_api_api_core_v1beta2_ClusterClassV1Beta1DeprecatedStatus(ref), "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterClassVariable": schema_cluster_api_api_core_v1beta2_ClusterClassVariable(ref), "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterClassVariableMetadata": schema_cluster_api_api_core_v1beta2_ClusterClassVariableMetadata(ref), @@ -161,6 +163,7 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineSetV1Beta1DeprecatedStatus": schema_cluster_api_api_core_v1beta2_MachineSetV1Beta1DeprecatedStatus(ref), "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineSpec": schema_cluster_api_api_core_v1beta2_MachineSpec(ref), "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineStatus": schema_cluster_api_api_core_v1beta2_MachineStatus(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineTaint": schema_cluster_api_api_core_v1beta2_MachineTaint(ref), "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineTemplateSpec": schema_cluster_api_api_core_v1beta2_MachineTemplateSpec(ref), "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineV1Beta1DeprecatedStatus": schema_cluster_api_api_core_v1beta2_MachineV1Beta1DeprecatedStatus(ref), "sigs.k8s.io/cluster-api/api/core/v1beta2.NetworkRanges": schema_cluster_api_api_core_v1beta2_NetworkRanges(ref), @@ -171,6 +174,7 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "sigs.k8s.io/cluster-api/api/core/v1beta2.PatchSelectorMatchMachineDeploymentClass": schema_cluster_api_api_core_v1beta2_PatchSelectorMatchMachineDeploymentClass(ref), "sigs.k8s.io/cluster-api/api/core/v1beta2.PatchSelectorMatchMachinePoolClass": schema_cluster_api_api_core_v1beta2_PatchSelectorMatchMachinePoolClass(ref), "sigs.k8s.io/cluster-api/api/core/v1beta2.Topology": schema_cluster_api_api_core_v1beta2_Topology(ref), + "sigs.k8s.io/cluster-api/api/core/v1beta2.UnhealthyMachineCondition": schema_cluster_api_api_core_v1beta2_UnhealthyMachineCondition(ref), "sigs.k8s.io/cluster-api/api/core/v1beta2.UnhealthyNodeCondition": schema_cluster_api_api_core_v1beta2_UnhealthyNodeCondition(ref), "sigs.k8s.io/cluster-api/api/core/v1beta2.ValidationRule": schema_cluster_api_api_core_v1beta2_ValidationRule(ref), "sigs.k8s.io/cluster-api/api/core/v1beta2.VariableSchema": schema_cluster_api_api_core_v1beta2_VariableSchema(ref), @@ -617,12 +621,39 @@ func schema_cluster_api_api_core_v1beta2_ClusterClassSpec(ref common.ReferenceCa }, }, }, + "upgrade": { + SchemaProps: spec.SchemaProps{ + Description: "upgrade defines the upgrade configuration for clusters using this ClusterClass.", + Default: map[string]interface{}{}, + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterClassUpgrade"), + }, + }, + "kubernetesVersions": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "kubernetesVersions is the list of Kubernetes versions that can be used for clusters using this ClusterClass. The list of version must be ordered from the older to the newer version, and there should be at least one version for every minor in between the first and the last version.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, }, Required: []string{"infrastructure", "controlPlane"}, }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterAvailabilityGate", "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterClassPatch", "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterClassVariable", "sigs.k8s.io/cluster-api/api/core/v1beta2.ControlPlaneClass", "sigs.k8s.io/cluster-api/api/core/v1beta2.InfrastructureClass", "sigs.k8s.io/cluster-api/api/core/v1beta2.WorkersClass"}, + "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterAvailabilityGate", "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterClassPatch", "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterClassUpgrade", "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterClassVariable", "sigs.k8s.io/cluster-api/api/core/v1beta2.ControlPlaneClass", "sigs.k8s.io/cluster-api/api/core/v1beta2.InfrastructureClass", "sigs.k8s.io/cluster-api/api/core/v1beta2.WorkersClass"}, } } @@ -823,6 +854,48 @@ func schema_cluster_api_api_core_v1beta2_ClusterClassTemplateReference(ref commo } } +func schema_cluster_api_api_core_v1beta2_ClusterClassUpgrade(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ClusterClassUpgrade defines the upgrade configuration for clusters using the ClusterClass.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "external": { + SchemaProps: spec.SchemaProps{ + Description: "external defines external runtime extensions for upgrade operations.", + Default: map[string]interface{}{}, + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterClassUpgradeExternal"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterClassUpgradeExternal"}, + } +} + +func schema_cluster_api_api_core_v1beta2_ClusterClassUpgradeExternal(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ClusterClassUpgradeExternal defines external runtime extensions for upgrade operations.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "generateUpgradePlanExtension": { + SchemaProps: spec.SchemaProps{ + Description: "generateUpgradePlanExtension references an extension which is called to generate upgrade plan.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + func schema_cluster_api_api_core_v1beta2_ClusterClassV1Beta1DeprecatedStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -1616,11 +1689,30 @@ func schema_cluster_api_api_core_v1beta2_ControlPlaneClassHealthCheckChecks(ref }, }, }, + "unhealthyMachineConditions": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "unhealthyMachineConditions contains a list of the machine conditions that determine whether a machine is considered unhealthy. The conditions are combined in a logical OR, i.e. if any of the conditions is met, the machine is unhealthy.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.UnhealthyMachineCondition"), + }, + }, + }, + }, + }, }, }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api/api/core/v1beta2.UnhealthyNodeCondition"}, + "sigs.k8s.io/cluster-api/api/core/v1beta2.UnhealthyMachineCondition", "sigs.k8s.io/cluster-api/api/core/v1beta2.UnhealthyNodeCondition"}, } } @@ -1899,11 +1991,30 @@ func schema_cluster_api_api_core_v1beta2_ControlPlaneTopologyHealthCheckChecks(r }, }, }, + "unhealthyMachineConditions": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "unhealthyMachineConditions contains a list of the machine conditions that determine whether a machine is considered unhealthy. The conditions are combined in a logical OR, i.e. if any of the conditions is met, the machine is unhealthy.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.UnhealthyMachineCondition"), + }, + }, + }, + }, + }, }, }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api/api/core/v1beta2.UnhealthyNodeCondition"}, + "sigs.k8s.io/cluster-api/api/core/v1beta2.UnhealthyMachineCondition", "sigs.k8s.io/cluster-api/api/core/v1beta2.UnhealthyNodeCondition"}, } } @@ -2920,11 +3031,30 @@ func schema_cluster_api_api_core_v1beta2_MachineDeploymentClassHealthCheckChecks }, }, }, + "unhealthyMachineConditions": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "unhealthyMachineConditions contains a list of the machine conditions that determine whether a machine is considered unhealthy. The conditions are combined in a logical OR, i.e. if any of the conditions is met, the machine is unhealthy.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.UnhealthyMachineCondition"), + }, + }, + }, + }, + }, }, }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api/api/core/v1beta2.UnhealthyNodeCondition"}, + "sigs.k8s.io/cluster-api/api/core/v1beta2.UnhealthyMachineCondition", "sigs.k8s.io/cluster-api/api/core/v1beta2.UnhealthyNodeCondition"}, } } @@ -3700,11 +3830,30 @@ func schema_cluster_api_api_core_v1beta2_MachineDeploymentTopologyHealthCheckChe }, }, }, + "unhealthyMachineConditions": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "unhealthyMachineConditions contains a list of the machine conditions that determine whether a machine is considered unhealthy. The conditions are combined in a logical OR, i.e. if any of the conditions is met, the machine is unhealthy.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.UnhealthyMachineCondition"), + }, + }, + }, + }, + }, }, }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api/api/core/v1beta2.UnhealthyNodeCondition"}, + "sigs.k8s.io/cluster-api/api/core/v1beta2.UnhealthyMachineCondition", "sigs.k8s.io/cluster-api/api/core/v1beta2.UnhealthyNodeCondition"}, } } @@ -4332,11 +4481,30 @@ func schema_cluster_api_api_core_v1beta2_MachineHealthCheckChecks(ref common.Ref }, }, }, + "unhealthyMachineConditions": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "unhealthyMachineConditions contains a list of the machine conditions that determine whether a machine is considered unhealthy. The conditions are combined in a logical OR, i.e. if any of the conditions is met, the machine is unhealthy.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.UnhealthyMachineCondition"), + }, + }, + }, + }, + }, }, }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api/api/core/v1beta2.UnhealthyNodeCondition"}, + "sigs.k8s.io/cluster-api/api/core/v1beta2.UnhealthyMachineCondition", "sigs.k8s.io/cluster-api/api/core/v1beta2.UnhealthyNodeCondition"}, } } @@ -5996,12 +6164,35 @@ func schema_cluster_api_api_core_v1beta2_MachineSpec(ref common.ReferenceCallbac Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeletionSpec"), }, }, + "taints": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "key", + "effect", + }, + "x-kubernetes-list-type": "map", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "taints are the node taints that Cluster API will manage. This list is not necessarily complete: other Kubernetes components may add or remove other taints from nodes, e.g. the node controller might add the node.kubernetes.io/not-ready taint. Only those taints defined in this list will be added or removed by core Cluster API controllers.\n\nThere can be at most 64 taints. A pod would have to tolerate all existing taints to run on the corresponding node.\n\nNOTE: This list is implemented as a \"map\" type, meaning that individual elements can be managed by different owners.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.MachineTaint"), + }, + }, + }, + }, + }, }, Required: []string{"clusterName", "bootstrap", "infrastructureRef"}, }, }, Dependencies: []string{ - "sigs.k8s.io/cluster-api/api/core/v1beta2.Bootstrap", "sigs.k8s.io/cluster-api/api/core/v1beta2.ContractVersionedObjectReference", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeletionSpec", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineReadinessGate"}, + "sigs.k8s.io/cluster-api/api/core/v1beta2.Bootstrap", "sigs.k8s.io/cluster-api/api/core/v1beta2.ContractVersionedObjectReference", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeletionSpec", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineReadinessGate", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineTaint"}, } } @@ -6022,7 +6213,7 @@ func schema_cluster_api_api_core_v1beta2_MachineStatus(ref common.ReferenceCallb }, }, SchemaProps: spec.SchemaProps{ - Description: "conditions represents the observations of a Machine's current state. Known condition types are Available, Ready, UpToDate, BootstrapConfigReady, InfrastructureReady, NodeReady, NodeHealthy, Deleting, Paused. If a MachineHealthCheck is targeting this machine, also HealthCheckSucceeded, OwnerRemediated conditions are added. Additionally control plane Machines controlled by KubeadmControlPlane will have following additional conditions: APIServerPodHealthy, ControllerManagerPodHealthy, SchedulerPodHealthy, EtcdPodHealthy, EtcdMemberHealthy.", + Description: "conditions represents the observations of a Machine's current state. Known condition types are Available, Ready, UpToDate, BootstrapConfigReady, InfrastructureReady, NodeReady, NodeHealthy, Updating, Deleting, Paused. If a MachineHealthCheck is targeting this machine, also HealthCheckSucceeded, OwnerRemediated conditions are added. Additionally control plane Machines controlled by KubeadmControlPlane will have following additional conditions: APIServerPodHealthy, ControllerManagerPodHealthy, SchedulerPodHealthy, EtcdPodHealthy, EtcdMemberHealthy.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ @@ -6114,6 +6305,48 @@ func schema_cluster_api_api_core_v1beta2_MachineStatus(ref common.ReferenceCallb } } +func schema_cluster_api_api_core_v1beta2_MachineTaint(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "MachineTaint defines a taint equivalent to corev1.Taint, but additionally having a propagation field.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "key": { + SchemaProps: spec.SchemaProps{ + Description: "key is the taint key to be applied to a node. Must be a valid qualified name of maximum size 63 characters with an optional subdomain prefix of maximum size 253 characters, separated by a `/`.", + Type: []string{"string"}, + Format: "", + }, + }, + "value": { + SchemaProps: spec.SchemaProps{ + Description: "value is the taint value corresponding to the taint key. It must be a valid label value of maximum size 63 characters.", + Type: []string{"string"}, + Format: "", + }, + }, + "effect": { + SchemaProps: spec.SchemaProps{ + Description: "effect is the effect for the taint. Valid values are NoSchedule, PreferNoSchedule and NoExecute.", + Type: []string{"string"}, + Format: "", + }, + }, + "propagation": { + SchemaProps: spec.SchemaProps{ + Description: "propagation defines how this taint should be propagated to nodes. Valid values are 'Always' and 'OnInitialization'. Always: The taint will be continuously reconciled. If it is not set for a node, it will be added during reconciliation. OnInitialization: The taint will be added during node initialization. If it gets removed from the node later on it will not get added again.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"key", "effect", "propagation"}, + }, + }, + } +} + func schema_cluster_api_api_core_v1beta2_MachineTemplateSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -6518,6 +6751,41 @@ func schema_cluster_api_api_core_v1beta2_Topology(ref common.ReferenceCallback) } } +func schema_cluster_api_api_core_v1beta2_UnhealthyMachineCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "UnhealthyMachineCondition represents a Machine condition type and value with a timeout specified as a duration. When the named condition has been in the given status for at least the timeout value, a machine is considered unhealthy.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Description: "type of Machine condition", + Type: []string{"string"}, + Format: "", + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "status of the condition, one of True, False, Unknown.", + Type: []string{"string"}, + Format: "", + }, + }, + "timeoutSeconds": { + SchemaProps: spec.SchemaProps{ + Description: "timeoutSeconds is the duration that a machine must be in a given status for, after which the machine is considered unhealthy. For example, with a value of \"3600\", the machine must match the status for at least 1 hour before being considered unhealthy.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + Required: []string{"type", "status", "timeoutSeconds"}, + }, + }, + } +} + func schema_cluster_api_api_core_v1beta2_UnhealthyNodeCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -6541,7 +6809,7 @@ func schema_cluster_api_api_core_v1beta2_UnhealthyNodeCondition(ref common.Refer }, "timeoutSeconds": { SchemaProps: spec.SchemaProps{ - Description: "timeoutSeconds is the duration that a node must be in a given status for, after which the node is considered unhealthy. For example, with a value of \"1h\", the node must match the status for at least 1 hour before being considered unhealthy.", + Description: "timeoutSeconds is the duration that a node must be in a given status for, after which the node is considered unhealthy. For example, with a value of \"3600\", the node must match the status for at least 1 hour before being considered unhealthy.", Type: []string{"integer"}, Format: "int32", }, diff --git a/vendor/sigs.k8s.io/cluster-api/feature/feature.go b/vendor/sigs.k8s.io/cluster-api/feature/feature.go index 15a6fb169b4..da8dd8e8da1 100644 --- a/vendor/sigs.k8s.io/cluster-api/feature/feature.go +++ b/vendor/sigs.k8s.io/cluster-api/feature/feature.go @@ -35,15 +35,6 @@ const ( // beta: v1.7 MachinePool featuregate.Feature = "MachinePool" - // ClusterResourceSet is a feature gate for the ClusterResourceSet functionality. - // - // alpha: v0.3 - // beta: v0.4 - // GA: v1.10 - // - // Deprecated: ClusterResourceSet feature is now GA and the corresponding feature flag will be removed in 1.12 release. - ClusterResourceSet featuregate.Feature = "ClusterResourceSet" - // ClusterTopology is a feature gate for the ClusterClass and managed topologies functionality. // // alpha: v0.4 @@ -77,6 +68,22 @@ const ( // // alpha: v1.10 PriorityQueue featuregate.Feature = "PriorityQueue" + + // ReconcilerRateLimiting is a feature gate that controls if reconcilers are rate-limited. + // Note: Currently the feature gate is rate-limiting to 1 request / 1 second. + // Note: If this feature gate is enabled the PriorityQueue feature gate must be enabled as well. + // + // alpha: v1.12 + ReconcilerRateLimiting featuregate.Feature = "ReconcilerRateLimiting" + + // InPlaceUpdates is a feature gate for the in-place machine updates functionality. + // alpha: v1.12 + InPlaceUpdates featuregate.Feature = "InPlaceUpdates" + + // MachineTaintPropagation is a feature gate for the machine taint propagation functionality. + // + // alpha: v1.12 + MachineTaintPropagation featuregate.Feature = "MachineTaintPropagation" ) func init() { @@ -87,12 +94,14 @@ func init() { // To add a new feature, define a key for it above and add it here. var defaultClusterAPIFeatureGates = map[featuregate.Feature]featuregate.FeatureSpec{ // Every feature should be initiated here: - ClusterResourceSet: {Default: true, PreRelease: featuregate.GA}, MachinePool: {Default: true, PreRelease: featuregate.Beta}, MachineSetPreflightChecks: {Default: true, PreRelease: featuregate.Beta}, MachineWaitForVolumeDetachConsiderVolumeAttachments: {Default: true, PreRelease: featuregate.Beta}, PriorityQueue: {Default: false, PreRelease: featuregate.Alpha}, + ReconcilerRateLimiting: {Default: false, PreRelease: featuregate.Alpha}, ClusterTopology: {Default: false, PreRelease: featuregate.Alpha}, KubeadmBootstrapFormatIgnition: {Default: false, PreRelease: featuregate.Alpha}, RuntimeSDK: {Default: false, PreRelease: featuregate.Alpha}, + InPlaceUpdates: {Default: false, PreRelease: featuregate.Alpha}, + MachineTaintPropagation: {Default: false, PreRelease: featuregate.Alpha}, } diff --git a/vendor/sigs.k8s.io/cluster-api/util/conditions/sort.go b/vendor/sigs.k8s.io/cluster-api/util/conditions/sort.go index d0be13af9e3..d06baeba82b 100644 --- a/vendor/sigs.k8s.io/cluster-api/util/conditions/sort.go +++ b/vendor/sigs.k8s.io/cluster-api/util/conditions/sort.go @@ -76,6 +76,7 @@ func defaultSortLessFunc(i, j metav1.Condition) bool { // | OwnerRemediated | | | | | | x | // | -- Operations -- | | | | | | | // | TopologyReconciled | x | | | | | | +// | Updating | | | | | | x | // | RollingOut | x | x | x | | x | | // | Remediating | x | x | x | x | x | | // | ScalingDown | x | x | x | x | x | | @@ -117,6 +118,7 @@ var order = []string{ clusterv1.MachineHealthCheckSucceededCondition, clusterv1.MachineOwnerRemediatedCondition, clusterv1.ClusterTopologyReconciledCondition, + clusterv1.MachineUpdatingCondition, clusterv1.RollingOutCondition, clusterv1.RemediatingCondition, clusterv1.ScalingDownCondition, diff --git a/vendor/sigs.k8s.io/cluster-api/util/patch/patch.go b/vendor/sigs.k8s.io/cluster-api/util/patch/patch.go index 1c994e3b88e..64378f457e6 100644 --- a/vendor/sigs.k8s.io/cluster-api/util/patch/patch.go +++ b/vendor/sigs.k8s.io/cluster-api/util/patch/patch.go @@ -143,18 +143,16 @@ func (h *Helper) Patch(ctx context.Context, obj client.Object, opts ...Option) e return errors.Wrapf(err, "failed to patch %s %s: failed to convert after object to Unstructured", h.gvk.Kind, klog.KObj(h.beforeObject)) } - // Determine if the object has status. - if unstructuredHasStatus(h.after) { - if options.IncludeStatusObservedGeneration { - // Set status.observedGeneration if we're asked to do so. - if err := unstructured.SetNestedField(h.after.Object, h.after.GetGeneration(), "status", "observedGeneration"); err != nil { - return errors.Wrapf(err, "failed to patch %s %s: failed to set .status.observedGeneration", h.gvk.Kind, klog.KObj(h.beforeObject)) - } + // Include .status.observedGeneration if IncludeStatusObservedGeneration is set. + if options.IncludeStatusObservedGeneration { + // Set status.observedGeneration if we're asked to do so. + if err := unstructured.SetNestedField(h.after.Object, h.after.GetGeneration(), "status", "observedGeneration"); err != nil { + return errors.Wrapf(err, "failed to patch %s %s: failed to set .status.observedGeneration", h.gvk.Kind, klog.KObj(h.beforeObject)) + } - // Restore the changes back to the original object. - if err := runtime.DefaultUnstructuredConverter.FromUnstructured(h.after.Object, obj); err != nil { - return errors.Wrapf(err, "failed to patch %s %s: failed to converted object from Unstructured", h.gvk.Kind, klog.KObj(h.beforeObject)) - } + // Restore the changes back to the original object. + if err := runtime.DefaultUnstructuredConverter.FromUnstructured(h.after.Object, obj); err != nil { + return errors.Wrapf(err, "failed to patch %s %s: failed to converted object from Unstructured", h.gvk.Kind, klog.KObj(h.beforeObject)) } } @@ -172,17 +170,17 @@ func (h *Helper) Patch(ctx context.Context, obj client.Object, opts ...Option) e // patching conditions first avoids an extra loop if spec or status patch succeeds first // given that causes the resourceVersion to mutate. if err := h.patchStatusConditions(ctx, obj, options.ForceOverwriteConditions, options.OwnedConditions, options.OwnedV1Beta2Conditions); err != nil { - errs = append(errs, err) + errs = append(errs, errors.Wrapf(err, "failed to patch status conditions")) } // Then proceed to patch the rest of the object. if err := h.patch(ctx, obj); err != nil { - errs = append(errs, err) + errs = append(errs, errors.Wrapf(err, "failed to patch spec and metadata")) } if err := h.patchStatus(ctx, obj); err != nil { //nolint:staticcheck if !(apierrors.IsNotFound(err) && !obj.GetDeletionTimestamp().IsZero() && len(obj.GetFinalizers()) == 0) { - errs = append(errs, err) + errs = append(errs, errors.Wrapf(err, "failed to patch status")) } } diff --git a/vendor/sigs.k8s.io/cluster-api/util/patch/utils.go b/vendor/sigs.k8s.io/cluster-api/util/patch/utils.go index c24ca7dddb4..94d6fbf2a71 100644 --- a/vendor/sigs.k8s.io/cluster-api/util/patch/utils.go +++ b/vendor/sigs.k8s.io/cluster-api/util/patch/utils.go @@ -43,11 +43,6 @@ var ( } ) -func unstructuredHasStatus(u *unstructured.Unstructured) bool { - _, ok := u.Object["status"] - return ok -} - // toUnstructured converts an object to Unstructured. // We have to pass in a gvk as we can't rely on GVK being set in a runtime.Object. func toUnstructured(obj runtime.Object, gvk schema.GroupVersionKind) (*unstructured.Unstructured, error) { diff --git a/vendor/sigs.k8s.io/cluster-api/util/util.go b/vendor/sigs.k8s.io/cluster-api/util/util.go index 684ef3d07b8..992d574ddee 100644 --- a/vendor/sigs.k8s.io/cluster-api/util/util.go +++ b/vendor/sigs.k8s.io/cluster-api/util/util.go @@ -37,6 +37,7 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/types" + "k8s.io/klog/v2" "k8s.io/utils/ptr" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" @@ -179,7 +180,7 @@ func GetClusterByName(ctx context.Context, c client.Client, namespace, name stri } if err := c.Get(ctx, key, cluster); err != nil { - return nil, errors.Wrapf(err, "failed to get Cluster/%s", name) + return nil, errors.Wrapf(err, "failed to get Cluster %s", klog.KRef(namespace, name)) } return cluster, nil @@ -359,9 +360,9 @@ func indexOwnerRef(ownerReferences []metav1.OwnerReference, ref metav1.OwnerRefe // IsOwnedByObject returns true if any of the owner references point to the given target. // It matches the object based on the Group, Kind and Name. -func IsOwnedByObject(obj metav1.Object, target client.Object) bool { +func IsOwnedByObject(obj metav1.Object, target client.Object, targetGK schema.GroupKind) bool { for _, ref := range obj.GetOwnerReferences() { - if refersTo(&ref, target) { + if refersTo(&ref, target, targetGK) { return true } } @@ -369,12 +370,12 @@ func IsOwnedByObject(obj metav1.Object, target client.Object) bool { } // IsControlledBy differs from metav1.IsControlledBy. This function matches on Group, Kind and Name. The metav1.IsControlledBy function matches on UID only. -func IsControlledBy(obj metav1.Object, owner client.Object) bool { +func IsControlledBy(obj metav1.Object, owner client.Object, ownerGK schema.GroupKind) bool { controllerRef := metav1.GetControllerOfNoCopy(obj) if controllerRef == nil { return false } - return refersTo(controllerRef, owner) + return refersTo(controllerRef, owner, ownerGK) } // Returns true if a and b point to the same object based on Group, Kind and Name. @@ -393,14 +394,13 @@ func referSameObject(a, b metav1.OwnerReference) bool { } // Returns true if ref refers to obj based on Group, Kind and Name. -func refersTo(ref *metav1.OwnerReference, obj client.Object) bool { +func refersTo(ref *metav1.OwnerReference, obj client.Object, objGK schema.GroupKind) bool { refGv, err := schema.ParseGroupVersion(ref.APIVersion) if err != nil { return false } - gvk := obj.GetObjectKind().GroupVersionKind() - return refGv.Group == gvk.Group && ref.Kind == gvk.Kind && ref.Name == obj.GetName() + return refGv.Group == objGK.Group && ref.Kind == objGK.Kind && ref.Name == obj.GetName() } // UnstructuredUnmarshalField is a wrapper around json and unstructured objects to decode and copy a specific field @@ -690,6 +690,8 @@ func IsSupportedVersionSkew(a, b semver.Version) bool { // LowestNonZeroResult compares two reconciliation results // and returns the one with lowest requeue time. +// +//nolint:staticcheck // SA1019: Requeue is deprecated. func LowestNonZeroResult(i, j ctrl.Result) ctrl.Result { switch { case i.IsZero(): @@ -751,3 +753,89 @@ func MergeMap(maps ...map[string]string) map[string]string { } return m } + +// GetOwnerMachinePool returns the MachinePool objects owning the current resource. +func GetOwnerMachinePool(ctx context.Context, c client.Client, obj metav1.ObjectMeta) (*clusterv1.MachinePool, error) { + for _, ref := range obj.GetOwnerReferences() { + if ref.Kind != "MachinePool" { + continue + } + gv, err := schema.ParseGroupVersion(ref.APIVersion) + if err != nil { + return nil, errors.WithStack(err) + } + if gv.Group == clusterv1.GroupVersion.Group { + return GetMachinePoolByName(ctx, c, obj.Namespace, ref.Name) + } + } + return nil, nil +} + +// GetMachinePoolByName finds and returns a MachinePool object using the specified params. +func GetMachinePoolByName(ctx context.Context, c client.Client, namespace, name string) (*clusterv1.MachinePool, error) { + m := &clusterv1.MachinePool{} + key := client.ObjectKey{Name: name, Namespace: namespace} + if err := c.Get(ctx, key, m); err != nil { + return nil, err + } + return m, nil +} + +// GetMachinePoolByLabels finds and returns a MachinePool object using the value of clusterv1.MachinePoolNameLabel. +// This differs from GetMachinePoolByName as the label value can be a hash. +func GetMachinePoolByLabels(ctx context.Context, c client.Client, namespace string, labels map[string]string) (*clusterv1.MachinePool, error) { + selector := map[string]string{} + if clusterName, ok := labels[clusterv1.ClusterNameLabel]; ok { + selector = map[string]string{clusterv1.ClusterNameLabel: clusterName} + } + + if poolNameHash, ok := labels[clusterv1.MachinePoolNameLabel]; ok { + machinePoolList := &clusterv1.MachinePoolList{} + if err := c.List(ctx, machinePoolList, client.InNamespace(namespace), client.MatchingLabels(selector)); err != nil { + return nil, errors.Wrapf(err, "failed to list MachinePools using labels %v", selector) + } + + for _, mp := range machinePoolList.Items { + if format.MustFormatValue(mp.Name) == poolNameHash { + return &mp, nil + } + } + } else { + return nil, errors.Errorf("labels missing required key `%s`", clusterv1.MachinePoolNameLabel) + } + + return nil, nil +} + +// MachinePoolToInfrastructureMapFunc returns a handler.MapFunc that watches for +// MachinePool events and returns reconciliation requests for an infrastructure provider object. +func MachinePoolToInfrastructureMapFunc(ctx context.Context, gvk schema.GroupVersionKind) handler.MapFunc { + log := ctrl.LoggerFrom(ctx) + return func(_ context.Context, o client.Object) []reconcile.Request { + m, ok := o.(*clusterv1.MachinePool) + if !ok { + log.V(4).Info("Not a machine pool", "Object", klog.KObj(o)) + return nil + } + log := log.WithValues("MachinePool", klog.KObj(o)) + + gk := gvk.GroupKind() + ref := m.Spec.Template.Spec.InfrastructureRef + // Return early if the GroupKind doesn't match what we expect. + infraGK := ref.GroupKind() + if gk != infraGK { + log.V(4).Info("Infra kind doesn't match filter group kind", "infrastructureGroupKind", infraGK.String()) + return nil + } + + log.V(4).Info("Projecting object") + return []reconcile.Request{ + { + NamespacedName: client.ObjectKey{ + Namespace: m.Namespace, + Name: ref.Name, + }, + }, + } + } +}