diff --git a/api/go.mod b/api/go.mod index eadf29da91eb..5f353404b988 100644 --- a/api/go.mod +++ b/api/go.mod @@ -26,5 +26,5 @@ require ( k8s.io/kube-openapi v0.0.0-20251125145642-4e65d59e963e // indirect sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 // indirect sigs.k8s.io/randfill v1.0.0 // indirect - sigs.k8s.io/structured-merge-diff/v6 v6.3.2 // indirect + sigs.k8s.io/structured-merge-diff/v6 v6.4.0 // indirect ) diff --git a/api/go.sum b/api/go.sum index 25b7c5adc29b..02fe14e9f234 100644 --- a/api/go.sum +++ b/api/go.sum @@ -54,7 +54,7 @@ sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 h1:IpInykpT6ceI+QxKBbEflcR5E sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730/go.mod h1:mdzfpAEoE6DHQEN0uh9ZbOCuHbLK5wOm7dK4ctXE9Tg= sigs.k8s.io/randfill v1.0.0 h1:JfjMILfT8A6RbawdsK2JXGBR5AQVfd+9TbzrlneTyrU= sigs.k8s.io/randfill v1.0.0/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY= -sigs.k8s.io/structured-merge-diff/v6 v6.3.2 h1:kwVWMx5yS1CrnFWA/2QHyRVJ8jM6dBA80uLmm0wJkk8= -sigs.k8s.io/structured-merge-diff/v6 v6.3.2/go.mod h1:M3W8sfWvn2HhQDIbGWj3S099YozAsymCo/wrT5ohRUE= +sigs.k8s.io/structured-merge-diff/v6 v6.4.0 h1:qmp2e3ZfFi1/jJbDGpD4mt3wyp6PE1NfKHCYLqgNQJo= +sigs.k8s.io/structured-merge-diff/v6 v6.4.0/go.mod h1:M3W8sfWvn2HhQDIbGWj3S099YozAsymCo/wrT5ohRUE= sigs.k8s.io/yaml v1.6.0 h1:G8fkbMSAFqgEFgh4b1wmtzDnioxFCUgTZhlbj5P9QYs= sigs.k8s.io/yaml v1.6.0/go.mod h1:796bPqUfzR/0jLAl6XjHl3Ck7MiyVv8dbTdyT3/pMf4= diff --git a/api/vendor/modules.txt b/api/vendor/modules.txt index fa2cf946e210..835999e99b47 100644 --- a/api/vendor/modules.txt +++ b/api/vendor/modules.txt @@ -101,6 +101,6 @@ sigs.k8s.io/json/internal/golang/encoding/json ## explicit; go 1.18 sigs.k8s.io/randfill sigs.k8s.io/randfill/bytesource -# sigs.k8s.io/structured-merge-diff/v6 v6.3.2 +# sigs.k8s.io/structured-merge-diff/v6 v6.4.0 ## explicit; go 1.23 sigs.k8s.io/structured-merge-diff/v6/value diff --git a/api/vendor/sigs.k8s.io/structured-merge-diff/v6/value/allocator.go b/api/vendor/sigs.k8s.io/structured-merge-diff/v6/value/allocator.go index f70cd41674bb..acbfe8cebaa5 100644 --- a/api/vendor/sigs.k8s.io/structured-merge-diff/v6/value/allocator.go +++ b/api/vendor/sigs.k8s.io/structured-merge-diff/v6/value/allocator.go @@ -16,6 +16,8 @@ limitations under the License. package value +import "reflect" + // Allocator provides a value object allocation strategy. // Value objects can be allocated by passing an allocator to the "Using" // receiver functions on the value interfaces, e.g. Map.ZipUsing(allocator, ...). @@ -24,8 +26,8 @@ package value type Allocator interface { // Free gives the allocator back any value objects returned by the "Using" // receiver functions on the value interfaces. - // interface{} may be any of: Value, Map, List or Range. - Free(interface{}) + // any may be any of: Value, Map, List or Range. + Free(any) // The unexported functions are for "Using" receiver functions of the value types // to request what they need from the allocator. @@ -74,7 +76,7 @@ func (p *heapAllocator) allocListReflectRange() *listReflectRange { return &listReflectRange{vr: &valueReflect{}} } -func (p *heapAllocator) Free(_ interface{}) {} +func (p *heapAllocator) Free(_ any) {} // NewFreelistAllocator creates freelist based allocator. // This allocator provides fast allocation and freeing of short lived value objects. @@ -89,25 +91,25 @@ func (p *heapAllocator) Free(_ interface{}) {} // for all temporary value access. func NewFreelistAllocator() Allocator { return &freelistAllocator{ - valueUnstructured: &freelist{new: func() interface{} { + valueUnstructured: &freelist[*valueUnstructured]{new: func() *valueUnstructured { return &valueUnstructured{} }}, - listUnstructuredRange: &freelist{new: func() interface{} { + listUnstructuredRange: &freelist[*listUnstructuredRange]{new: func() *listUnstructuredRange { return &listUnstructuredRange{vv: &valueUnstructured{}} }}, - valueReflect: &freelist{new: func() interface{} { + valueReflect: &freelist[*valueReflect]{new: func() *valueReflect { return &valueReflect{} }}, - mapReflect: &freelist{new: func() interface{} { + mapReflect: &freelist[*mapReflect]{new: func() *mapReflect { return &mapReflect{} }}, - structReflect: &freelist{new: func() interface{} { + structReflect: &freelist[*structReflect]{new: func() *structReflect { return &structReflect{} }}, - listReflect: &freelist{new: func() interface{} { + listReflect: &freelist[*listReflect]{new: func() *listReflect { return &listReflect{} }}, - listReflectRange: &freelist{new: func() interface{} { + listReflectRange: &freelist[*listReflectRange]{new: func() *listReflectRange { return &listReflectRange{vr: &valueReflect{}} }}, } @@ -119,22 +121,22 @@ func NewFreelistAllocator() Allocator { const freelistMaxSize = 1000 type freelistAllocator struct { - valueUnstructured *freelist - listUnstructuredRange *freelist - valueReflect *freelist - mapReflect *freelist - structReflect *freelist - listReflect *freelist - listReflectRange *freelist + valueUnstructured *freelist[*valueUnstructured] + listUnstructuredRange *freelist[*listUnstructuredRange] + valueReflect *freelist[*valueReflect] + mapReflect *freelist[*mapReflect] + structReflect *freelist[*structReflect] + listReflect *freelist[*listReflect] + listReflectRange *freelist[*listReflectRange] } -type freelist struct { - list []interface{} - new func() interface{} +type freelist[T any] struct { + list []T + new func() T } -func (f *freelist) allocate() interface{} { - var w2 interface{} +func (f *freelist[T]) allocate() T { + var w2 T if n := len(f.list); n > 0 { w2, f.list = f.list[n-1], f.list[:n-1] } else { @@ -143,61 +145,73 @@ func (f *freelist) allocate() interface{} { return w2 } -func (f *freelist) free(v interface{}) { +func (f *freelist[T]) free(v T) { if len(f.list) < freelistMaxSize { f.list = append(f.list, v) } } -func (w *freelistAllocator) Free(value interface{}) { +func (w *freelistAllocator) Free(value any) { switch v := value.(type) { case *valueUnstructured: v.Value = nil // don't hold references to unstructured objects w.valueUnstructured.free(v) case *listUnstructuredRange: + v.list = nil // don't hold references to unstructured objects v.vv.Value = nil // don't hold references to unstructured objects w.listUnstructuredRange.free(v) case *valueReflect: - v.ParentMapKey = nil v.ParentMap = nil + v.ParentMapKey = nil + v.Value = reflect.Value{} // don't hold references to reflected objects w.valueReflect.free(v) case *mapReflect: + v.valueReflect.ParentMap = nil + v.valueReflect.ParentMapKey = nil + v.valueReflect.Value = reflect.Value{} // don't hold references to reflected objects w.mapReflect.free(v) case *structReflect: + v.valueReflect.ParentMap = nil + v.valueReflect.ParentMapKey = nil + v.valueReflect.Value = reflect.Value{} // don't hold references to reflected objects w.structReflect.free(v) case *listReflect: + v.Value = reflect.Value{} // don't hold references to reflected objects w.listReflect.free(v) case *listReflectRange: - v.vr.ParentMapKey = nil + v.list = reflect.Value{} // don't hold references to reflected objects v.vr.ParentMap = nil + v.vr.ParentMapKey = nil + v.vr.Value = reflect.Value{} // don't hold references to reflected objects + v.entry = nil w.listReflectRange.free(v) } } func (w *freelistAllocator) allocValueUnstructured() *valueUnstructured { - return w.valueUnstructured.allocate().(*valueUnstructured) + return w.valueUnstructured.allocate() } func (w *freelistAllocator) allocListUnstructuredRange() *listUnstructuredRange { - return w.listUnstructuredRange.allocate().(*listUnstructuredRange) + return w.listUnstructuredRange.allocate() } func (w *freelistAllocator) allocValueReflect() *valueReflect { - return w.valueReflect.allocate().(*valueReflect) + return w.valueReflect.allocate() } func (w *freelistAllocator) allocStructReflect() *structReflect { - return w.structReflect.allocate().(*structReflect) + return w.structReflect.allocate() } func (w *freelistAllocator) allocMapReflect() *mapReflect { - return w.mapReflect.allocate().(*mapReflect) + return w.mapReflect.allocate() } func (w *freelistAllocator) allocListReflect() *listReflect { - return w.listReflect.allocate().(*listReflect) + return w.listReflect.allocate() } func (w *freelistAllocator) allocListReflectRange() *listReflectRange { - return w.listReflectRange.allocate().(*listReflectRange) + return w.listReflectRange.allocate() } diff --git a/api/vendor/sigs.k8s.io/structured-merge-diff/v6/value/jsontagutil.go b/api/vendor/sigs.k8s.io/structured-merge-diff/v6/value/jsontagutil.go index 3aadceb22262..db2561373450 100644 --- a/api/vendor/sigs.k8s.io/structured-merge-diff/v6/value/jsontagutil.go +++ b/api/vendor/sigs.k8s.io/structured-merge-diff/v6/value/jsontagutil.go @@ -76,11 +76,16 @@ func OmitZeroFunc(t reflect.Type) func(reflect.Value) bool { // but is based on the highly efficient approach from https://golang.org/src/encoding/json/encode.go func lookupJsonTags(f reflect.StructField) (name string, omit bool, inline bool, omitempty bool, omitzero func(reflect.Value) bool) { + // Skip unexported non-embedded fields, matching encoding/json behavior. + if f.PkgPath != "" && !f.Anonymous { + return "", true, false, false, nil + } tag := f.Tag.Get("json") if tag == "-" { return "", true, false, false, nil } name, opts := parseTag(tag) + inline = f.Anonymous && name == "" if name == "" { name = f.Name } @@ -89,7 +94,7 @@ func lookupJsonTags(f reflect.StructField) (name string, omit bool, inline bool, omitzero = OmitZeroFunc(f.Type) } - return name, false, opts.Contains("inline"), opts.Contains("omitempty"), omitzero + return name, false, inline, opts.Contains("omitempty"), omitzero } func isEmpty(v reflect.Value) bool { diff --git a/cmd/cluster/core/dump.go b/cmd/cluster/core/dump.go index 5c5536954787..e36e2434da79 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/cluster/openstack/create_test.go b/cmd/cluster/openstack/create_test.go index 4d1aac0d6dd8..ea1215e517fe 100644 --- a/cmd/cluster/openstack/create_test.go +++ b/cmd/cluster/openstack/create_test.go @@ -48,6 +48,7 @@ func TestCreateCluster(t *testing.T) { ctx := framework.InterruptableContext(t.Context()) tempDir := t.TempDir() t.Setenv("FAKE_CLIENT", "true") + t.Setenv("OS_CLOUD", "") cloudsYAML := map[string]interface{}{ "clouds": map[string]interface{}{ diff --git a/cmd/install/assets/crds/assets.go b/cmd/install/assets/crds/assets.go index eb84e2aa96a9..affe646103f6 100644 --- a/cmd/install/assets/crds/assets.go +++ b/cmd/install/assets/crds/assets.go @@ -81,6 +81,7 @@ var capiResources = map[string]string{ "cluster-api-provider-openstack/infrastructure.cluster.x-k8s.io_openstackmachines.yaml": "v1beta1", "cluster-api-provider-openstack/infrastructure.cluster.x-k8s.io_openstackmachinetemplates.yaml": "v1beta1", "cluster-api-provider-openstack/infrastructure.cluster.x-k8s.io_openstackfloatingippools.yaml": "v1alpha1", + "cluster-api-provider-openstack/infrastructure.cluster.x-k8s.io_openstackclusteridentities.yaml": "v1alpha1", "cluster-api-provider-openstack/infrastructure.cluster.x-k8s.io_openstackservers.yaml": "v1alpha1", } 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 d295955918fc..edfd642f129e 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 3a7b7ce160e9..803cf2792892 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 c9274fb81635..32d57fa8c38e 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 b150d6ebad12..7d372273051b 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 155a4c2e87f6..1e872f32b781 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 819897033e45..18d7b38aee8d 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 cd5f2b9bdd95..75a711f7bc8d 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 65ecfd888711..cc450903cb81 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 3161cf00121a..ca21618211d2 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 0a5b74c5c2e3..a5bfd33c2d1f 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 1c82d012d2e5..07c61519b955 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 6b6af9c486ad..cd23ba5c8059 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 000000000000..ea13bcbfebdc --- /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 9e4d79613f28..d32a1cb099e6 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 4f9970ebf988..b20377a9abc9 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 571c6a4789dd..d3e254c11ecb 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 75355da4eba3..d4269ecf6e4e 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 e4de100196e8..d36d8b3f2c1c 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 dc7e7a7ed5ec..435930d8cb6b 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_addressscopes.yaml b/cmd/install/assets/crds/cluster-api-provider-openstack/openstack.k-orc.cloud_addressscopes.yaml new file mode 100644 index 000000000000..ca038821800f --- /dev/null +++ b/cmd/install/assets/crds/cluster-api-provider-openstack/openstack.k-orc.cloud_addressscopes.yaml @@ -0,0 +1,338 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.17.0 + name: addressscopes.openstack.k-orc.cloud +spec: + group: openstack.k-orc.cloud + names: + categories: + - openstack + kind: AddressScope + listKind: AddressScopeList + plural: addressscopes + singular: addressscope + 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: AddressScope 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: + ipVersion: + description: ipVersion is the IP protocol version. + enum: + - 4 + - 6 + format: int32 + type: integer + name: + description: name of the existing resource + maxLength: 255 + minLength: 1 + pattern: ^[^,]+$ + type: string + projectRef: + description: projectRef is a reference to the ORC Project + which this resource is associated with. + maxLength: 253 + minLength: 1 + type: string + shared: + description: |- + shared indicates whether this resource is shared across all + projects or not. By default, only admin users can change set + this value. + type: boolean + 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 + maxLength: 36 + 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: + ipVersion: + description: ipVersion is the IP protocol version. + enum: + - 4 + - 6 + format: int32 + type: integer + x-kubernetes-validations: + - message: ipVersion 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 + projectRef: + description: projectRef is a reference to the ORC Project which + this resource is associated with. + 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 or not. By default, only admin users can change set + this value. We can't unshared a shared address scope; Neutron + enforces this. + type: boolean + x-kubernetes-validations: + - message: shared address scope can't be unshared + rule: '!(oldSelf && !self)' + required: + - ipVersion + 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. + maxLength: 1024 + type: string + resource: + description: resource contains the observed state of the OpenStack + resource. + properties: + ipVersion: + description: ipVersion is the IP protocol version. + format: int32 + type: integer + name: + description: name is a Human-readable name for the resource. Might + not be unique. + maxLength: 1024 + type: string + projectID: + description: projectID is the ID of the Project to which the resource + is associated. + maxLength: 1024 + type: string + shared: + description: |- + shared indicates whether this resource is shared across all + projects or not. By default, only admin users can change set + this value. + type: boolean + type: object + type: object + required: + - spec + type: object + served: true + storage: true + subresources: + status: {} diff --git a/cmd/install/assets/crds/cluster-api-provider-openstack/openstack.k-orc.cloud_applicationcredentials.yaml b/cmd/install/assets/crds/cluster-api-provider-openstack/openstack.k-orc.cloud_applicationcredentials.yaml new file mode 100644 index 000000000000..84f6029f6a75 --- /dev/null +++ b/cmd/install/assets/crds/cluster-api-provider-openstack/openstack.k-orc.cloud_applicationcredentials.yaml @@ -0,0 +1,440 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.17.0 + name: applicationcredentials.openstack.k-orc.cloud +spec: + group: openstack.k-orc.cloud + names: + categories: + - openstack + kind: ApplicationCredential + listKind: ApplicationCredentialList + plural: applicationcredentials + singular: applicationcredential + 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: ApplicationCredential 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: 2 + properties: + description: + description: description of the existing resource + maxLength: 1024 + type: string + name: + description: name of the existing resource + maxLength: 255 + minLength: 1 + pattern: ^[^,]+$ + type: string + userRef: + description: |- + userRef is a reference to the ORC User which this resource is associated with. + Note: Due to the nature of the OpenStack API, managing application credentials for a user different than the one ORC is authenticated against can be computationally expensive. In the worst case, all application credentials of all users have to be queried. + maxLength: 253 + minLength: 1 + type: string + required: + - userRef + 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 + maxLength: 36 + 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: + accessRules: + description: accessRules is a list of fine grained access control + rules + items: + description: ApplicationCredentialAccessRule defines an access + rule + minProperties: 1 + properties: + method: + description: method that the application credential is permitted + to use for a given API endpoint + enum: + - CONNECT + - DELETE + - GET + - HEAD + - OPTIONS + - PATCH + - POST + - PUT + - TRACE + type: string + path: + description: path that the application credential is permitted + to access + maxLength: 1024 + type: string + serviceRef: + description: serviceRef identifier for the service that + the application credential is permitted to access + maxLength: 253 + minLength: 1 + type: string + type: object + maxItems: 256 + type: array + x-kubernetes-list-type: atomic + description: + description: description is a human-readable description for the + resource. + maxLength: 255 + minLength: 1 + type: string + expiresAt: + description: expiresAt is the time of expiration for the application + credential. If unset, the application credential does not expire. + format: date-time + 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 + roleRefs: + description: roleRefs may only contain roles that the user has + assigned on the project. If not provided, the roles assigned + to the application credential will be the same as the roles + in the current token. + items: + maxLength: 253 + minLength: 1 + type: string + maxItems: 256 + type: array + x-kubernetes-list-type: atomic + secretRef: + description: secretRef is a reference to a Secret containing the + application credential secret + maxLength: 253 + minLength: 1 + type: string + unrestricted: + description: unrestricted is a flag indicating whether the application + credential may be used for creation or destruction of other + application credentials or trusts + type: boolean + userRef: + description: |- + userRef is a reference to the ORC User which this resource is associated with. + Note: Due to the nature of the OpenStack API, managing application credentials for a user different than the one ORC is authenticated against can be computationally expensive. In the worst case, all application credentials of all users have to be queried. + maxLength: 253 + minLength: 1 + type: string + required: + - secretRef + - userRef + type: object + x-kubernetes-validations: + - message: ApplicationCredentialResourceSpec 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. + maxLength: 1024 + type: string + resource: + description: resource contains the observed state of the OpenStack + resource. + properties: + accessRules: + description: accessRules is a list of fine grained access control + rules + items: + properties: + id: + description: id is the ID of this access rule + maxLength: 1024 + type: string + method: + description: method that the application credential is permitted + to use for a given API endpoint + maxLength: 32 + type: string + path: + description: path that the application credential is permitted + to access + maxLength: 1024 + type: string + service: + description: service type identifier for the service that + the application credential is permitted to access + maxLength: 1024 + type: string + type: object + maxItems: 64 + type: array + x-kubernetes-list-type: atomic + description: + description: description is a human-readable description for the + resource. + maxLength: 1024 + type: string + expiresAt: + description: expiresAt is the time of expiration for the application + credential. If unset, the application credential does not expire. + format: date-time + type: string + name: + description: name is a Human-readable name for the resource. Might + not be unique. + maxLength: 1024 + type: string + projectID: + description: projectID of the project the application credential + was created for and that authentication requests using this + application credential will be scoped to. + maxLength: 1024 + type: string + roles: + description: roles is a list of role objects may only contain + roles that the user has assigned on the project + items: + properties: + domainID: + description: domainID of the domain of this role + maxLength: 1024 + type: string + id: + description: id is the ID of a role + maxLength: 1024 + type: string + name: + description: name of an existing role + maxLength: 1024 + type: string + type: object + maxItems: 64 + type: array + x-kubernetes-list-type: atomic + unrestricted: + description: unrestricted is a flag indicating whether the application + credential may be used for creation or destruction of other + application credentials or trusts + type: boolean + type: object + type: object + required: + - spec + type: object + served: true + storage: true + subresources: + status: {} 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 000000000000..04913ae7ba2d --- /dev/null +++ b/cmd/install/assets/crds/cluster-api-provider-openstack/openstack.k-orc.cloud_domains.yaml @@ -0,0 +1,297 @@ +--- +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 + maxLength: 36 + 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. + maxLength: 1024 + 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 + required: + - spec + type: object + served: true + storage: true + subresources: + status: {} diff --git a/cmd/install/assets/crds/cluster-api-provider-openstack/openstack.k-orc.cloud_endpoints.yaml b/cmd/install/assets/crds/cluster-api-provider-openstack/openstack.k-orc.cloud_endpoints.yaml new file mode 100644 index 000000000000..b99097eb7a44 --- /dev/null +++ b/cmd/install/assets/crds/cluster-api-provider-openstack/openstack.k-orc.cloud_endpoints.yaml @@ -0,0 +1,331 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.17.0 + name: endpoints.openstack.k-orc.cloud +spec: + group: openstack.k-orc.cloud + names: + categories: + - openstack + kind: Endpoint + listKind: EndpointList + plural: endpoints + singular: endpoint + 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: Endpoint 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: + interface: + description: interface of the existing endpoint. + enum: + - admin + - internal + - public + type: string + serviceRef: + description: serviceRef is a reference to the ORC Service + which this resource is associated with. + maxLength: 253 + minLength: 1 + type: string + url: + description: url is the URL of the existing endpoint. + maxLength: 1024 + 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 + maxLength: 36 + 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 + x-kubernetes-validations: + - message: description is immutable + rule: self == oldSelf + enabled: + description: enabled indicates whether the endpoint is enabled + or not. + type: boolean + interface: + description: interface indicates the visibility of the endpoint. + enum: + - admin + - internal + - public + type: string + serviceRef: + description: serviceRef is a reference to the ORC Service which + this resource is associated with. + maxLength: 253 + minLength: 1 + type: string + x-kubernetes-validations: + - message: serviceRef is immutable + rule: self == oldSelf + url: + description: url is the endpoint URL. + maxLength: 1024 + type: string + required: + - interface + - serviceRef + - url + 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. + maxLength: 1024 + 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: 255 + minLength: 1 + type: string + enabled: + description: enabled indicates whether the endpoint is enabled + or not. + type: boolean + interface: + description: interface indicates the visibility of the endpoint. + maxLength: 128 + type: string + serviceID: + description: serviceID is the ID of the Service to which the resource + is associated. + maxLength: 1024 + type: string + url: + description: url is the endpoint URL. + maxLength: 1024 + type: string + type: object + type: object + required: + - spec + 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 000000000000..4c446ea1bf9d --- /dev/null +++ b/cmd/install/assets/crds/cluster-api-provider-openstack/openstack.k-orc.cloud_flavors.yaml @@ -0,0 +1,385 @@ +--- +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 + maxLength: 36 + 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 + id: + description: |- + id will be the id of the created resource. If not specified, a random + UUID will be generated by OpenStack. + maxLength: 255 + minLength: 1 + pattern: ^[a-zA-Z0-9._-]([a-zA-Z0-9. _-]*[a-zA-Z0-9._-])?$ + type: string + 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. + maxLength: 1024 + 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 + required: + - spec + 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 000000000000..33e4357d6a8c --- /dev/null +++ b/cmd/install/assets/crds/cluster-api-provider-openstack/openstack.k-orc.cloud_floatingips.yaml @@ -0,0 +1,490 @@ +--- +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 + maxLength: 36 + 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. + maxLength: 1024 + 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 + required: + - spec + 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 000000000000..020977293f74 --- /dev/null +++ b/cmd/install/assets/crds/cluster-api-provider-openstack/openstack.k-orc.cloud_groups.yaml @@ -0,0 +1,302 @@ +--- +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 + maxLength: 36 + 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. + maxLength: 1024 + 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 + required: + - spec + 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 962e19d418ad..625987cea110 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,61 @@ 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 + maxLength: 36 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 +144,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 +157,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 +180,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 +201,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 +217,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 +233,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 +248,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 +264,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 +327,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 +358,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 +399,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 +416,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 +440,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 +454,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 +562,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 +633,34 @@ 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. + maxLength: 1024 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 +669,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,20 +679,44 @@ 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 + required: + - spec type: object served: true storage: true 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 000000000000..d066092f694a --- /dev/null +++ b/cmd/install/assets/crds/cluster-api-provider-openstack/openstack.k-orc.cloud_keypairs.yaml @@ -0,0 +1,300 @@ +--- +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. + maxLength: 1024 + 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. + maxLength: 1024 + 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 + required: + - spec + 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 000000000000..a13323951ebb --- /dev/null +++ b/cmd/install/assets/crds/cluster-api-provider-openstack/openstack.k-orc.cloud_networks.yaml @@ -0,0 +1,551 @@ +--- +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 + maxLength: 36 + 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. + maxLength: 1024 + 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 + required: + - spec + 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 000000000000..0481c0e1063a --- /dev/null +++ b/cmd/install/assets/crds/cluster-api-provider-openstack/openstack.k-orc.cloud_ports.yaml @@ -0,0 +1,672 @@ +--- +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: + adminStateUp: + description: |- + adminStateUp is the administrative state of the port, + which is up (true) or down (false). + type: boolean + description: + description: description of the existing resource + maxLength: 255 + minLength: 1 + type: string + macAddress: + description: macAddress is the MAC address of the port. + maxLength: 32 + 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 + maxLength: 36 + 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 + adminStateUp: + default: true + description: |- + adminStateUp is the administrative state of the port, + which is up (true) or down (false). The default value is true. + type: boolean + 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 + hostID: + description: |- + hostID specifies the host where the port will be bound. + Note that when the port is attached to a server, OpenStack may + rebind the port to the server's actual compute host, which may + differ from the specified hostID if no matching scheduler hint + is used. In this case the port's status will reflect the actual + binding host, not the value specified here. + maxProperties: 1 + minProperties: 1 + properties: + id: + description: |- + id is the literal host ID string to use for binding:host_id. + This is mutually exclusive with serverRef. + maxLength: 36 + type: string + serverRef: + description: |- + serverRef is a reference to an ORC Server resource from which to + retrieve the hostID for port binding. The hostID will be read from + the Server's status.resource.hostID field. + This is mutually exclusive with id. + maxLength: 253 + minLength: 1 + type: string + type: object + x-kubernetes-validations: + - message: hostID is immutable + rule: self == oldSelf + - message: exactly one of id or serverRef must be set + rule: (has(self.id) && size(self.id) > 0) != (has(self.serverRef) + && size(self.serverRef) > 0) + macAddress: + description: macAddress is the MAC address of the port. + maxLength: 32 + 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. + maxLength: 1024 + 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 + hostID: + description: hostID is the ID of host where the port resides. + maxLength: 128 + type: string + 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 + required: + - spec + 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 000000000000..c6f9be21a6e4 --- /dev/null +++ b/cmd/install/assets/crds/cluster-api-provider-openstack/openstack.k-orc.cloud_projects.yaml @@ -0,0 +1,374 @@ +--- +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: + 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 + 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 + maxLength: 36 + 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 + 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 + 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. + maxLength: 1024 + 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 + domainID: + description: domainID is the ID of the Domain to which the resource + is associated. + maxLength: 1024 + 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 + required: + - spec + 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 000000000000..587d8db6654d --- /dev/null +++ b/cmd/install/assets/crds/cluster-api-provider-openstack/openstack.k-orc.cloud_roles.yaml @@ -0,0 +1,302 @@ +--- +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 + maxLength: 36 + 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. + maxLength: 1024 + 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 + required: + - spec + 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 000000000000..cc3104a95bd6 --- /dev/null +++ b/cmd/install/assets/crds/cluster-api-provider-openstack/openstack.k-orc.cloud_routerinterfaces.yaml @@ -0,0 +1,171 @@ +--- +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 + required: + - spec + 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 000000000000..58cd2d8df5a6 --- /dev/null +++ b/cmd/install/assets/crds/cluster-api-provider-openstack/openstack.k-orc.cloud_routers.yaml @@ -0,0 +1,469 @@ +--- +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 + maxLength: 36 + 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. + maxLength: 1024 + 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 + required: + - spec + 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 000000000000..272c36f3b470 --- /dev/null +++ b/cmd/install/assets/crds/cluster-api-provider-openstack/openstack.k-orc.cloud_securitygroups.yaml @@ -0,0 +1,599 @@ +--- +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 + maxLength: 36 + 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. + maxLength: 1024 + 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 + required: + - spec + 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 000000000000..d4c0a998fd21 --- /dev/null +++ b/cmd/install/assets/crds/cluster-api-provider-openstack/openstack.k-orc.cloud_servergroups.yaml @@ -0,0 +1,322 @@ +--- +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 + maxLength: 36 + 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. + maxLength: 1024 + 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 + required: + - spec + 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 000000000000..c11d1cfdbdc8 --- /dev/null +++ b/cmd/install/assets/crds/cluster-api-provider-openstack/openstack.k-orc.cloud_servers.yaml @@ -0,0 +1,599 @@ +--- +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 + maxLength: 36 + 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 + configDrive: + description: |- + configDrive specifies whether to attach a config drive to the server. + When true, configuration data will be available via a special drive + instead of the metadata service. + type: boolean + x-kubernetes-validations: + - message: configDrive 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 + metadata: + description: metadata is a list of metadata key-value pairs which + will be set on the server. + items: + description: ServerMetadata represents a key-value pair for + server metadata. + properties: + key: + description: key is the metadata key. + maxLength: 255 + minLength: 1 + type: string + value: + description: value is the metadata value. + maxLength: 255 + minLength: 1 + type: string + required: + - key + - value + type: object + maxItems: 128 + type: array + x-kubernetes-list-type: atomic + 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. + maxLength: 1024 + 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 + configDrive: + description: configDrive indicates whether the server was booted + with a config drive. + type: boolean + 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 + metadata: + description: metadata is the list of metadata key-value pairs + on the resource. + items: + description: ServerMetadataStatus represents a key-value pair + for server metadata in status. + properties: + key: + description: key is the metadata key. + maxLength: 255 + type: string + value: + description: value is the metadata value. + maxLength: 255 + type: string + type: object + maxItems: 128 + 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 + required: + - spec + 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 000000000000..093f7c03b08f --- /dev/null +++ b/cmd/install/assets/crds/cluster-api-provider-openstack/openstack.k-orc.cloud_services.yaml @@ -0,0 +1,308 @@ +--- +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 + maxLength: 36 + 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. + maxLength: 1024 + 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 + required: + - spec + 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 000000000000..5c16ec3df2d0 --- /dev/null +++ b/cmd/install/assets/crds/cluster-api-provider-openstack/openstack.k-orc.cloud_subnets.yaml @@ -0,0 +1,706 @@ +--- +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 + maxLength: 36 + 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. + maxLength: 1024 + 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 + required: + - spec + type: object + served: true + storage: true + subresources: + status: {} diff --git a/cmd/install/assets/crds/cluster-api-provider-openstack/openstack.k-orc.cloud_trunks.yaml b/cmd/install/assets/crds/cluster-api-provider-openstack/openstack.k-orc.cloud_trunks.yaml new file mode 100644 index 000000000000..78276578a993 --- /dev/null +++ b/cmd/install/assets/crds/cluster-api-provider-openstack/openstack.k-orc.cloud_trunks.yaml @@ -0,0 +1,506 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.17.0 + name: trunks.openstack.k-orc.cloud +spec: + group: openstack.k-orc.cloud + names: + categories: + - openstack + kind: Trunk + listKind: TrunkList + plural: trunks + singular: trunk + 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: Trunk 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: + adminStateUp: + description: adminStateUp is the administrative state of the + trunk. + type: boolean + 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 + 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 + which this resource is associated with. + 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 + maxLength: 36 + 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 trunk. If false (down), + the trunk does not forward packets. + type: boolean + 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 + 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 which + this resource is associated with. + maxLength: 253 + minLength: 1 + type: string + x-kubernetes-validations: + - message: projectRef is immutable + rule: self == oldSelf + subports: + description: subports is the list of ports to attach to the trunk. + items: + description: |- + TrunkSubportSpec represents a subport to attach to a trunk. + It maps to gophercloud's trunks.Subport. + properties: + portRef: + description: portRef is a reference to the ORC Port that + will be attached as a subport. + maxLength: 253 + minLength: 1 + type: string + segmentationID: + description: segmentationID is the segmentation ID for the + subport (e.g. VLAN ID). + format: int32 + maximum: 4094 + minimum: 1 + type: integer + segmentationType: + description: segmentationType is the segmentation type for + the subport (e.g. vlan). + enum: + - inherit + - vlan + maxLength: 32 + minLength: 1 + type: string + required: + - portRef + - segmentationID + - segmentationType + type: object + maxItems: 1024 + type: array + x-kubernetes-list-type: atomic + tags: + description: tags is a list of Neutron tags to apply to the trunk. + 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: + - portRef + 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. + maxLength: 1024 + type: string + resource: + description: resource contains the observed state of the OpenStack + resource. + properties: + adminStateUp: + description: adminStateUp is the administrative state of the trunk. + type: boolean + 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 resource. Might + not be unique. + maxLength: 1024 + type: string + portID: + description: portID is the ID of the Port to which the resource + is associated. + maxLength: 1024 + type: string + projectID: + description: projectID is the ID of the Project to which the resource + is associated. + maxLength: 1024 + type: string + revisionNumber: + description: revisionNumber optionally set via extensions/standard-attr-revisions + format: int64 + type: integer + status: + description: status indicates whether the trunk is currently operational. + maxLength: 1024 + type: string + subports: + description: subports is a list of ports associated with the trunk. + items: + description: |- + TrunkSubportStatus represents an attached subport on a trunk. + It maps to gophercloud's trunks.Subport. + properties: + portID: + description: portID is the OpenStack ID of the Port attached + as a subport. + maxLength: 1024 + type: string + segmentationID: + description: segmentationID is the segmentation ID for the + subport (e.g. VLAN ID). + format: int32 + type: integer + segmentationType: + description: segmentationType is the segmentation type for + the subport (e.g. vlan). + maxLength: 1024 + type: string + type: object + maxItems: 1024 + 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 + tenantID: + description: tenantID is the project owner of the trunk (alias + of projectID in some deployments). + 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 + required: + - spec + type: object + served: true + storage: true + subresources: + status: {} diff --git a/cmd/install/assets/crds/cluster-api-provider-openstack/openstack.k-orc.cloud_users.yaml b/cmd/install/assets/crds/cluster-api-provider-openstack/openstack.k-orc.cloud_users.yaml new file mode 100644 index 000000000000..9b5ebe083b40 --- /dev/null +++ b/cmd/install/assets/crds/cluster-api-provider-openstack/openstack.k-orc.cloud_users.yaml @@ -0,0 +1,346 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.17.0 + name: users.openstack.k-orc.cloud +spec: + group: openstack.k-orc.cloud + names: + categories: + - openstack + kind: User + listKind: UserList + plural: users + singular: user + 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: User 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: 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 + maxLength: 36 + 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: + defaultProjectRef: + description: defaultProjectRef is a reference to the Default Project + which this resource is associated with. + maxLength: 253 + minLength: 1 + type: string + x-kubernetes-validations: + - message: defaultProjectRef is immutable + rule: self == oldSelf + 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 + enabled: + description: enabled defines whether a user is enabled or disabled + 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 + passwordRef: + description: |- + passwordRef is a reference to a Secret containing the password + for this user. The Secret must contain a key named "password". + If not specified, the user is created without a password. + maxLength: 253 + minLength: 1 + type: string + type: object + x-kubernetes-validations: + - message: passwordRef may not be removed once set + rule: '!has(oldSelf.passwordRef) || has(self.passwordRef)' + 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. + maxLength: 1024 + type: string + resource: + description: resource contains the observed state of the OpenStack + resource. + properties: + appliedPasswordRef: + description: |- + appliedPasswordRef is the name of the Secret containing the + password that was last applied to the OpenStack resource. + maxLength: 1024 + type: string + defaultProjectID: + description: defaultProjectID is the ID of the Default Project + to which the user is associated with. + maxLength: 1024 + type: string + 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 + enabled: + description: enabled defines whether a user is enabled or disabled + type: boolean + name: + description: name is a Human-readable name for the resource. Might + not be unique. + maxLength: 1024 + type: string + passwordExpiresAt: + description: passwordExpiresAt is the timestamp at which the user's + password expires. + maxLength: 1024 + type: string + type: object + type: object + required: + - spec + 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 000000000000..ea46a4ecba0d --- /dev/null +++ b/cmd/install/assets/crds/cluster-api-provider-openstack/openstack.k-orc.cloud_volumes.yaml @@ -0,0 +1,483 @@ +--- +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 + maxLength: 36 + 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 + imageRef: + description: |- + imageRef is a reference to an ORC Image. If specified, creates a + bootable volume from this image. The volume size must be >= the + image's min_disk requirement. + maxLength: 253 + minLength: 1 + type: string + x-kubernetes-validations: + - message: imageRef is immutable + rule: self == oldSelf + 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. + maxLength: 1024 + 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 + imageID: + description: imageID is the ID of the image this volume was created + from, if any. + 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 + required: + - spec + 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 000000000000..04d155d2f2db --- /dev/null +++ b/cmd/install/assets/crds/cluster-api-provider-openstack/openstack.k-orc.cloud_volumetypes.yaml @@ -0,0 +1,336 @@ +--- +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 + maxLength: 36 + 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. + maxLength: 1024 + 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 + required: + - spec + 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 e429ac6527ca..98ff2eb1c2cf 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 f66415318475..9596cee338f2 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 e6d429803b25..71b2ccef7755 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 fa644b4f4368..2739e0b7e5ca 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 698af44792d1..7d55c5d07704 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 65cd40e0484d..5af9f56a3f85 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 e0e0462abb4a..bb10ca5a362f 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/cmd/install/assets/hypershift_operator.go b/cmd/install/assets/hypershift_operator.go index 2a2cd5704db2..807d0ee35130 100644 --- a/cmd/install/assets/hypershift_operator.go +++ b/cmd/install/assets/hypershift_operator.go @@ -1393,9 +1393,10 @@ func (o HyperShiftOperatorClusterRole) Build() *rbacv1.ClusterRole { Verbs: []string{"create", "delete", "get", "list", "update", "watch"}, }, // This allows hypershift operator to grant RBAC permissions for ORC to the capi-provider. + // We use a wildcard since ORC has a lot of resources. { APIGroups: []string{"openstack.k-orc.cloud"}, - Resources: []string{"images", "images/status"}, + Resources: []string{"*"}, Verbs: []string{rbacv1.VerbAll}, }, { // This allows the kubevirt csi driver to hotplug volumes to KubeVirt VMs. diff --git a/control-plane-operator/controllers/hostedcontrolplane/testdata/openstack-cloud-controller-manager/AROSwift/zz_fixture_TestControlPlaneComponents_openstack_cloud_controller_manager_deployment.yaml b/control-plane-operator/controllers/hostedcontrolplane/testdata/openstack-cloud-controller-manager/AROSwift/zz_fixture_TestControlPlaneComponents_openstack_cloud_controller_manager_deployment.yaml index 17b2e66ea0e5..dcf4611b8a1f 100644 --- a/control-plane-operator/controllers/hostedcontrolplane/testdata/openstack-cloud-controller-manager/AROSwift/zz_fixture_TestControlPlaneComponents_openstack_cloud_controller_manager_deployment.yaml +++ b/control-plane-operator/controllers/hostedcontrolplane/testdata/openstack-cloud-controller-manager/AROSwift/zz_fixture_TestControlPlaneComponents_openstack_cloud_controller_manager_deployment.yaml @@ -29,6 +29,7 @@ spec: component.hypershift.openshift.io/config-hash: 1cdcee0c hypershift.openshift.io/release-image: quay.io/openshift-release-dev/ocp-release:4.16.10-x86_64 labels: + app: cloud-controller-manager hypershift.openshift.io/control-plane-component: openstack-cloud-controller-manager hypershift.openshift.io/hosted-control-plane: hcp-namespace infrastructure.openshift.io/cloud-controller-manager: OpenStack diff --git a/control-plane-operator/controllers/hostedcontrolplane/testdata/openstack-cloud-controller-manager/GCP/zz_fixture_TestControlPlaneComponents_openstack_cloud_controller_manager_deployment.yaml b/control-plane-operator/controllers/hostedcontrolplane/testdata/openstack-cloud-controller-manager/GCP/zz_fixture_TestControlPlaneComponents_openstack_cloud_controller_manager_deployment.yaml index 6efc8bb2cdf1..c7e9f0fca48d 100644 --- a/control-plane-operator/controllers/hostedcontrolplane/testdata/openstack-cloud-controller-manager/GCP/zz_fixture_TestControlPlaneComponents_openstack_cloud_controller_manager_deployment.yaml +++ b/control-plane-operator/controllers/hostedcontrolplane/testdata/openstack-cloud-controller-manager/GCP/zz_fixture_TestControlPlaneComponents_openstack_cloud_controller_manager_deployment.yaml @@ -29,6 +29,7 @@ spec: component.hypershift.openshift.io/config-hash: 1cdcee0c hypershift.openshift.io/release-image: quay.io/openshift-release-dev/ocp-release:4.16.10-x86_64 labels: + app: cloud-controller-manager hypershift.openshift.io/control-plane-component: openstack-cloud-controller-manager hypershift.openshift.io/hosted-control-plane: hcp-namespace infrastructure.openshift.io/cloud-controller-manager: OpenStack diff --git a/control-plane-operator/controllers/hostedcontrolplane/testdata/openstack-cloud-controller-manager/IBMCloud/zz_fixture_TestControlPlaneComponents_openstack_cloud_controller_manager_deployment.yaml b/control-plane-operator/controllers/hostedcontrolplane/testdata/openstack-cloud-controller-manager/IBMCloud/zz_fixture_TestControlPlaneComponents_openstack_cloud_controller_manager_deployment.yaml index 17b2e66ea0e5..dcf4611b8a1f 100644 --- a/control-plane-operator/controllers/hostedcontrolplane/testdata/openstack-cloud-controller-manager/IBMCloud/zz_fixture_TestControlPlaneComponents_openstack_cloud_controller_manager_deployment.yaml +++ b/control-plane-operator/controllers/hostedcontrolplane/testdata/openstack-cloud-controller-manager/IBMCloud/zz_fixture_TestControlPlaneComponents_openstack_cloud_controller_manager_deployment.yaml @@ -29,6 +29,7 @@ spec: component.hypershift.openshift.io/config-hash: 1cdcee0c hypershift.openshift.io/release-image: quay.io/openshift-release-dev/ocp-release:4.16.10-x86_64 labels: + app: cloud-controller-manager hypershift.openshift.io/control-plane-component: openstack-cloud-controller-manager hypershift.openshift.io/hosted-control-plane: hcp-namespace infrastructure.openshift.io/cloud-controller-manager: OpenStack diff --git a/control-plane-operator/controllers/hostedcontrolplane/testdata/openstack-cloud-controller-manager/TechPreviewNoUpgrade/zz_fixture_TestControlPlaneComponents_openstack_cloud_controller_manager_deployment.yaml b/control-plane-operator/controllers/hostedcontrolplane/testdata/openstack-cloud-controller-manager/TechPreviewNoUpgrade/zz_fixture_TestControlPlaneComponents_openstack_cloud_controller_manager_deployment.yaml index 17b2e66ea0e5..dcf4611b8a1f 100644 --- a/control-plane-operator/controllers/hostedcontrolplane/testdata/openstack-cloud-controller-manager/TechPreviewNoUpgrade/zz_fixture_TestControlPlaneComponents_openstack_cloud_controller_manager_deployment.yaml +++ b/control-plane-operator/controllers/hostedcontrolplane/testdata/openstack-cloud-controller-manager/TechPreviewNoUpgrade/zz_fixture_TestControlPlaneComponents_openstack_cloud_controller_manager_deployment.yaml @@ -29,6 +29,7 @@ spec: component.hypershift.openshift.io/config-hash: 1cdcee0c hypershift.openshift.io/release-image: quay.io/openshift-release-dev/ocp-release:4.16.10-x86_64 labels: + app: cloud-controller-manager hypershift.openshift.io/control-plane-component: openstack-cloud-controller-manager hypershift.openshift.io/hosted-control-plane: hcp-namespace infrastructure.openshift.io/cloud-controller-manager: OpenStack diff --git a/control-plane-operator/controllers/hostedcontrolplane/testdata/openstack-cloud-controller-manager/zz_fixture_TestControlPlaneComponents_openstack_cloud_controller_manager_deployment.yaml b/control-plane-operator/controllers/hostedcontrolplane/testdata/openstack-cloud-controller-manager/zz_fixture_TestControlPlaneComponents_openstack_cloud_controller_manager_deployment.yaml index 17b2e66ea0e5..dcf4611b8a1f 100644 --- a/control-plane-operator/controllers/hostedcontrolplane/testdata/openstack-cloud-controller-manager/zz_fixture_TestControlPlaneComponents_openstack_cloud_controller_manager_deployment.yaml +++ b/control-plane-operator/controllers/hostedcontrolplane/testdata/openstack-cloud-controller-manager/zz_fixture_TestControlPlaneComponents_openstack_cloud_controller_manager_deployment.yaml @@ -29,6 +29,7 @@ spec: component.hypershift.openshift.io/config-hash: 1cdcee0c hypershift.openshift.io/release-image: quay.io/openshift-release-dev/ocp-release:4.16.10-x86_64 labels: + app: cloud-controller-manager hypershift.openshift.io/control-plane-component: openstack-cloud-controller-manager hypershift.openshift.io/hosted-control-plane: hcp-namespace infrastructure.openshift.io/cloud-controller-manager: OpenStack diff --git a/control-plane-operator/controllers/hostedcontrolplane/v2/assets/cluster-api/deployment.yaml b/control-plane-operator/controllers/hostedcontrolplane/v2/assets/cluster-api/deployment.yaml index 0eb5208281e5..420efe6371f2 100644 --- a/control-plane-operator/controllers/hostedcontrolplane/v2/assets/cluster-api/deployment.yaml +++ b/control-plane-operator/controllers/hostedcontrolplane/v2/assets/cluster-api/deployment.yaml @@ -28,6 +28,8 @@ spec: - --leader-elect-lease-duration=137s - --leader-elect-retry-period=26s - --leader-elect-renew-deadline=107s + - --skip-crd-migration-phases=StorageVersionMigration + - --skip-crd-migration-phases=CleanupManagedFields env: - name: MY_NAMESPACE valueFrom: diff --git a/control-plane-operator/controllers/hostedcontrolplane/v2/assets/openstack-cloud-controller-manager/deployment.yaml b/control-plane-operator/controllers/hostedcontrolplane/v2/assets/openstack-cloud-controller-manager/deployment.yaml index b58c14e27337..cfee328d9a99 100644 --- a/control-plane-operator/controllers/hostedcontrolplane/v2/assets/openstack-cloud-controller-manager/deployment.yaml +++ b/control-plane-operator/controllers/hostedcontrolplane/v2/assets/openstack-cloud-controller-manager/deployment.yaml @@ -14,6 +14,7 @@ spec: template: metadata: labels: + app: cloud-controller-manager infrastructure.openshift.io/cloud-controller-manager: OpenStack k8s-app: openstack-cloud-controller-manager spec: diff --git a/go.mod b/go.mod index 9a6d049c9aeb..897706c8e8cb 100644 --- a/go.mod +++ b/go.mod @@ -56,10 +56,10 @@ 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.6.0 github.com/kubernetes-csi/external-snapshotter/client/v6 v6.3.0 github.com/onsi/ginkgo/v2 v2.31.0 - github.com/onsi/gomega v1.40.0 + github.com/onsi/gomega v1.41.0 github.com/opencontainers/go-digest v1.0.0 github.com/opencontainers/image-spec v1.1.1 github.com/openshift/api v0.0.0-20260416105050-3c6b218b8a80 @@ -117,18 +117,18 @@ 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/kube-storage-version-migrator v0.0.6-0.20230721195810-5c8923c5ff96 sigs.k8s.io/secrets-store-csi-driver v1.4.8 - sigs.k8s.io/structured-merge-diff/v6 v6.3.2 + sigs.k8s.io/structured-merge-diff/v6 v6.4.0 sigs.k8s.io/yaml v1.6.0 ) @@ -223,7 +223,7 @@ require ( github.com/google/s2a-go v0.1.9 // indirect github.com/googleapis/enterprise-certificate-proxy v0.3.15 // indirect github.com/googleapis/gax-go/v2 v2.22.0 // indirect - github.com/gophercloud/gophercloud/v2 v2.10.0 // indirect + github.com/gophercloud/gophercloud/v2 v2.12.0 // indirect github.com/gorilla/mux v1.8.1 // indirect github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674 // indirect github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 // indirect @@ -312,12 +312,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 - // Use our openshift version of karpenter instead of upstream replace github.com/aws/karpenter-provider-aws => github.com/openshift/aws-karpenter-provider-aws v0.0.0-20260311064431-f0be9c72e5bf diff --git a/go.sum b/go.sum index 3abef0cf5f9b..546d396f6034 100644 --- a/go.sum +++ b/go.sum @@ -215,8 +215,8 @@ github.com/coder/websocket v1.8.14 h1:9L0p0iKiNOibykf283eHkKUHHrpG7f65OE3BhhO7v9 github.com/coder/websocket v1.8.14/go.mod h1:NX3SzP+inril6yawo5CQXx8+fk145lPDC6pumgx0mVg= 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= @@ -443,8 +443,8 @@ github.com/googleapis/gax-go/v2 v2.22.0 h1:PjIWBpgGIVKGoCXuiCoP64altEJCj3/Ei+kSU github.com/googleapis/gax-go/v2 v2.22.0/go.mod h1:irWBbALSr0Sk3qlqb9SyJ1h68WjgeFuiOzI4Rqw5+aY= github.com/googleapis/gnostic v0.5.1/go.mod h1:6U4PtQXGIEt/Z3h5MAT7FNofLnw9vXk2cUuW7uA/OeU= github.com/googleapis/gnostic v0.5.5/go.mod h1:7+EbHbldMins07ALC74bsA81Ovc97DwqyJO1AENw9kA= -github.com/gophercloud/gophercloud/v2 v2.10.0 h1:NRadC0aHNvy4iMoFXj5AFiPmut/Sj3hAPAo9B59VMGc= -github.com/gophercloud/gophercloud/v2 v2.10.0/go.mod h1:Ki/ILhYZr/5EPebrPL9Ej+tUg4lqx71/YH2JWVeU+Qk= +github.com/gophercloud/gophercloud/v2 v2.12.0 h1:Gxmc/Bog1UDKkxTcQW7MSPTDviJXpLeEgVeN5KrxoCo= +github.com/gophercloud/gophercloud/v2 v2.12.0/go.mod h1:H7TTOxbLy8RIaHSNhI2GCrWIzw4Xpw8Xn2mBhCUT5kA= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY= github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ= @@ -498,6 +498,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.6.0 h1:KKmdPiec2rzXv8NWWF01qQT6pIp4pILhDTnj45Nq7Uc= +github.com/k-orc/openstack-resource-controller/v2 v2.6.0/go.mod h1:4G1kcWulFGyWqzde7AyCRjA6qpuZ8V4B3O3eluN3djU= 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= @@ -595,8 +597,8 @@ github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7J github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= github.com/onsi/gomega v1.18.1/go.mod h1:0q+aL8jAiMXy9hbwj2mr5GziHiwhAIQpFmmtT5hitRs= -github.com/onsi/gomega v1.40.0 h1:Vtol0e1MghCD2ZVIilPDIg44XSL9l2QAn8ZNaljWcJc= -github.com/onsi/gomega v1.40.0/go.mod h1:M/Uqpu/8qTjtzCLUA2zJHX9Iilrau25x1PdoSRbWh5A= +github.com/onsi/gomega v1.41.0 h1:OwKp4pXNgVxf6sCplzYo794OFNuoL2q2SBMU5NSWOjA= +github.com/onsi/gomega v1.41.0/go.mod h1:M/Uqpu/8qTjtzCLUA2zJHX9Iilrau25x1PdoSRbWh5A= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.1 h1:y0fUlFfIZhPF1W537XOLg0/fcx6zcHCJwooC2xJA040= @@ -695,8 +697,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,12 +1086,10 @@ 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/controller-runtime v0.22.4 h1:GEjV7KV3TY8e+tJ2LCTxUTanW4z/FmNB7l327UfMq9A= -sigs.k8s.io/controller-runtime v0.22.4/go.mod h1:+QX1XUpTXN4mLoblf4tqr5CQcyHPAki2HLXqQMY6vh8= +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.22.5 h1:v3nfSUMowX/2WMp27J9slwGFyAt7IV0YwBxAkrUr0GE= +sigs.k8s.io/controller-runtime v0.22.5/go.mod h1:pc5SoYWnWI6I+cBHYYdZ7B6YHZVY5xNfll88JB+vniI= sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6/go.mod h1:p4QtZmO4uMYipTQNzagwnNoseA6OxSUutVw05NhYDRs= sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 h1:IpInykpT6ceI+QxKBbEflcR5EXP7sU1kvOlxwZh5txg= sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730/go.mod h1:mdzfpAEoE6DHQEN0uh9ZbOCuHbLK5wOm7dK4ctXE9Tg= @@ -1105,8 +1105,8 @@ sigs.k8s.io/secrets-store-csi-driver v1.4.8 h1:YmL0lx9HMYqeZCnLyOZRMuGAZXmP/e42U sigs.k8s.io/secrets-store-csi-driver v1.4.8/go.mod h1:IawZyjzh3xGt6hHdckJUf3ls04O0zG5H550PEZz/beo= sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/structured-merge-diff/v4 v4.2.1/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= -sigs.k8s.io/structured-merge-diff/v6 v6.3.2 h1:kwVWMx5yS1CrnFWA/2QHyRVJ8jM6dBA80uLmm0wJkk8= -sigs.k8s.io/structured-merge-diff/v6 v6.3.2/go.mod h1:M3W8sfWvn2HhQDIbGWj3S099YozAsymCo/wrT5ohRUE= +sigs.k8s.io/structured-merge-diff/v6 v6.4.0 h1:qmp2e3ZfFi1/jJbDGpD4mt3wyp6PE1NfKHCYLqgNQJo= +sigs.k8s.io/structured-merge-diff/v6 v6.4.0/go.mod h1:M3W8sfWvn2HhQDIbGWj3S099YozAsymCo/wrT5ohRUE= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= sigs.k8s.io/yaml v1.6.0 h1:G8fkbMSAFqgEFgh4b1wmtzDnioxFCUgTZhlbj5P9QYs= diff --git a/hypershift-operator/controllers/hostedcluster/hostedcluster_controller.go b/hypershift-operator/controllers/hostedcluster/hostedcluster_controller.go index a5a1e3c45e64..79e9d6edc15a 100644 --- a/hypershift-operator/controllers/hostedcluster/hostedcluster_controller.go +++ b/hypershift-operator/controllers/hostedcluster/hostedcluster_controller.go @@ -99,6 +99,7 @@ import ( "k8s.io/utils/clock" "k8s.io/utils/ptr" + capov1alpha1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1alpha1" capiv1 "sigs.k8s.io/cluster-api/api/core/v1beta1" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/builder" @@ -113,6 +114,7 @@ import ( "github.com/blang/semver" "github.com/go-logr/logr" "github.com/google/uuid" + orcv1alpha1 "github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1" prometheusoperatorv1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1" "gopkg.in/ini.v1" ) @@ -3647,6 +3649,82 @@ func deleteGCPPrivateServiceConnect(ctx context.Context, c client.Client, _ *hyp return false, nil } +// deleteOpenStackOrcImages deletes all ORC Image CRs in the control plane namespace and waits for +// them to be fully removed. ORC Images have a finalizer that is only removed after the controller +// has deleted the corresponding Glance image. This must complete before the namespace is deleted, +// because namespace deletion terminates the CAPO/ORC pod, leaving the finalizer permanently stuck. +func deleteOpenStackOrcImages(ctx context.Context, c client.Client, namespace string) (bool, error) { + imageList := &orcv1alpha1.ImageList{} + if err := c.List(ctx, imageList, &client.ListOptions{Namespace: namespace}); err != nil { + if apierrors.IsNotFound(err) || meta.IsNoMatchError(err) { + return false, nil + } + return false, fmt.Errorf("error listing ORC Images in namespace %s: %w", namespace, err) + } + for i := range imageList.Items { + img := &imageList.Items[i] + if img.DeletionTimestamp != nil { + continue + } + if err := c.Delete(ctx, img); err != nil && !apierrors.IsNotFound(err) { + return false, fmt.Errorf("error deleting ORC Image %s in namespace %s: %w", img.Name, namespace, err) + } + } + return len(imageList.Items) != 0, nil +} + +// removeOpenStackOrcSecretFinalizers strips the ORC image finalizer from any Secrets in the control plane +// namespace. ORC places a finalizer (openstack.k-orc.cloud/image) on the cloud-credentials Secret referenced +// by Image CRs to prevent the Secret from being deleted while the Image still needs it. Once all ORC Image CRs +// are gone, the finalizer serves no purpose but will block namespace deletion if it hasn't been removed — the +// ORC controller that would normally remove it is killed when the HCP is torn down. +func removeOpenStackOrcSecretFinalizers(ctx context.Context, c client.Client, namespace string) error { + const orcImageFinalizer = "openstack.k-orc.cloud/image" + + secretList := &corev1.SecretList{} + if err := c.List(ctx, secretList, &client.ListOptions{Namespace: namespace}); err != nil { + return fmt.Errorf("error listing Secrets in namespace %s: %w", namespace, err) + } + for i := range secretList.Items { + secret := &secretList.Items[i] + if !controllerutil.ContainsFinalizer(secret, orcImageFinalizer) { + continue + } + controllerutil.RemoveFinalizer(secret, orcImageFinalizer) + if err := c.Update(ctx, secret); err != nil { + if apierrors.IsNotFound(err) { + continue + } + return fmt.Errorf("error removing ORC finalizer from Secret %s in namespace %s: %w", secret.Name, namespace, err) + } + } + return nil +} + +// deleteOpenStackCAPOServers deletes all CAPO OpenStackServer CRs in the control plane namespace and waits for +// them to be fully removed. OpenStackServer objects have a finalizer managed by the CAPO controller, which runs +// in the control plane namespace. This must complete before the namespace is deleted, because namespace deletion +// terminates the CAPO pod, leaving the finalizer permanently stuck. +func deleteOpenStackCAPOServers(ctx context.Context, c client.Client, namespace string) (bool, error) { + serverList := &capov1alpha1.OpenStackServerList{} + if err := c.List(ctx, serverList, &client.ListOptions{Namespace: namespace}); err != nil { + if apierrors.IsNotFound(err) || meta.IsNoMatchError(err) { + return false, nil + } + return false, fmt.Errorf("error listing OpenStackServers in namespace %s: %w", namespace, err) + } + for i := range serverList.Items { + srv := &serverList.Items[i] + if srv.DeletionTimestamp != nil { + continue + } + if err := c.Delete(ctx, srv); err != nil && !apierrors.IsNotFound(err) { + return false, fmt.Errorf("error deleting OpenStackServer %s in namespace %s: %w", srv.Name, namespace, err) + } + } + return len(serverList.Items) != 0, nil +} + func deleteControlPlaneOperatorRBAC(ctx context.Context, c client.Client, rbacNamespace string, controlPlaneNamespace string) error { if _, err := k8sutil.DeleteIfNeeded(ctx, c, &rbacv1.Role{ObjectMeta: metav1.ObjectMeta{Name: "control-plane-operator-" + controlPlaneNamespace, Namespace: rbacNamespace}}); err != nil { return err @@ -3772,6 +3850,30 @@ func (r *HostedClusterReconciler) delete(ctx context.Context, hc *hyperv1.Hosted } } + if hc.Spec.Platform.Type == hyperv1.OpenStackPlatform { + exists, err := deleteOpenStackOrcImages(ctx, r.Client, controlPlaneNamespace) + if err != nil { + return false, err + } + if exists { + log.Info("Waiting for ORC Image deletion", "controlPlaneNamespace", controlPlaneNamespace) + return false, nil + } + + if err := removeOpenStackOrcSecretFinalizers(ctx, r.Client, controlPlaneNamespace); err != nil { + return false, err + } + + exists, err = deleteOpenStackCAPOServers(ctx, r.Client, controlPlaneNamespace) + if err != nil { + return false, err + } + if exists { + log.Info("Waiting for OpenStackServer deletion", "controlPlaneNamespace", controlPlaneNamespace) + return false, nil + } + } + if r.ManagementClusterCapabilities.Has(capabilities.CapabilityRoute) { err = deleteControlPlaneOperatorRBAC(ctx, r.Client, "openshift-ingress", controlPlaneNamespace) if err != nil { diff --git a/hypershift-operator/controllers/hostedcluster/hostedcluster_controller_test.go b/hypershift-operator/controllers/hostedcluster/hostedcluster_controller_test.go index 436ed7629241..fcb01733e739 100644 --- a/hypershift-operator/controllers/hostedcluster/hostedcluster_controller_test.go +++ b/hypershift-operator/controllers/hostedcluster/hostedcluster_controller_test.go @@ -69,6 +69,7 @@ import ( capiaws "sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2" capibmv1 "sigs.k8s.io/cluster-api-provider-ibmcloud/api/v1beta2" + capov1alpha1 "sigs.k8s.io/cluster-api-provider-openstack/api/v1alpha1" "sigs.k8s.io/cluster-api/api/core/v1beta1" ctrl "sigs.k8s.io/controller-runtime" crclient "sigs.k8s.io/controller-runtime/pkg/client" @@ -83,6 +84,7 @@ import ( "github.com/docker/distribution/manifest/manifestlist" "github.com/go-logr/logr" "github.com/google/go-cmp/cmp" + orcv1alpha1 "github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1" "go.uber.org/mock/gomock" "go.uber.org/zap/zapcore" ) @@ -7422,6 +7424,472 @@ func TestReconcileCLISecretsErrors(t *testing.T) { } } +func TestDeleteOpenStackOrcImages(t *testing.T) { + t.Parallel() + + namespace := "test-cp-namespace" + now := metav1.Now() + + testCases := []struct { + name string + existingImages []orcv1alpha1.Image + listInterceptor func(ctx context.Context, client crclient.WithWatch, list crclient.ObjectList, opts ...crclient.ListOption) error + deleteInterceptor func(ctx context.Context, client crclient.WithWatch, obj crclient.Object, opts ...crclient.DeleteOption) error + wantExists bool + wantErr bool + wantErrSubstr string + }{ + { + name: "When no images exist, it should return false with no error", + existingImages: nil, + wantExists: false, + wantErr: false, + }, + { + name: "When images without deletion timestamp exist, it should delete them and return true", + existingImages: []orcv1alpha1.Image{ + {ObjectMeta: metav1.ObjectMeta{Name: "img-a", Namespace: namespace}}, + {ObjectMeta: metav1.ObjectMeta{Name: "img-b", Namespace: namespace}}, + }, + wantExists: true, + wantErr: false, + }, + { + name: "When images with deletion timestamp exist, it should not re-delete them and return true", + existingImages: []orcv1alpha1.Image{ + {ObjectMeta: metav1.ObjectMeta{Name: "img-a", Namespace: namespace, DeletionTimestamp: &now, Finalizers: []string{"openstack.k-orc.cloud/image"}}}, + }, + wantExists: true, + wantErr: false, + }, + { + name: "When some images have deletion timestamp and some do not, it should delete pending ones and return true", + existingImages: []orcv1alpha1.Image{ + {ObjectMeta: metav1.ObjectMeta{Name: "img-deleting", Namespace: namespace, DeletionTimestamp: &now, Finalizers: []string{"openstack.k-orc.cloud/image"}}}, + {ObjectMeta: metav1.ObjectMeta{Name: "img-pending", Namespace: namespace}}, + }, + wantExists: true, + wantErr: false, + }, + { + name: "When listing returns NotFound error, it should return false with no error", + listInterceptor: func(_ context.Context, _ crclient.WithWatch, _ crclient.ObjectList, _ ...crclient.ListOption) error { + return errors2.NewNotFound(orcv1alpha1.SchemeGroupVersion.WithResource("images").GroupResource(), "") + }, + wantExists: false, + wantErr: false, + }, + { + name: "When listing returns NoMatchError, it should return false with no error", + listInterceptor: func(_ context.Context, _ crclient.WithWatch, _ crclient.ObjectList, _ ...crclient.ListOption) error { + return &meta.NoKindMatchError{} + }, + wantExists: false, + wantErr: false, + }, + { + name: "When listing returns an unexpected error, it should return the error", + listInterceptor: func(_ context.Context, _ crclient.WithWatch, _ crclient.ObjectList, _ ...crclient.ListOption) error { + return fmt.Errorf("internal server error") + }, + wantExists: false, + wantErr: true, + wantErrSubstr: "error listing ORC Images", + }, + { + name: "When deletion returns NotFound, it should treat it as success and return true", + existingImages: []orcv1alpha1.Image{ + {ObjectMeta: metav1.ObjectMeta{Name: "img-a", Namespace: namespace}}, + }, + deleteInterceptor: func(_ context.Context, _ crclient.WithWatch, obj crclient.Object, _ ...crclient.DeleteOption) error { + return errors2.NewNotFound(orcv1alpha1.SchemeGroupVersion.WithResource("images").GroupResource(), obj.GetName()) + }, + wantExists: true, + wantErr: false, + }, + { + name: "When deletion returns an unexpected error, it should return the error", + existingImages: []orcv1alpha1.Image{ + {ObjectMeta: metav1.ObjectMeta{Name: "img-a", Namespace: namespace}}, + }, + deleteInterceptor: func(_ context.Context, _ crclient.WithWatch, _ crclient.Object, _ ...crclient.DeleteOption) error { + return fmt.Errorf("internal server error") + }, + wantExists: false, + wantErr: true, + wantErrSubstr: "error deleting ORC Image", + }, + } + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + t.Parallel() + g := NewWithT(t) + + objs := make([]crclient.Object, len(tc.existingImages)) + for i := range tc.existingImages { + objs[i] = &tc.existingImages[i] + } + + funcs := interceptor.Funcs{} + if tc.listInterceptor != nil { + funcs.List = tc.listInterceptor + } + if tc.deleteInterceptor != nil { + funcs.Delete = tc.deleteInterceptor + } + + c := fake.NewClientBuilder(). + WithScheme(api.Scheme). + WithObjects(objs...). + WithInterceptorFuncs(funcs). + Build() + + exists, err := deleteOpenStackOrcImages(context.Background(), c, namespace) + + if tc.wantErr { + g.Expect(err).To(HaveOccurred()) + if tc.wantErrSubstr != "" { + g.Expect(err.Error()).To(ContainSubstring(tc.wantErrSubstr)) + } + } else { + g.Expect(err).ToNot(HaveOccurred()) + } + g.Expect(exists).To(Equal(tc.wantExists)) + }) + } +} + +func TestRemoveOpenStackOrcSecretFinalizers(t *testing.T) { + t.Parallel() + + namespace := "test-cp-namespace" + const orcImageFinalizer = "openstack.k-orc.cloud/image" + + testCases := []struct { + name string + existingSecrets []corev1.Secret + updateInterceptor func(ctx context.Context, client crclient.WithWatch, obj crclient.Object, opts ...crclient.UpdateOption) error + wantErr bool + wantErrSubstr string + wantFinalizers map[string][]string // secret name -> expected finalizers after the call + }{ + { + name: "When no secrets exist, it should return no error", + existingSecrets: nil, + wantErr: false, + }, + { + name: "When secrets without ORC finalizer exist, it should leave them unchanged", + existingSecrets: []corev1.Secret{ + {ObjectMeta: metav1.ObjectMeta{Name: "unrelated", Namespace: namespace, Finalizers: []string{"other-finalizer"}}}, + }, + wantErr: false, + wantFinalizers: map[string][]string{"unrelated": {"other-finalizer"}}, + }, + { + name: "When a secret has the ORC finalizer, it should remove it", + existingSecrets: []corev1.Secret{ + {ObjectMeta: metav1.ObjectMeta{Name: "cloud-creds", Namespace: namespace, Finalizers: []string{orcImageFinalizer}}}, + }, + wantErr: false, + wantFinalizers: map[string][]string{"cloud-creds": nil}, + }, + { + name: "When a secret has the ORC finalizer among others, it should remove only the ORC finalizer", + existingSecrets: []corev1.Secret{ + {ObjectMeta: metav1.ObjectMeta{Name: "cloud-creds", Namespace: namespace, Finalizers: []string{"keep-me", orcImageFinalizer, "also-keep"}}}, + }, + wantErr: false, + wantFinalizers: map[string][]string{"cloud-creds": {"keep-me", "also-keep"}}, + }, + { + name: "When multiple secrets have the ORC finalizer, it should remove it from all", + existingSecrets: []corev1.Secret{ + {ObjectMeta: metav1.ObjectMeta{Name: "creds-a", Namespace: namespace, Finalizers: []string{orcImageFinalizer}}}, + {ObjectMeta: metav1.ObjectMeta{Name: "creds-b", Namespace: namespace, Finalizers: []string{orcImageFinalizer}}}, + }, + wantErr: false, + wantFinalizers: map[string][]string{"creds-a": nil, "creds-b": nil}, + }, + { + name: "When update returns NotFound, it should skip the secret", + existingSecrets: []corev1.Secret{ + {ObjectMeta: metav1.ObjectMeta{Name: "gone", Namespace: namespace, Finalizers: []string{orcImageFinalizer}}}, + }, + updateInterceptor: func(_ context.Context, _ crclient.WithWatch, _ crclient.Object, _ ...crclient.UpdateOption) error { + return errors2.NewNotFound(corev1.SchemeGroupVersion.WithResource("secrets").GroupResource(), "gone") + }, + wantErr: false, + }, + { + name: "When update returns an unexpected error, it should return the error", + existingSecrets: []corev1.Secret{ + {ObjectMeta: metav1.ObjectMeta{Name: "cloud-creds", Namespace: namespace, Finalizers: []string{orcImageFinalizer}}}, + }, + updateInterceptor: func(_ context.Context, _ crclient.WithWatch, _ crclient.Object, _ ...crclient.UpdateOption) error { + return fmt.Errorf("internal server error") + }, + wantErr: true, + wantErrSubstr: "error removing ORC finalizer from Secret", + }, + } + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + t.Parallel() + g := NewWithT(t) + + objs := make([]crclient.Object, len(tc.existingSecrets)) + for i := range tc.existingSecrets { + objs[i] = &tc.existingSecrets[i] + } + + funcs := interceptor.Funcs{} + if tc.updateInterceptor != nil { + funcs.Update = tc.updateInterceptor + } + + c := fake.NewClientBuilder(). + WithScheme(api.Scheme). + WithObjects(objs...). + WithInterceptorFuncs(funcs). + Build() + + err := removeOpenStackOrcSecretFinalizers(context.Background(), c, namespace) + + if tc.wantErr { + g.Expect(err).To(HaveOccurred()) + if tc.wantErrSubstr != "" { + g.Expect(err.Error()).To(ContainSubstring(tc.wantErrSubstr)) + } + } else { + g.Expect(err).ToNot(HaveOccurred()) + } + + for secretName, expectedFinalizers := range tc.wantFinalizers { + var secret corev1.Secret + err := c.Get(context.Background(), crclient.ObjectKey{Namespace: namespace, Name: secretName}, &secret) + g.Expect(err).ToNot(HaveOccurred()) + if len(expectedFinalizers) == 0 { + g.Expect(secret.Finalizers).To(BeEmpty()) + } else { + g.Expect(secret.Finalizers).To(Equal(expectedFinalizers)) + } + } + }) + } +} + +func TestDeleteOpenStackCAPOServers(t *testing.T) { + t.Parallel() + + namespace := "test-cp-namespace" + now := metav1.Now() + + testCases := []struct { + name string + existingServers []capov1alpha1.OpenStackServer + listInterceptor func(ctx context.Context, client crclient.WithWatch, list crclient.ObjectList, opts ...crclient.ListOption) error + deleteInterceptor func(ctx context.Context, client crclient.WithWatch, obj crclient.Object, opts ...crclient.DeleteOption) error + wantExists bool + wantErr bool + wantErrSubstr string + }{ + { + name: "When no servers exist, it should return false with no error", + existingServers: nil, + wantExists: false, + wantErr: false, + }, + { + name: "When servers without deletion timestamp exist, it should delete them and return true", + existingServers: []capov1alpha1.OpenStackServer{ + {ObjectMeta: metav1.ObjectMeta{Name: "srv-a", Namespace: namespace}}, + {ObjectMeta: metav1.ObjectMeta{Name: "srv-b", Namespace: namespace}}, + }, + wantExists: true, + wantErr: false, + }, + { + name: "When servers with deletion timestamp exist, it should not re-delete them and return true", + existingServers: []capov1alpha1.OpenStackServer{ + {ObjectMeta: metav1.ObjectMeta{Name: "srv-a", Namespace: namespace, DeletionTimestamp: &now, Finalizers: []string{capov1alpha1.OpenStackServerFinalizer}}}, + }, + wantExists: true, + wantErr: false, + }, + { + name: "When some servers have deletion timestamp and some do not, it should delete pending ones and return true", + existingServers: []capov1alpha1.OpenStackServer{ + {ObjectMeta: metav1.ObjectMeta{Name: "srv-deleting", Namespace: namespace, DeletionTimestamp: &now, Finalizers: []string{capov1alpha1.OpenStackServerFinalizer}}}, + {ObjectMeta: metav1.ObjectMeta{Name: "srv-pending", Namespace: namespace}}, + }, + wantExists: true, + wantErr: false, + }, + { + name: "When listing returns NotFound error, it should return false with no error", + listInterceptor: func(_ context.Context, _ crclient.WithWatch, _ crclient.ObjectList, _ ...crclient.ListOption) error { + return errors2.NewNotFound(capov1alpha1.SchemeGroupVersion.WithResource("openstackservers").GroupResource(), "") + }, + wantExists: false, + wantErr: false, + }, + { + name: "When listing returns NoMatchError, it should return false with no error", + listInterceptor: func(_ context.Context, _ crclient.WithWatch, _ crclient.ObjectList, _ ...crclient.ListOption) error { + return &meta.NoKindMatchError{} + }, + wantExists: false, + wantErr: false, + }, + { + name: "When listing returns an unexpected error, it should return the error", + listInterceptor: func(_ context.Context, _ crclient.WithWatch, _ crclient.ObjectList, _ ...crclient.ListOption) error { + return fmt.Errorf("internal server error") + }, + wantExists: false, + wantErr: true, + wantErrSubstr: "error listing OpenStackServers", + }, + { + name: "When deletion returns NotFound, it should treat it as success and return true", + existingServers: []capov1alpha1.OpenStackServer{ + {ObjectMeta: metav1.ObjectMeta{Name: "srv-a", Namespace: namespace}}, + }, + deleteInterceptor: func(_ context.Context, _ crclient.WithWatch, obj crclient.Object, _ ...crclient.DeleteOption) error { + return errors2.NewNotFound(capov1alpha1.SchemeGroupVersion.WithResource("openstackservers").GroupResource(), obj.GetName()) + }, + wantExists: true, + wantErr: false, + }, + { + name: "When deletion returns an unexpected error, it should return the error", + existingServers: []capov1alpha1.OpenStackServer{ + {ObjectMeta: metav1.ObjectMeta{Name: "srv-a", Namespace: namespace}}, + }, + deleteInterceptor: func(_ context.Context, _ crclient.WithWatch, _ crclient.Object, _ ...crclient.DeleteOption) error { + return fmt.Errorf("internal server error") + }, + wantExists: false, + wantErr: true, + wantErrSubstr: "error deleting OpenStackServer", + }, + } + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + t.Parallel() + g := NewWithT(t) + + objs := make([]crclient.Object, len(tc.existingServers)) + for i := range tc.existingServers { + objs[i] = &tc.existingServers[i] + } + + funcs := interceptor.Funcs{} + if tc.listInterceptor != nil { + funcs.List = tc.listInterceptor + } + if tc.deleteInterceptor != nil { + funcs.Delete = tc.deleteInterceptor + } + + c := fake.NewClientBuilder(). + WithScheme(api.Scheme). + WithObjects(objs...). + WithInterceptorFuncs(funcs). + Build() + + exists, err := deleteOpenStackCAPOServers(context.Background(), c, namespace) + + if tc.wantErr { + g.Expect(err).To(HaveOccurred()) + if tc.wantErrSubstr != "" { + g.Expect(err.Error()).To(ContainSubstring(tc.wantErrSubstr)) + } + } else { + g.Expect(err).ToNot(HaveOccurred()) + } + g.Expect(exists).To(Equal(tc.wantExists)) + }) + } +} + +func TestDeleteOrcImagesDuringHostedClusterDeletion(t *testing.T) { + t.Parallel() + + const ( + hcNamespace = "test-namespace" + hcName = "test-cluster" + ) + cpNamespace := hcpmanifests.HostedControlPlaneNamespace(hcNamespace, hcName) + + testCases := []struct { + name string + platformType hyperv1.PlatformType + orcImages []orcv1alpha1.Image + wantDone bool + }{ + { + name: "When platform is not OpenStack, it should proceed without waiting for ORC image deletion", + platformType: hyperv1.NonePlatform, + orcImages: []orcv1alpha1.Image{ + {ObjectMeta: metav1.ObjectMeta{Name: "stale-image", Namespace: cpNamespace}}, + }, + wantDone: true, + }, + { + name: "When platform is OpenStack and ORC images still exist, it should return false to wait for their deletion", + platformType: hyperv1.OpenStackPlatform, + orcImages: []orcv1alpha1.Image{ + {ObjectMeta: metav1.ObjectMeta{Name: "pending-image", Namespace: cpNamespace}}, + }, + wantDone: false, + }, + { + name: "When platform is OpenStack and no ORC images remain, it should proceed with deletion", + platformType: hyperv1.OpenStackPlatform, + orcImages: nil, + wantDone: true, + }, + } + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + t.Parallel() + g := NewWithT(t) + + hc := &hyperv1.HostedCluster{ + ObjectMeta: metav1.ObjectMeta{ + Name: hcName, + Namespace: hcNamespace, + }, + Spec: hyperv1.HostedClusterSpec{ + Platform: hyperv1.PlatformSpec{Type: tc.platformType}, + }, + } + + objs := []crclient.Object{hc} + for i := range tc.orcImages { + objs = append(objs, &tc.orcImages[i]) + } + + fakeClient := fake.NewClientBuilder().WithScheme(api.Scheme).WithObjects(objs...).Build() + r := &HostedClusterReconciler{ + Client: fakeClient, + ManagementClusterCapabilities: &fakecapabilities.FakeSupportNoCapabilities{}, + KubevirtInfraClients: kvinfra.NewKubevirtInfraClientMap(), + } + + done, err := r.delete(context.Background(), hc) + g.Expect(err).ToNot(HaveOccurred()) + g.Expect(done).To(Equal(tc.wantDone)) + }) + } +} + func TestKasServingCertHashFromEndpoint(t *testing.T) { t.Parallel() tests := []struct { diff --git a/hypershift-operator/controllers/hostedcluster/internal/platform/openstack/openstack.go b/hypershift-operator/controllers/hostedcluster/internal/platform/openstack/openstack.go index 523b81a6f342..4ce567002fe9 100644 --- a/hypershift-operator/controllers/hostedcluster/internal/platform/openstack/openstack.go +++ b/hypershift-operator/controllers/hostedcluster/internal/platform/openstack/openstack.go @@ -225,6 +225,14 @@ func (a OpenStack) CAPIProviderDeploymentSpec(hcluster *hyperv1.HostedCluster, _ "--namespace=$(MY_NAMESPACE)", "--leader-elect", "--v=2", + // HyperShift runs CAPO in a namespace-scoped deployment and manages CRDs + // itself. CAPO v0.14 introduced a crdmigrator controller that requires + // cluster-scoped RBAC (list openstackclusteridentities, patch + // customresourcedefinitions) that we do not and cannot grant. Skipping + // all phases causes crdmigrator.SetupWithManager to return early without + // registering the controller, eliminating the spurious RBAC errors. + "--skip-crd-migration-phases=StorageVersionMigration", + "--skip-crd-migration-phases=CleanupManagedFields", }, Resources: corev1.ResourceRequirements{ Requests: corev1.ResourceList{ @@ -441,9 +449,10 @@ func (a OpenStack) CAPIProviderPolicyRules() []rbacv1.PolicyRule { }, // We deploy ORC in the same namespace as the CAPI provider, so we need to create the // necessary RBAC policy rules for ORC to manage the OpenStack resources. + // Note that we use a wildcard here ORC has a lot of resources. { APIGroups: []string{"openstack.k-orc.cloud"}, - Resources: []string{"images", "images/status"}, + Resources: []string{"*"}, Verbs: []string{rbacv1.VerbAll}, }, } diff --git a/hypershift-operator/controllers/hostedcluster/internal/platform/openstack/openstack_test.go b/hypershift-operator/controllers/hostedcluster/internal/platform/openstack/openstack_test.go index 7196d200d50d..faa7adcf85f7 100644 --- a/hypershift-operator/controllers/hostedcluster/internal/platform/openstack/openstack_test.go +++ b/hypershift-operator/controllers/hostedcluster/internal/platform/openstack/openstack_test.go @@ -302,6 +302,8 @@ func TestCAPIProviderDeploymentSpec(t *testing.T) { "--namespace=$(MY_NAMESPACE)", "--leader-elect", "--v=2", + "--skip-crd-migration-phases=StorageVersionMigration", + "--skip-crd-migration-phases=CleanupManagedFields", }, Resources: corev1.ResourceRequirements{ Requests: corev1.ResourceList{ @@ -411,6 +413,8 @@ func TestCAPIProviderDeploymentSpec(t *testing.T) { "--namespace=$(MY_NAMESPACE)", "--leader-elect", "--v=2", + "--skip-crd-migration-phases=StorageVersionMigration", + "--skip-crd-migration-phases=CleanupManagedFields", }, Resources: corev1.ResourceRequirements{ Requests: corev1.ResourceList{ diff --git a/hypershift-operator/controllers/hostedcluster/testdata/cluster-api/zz_fixture_TestReconcileComponents.yaml b/hypershift-operator/controllers/hostedcluster/testdata/cluster-api/zz_fixture_TestReconcileComponents.yaml index ca6ee942b800..01cea84bdc3a 100644 --- a/hypershift-operator/controllers/hostedcluster/testdata/cluster-api/zz_fixture_TestReconcileComponents.yaml +++ b/hypershift-operator/controllers/hostedcluster/testdata/cluster-api/zz_fixture_TestReconcileComponents.yaml @@ -68,6 +68,8 @@ spec: - --leader-elect-lease-duration=137s - --leader-elect-retry-period=26s - --leader-elect-renew-deadline=107s + - --skip-crd-migration-phases=StorageVersionMigration + - --skip-crd-migration-phases=CleanupManagedFields env: - name: MY_NAMESPACE valueFrom: diff --git a/hypershift-operator/controllers/nodepool/openstack.go b/hypershift-operator/controllers/nodepool/openstack.go index bd9773caa737..09f1340aba19 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 48110bd40d1a..dada4b8ffa63 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", @@ -166,10 +166,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 17da96ff3326..1ca26db5fe76 100644 --- a/hypershift-operator/controllers/nodepool/openstack/openstack_test.go +++ b/hypershift-operator/controllers/nodepool/openstack/openstack_test.go @@ -15,7 +15,7 @@ import ( "github.com/coreos/stream-metadata-go/stream" "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" @@ -424,7 +424,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", @@ -499,7 +499,7 @@ func TestClusterImageName(t *testing.T) { name string hostedCluster *hyperv1.HostedCluster releaseImage *releaseinfo.ReleaseImage - expectedResult string + expectedResult orc.OpenStackName expectedError bool }{ { @@ -523,7 +523,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 e8bd573a1c90..2dcdf29e17d7 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/test/e2e/util/util.go b/test/e2e/util/util.go index 27359db6b2a6..2e7f92476299 100644 --- a/test/e2e/util/util.go +++ b/test/e2e/util/util.go @@ -2311,6 +2311,13 @@ func EnsureKubeAPIDNSNameCustomCert(t *testing.T, ctx context.Context, mgmtClien t.Skip("Skipping EnsureKubeAPIDNSNameCustomCert test for kubevirt") } + // FIXME(stephenfin): investigate why this fails on OpenStack. DNS resolves + // correctly (external-dns is deployed) but the KAS is unreachable at the + // custom DNS name, returning i/o timeouts on TCP connect to the ELB IP. + if entryHostedCluster.Spec.Platform.Type == hyperv1.OpenStackPlatform { + t.Skip("Skipping EnsureKubeAPIDNSNameCustomCert test for OpenStack") + } + serviceDomain, retryTimeout := customCertDNSConfig(t, entryHostedCluster, clusterOpts) var ( diff --git a/vendor/github.com/gophercloud/gophercloud/v2/.golangci.yaml b/vendor/github.com/gophercloud/gophercloud/v2/.golangci.yaml index 828a099a40cc..2de1155c037a 100644 --- a/vendor/github.com/gophercloud/gophercloud/v2/.golangci.yaml +++ b/vendor/github.com/gophercloud/gophercloud/v2/.golangci.yaml @@ -1,19 +1,34 @@ ---- +version: "2" linters: - disable-all: true + default: none enable: - errcheck - - gofmt - - goimports - govet - staticcheck - unparam - unused - -issues: - exclude: - - SA1006 # printf-style function with dynamic format string and no further arguments should use print-style function instead (staticcheck) - exclude-rules: - - linters: - - staticcheck - text: 'SA1019: (x509.EncryptPEMBlock|strings.Title)' + exclusions: + generated: lax + presets: + - comments + - common-false-positives + - legacy + - std-error-handling + rules: + - linters: + - staticcheck + text: "SA1019: (x509.EncryptPEMBlock|strings.Title)" + paths: + - third_party$ + - builtin$ + - examples$ +formatters: + enable: + - gofmt + - goimports + exclusions: + generated: lax + paths: + - third_party$ + - builtin$ + - examples$ diff --git a/vendor/github.com/gophercloud/gophercloud/v2/CHANGELOG.md b/vendor/github.com/gophercloud/gophercloud/v2/CHANGELOG.md index d53f641b8ad8..5d0a140d0312 100644 --- a/vendor/github.com/gophercloud/gophercloud/v2/CHANGELOG.md +++ b/vendor/github.com/gophercloud/gophercloud/v2/CHANGELOG.md @@ -1,3 +1,41 @@ +## v2.12.0 (2026-04-10) + +* [GH-3653](https://github.com/gophercloud/gophercloud/pull/3653) [v2] Fix clouds.yaml search path to use XDG convention on all platforms +* [GH-3660](https://github.com/gophercloud/gophercloud/pull/3660) [v2] Use jammy amphora in octavia epoxy job +* [GH-3670](https://github.com/gophercloud/gophercloud/pull/3670) [v2] Implement READ operations on Placement traits +* [GH-3673](https://github.com/gophercloud/gophercloud/pull/3673) [v2] Github action fixes +* [GH-3674](https://github.com/gophercloud/gophercloud/pull/3674) [v2] Update acceptance README to remove mentions of Packstack +* [GH-3678](https://github.com/gophercloud/gophercloud/pull/3678) [v2] Implement CREATE/UPDATE operation on Placement traits +* [GH-3679](https://github.com/gophercloud/gophercloud/pull/3679) [v2] Implement DELETE operations on Placement traits +* [GH-3682](https://github.com/gophercloud/gophercloud/pull/3682) [v2] Implement resource_classes GET operations +* [GH-3683](https://github.com/gophercloud/gophercloud/pull/3683) [v2] Implement resource classes CREATE operations +* [GH-3684](https://github.com/gophercloud/gophercloud/pull/3684) [v2] Implement resource classes DELETE operation +* [GH-3690](https://github.com/gophercloud/gophercloud/pull/3690) [v2] Add metric-storage (Aetos) v1 service support +* [GH-3691](https://github.com/gophercloud/gophercloud/pull/3691) [v2] Implement GET/UPDATE/DELETE operations on Placement resource providers inventories +* [GH-3692](https://github.com/gophercloud/gophercloud/pull/3692) [v2] Fix TestCreateTempURL flaky test by removing hardcoded port dependency +* [GH-3695](https://github.com/gophercloud/gophercloud/pull/3695) [v2] Remove legacy workflows +* [GH-3698](https://github.com/gophercloud/gophercloud/pull/3698) build(deps): bump golang.org/x/crypto from 0.33.0 to 0.49.0 +* [GH-3699](https://github.com/gophercloud/gophercloud/pull/3699) build(deps): bump actions/setup-go from 6.3.0 to 6.4.0 +* [GH-3700](https://github.com/gophercloud/gophercloud/pull/3700) build(deps): bump github/codeql-action from 4.34.1 to 4.35.1 +* [GH-3703](https://github.com/gophercloud/gophercloud/pull/3703) [v2] CI: prefer github mirrors whenever possible +* [GH-3708](https://github.com/gophercloud/gophercloud/pull/3708) [v2] Implement Placement allocationcandidates + +## v2.11.1 (2026-03-10) + +* [GH-3648](https://github.com/gophercloud/gophercloud/pull/3648) [v2] Do not specify go patch version + +## v2.11.0 (2026-03-04) + +* [GH-3602](https://github.com/gophercloud/gophercloud/pull/3602) [v2] Add PCIAddress field to baremetal InterfaceType +* [GH-3610](https://github.com/gophercloud/gophercloud/pull/3610) [v2] Networking V2: Added support for ML2 extension port_trusted_vif +* [GH-3611](https://github.com/gophercloud/gophercloud/pull/3611) [v2] networking/v2/layer3/routers: Add external gateways management +* [GH-3625](https://github.com/gophercloud/gophercloud/pull/3625) [v2] Use jimmy amphora in octavia job +* [GH-3629](https://github.com/gophercloud/gophercloud/pull/3629) [v2] Add a new Ironic field representing node health to Gophercloud +* [GH-3630](https://github.com/gophercloud/gophercloud/pull/3630) [v2] Bump go +* [GH-3632](https://github.com/gophercloud/gophercloud/pull/3632) [v2] CI: Fix fwaas jobs +* [GH-3633](https://github.com/gophercloud/gophercloud/pull/3633) [v2] Add TSIG key support for OpenStack DNS v2 API +* [GH-3640](https://github.com/gophercloud/gophercloud/pull/3640) [v2] fix: networkipavailabilities: handle scientific notation in IP counts + ## v2.10.0 (2026-01-05) * [GH-3569](https://github.com/gophercloud/gophercloud/pull/3569) identity/role: restore backward compatibility for description diff --git a/vendor/github.com/gophercloud/gophercloud/v2/Makefile b/vendor/github.com/gophercloud/gophercloud/v2/Makefile index c63adb8d0319..6b9d043cf255 100644 --- a/vendor/github.com/gophercloud/gophercloud/v2/Makefile +++ b/vendor/github.com/gophercloud/gophercloud/v2/Makefile @@ -1,7 +1,7 @@ undefine GOFLAGS -GOLANGCI_LINT_VERSION?=v1.62.2 -GOTESTSUM_VERSION?=v1.12.2 +GOLANGCI_LINT_VERSION?=v2.5.0 +GOTESTSUM_VERSION?=v1.13.0 GO_TEST?=go run gotest.tools/gotestsum@$(GOTESTSUM_VERSION) --format testname -- TIMEOUT := "60m" @@ -43,7 +43,7 @@ coverage: $(GO_TEST) -shuffle on -covermode count -coverprofile cover.out -coverpkg=./... ./... .PHONY: coverage -acceptance: acceptance-basic acceptance-baremetal acceptance-blockstorage acceptance-compute acceptance-container acceptance-containerinfra acceptance-db acceptance-dns acceptance-identity acceptance-image acceptance-keymanager acceptance-loadbalancer acceptance-messaging acceptance-networking acceptance-objectstorage acceptance-orchestration acceptance-placement acceptance-sharedfilesystems acceptance-workflow +acceptance: acceptance-basic acceptance-baremetal acceptance-blockstorage acceptance-compute acceptance-container acceptance-containerinfra acceptance-db acceptance-dns acceptance-identity acceptance-image acceptance-keymanager acceptance-loadbalancer acceptance-messaging acceptance-metric acceptance-networking acceptance-objectstorage acceptance-orchestration acceptance-placement acceptance-sharedfilesystems acceptance-workflow .PHONY: acceptance acceptance-basic: @@ -78,6 +78,10 @@ acceptance-dns: $(GO_TEST) -timeout $(TIMEOUT) -tags "fixtures acceptance" ./internal/acceptance/openstack/dns/... .PHONY: acceptance-dns +acceptance-fwaas: + $(GO_TEST) -timeout $(TIMEOUT) -tags "fixtures acceptance" ./internal/acceptance/openstack/networking/v2/extensions/fwaas_v2/... +.PHONY: acceptance-fwaas + acceptance-identity: $(GO_TEST) -timeout $(TIMEOUT) -tags "fixtures acceptance" ./internal/acceptance/openstack/identity/... .PHONY: acceptance-identity @@ -98,6 +102,10 @@ acceptance-messaging: $(GO_TEST) -timeout $(TIMEOUT) -tags "fixtures acceptance" ./internal/acceptance/openstack/messaging/... .PHONY: acceptance-messaging +acceptance-metric: + $(GO_TEST) -timeout $(TIMEOUT) -tags "fixtures acceptance" ./internal/acceptance/openstack/metric/... +.PHONY: acceptance-metric + acceptance-networking: $(GO_TEST) -timeout $(TIMEOUT) -tags "fixtures acceptance" ./internal/acceptance/openstack/networking/... .PHONY: acceptance-networking diff --git a/vendor/github.com/gophercloud/gophercloud/v2/params.go b/vendor/github.com/gophercloud/gophercloud/v2/params.go index 4a2ed6c9425b..e28203368391 100644 --- a/vendor/github.com/gophercloud/gophercloud/v2/params.go +++ b/vendor/github.com/gophercloud/gophercloud/v2/params.go @@ -109,7 +109,7 @@ func BuildRequestBody(opts any, parent string) (map[string]any, error) { } xorFieldIsZero = isZero(xorField) } - if !(zero != xorFieldIsZero) { + if zero == xorFieldIsZero { err := ErrMissingInput{} err.Argument = fmt.Sprintf("%s/%s", f.Name, xorTag) err.Info = fmt.Sprintf("Exactly one of %s and %s must be provided", f.Name, xorTag) @@ -219,12 +219,12 @@ func BuildRequestBody(opts any, parent string) (map[string]any, error) { optsMaps[i] = b } if parent == "" { - return nil, fmt.Errorf("Parent is required when passing an array or a slice.") + return nil, fmt.Errorf("parent is required when passing an array or a slice") } return map[string]any{parent: optsMaps}, nil } // Return an error if we can't work with the underlying type of 'opts' - return nil, fmt.Errorf("Options type is not a struct, a slice, or an array.") + return nil, fmt.Errorf("options type is not a struct, a slice, or an array") } // EnabledState is a convenience type, mostly used in Create and Update @@ -429,7 +429,7 @@ func BuildQueryString(opts any) (*url.URL, error) { } else { // if the field has a 'required' tag, it can't have a zero-value if requiredTag := f.Tag.Get("required"); requiredTag == "true" { - return &url.URL{}, fmt.Errorf("Required query parameter [%s] not set.", f.Name) + return &url.URL{}, fmt.Errorf("required query parameter [%s] not set", f.Name) } } } @@ -438,7 +438,7 @@ func BuildQueryString(opts any) (*url.URL, error) { return &url.URL{RawQuery: params.Encode()}, nil } // Return an error if the underlying type of 'opts' isn't a struct. - return nil, fmt.Errorf("Options type is not a struct.") + return nil, fmt.Errorf("options type is not a struct") } /* @@ -509,7 +509,7 @@ func BuildHeaders(opts any) (map[string]string, error) { } else { // if the field has a 'required' tag, it can't have a zero-value if requiredTag := f.Tag.Get("required"); requiredTag == "true" { - return optsMap, fmt.Errorf("Required header [%s] not set.", f.Name) + return optsMap, fmt.Errorf("required header [%s] not set", f.Name) } } } @@ -518,7 +518,7 @@ func BuildHeaders(opts any) (map[string]string, error) { return optsMap, nil } // Return an error if the underlying type of 'opts' isn't a struct. - return optsMap, fmt.Errorf("Options type is not a struct.") + return optsMap, fmt.Errorf("options type is not a struct") } // IDSliceToQueryString takes a slice of elements and converts them into a query diff --git a/vendor/github.com/gophercloud/gophercloud/v2/provider_client.go b/vendor/github.com/gophercloud/gophercloud/v2/provider_client.go index a9bde9457c01..fda42d92e344 100644 --- a/vendor/github.com/gophercloud/gophercloud/v2/provider_client.go +++ b/vendor/github.com/gophercloud/gophercloud/v2/provider_client.go @@ -14,7 +14,7 @@ import ( // DefaultUserAgent is the default User-Agent string set in the request header. const ( - DefaultUserAgent = "gophercloud/v2.10.0" + DefaultUserAgent = "gophercloud/v2.12.0" DefaultMaxBackoffRetries = 60 ) diff --git a/vendor/github.com/gophercloud/gophercloud/v2/results.go b/vendor/github.com/gophercloud/gophercloud/v2/results.go index b12c15a02661..d5b947b7f0f2 100644 --- a/vendor/github.com/gophercloud/gophercloud/v2/results.go +++ b/vendor/github.com/gophercloud/gophercloud/v2/results.go @@ -185,23 +185,23 @@ func (r Result) ExtractIntoStructPtr(to any, label string) error { } if to == nil { - return fmt.Errorf("Expected pointer, got %T", to) + return fmt.Errorf("expected pointer, got %T", to) } t := reflect.TypeOf(to) if k := t.Kind(); k != reflect.Ptr { - return fmt.Errorf("Expected pointer, got %v", k) + return fmt.Errorf("expected pointer, got %v", k) } if reflect.ValueOf(to).IsNil() { - return fmt.Errorf("Expected pointer, got %T", to) + return fmt.Errorf("expected pointer, got %T", to) } switch t.Elem().Kind() { case reflect.Struct: return r.extractIntoPtr(to, label) default: - return fmt.Errorf("Expected pointer to struct, got: %v", t) + return fmt.Errorf("expected pointer to struct, got: %v", t) } } @@ -220,23 +220,23 @@ func (r Result) ExtractIntoSlicePtr(to any, label string) error { } if to == nil { - return fmt.Errorf("Expected pointer, got %T", to) + return fmt.Errorf("expected pointer, got %T", to) } t := reflect.TypeOf(to) if k := t.Kind(); k != reflect.Ptr { - return fmt.Errorf("Expected pointer, got %v", k) + return fmt.Errorf("expected pointer, got %v", k) } if reflect.ValueOf(to).IsNil() { - return fmt.Errorf("Expected pointer, got %T", to) + return fmt.Errorf("expected pointer, got %T", to) } switch t.Elem().Kind() { case reflect.Slice: return r.extractIntoPtr(to, label) default: - return fmt.Errorf("Expected pointer to slice, got: %v", t) + return fmt.Errorf("expected pointer to slice, got: %v", t) } } 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 3ae986c9c0a3..000000000000 --- 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 51f5e59645fa..261eeb9e9f8b 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/addressscope_types.go b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/addressscope_types.go new file mode 100644 index 000000000000..8a28e4585e03 --- /dev/null +++ b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/addressscope_types.go @@ -0,0 +1,88 @@ +/* +Copyright 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 + +// AddressScopeResourceSpec contains the desired state of the resource. +type AddressScopeResourceSpec 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"` + + // projectRef is a reference to the ORC Project which this resource is associated with. + // +optional + // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="projectRef is immutable" + ProjectRef *KubernetesNameRef `json:"projectRef,omitempty"` + + // ipVersion is the IP protocol version. + // +required + // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="ipVersion is immutable" + IPVersion IPVersion `json:"ipVersion"` + + // shared indicates whether this resource is shared across all + // projects or not. By default, only admin users can change set + // this value. We can't unshared a shared address scope; Neutron + // enforces this. + // +optional + // +kubebuilder:validation:XValidation:rule="!(oldSelf && !self)",message="shared address scope can't be unshared" + Shared *bool `json:"shared,omitempty"` +} + +// AddressScopeFilter defines an existing resource by its properties +// +kubebuilder:validation:MinProperties:=1 +type AddressScopeFilter struct { + // name of the existing resource + // +optional + Name *OpenStackName `json:"name,omitempty"` + + // projectRef is a reference to the ORC Project which this resource is associated with. + // +optional + ProjectRef *KubernetesNameRef `json:"projectRef,omitempty"` + + // ipVersion is the IP protocol version. + // +optional + IPVersion IPVersion `json:"ipVersion,omitempty"` + + // shared indicates whether this resource is shared across all + // projects or not. By default, only admin users can change set + // this value. + // +optional + Shared *bool `json:"shared,omitempty"` +} + +// AddressScopeResourceStatus represents the observed state of the resource. +type AddressScopeResourceStatus struct { + // name is a Human-readable name for the resource. Might not be unique. + // +kubebuilder:validation:MaxLength=1024 + // +optional + Name string `json:"name,omitempty"` + + // projectID is the ID of the Project to which the resource is associated. + // +kubebuilder:validation:MaxLength=1024 + // +optional + ProjectID string `json:"projectID,omitempty"` + + // ipVersion is the IP protocol version. + // +optional + IPVersion int32 `json:"ipVersion,omitempty"` + + // shared indicates whether this resource is shared across all + // projects or not. By default, only admin users can change set + // this value. + // +optional + Shared *bool `json:"shared,omitempty"` +} diff --git a/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/applicationcredential_types.go b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/applicationcredential_types.go new file mode 100644 index 000000000000..bcb11a3dd746 --- /dev/null +++ b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/applicationcredential_types.go @@ -0,0 +1,190 @@ +/* +Copyright 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:Enum:=CONNECT;DELETE;GET;HEAD;OPTIONS;PATCH;POST;PUT;TRACE +type HTTPMethod string + +const ( + HTTPMethodCONNECT HTTPMethod = "CONNECT" + HTTPMethodDELETE HTTPMethod = "DELETE" + HTTPMethodGET HTTPMethod = "GET" + HTTPMethodHEAD HTTPMethod = "HEAD" + HTTPMethodOPTIONS HTTPMethod = "OPTIONS" + HTTPMethodPATCH HTTPMethod = "PATCH" + HTTPMethodPOST HTTPMethod = "POST" + HTTPMethodPUT HTTPMethod = "PUT" + HTTPMethodTRACE HTTPMethod = "TRACE" +) + +// ApplicationCredentialAccessRule defines an access rule +// +kubebuilder:validation:MinProperties:=1 +type ApplicationCredentialAccessRule struct { + // path that the application credential is permitted to access + // +kubebuilder:validation:MaxLength=1024 + // +optional + Path *string `json:"path,omitempty"` + + // method that the application credential is permitted to use for a given API endpoint + // +optional + Method *HTTPMethod `json:"method,omitempty"` + + // serviceRef identifier for the service that the application credential is permitted to access + // +optional + ServiceRef *KubernetesNameRef `json:"serviceRef,omitempty"` +} + +// ApplicationCredentialResourceSpec contains the desired state of the resource. +// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="ApplicationCredentialResourceSpec is immutable" +type ApplicationCredentialResourceSpec 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"` + + // userRef is a reference to the ORC User which this resource is associated with. + // Note: Due to the nature of the OpenStack API, managing application credentials for a user different than the one ORC is authenticated against can be computationally expensive. In the worst case, all application credentials of all users have to be queried. + // +required + UserRef KubernetesNameRef `json:"userRef,omitempty"` + + // unrestricted is a flag indicating whether the application credential may be used for creation or destruction of other application credentials or trusts + // +optional + Unrestricted *bool `json:"unrestricted,omitempty"` + + // secretRef is a reference to a Secret containing the application credential secret + // +required + SecretRef KubernetesNameRef `json:"secretRef,omitempty"` + + // roleRefs may only contain roles that the user has assigned on the project. If not provided, the roles assigned to the application credential will be the same as the roles in the current token. + // +kubebuilder:validation:MaxItems:=256 + // +listType=atomic + // +optional + RoleRefs []KubernetesNameRef `json:"roleRefs,omitempty"` + + // accessRules is a list of fine grained access control rules + // +kubebuilder:validation:MaxItems:=256 + // +listType=atomic + // +optional + AccessRules []ApplicationCredentialAccessRule `json:"accessRules,omitempty"` + + // expiresAt is the time of expiration for the application credential. If unset, the application credential does not expire. + // +optional + ExpiresAt *metav1.Time `json:"expiresAt,omitempty"` +} + +// ApplicationCredentialFilter defines an existing resource by its properties +// +kubebuilder:validation:MinProperties:=2 +type ApplicationCredentialFilter struct { + // userRef is a reference to the ORC User which this resource is associated with. + // Note: Due to the nature of the OpenStack API, managing application credentials for a user different than the one ORC is authenticated against can be computationally expensive. In the worst case, all application credentials of all users have to be queried. + // +required + UserRef KubernetesNameRef `json:"userRef,omitempty"` + + // name of the existing resource + // +optional + Name *OpenStackName `json:"name,omitempty"` + + // description of the existing resource + // +kubebuilder:validation:MaxLength:=1024 + // +optional + Description *string `json:"description,omitempty"` +} + +type ApplicationCredentialRoleStatus struct { + // name of an existing role + // +kubebuilder:validation:MaxLength:=1024 + // +optional + Name *string `json:"name,omitempty"` + + // id is the ID of a role + // +kubebuilder:validation:MaxLength:=1024 + // +optional + ID *string `json:"id,omitempty"` + + // domainID of the domain of this role + // +kubebuilder:validation:MaxLength:=1024 + // +optional + DomainID *string `json:"domainID,omitempty"` +} + +type ApplicationCredentialAccessRuleStatus struct { + // id is the ID of this access rule + // +kubebuilder:validation:MaxLength:=1024 + // +optional + ID *string `json:"id,omitempty"` + + // path that the application credential is permitted to access + // +kubebuilder:validation:MaxLength:=1024 + // +optional + Path *string `json:"path,omitempty"` + + // method that the application credential is permitted to use for a given API endpoint + // +kubebuilder:validation:MaxLength=32 + // +optional + Method *string `json:"method,omitempty"` + + // service type identifier for the service that the application credential is permitted to access + // +kubebuilder:validation:MaxLength:=1024 + // +optional + Service *string `json:"service,omitempty"` +} + +// ApplicationCredentialResourceStatus represents the observed state of the resource. +type ApplicationCredentialResourceStatus 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"` + + // unrestricted is a flag indicating whether the application credential may be used for creation or destruction of other application credentials or trusts + // +optional + Unrestricted bool `json:"unrestricted,omitempty"` + + // projectID of the project the application credential was created for and that authentication requests using this application credential will be scoped to. + // +kubebuilder:validation:MaxLength=1024 + // +optional + ProjectID string `json:"projectID,omitempty"` + + // roles is a list of role objects may only contain roles that the user has assigned on the project + // +kubebuilder:validation:MaxItems:=64 + // +listType=atomic + // +optional + Roles []ApplicationCredentialRoleStatus `json:"roles"` + + // expiresAt is the time of expiration for the application credential. If unset, the application credential does not expire. + // +optional + ExpiresAt *metav1.Time `json:"expiresAt"` + + // accessRules is a list of fine grained access control rules + // +kubebuilder:validation:MaxItems:=64 + // +listType=atomic + // +optional + AccessRules []ApplicationCredentialAccessRuleStatus `json:"accessRules,omitempty"` +} 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 000000000000..4afeb5fbb9df --- /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 83631732ea0e..93dfe77121b8 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 a950cbf3bc69..d0908b10ebc0 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 b007a63aef5e..6d15e5d30428 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 000000000000..e3e5dd8d7743 --- /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/endpoint_types.go b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/endpoint_types.go new file mode 100644 index 000000000000..fc2e9c5ccc88 --- /dev/null +++ b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/endpoint_types.go @@ -0,0 +1,92 @@ +/* +Copyright 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 + +// EndpointResourceSpec contains the desired state of the resource. +type EndpointResourceSpec struct { + // description is a human-readable description for the resource. + // +kubebuilder:validation:MinLength:=1 + // +kubebuilder:validation:MaxLength:=255 + // +optional + // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="description is immutable" + Description *string `json:"description,omitempty"` + + // enabled indicates whether the endpoint is enabled or not. + // +optional + Enabled *bool `json:"enabled,omitempty"` + + // interface indicates the visibility of the endpoint. + // +kubebuilder:validation:Enum:=admin;internal;public + // +required + Interface string `json:"interface,omitempty"` + + // url is the endpoint URL. + // +kubebuilder:validation:MaxLength=1024 + // +required + URL string `json:"url"` + + // serviceRef is a reference to the ORC Service which this resource is associated with. + // +required + // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="serviceRef is immutable" + ServiceRef KubernetesNameRef `json:"serviceRef,omitempty"` +} + +// EndpointFilter defines an existing resource by its properties +// +kubebuilder:validation:MinProperties:=1 +type EndpointFilter struct { + // interface of the existing endpoint. + // +kubebuilder:validation:Enum:=admin;internal;public + // +optional + Interface string `json:"interface,omitempty"` + + // serviceRef is a reference to the ORC Service which this resource is associated with. + // +optional + ServiceRef *KubernetesNameRef `json:"serviceRef,omitempty"` + + // url is the URL of the existing endpoint. + // +kubebuilder:validation:MaxLength=1024 + // +optional + URL string `json:"url,omitempty"` +} + +// EndpointResourceStatus represents the observed state of the resource. +type EndpointResourceStatus struct { + // description is a human-readable description for the resource. + // +kubebuilder:validation:MinLength:=1 + // +kubebuilder:validation:MaxLength:=255 + // +optional + Description string `json:"description,omitempty"` + + // enabled indicates whether the endpoint is enabled or not. + // +optional + Enabled *bool `json:"enabled,omitempty"` + + // interface indicates the visibility of the endpoint. + // +kubebuilder:validation:MaxLength=128 + // +optional + Interface string `json:"interface,omitempty"` + + // url is the endpoint URL. + // +kubebuilder:validation:MaxLength=1024 + // +optional + URL string `json:"url,omitempty"` + + // serviceID is the ID of the Service to which the resource is associated. + // +kubebuilder:validation:MaxLength=1024 + // +optional + ServiceID string `json:"serviceID,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 000000000000..4ebbeccf9861 --- /dev/null +++ b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/flavor_types.go @@ -0,0 +1,141 @@ +/* +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"` + + // id will be the id of the created resource. If not specified, a random + // UUID will be generated by OpenStack. + // +kubebuilder:validation:MinLength=1 + // +kubebuilder:validation:MaxLength=255 + // +kubebuilder:validation:Pattern=^[a-zA-Z0-9._-]([a-zA-Z0-9. _-]*[a-zA-Z0-9._-])?$ + // +optional + ID string `json:"id,omitempty"` //nolint:kubeapilinter // intentionally allow raw ID + + // 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 000000000000..fd2739abacac --- /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 000000000000..f3719f5ae24d --- /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 7ce3f2ad99b5..4bba99d498f8 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 61% 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 e57029613797..de601497310f 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,39 @@ 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 + // +required Download *ImageContentSourceDownload `json:"download,omitempty"` } 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 +295,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 +343,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 +387,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 000000000000..a1a04e8586de --- /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 000000000000..18abf1e4ea7d --- /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 000000000000..936c79ed95ca --- /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 000000000000..884411a07e31 --- /dev/null +++ b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/port_types.go @@ -0,0 +1,324 @@ +/* +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"` + + // 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=32 + // +optional + MACAddress string `json:"macAddress,omitempty"` + + FilterByNeutronTags `json:",inline"` +} + +// HostID specifies how to determine the host ID for port binding. +// Exactly one of the fields must be set. +// +kubebuilder:validation:MinProperties:=1 +// +kubebuilder:validation:MaxProperties:=1 +// +kubebuilder:validation:XValidation:rule="(has(self.id) && size(self.id) > 0) != (has(self.serverRef) && size(self.serverRef) > 0)",message="exactly one of id or serverRef must be set" +type HostID struct { + // id is the literal host ID string to use for binding:host_id. + // This is mutually exclusive with serverRef. + // +kubebuilder:validation:MaxLength=36 + // +optional + ID string `json:"id,omitempty"` //nolint:kubeapilinter // intentionally allow raw ID + + // serverRef is a reference to an ORC Server resource from which to + // retrieve the hostID for port binding. The hostID will be read from + // the Server's status.resource.hostID field. + // This is mutually exclusive with id. + // +optional + ServerRef KubernetesNameRef `json:"serverRef,omitempty"` +} + +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"` + + // adminStateUp is the administrative state of the port, + // which is up (true) or down (false). The default value is true. + // +kubebuilder:default:=true + // +optional + AdminStateUp *bool `json:"adminStateUp,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"` //nolint:kubeapilinter // https://github.com/k-orc/openstack-resource-controller/issues/438 + + // 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"` + + // macAddress is the MAC address of the port. + // +kubebuilder:validation:MaxLength=32 + // +optional + MACAddress string `json:"macAddress,omitempty"` + + // hostID specifies the host where the port will be bound. + // Note that when the port is attached to a server, OpenStack may + // rebind the port to the server's actual compute host, which may + // differ from the specified hostID if no matching scheduler hint + // is used. In this case the port's status will reflect the actual + // binding host, not the value specified here. + // +optional + // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="hostID is immutable" + HostID *HostID `json:"hostID,omitempty"` //nolint:kubeapilinter // HostID provides both raw ID and ServerRef options +} + +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"` + + // hostID is the ID of host where the port resides. + // +kubebuilder:validation:MaxLength=128 + // +optional + HostID string `json:"hostID,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 000000000000..0c49011c9d92 --- /dev/null +++ b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/project_types.go @@ -0,0 +1,125 @@ +/* +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"` + + // 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"` + + // 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"` + + // domainRef is a reference to the ORC Domain which this resource is associated with. + // +optional + DomainRef *KubernetesNameRef `json:"domainRef,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"` + + // domainID is the ID of the Domain to which the resource is associated. + // +kubebuilder:validation:MaxLength=1024 + // +optional + DomainID string `json:"domainID,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 000000000000..f4a961dd192e --- /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 000000000000..236c9bebf47c --- /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. + // +required + Spec RouterInterfaceSpec `json:"spec,omitzero"` + + // 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 000000000000..999404a35741 --- /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 000000000000..a3f977883431 --- /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 000000000000..f4f40b279303 --- /dev/null +++ b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/server_types.go @@ -0,0 +1,315 @@ +/* +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"` + + // metadata is a list of metadata key-value pairs which will be set on the server. + // +kubebuilder:validation:MaxItems:=128 + // +listType=atomic + // +optional + Metadata []ServerMetadata `json:"metadata,omitempty"` + + // configDrive specifies whether to attach a config drive to the server. + // When true, configuration data will be available via a special drive + // instead of the metadata service. + // +optional + // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="configDrive is immutable" + ConfigDrive *bool `json:"configDrive,omitempty"` +} + +// ServerMetadata represents a key-value pair for server metadata. +type ServerMetadata struct { + // key is the metadata key. + // +kubebuilder:validation:MinLength:=1 + // +kubebuilder:validation:MaxLength:=255 + // +required + Key string `json:"key,omitempty"` + + // value is the metadata value. + // +kubebuilder:validation:MaxLength:=255 + // +kubebuilder:validation:MinLength:=1 + // +required + Value string `json:"value,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"` + + // metadata is the list of metadata key-value pairs on the resource. + // +kubebuilder:validation:MaxItems:=128 + // +listType=atomic + // +optional + Metadata []ServerMetadataStatus `json:"metadata,omitempty"` + + // configDrive indicates whether the server was booted with a config drive. + // +optional + ConfigDrive bool `json:"configDrive,omitempty"` +} + +// ServerMetadataStatus represents a key-value pair for server metadata in status. +type ServerMetadataStatus struct { + // key is the metadata key. + // +kubebuilder:validation:MaxLength:=255 + // +optional + Key string `json:"key,omitempty"` + + // value is the metadata value. + // +kubebuilder:validation:MaxLength:=255 + // +optional + Value string `json:"value,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 000000000000..c8334709d9b2 --- /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 000000000000..328f4fbbfde3 --- /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 000000000000..1a8450d03150 --- /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/trunk_types.go b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/trunk_types.go new file mode 100644 index 000000000000..d857c450172f --- /dev/null +++ b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/trunk_types.go @@ -0,0 +1,176 @@ +/* +Copyright 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 + +// TrunkSubportSpec represents a subport to attach to a trunk. +// It maps to gophercloud's trunks.Subport. +type TrunkSubportSpec struct { + // portRef is a reference to the ORC Port that will be attached as a subport. + // +required + PortRef KubernetesNameRef `json:"portRef,omitempty"` + + // segmentationID is the segmentation ID for the subport (e.g. VLAN ID). + // +required + // +kubebuilder:validation:Minimum:=1 + // +kubebuilder:validation:Maximum:=4094 + SegmentationID int32 `json:"segmentationID,omitempty"` + + // segmentationType is the segmentation type for the subport (e.g. vlan). + // +required + // +kubebuilder:validation:MinLength:=1 + // +kubebuilder:validation:MaxLength:=32 + // +kubebuilder:validation:Enum:=inherit;vlan + SegmentationType string `json:"segmentationType,omitempty"` +} + +// TrunkSubportStatus represents an attached subport on a trunk. +// It maps to gophercloud's trunks.Subport. +type TrunkSubportStatus struct { + // portID is the OpenStack ID of the Port attached as a subport. + // +kubebuilder:validation:MaxLength=1024 + // +optional + PortID string `json:"portID,omitempty"` + + // segmentationID is the segmentation ID for the subport (e.g. VLAN ID). + // +optional + SegmentationID int32 `json:"segmentationID,omitempty"` + + // segmentationType is the segmentation type for the subport (e.g. vlan). + // +kubebuilder:validation:MaxLength=1024 + // +optional + SegmentationType string `json:"segmentationType,omitempty"` +} + +// TrunkResourceSpec contains the desired state of the resource. +type TrunkResourceSpec 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"` + + // portRef is a reference to the ORC Port which this resource is associated with. + // +required + // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="portRef is immutable" + PortRef KubernetesNameRef `json:"portRef,omitempty"` + + // projectRef is a reference to the ORC Project which this resource is associated with. + // +optional + // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="projectRef is immutable" + ProjectRef *KubernetesNameRef `json:"projectRef,omitempty"` + + // adminStateUp is the administrative state of the trunk. If false (down), + // the trunk does not forward packets. + // +optional + AdminStateUp *bool `json:"adminStateUp,omitempty"` + + // subports is the list of ports to attach to the trunk. + // +optional + // +kubebuilder:validation:MaxItems:=1024 + // +listType=atomic + Subports []TrunkSubportSpec `json:"subports,omitempty"` + + // tags is a list of Neutron tags to apply to the trunk. + // +kubebuilder:validation:MaxItems:=64 + // +listType=set + // +optional + Tags []NeutronTag `json:"tags,omitempty"` +} + +// TrunkFilter defines an existing resource by its properties +// +kubebuilder:validation:MinProperties:=1 +type TrunkFilter struct { + // name of the existing resource + // +optional + Name *OpenStackName `json:"name,omitempty"` + + // description of the existing resource + // +optional + Description *NeutronDescription `json:"description,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 which this resource is associated with. + // +optional + ProjectRef *KubernetesNameRef `json:"projectRef,omitempty"` + + // Contrary to what the neutron doc say, we can't filter by status + // https://github.com/gophercloud/gophercloud/issues/3626 + + // adminStateUp is the administrative state of the trunk. + // +optional + AdminStateUp *bool `json:"adminStateUp,omitempty"` + + FilterByNeutronTags `json:",inline"` +} + +// TrunkResourceStatus represents the observed state of the resource. +type TrunkResourceStatus 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"` + + // portID is the ID of the Port to which the resource is associated. + // +kubebuilder:validation:MaxLength=1024 + // +optional + PortID string `json:"portID,omitempty"` + + // projectID is the ID of the Project to which the resource is associated. + // +kubebuilder:validation:MaxLength=1024 + // +optional + ProjectID string `json:"projectID,omitempty"` + + // tenantID is the project owner of the trunk (alias of projectID in some deployments). + // +kubebuilder:validation:MaxLength=1024 + // +optional + TenantID string `json:"tenantID,omitempty"` + + // status indicates whether the trunk is currently operational. + // +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 trunk. + // +optional + AdminStateUp *bool `json:"adminStateUp,omitempty"` + + // subports is a list of ports associated with the trunk. + // +kubebuilder:validation:MaxItems=1024 + // +listType=atomic + // +optional + Subports []TrunkSubportStatus `json:"subports,omitempty"` +} diff --git a/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/user_types.go b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/user_types.go new file mode 100644 index 000000000000..e085006d993c --- /dev/null +++ b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/user_types.go @@ -0,0 +1,102 @@ +/* +Copyright 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 + +// UserResourceSpec contains the desired state of the resource. +// +kubebuilder:validation:XValidation:rule="!has(oldSelf.passwordRef) || has(self.passwordRef)",message="passwordRef may not be removed once set" +type UserResourceSpec 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"` + + // 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"` + + // defaultProjectRef is a reference to the Default Project which this resource is associated with. + // +optional + // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="defaultProjectRef is immutable" + DefaultProjectRef *KubernetesNameRef `json:"defaultProjectRef,omitempty"` + + // enabled defines whether a user is enabled or disabled + // +optional + Enabled *bool `json:"enabled,omitempty"` + + // passwordRef is a reference to a Secret containing the password + // for this user. The Secret must contain a key named "password". + // If not specified, the user is created without a password. + // +optional + PasswordRef *KubernetesNameRef `json:"passwordRef,omitempty"` +} + +// UserFilter defines an existing resource by its properties +// +kubebuilder:validation:MinProperties:=1 +type UserFilter struct { + // name of the existing resource + // +optional + Name *OpenStackName `json:"name,omitempty"` + + // domainRef is a reference to the ORC Domain which this resource is associated with. + // +optional + DomainRef *KubernetesNameRef `json:"domainRef,omitempty"` +} + +// UserResourceStatus represents the observed state of the resource. +type UserResourceStatus 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"` + + // defaultProjectID is the ID of the Default Project to which the user is associated with. + // +kubebuilder:validation:MaxLength=1024 + // +optional + DefaultProjectID string `json:"defaultProjectID,omitempty"` + + // enabled defines whether a user is enabled or disabled + // +optional + Enabled bool `json:"enabled,omitempty"` + + // passwordExpiresAt is the timestamp at which the user's password expires. + // +kubebuilder:validation:MaxLength:=1024 + // +optional + PasswordExpiresAt string `json:"passwordExpiresAt,omitempty"` + + // appliedPasswordRef is the name of the Secret containing the + // password that was last applied to the OpenStack resource. + // +kubebuilder:validation:MaxLength=1024 + // +optional + AppliedPasswordRef string `json:"appliedPasswordRef,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 000000000000..49e2f3d06ec6 --- /dev/null +++ b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/volume_types.go @@ -0,0 +1,250 @@ +/* +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"` + + // imageRef is a reference to an ORC Image. If specified, creates a + // bootable volume from this image. The volume size must be >= the + // image's min_disk requirement. + // +optional + // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="imageRef is immutable" + ImageRef *KubernetesNameRef `json:"imageRef,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"` + + // imageID is the ID of the image this volume was created from, if any. + // +kubebuilder:validation:MaxLength=1024 + // +optional + ImageID string `json:"imageID,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 000000000000..76bdb210bbd1 --- /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.addressscope-resource.go b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/zz_generated.addressscope-resource.go new file mode 100644 index 000000000000..a61636c7d78d --- /dev/null +++ b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/zz_generated.addressscope-resource.go @@ -0,0 +1,179 @@ +// Code generated by resource-generator. DO NOT EDIT. +/* +Copyright 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" +) + +// AddressScopeImport specifies an existing resource which will be imported instead of +// creating a new one +// +kubebuilder:validation:MinProperties:=1 +// +kubebuilder:validation:MaxProperties:=1 +type AddressScopeImport 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. + // +kubebuilder:validation:Format:=uuid + // +kubebuilder:validation:MaxLength:=36 + // +optional + ID *string `json:"id,omitempty"` //nolint:kubeapilinter + + // 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 *AddressScopeFilter `json:"filter,omitempty"` +} + +// AddressScopeSpec 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 AddressScopeSpec struct { + // import refers to an existing OpenStack resource which will be imported instead of + // creating a new one. + // +optional + Import *AddressScopeImport `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 *AddressScopeResourceSpec `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,omitzero"` +} + +// AddressScopeStatus defines the observed state of an ORC resource. +type AddressScopeStatus 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. + // +kubebuilder:validation:MaxLength:=1024 + // +optional + ID *string `json:"id,omitempty"` + + // resource contains the observed state of the OpenStack resource. + // +optional + Resource *AddressScopeResourceStatus `json:"resource,omitempty"` +} + +var _ ObjectWithConditions = &AddressScope{} + +func (i *AddressScope) 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" + +// AddressScope is the Schema for an ORC resource. +type AddressScope struct { + metav1.TypeMeta `json:",inline"` + + // metadata contains the object metadata + // +optional + metav1.ObjectMeta `json:"metadata,omitempty"` + + // spec specifies the desired state of the resource. + // +required + Spec AddressScopeSpec `json:"spec,omitzero"` + + // status defines the observed state of the resource. + // +optional + Status AddressScopeStatus `json:"status,omitempty"` +} + +// +kubebuilder:object:root=true + +// AddressScopeList contains a list of AddressScope. +type AddressScopeList struct { + metav1.TypeMeta `json:",inline"` + + // metadata contains the list metadata + // +optional + metav1.ListMeta `json:"metadata,omitempty"` + + // items contains a list of AddressScope. + // +required + Items []AddressScope `json:"items"` +} + +func (l *AddressScopeList) GetItems() []AddressScope { + return l.Items +} + +func init() { + SchemeBuilder.Register(&AddressScope{}, &AddressScopeList{}) +} + +func (i *AddressScope) GetCloudCredentialsRef() (*string, *CloudCredentialsReference) { + if i == nil { + return nil, nil + } + + return &i.Namespace, &i.Spec.CloudCredentialsRef +} + +var _ CloudCredentialsRefProvider = &AddressScope{} diff --git a/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/zz_generated.applicationcredential-resource.go b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/zz_generated.applicationcredential-resource.go new file mode 100644 index 000000000000..d949c84d06e7 --- /dev/null +++ b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/zz_generated.applicationcredential-resource.go @@ -0,0 +1,179 @@ +// Code generated by resource-generator. DO NOT EDIT. +/* +Copyright 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" +) + +// ApplicationCredentialImport specifies an existing resource which will be imported instead of +// creating a new one +// +kubebuilder:validation:MinProperties:=1 +// +kubebuilder:validation:MaxProperties:=1 +type ApplicationCredentialImport 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. + // +kubebuilder:validation:Format:=uuid + // +kubebuilder:validation:MaxLength:=36 + // +optional + ID *string `json:"id,omitempty"` //nolint:kubeapilinter + + // 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 *ApplicationCredentialFilter `json:"filter,omitempty"` +} + +// ApplicationCredentialSpec 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 ApplicationCredentialSpec struct { + // import refers to an existing OpenStack resource which will be imported instead of + // creating a new one. + // +optional + Import *ApplicationCredentialImport `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 *ApplicationCredentialResourceSpec `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,omitzero"` +} + +// ApplicationCredentialStatus defines the observed state of an ORC resource. +type ApplicationCredentialStatus 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. + // +kubebuilder:validation:MaxLength:=1024 + // +optional + ID *string `json:"id,omitempty"` + + // resource contains the observed state of the OpenStack resource. + // +optional + Resource *ApplicationCredentialResourceStatus `json:"resource,omitempty"` +} + +var _ ObjectWithConditions = &ApplicationCredential{} + +func (i *ApplicationCredential) 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" + +// ApplicationCredential is the Schema for an ORC resource. +type ApplicationCredential struct { + metav1.TypeMeta `json:",inline"` + + // metadata contains the object metadata + // +optional + metav1.ObjectMeta `json:"metadata,omitempty"` + + // spec specifies the desired state of the resource. + // +required + Spec ApplicationCredentialSpec `json:"spec,omitzero"` + + // status defines the observed state of the resource. + // +optional + Status ApplicationCredentialStatus `json:"status,omitempty"` +} + +// +kubebuilder:object:root=true + +// ApplicationCredentialList contains a list of ApplicationCredential. +type ApplicationCredentialList struct { + metav1.TypeMeta `json:",inline"` + + // metadata contains the list metadata + // +optional + metav1.ListMeta `json:"metadata,omitempty"` + + // items contains a list of ApplicationCredential. + // +required + Items []ApplicationCredential `json:"items"` +} + +func (l *ApplicationCredentialList) GetItems() []ApplicationCredential { + return l.Items +} + +func init() { + SchemeBuilder.Register(&ApplicationCredential{}, &ApplicationCredentialList{}) +} + +func (i *ApplicationCredential) GetCloudCredentialsRef() (*string, *CloudCredentialsReference) { + if i == nil { + return nil, nil + } + + return &i.Namespace, &i.Spec.CloudCredentialsRef +} + +var _ CloudCredentialsRefProvider = &ApplicationCredential{} 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 000000000000..ec4a2eb4650b --- /dev/null +++ b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/zz_generated.deepcopy.go @@ -0,0 +1,6964 @@ +//go:build !ignore_autogenerated + +/* +Copyright 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 *AddressScope) DeepCopyInto(out *AddressScope) { + *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 AddressScope. +func (in *AddressScope) DeepCopy() *AddressScope { + if in == nil { + return nil + } + out := new(AddressScope) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *AddressScope) 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 *AddressScopeFilter) DeepCopyInto(out *AddressScopeFilter) { + *out = *in + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(OpenStackName) + **out = **in + } + if in.ProjectRef != nil { + in, out := &in.ProjectRef, &out.ProjectRef + *out = new(KubernetesNameRef) + **out = **in + } + if in.Shared != nil { + in, out := &in.Shared, &out.Shared + *out = new(bool) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AddressScopeFilter. +func (in *AddressScopeFilter) DeepCopy() *AddressScopeFilter { + if in == nil { + return nil + } + out := new(AddressScopeFilter) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AddressScopeImport) DeepCopyInto(out *AddressScopeImport) { + *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(AddressScopeFilter) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AddressScopeImport. +func (in *AddressScopeImport) DeepCopy() *AddressScopeImport { + if in == nil { + return nil + } + out := new(AddressScopeImport) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AddressScopeList) DeepCopyInto(out *AddressScopeList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]AddressScope, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AddressScopeList. +func (in *AddressScopeList) DeepCopy() *AddressScopeList { + if in == nil { + return nil + } + out := new(AddressScopeList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *AddressScopeList) 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 *AddressScopeResourceSpec) DeepCopyInto(out *AddressScopeResourceSpec) { + *out = *in + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(OpenStackName) + **out = **in + } + if in.ProjectRef != nil { + in, out := &in.ProjectRef, &out.ProjectRef + *out = new(KubernetesNameRef) + **out = **in + } + if in.Shared != nil { + in, out := &in.Shared, &out.Shared + *out = new(bool) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AddressScopeResourceSpec. +func (in *AddressScopeResourceSpec) DeepCopy() *AddressScopeResourceSpec { + if in == nil { + return nil + } + out := new(AddressScopeResourceSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AddressScopeResourceStatus) DeepCopyInto(out *AddressScopeResourceStatus) { + *out = *in + if in.Shared != nil { + in, out := &in.Shared, &out.Shared + *out = new(bool) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AddressScopeResourceStatus. +func (in *AddressScopeResourceStatus) DeepCopy() *AddressScopeResourceStatus { + if in == nil { + return nil + } + out := new(AddressScopeResourceStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AddressScopeSpec) DeepCopyInto(out *AddressScopeSpec) { + *out = *in + if in.Import != nil { + in, out := &in.Import, &out.Import + *out = new(AddressScopeImport) + (*in).DeepCopyInto(*out) + } + if in.Resource != nil { + in, out := &in.Resource, &out.Resource + *out = new(AddressScopeResourceSpec) + (*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 AddressScopeSpec. +func (in *AddressScopeSpec) DeepCopy() *AddressScopeSpec { + if in == nil { + return nil + } + out := new(AddressScopeSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AddressScopeStatus) DeepCopyInto(out *AddressScopeStatus) { + *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(AddressScopeResourceStatus) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AddressScopeStatus. +func (in *AddressScopeStatus) DeepCopy() *AddressScopeStatus { + if in == nil { + return nil + } + out := new(AddressScopeStatus) + 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 *ApplicationCredential) DeepCopyInto(out *ApplicationCredential) { + *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 ApplicationCredential. +func (in *ApplicationCredential) DeepCopy() *ApplicationCredential { + if in == nil { + return nil + } + out := new(ApplicationCredential) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ApplicationCredential) 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 *ApplicationCredentialAccessRule) DeepCopyInto(out *ApplicationCredentialAccessRule) { + *out = *in + if in.Path != nil { + in, out := &in.Path, &out.Path + *out = new(string) + **out = **in + } + if in.Method != nil { + in, out := &in.Method, &out.Method + *out = new(HTTPMethod) + **out = **in + } + if in.ServiceRef != nil { + in, out := &in.ServiceRef, &out.ServiceRef + *out = new(KubernetesNameRef) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApplicationCredentialAccessRule. +func (in *ApplicationCredentialAccessRule) DeepCopy() *ApplicationCredentialAccessRule { + if in == nil { + return nil + } + out := new(ApplicationCredentialAccessRule) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ApplicationCredentialAccessRuleStatus) DeepCopyInto(out *ApplicationCredentialAccessRuleStatus) { + *out = *in + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } + if in.Path != nil { + in, out := &in.Path, &out.Path + *out = new(string) + **out = **in + } + if in.Method != nil { + in, out := &in.Method, &out.Method + *out = new(string) + **out = **in + } + if in.Service != nil { + in, out := &in.Service, &out.Service + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApplicationCredentialAccessRuleStatus. +func (in *ApplicationCredentialAccessRuleStatus) DeepCopy() *ApplicationCredentialAccessRuleStatus { + if in == nil { + return nil + } + out := new(ApplicationCredentialAccessRuleStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ApplicationCredentialFilter) DeepCopyInto(out *ApplicationCredentialFilter) { + *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 + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApplicationCredentialFilter. +func (in *ApplicationCredentialFilter) DeepCopy() *ApplicationCredentialFilter { + if in == nil { + return nil + } + out := new(ApplicationCredentialFilter) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ApplicationCredentialImport) DeepCopyInto(out *ApplicationCredentialImport) { + *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(ApplicationCredentialFilter) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApplicationCredentialImport. +func (in *ApplicationCredentialImport) DeepCopy() *ApplicationCredentialImport { + if in == nil { + return nil + } + out := new(ApplicationCredentialImport) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ApplicationCredentialList) DeepCopyInto(out *ApplicationCredentialList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ApplicationCredential, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApplicationCredentialList. +func (in *ApplicationCredentialList) DeepCopy() *ApplicationCredentialList { + if in == nil { + return nil + } + out := new(ApplicationCredentialList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ApplicationCredentialList) 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 *ApplicationCredentialResourceSpec) DeepCopyInto(out *ApplicationCredentialResourceSpec) { + *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.Unrestricted != nil { + in, out := &in.Unrestricted, &out.Unrestricted + *out = new(bool) + **out = **in + } + if in.RoleRefs != nil { + in, out := &in.RoleRefs, &out.RoleRefs + *out = make([]KubernetesNameRef, len(*in)) + copy(*out, *in) + } + if in.AccessRules != nil { + in, out := &in.AccessRules, &out.AccessRules + *out = make([]ApplicationCredentialAccessRule, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.ExpiresAt != nil { + in, out := &in.ExpiresAt, &out.ExpiresAt + *out = (*in).DeepCopy() + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApplicationCredentialResourceSpec. +func (in *ApplicationCredentialResourceSpec) DeepCopy() *ApplicationCredentialResourceSpec { + if in == nil { + return nil + } + out := new(ApplicationCredentialResourceSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ApplicationCredentialResourceStatus) DeepCopyInto(out *ApplicationCredentialResourceStatus) { + *out = *in + if in.Roles != nil { + in, out := &in.Roles, &out.Roles + *out = make([]ApplicationCredentialRoleStatus, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.ExpiresAt != nil { + in, out := &in.ExpiresAt, &out.ExpiresAt + *out = (*in).DeepCopy() + } + if in.AccessRules != nil { + in, out := &in.AccessRules, &out.AccessRules + *out = make([]ApplicationCredentialAccessRuleStatus, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApplicationCredentialResourceStatus. +func (in *ApplicationCredentialResourceStatus) DeepCopy() *ApplicationCredentialResourceStatus { + if in == nil { + return nil + } + out := new(ApplicationCredentialResourceStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ApplicationCredentialRoleStatus) DeepCopyInto(out *ApplicationCredentialRoleStatus) { + *out = *in + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } + if in.DomainID != nil { + in, out := &in.DomainID, &out.DomainID + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApplicationCredentialRoleStatus. +func (in *ApplicationCredentialRoleStatus) DeepCopy() *ApplicationCredentialRoleStatus { + if in == nil { + return nil + } + out := new(ApplicationCredentialRoleStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ApplicationCredentialSpec) DeepCopyInto(out *ApplicationCredentialSpec) { + *out = *in + if in.Import != nil { + in, out := &in.Import, &out.Import + *out = new(ApplicationCredentialImport) + (*in).DeepCopyInto(*out) + } + if in.Resource != nil { + in, out := &in.Resource, &out.Resource + *out = new(ApplicationCredentialResourceSpec) + (*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 ApplicationCredentialSpec. +func (in *ApplicationCredentialSpec) DeepCopy() *ApplicationCredentialSpec { + if in == nil { + return nil + } + out := new(ApplicationCredentialSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ApplicationCredentialStatus) DeepCopyInto(out *ApplicationCredentialStatus) { + *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(ApplicationCredentialResourceStatus) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApplicationCredentialStatus. +func (in *ApplicationCredentialStatus) DeepCopy() *ApplicationCredentialStatus { + if in == nil { + return nil + } + out := new(ApplicationCredentialStatus) + 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 *Endpoint) DeepCopyInto(out *Endpoint) { + *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 Endpoint. +func (in *Endpoint) DeepCopy() *Endpoint { + if in == nil { + return nil + } + out := new(Endpoint) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Endpoint) 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 *EndpointFilter) DeepCopyInto(out *EndpointFilter) { + *out = *in + if in.ServiceRef != nil { + in, out := &in.ServiceRef, &out.ServiceRef + *out = new(KubernetesNameRef) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EndpointFilter. +func (in *EndpointFilter) DeepCopy() *EndpointFilter { + if in == nil { + return nil + } + out := new(EndpointFilter) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EndpointImport) DeepCopyInto(out *EndpointImport) { + *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(EndpointFilter) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EndpointImport. +func (in *EndpointImport) DeepCopy() *EndpointImport { + if in == nil { + return nil + } + out := new(EndpointImport) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EndpointList) DeepCopyInto(out *EndpointList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Endpoint, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EndpointList. +func (in *EndpointList) DeepCopy() *EndpointList { + if in == nil { + return nil + } + out := new(EndpointList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *EndpointList) 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 *EndpointResourceSpec) DeepCopyInto(out *EndpointResourceSpec) { + *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 EndpointResourceSpec. +func (in *EndpointResourceSpec) DeepCopy() *EndpointResourceSpec { + if in == nil { + return nil + } + out := new(EndpointResourceSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EndpointResourceStatus) DeepCopyInto(out *EndpointResourceStatus) { + *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 EndpointResourceStatus. +func (in *EndpointResourceStatus) DeepCopy() *EndpointResourceStatus { + if in == nil { + return nil + } + out := new(EndpointResourceStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EndpointSpec) DeepCopyInto(out *EndpointSpec) { + *out = *in + if in.Import != nil { + in, out := &in.Import, &out.Import + *out = new(EndpointImport) + (*in).DeepCopyInto(*out) + } + if in.Resource != nil { + in, out := &in.Resource, &out.Resource + *out = new(EndpointResourceSpec) + (*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 EndpointSpec. +func (in *EndpointSpec) DeepCopy() *EndpointSpec { + if in == nil { + return nil + } + out := new(EndpointSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EndpointStatus) DeepCopyInto(out *EndpointStatus) { + *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(EndpointResourceStatus) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EndpointStatus. +func (in *EndpointStatus) DeepCopy() *EndpointStatus { + if in == nil { + return nil + } + out := new(EndpointStatus) + 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 *HostID) DeepCopyInto(out *HostID) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HostID. +func (in *HostID) DeepCopy() *HostID { + if in == nil { + return nil + } + out := new(HostID) + 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 + } + if in.AdminStateUp != nil { + in, out := &in.AdminStateUp, &out.AdminStateUp + *out = new(bool) + **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.AdminStateUp != nil { + in, out := &in.AdminStateUp, &out.AdminStateUp + *out = new(bool) + **out = **in + } + 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 + } + if in.HostID != nil { + in, out := &in.HostID, &out.HostID + *out = new(HostID) + **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 + } + if in.DomainRef != nil { + in, out := &in.DomainRef, &out.DomainRef + *out = new(KubernetesNameRef) + **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.DomainRef != nil { + in, out := &in.DomainRef, &out.DomainRef + *out = new(KubernetesNameRef) + **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 *ServerMetadata) DeepCopyInto(out *ServerMetadata) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServerMetadata. +func (in *ServerMetadata) DeepCopy() *ServerMetadata { + if in == nil { + return nil + } + out := new(ServerMetadata) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ServerMetadataStatus) DeepCopyInto(out *ServerMetadataStatus) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServerMetadataStatus. +func (in *ServerMetadataStatus) DeepCopy() *ServerMetadataStatus { + if in == nil { + return nil + } + out := new(ServerMetadataStatus) + in.DeepCopyInto(out) + return out +} + +// 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) + } + if in.Metadata != nil { + in, out := &in.Metadata, &out.Metadata + *out = make([]ServerMetadata, len(*in)) + copy(*out, *in) + } + if in.ConfigDrive != nil { + in, out := &in.ConfigDrive, &out.ConfigDrive + *out = new(bool) + **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) + } + if in.Metadata != nil { + in, out := &in.Metadata, &out.Metadata + *out = make([]ServerMetadataStatus, 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 *Trunk) DeepCopyInto(out *Trunk) { + *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 Trunk. +func (in *Trunk) DeepCopy() *Trunk { + if in == nil { + return nil + } + out := new(Trunk) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Trunk) 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 *TrunkFilter) DeepCopyInto(out *TrunkFilter) { + *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.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 + } + if in.AdminStateUp != nil { + in, out := &in.AdminStateUp, &out.AdminStateUp + *out = new(bool) + **out = **in + } + in.FilterByNeutronTags.DeepCopyInto(&out.FilterByNeutronTags) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TrunkFilter. +func (in *TrunkFilter) DeepCopy() *TrunkFilter { + if in == nil { + return nil + } + out := new(TrunkFilter) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TrunkImport) DeepCopyInto(out *TrunkImport) { + *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(TrunkFilter) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TrunkImport. +func (in *TrunkImport) DeepCopy() *TrunkImport { + if in == nil { + return nil + } + out := new(TrunkImport) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TrunkList) DeepCopyInto(out *TrunkList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Trunk, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TrunkList. +func (in *TrunkList) DeepCopy() *TrunkList { + if in == nil { + return nil + } + out := new(TrunkList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *TrunkList) 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 *TrunkResourceSpec) DeepCopyInto(out *TrunkResourceSpec) { + *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 + } + if in.AdminStateUp != nil { + in, out := &in.AdminStateUp, &out.AdminStateUp + *out = new(bool) + **out = **in + } + if in.Subports != nil { + in, out := &in.Subports, &out.Subports + *out = make([]TrunkSubportSpec, len(*in)) + copy(*out, *in) + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make([]NeutronTag, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TrunkResourceSpec. +func (in *TrunkResourceSpec) DeepCopy() *TrunkResourceSpec { + if in == nil { + return nil + } + out := new(TrunkResourceSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TrunkResourceStatus) DeepCopyInto(out *TrunkResourceStatus) { + *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.Subports != nil { + in, out := &in.Subports, &out.Subports + *out = make([]TrunkSubportStatus, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TrunkResourceStatus. +func (in *TrunkResourceStatus) DeepCopy() *TrunkResourceStatus { + if in == nil { + return nil + } + out := new(TrunkResourceStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TrunkSpec) DeepCopyInto(out *TrunkSpec) { + *out = *in + if in.Import != nil { + in, out := &in.Import, &out.Import + *out = new(TrunkImport) + (*in).DeepCopyInto(*out) + } + if in.Resource != nil { + in, out := &in.Resource, &out.Resource + *out = new(TrunkResourceSpec) + (*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 TrunkSpec. +func (in *TrunkSpec) DeepCopy() *TrunkSpec { + if in == nil { + return nil + } + out := new(TrunkSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TrunkStatus) DeepCopyInto(out *TrunkStatus) { + *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(TrunkResourceStatus) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TrunkStatus. +func (in *TrunkStatus) DeepCopy() *TrunkStatus { + if in == nil { + return nil + } + out := new(TrunkStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TrunkSubportSpec) DeepCopyInto(out *TrunkSubportSpec) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TrunkSubportSpec. +func (in *TrunkSubportSpec) DeepCopy() *TrunkSubportSpec { + if in == nil { + return nil + } + out := new(TrunkSubportSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TrunkSubportStatus) DeepCopyInto(out *TrunkSubportStatus) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TrunkSubportStatus. +func (in *TrunkSubportStatus) DeepCopy() *TrunkSubportStatus { + if in == nil { + return nil + } + out := new(TrunkSubportStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *User) DeepCopyInto(out *User) { + *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 User. +func (in *User) DeepCopy() *User { + if in == nil { + return nil + } + out := new(User) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *User) 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 *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 *UserFilter) DeepCopyInto(out *UserFilter) { + *out = *in + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(OpenStackName) + **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 UserFilter. +func (in *UserFilter) DeepCopy() *UserFilter { + if in == nil { + return nil + } + out := new(UserFilter) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *UserImport) DeepCopyInto(out *UserImport) { + *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(UserFilter) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserImport. +func (in *UserImport) DeepCopy() *UserImport { + if in == nil { + return nil + } + out := new(UserImport) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *UserList) DeepCopyInto(out *UserList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]User, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserList. +func (in *UserList) DeepCopy() *UserList { + if in == nil { + return nil + } + out := new(UserList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *UserList) 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 *UserResourceSpec) DeepCopyInto(out *UserResourceSpec) { + *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.DomainRef != nil { + in, out := &in.DomainRef, &out.DomainRef + *out = new(KubernetesNameRef) + **out = **in + } + if in.DefaultProjectRef != nil { + in, out := &in.DefaultProjectRef, &out.DefaultProjectRef + *out = new(KubernetesNameRef) + **out = **in + } + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = new(bool) + **out = **in + } + if in.PasswordRef != nil { + in, out := &in.PasswordRef, &out.PasswordRef + *out = new(KubernetesNameRef) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserResourceSpec. +func (in *UserResourceSpec) DeepCopy() *UserResourceSpec { + if in == nil { + return nil + } + out := new(UserResourceSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *UserResourceStatus) DeepCopyInto(out *UserResourceStatus) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserResourceStatus. +func (in *UserResourceStatus) DeepCopy() *UserResourceStatus { + if in == nil { + return nil + } + out := new(UserResourceStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *UserSpec) DeepCopyInto(out *UserSpec) { + *out = *in + if in.Import != nil { + in, out := &in.Import, &out.Import + *out = new(UserImport) + (*in).DeepCopyInto(*out) + } + if in.Resource != nil { + in, out := &in.Resource, &out.Resource + *out = new(UserResourceSpec) + (*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 UserSpec. +func (in *UserSpec) DeepCopy() *UserSpec { + if in == nil { + return nil + } + out := new(UserSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *UserStatus) DeepCopyInto(out *UserStatus) { + *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(UserResourceStatus) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserStatus. +func (in *UserStatus) DeepCopy() *UserStatus { + if in == nil { + return nil + } + out := new(UserStatus) + 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) + } + if in.ImageRef != nil { + in, out := &in.ImageRef, &out.ImageRef + *out = new(KubernetesNameRef) + **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 000000000000..ae2e5fc4ef77 --- /dev/null +++ b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/zz_generated.domain-resource.go @@ -0,0 +1,179 @@ +// Code generated by resource-generator. DO NOT EDIT. +/* +Copyright 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. + // +kubebuilder:validation:Format:=uuid + // +kubebuilder:validation:MaxLength:=36 + // +optional + ID *string `json:"id,omitempty"` //nolint:kubeapilinter + + // 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,omitzero"` +} + +// 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. + // +kubebuilder:validation:MaxLength:=1024 + // +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. + // +required + Spec DomainSpec `json:"spec,omitzero"` + + // 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.endpoint-resource.go b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/zz_generated.endpoint-resource.go new file mode 100644 index 000000000000..0fcc28d2d7e0 --- /dev/null +++ b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/zz_generated.endpoint-resource.go @@ -0,0 +1,179 @@ +// Code generated by resource-generator. DO NOT EDIT. +/* +Copyright 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" +) + +// EndpointImport specifies an existing resource which will be imported instead of +// creating a new one +// +kubebuilder:validation:MinProperties:=1 +// +kubebuilder:validation:MaxProperties:=1 +type EndpointImport 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. + // +kubebuilder:validation:Format:=uuid + // +kubebuilder:validation:MaxLength:=36 + // +optional + ID *string `json:"id,omitempty"` //nolint:kubeapilinter + + // 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 *EndpointFilter `json:"filter,omitempty"` +} + +// EndpointSpec 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 EndpointSpec struct { + // import refers to an existing OpenStack resource which will be imported instead of + // creating a new one. + // +optional + Import *EndpointImport `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 *EndpointResourceSpec `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,omitzero"` +} + +// EndpointStatus defines the observed state of an ORC resource. +type EndpointStatus 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. + // +kubebuilder:validation:MaxLength:=1024 + // +optional + ID *string `json:"id,omitempty"` + + // resource contains the observed state of the OpenStack resource. + // +optional + Resource *EndpointResourceStatus `json:"resource,omitempty"` +} + +var _ ObjectWithConditions = &Endpoint{} + +func (i *Endpoint) 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" + +// Endpoint is the Schema for an ORC resource. +type Endpoint struct { + metav1.TypeMeta `json:",inline"` + + // metadata contains the object metadata + // +optional + metav1.ObjectMeta `json:"metadata,omitempty"` + + // spec specifies the desired state of the resource. + // +required + Spec EndpointSpec `json:"spec,omitzero"` + + // status defines the observed state of the resource. + // +optional + Status EndpointStatus `json:"status,omitempty"` +} + +// +kubebuilder:object:root=true + +// EndpointList contains a list of Endpoint. +type EndpointList struct { + metav1.TypeMeta `json:",inline"` + + // metadata contains the list metadata + // +optional + metav1.ListMeta `json:"metadata,omitempty"` + + // items contains a list of Endpoint. + // +required + Items []Endpoint `json:"items"` +} + +func (l *EndpointList) GetItems() []Endpoint { + return l.Items +} + +func init() { + SchemeBuilder.Register(&Endpoint{}, &EndpointList{}) +} + +func (i *Endpoint) GetCloudCredentialsRef() (*string, *CloudCredentialsReference) { + if i == nil { + return nil, nil + } + + return &i.Namespace, &i.Spec.CloudCredentialsRef +} + +var _ CloudCredentialsRefProvider = &Endpoint{} 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 000000000000..6ae9d1fd88db --- /dev/null +++ b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/zz_generated.flavor-resource.go @@ -0,0 +1,179 @@ +// Code generated by resource-generator. DO NOT EDIT. +/* +Copyright 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. + // +kubebuilder:validation:Format:=uuid + // +kubebuilder:validation:MaxLength:=36 + // +optional + ID *string `json:"id,omitempty"` //nolint:kubeapilinter + + // 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,omitzero"` +} + +// 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. + // +kubebuilder:validation:MaxLength:=1024 + // +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. + // +required + Spec FlavorSpec `json:"spec,omitzero"` + + // 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 000000000000..d502e9b65e5b --- /dev/null +++ b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/zz_generated.floatingip-resource.go @@ -0,0 +1,180 @@ +// Code generated by resource-generator. DO NOT EDIT. +/* +Copyright 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. + // +kubebuilder:validation:Format:=uuid + // +kubebuilder:validation:MaxLength:=36 + // +optional + ID *string `json:"id,omitempty"` //nolint:kubeapilinter + + // 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,omitzero"` +} + +// 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. + // +kubebuilder:validation:MaxLength:=1024 + // +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. + // +required + Spec FloatingIPSpec `json:"spec,omitzero"` + + // 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 000000000000..653bea813a6c --- /dev/null +++ b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/zz_generated.group-resource.go @@ -0,0 +1,179 @@ +// Code generated by resource-generator. DO NOT EDIT. +/* +Copyright 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. + // +kubebuilder:validation:Format:=uuid + // +kubebuilder:validation:MaxLength:=36 + // +optional + ID *string `json:"id,omitempty"` //nolint:kubeapilinter + + // 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,omitzero"` +} + +// 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. + // +kubebuilder:validation:MaxLength:=1024 + // +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. + // +required + Spec GroupSpec `json:"spec,omitzero"` + + // 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 77% 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 21bb4fb49543..e9a65eff8989 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 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,15 @@ 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"` + // +kubebuilder:validation:MaxLength:=36 + // +optional + ID *string `json:"id,omitempty"` //nolint:kubeapilinter - // 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 +50,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 +72,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 CloudCredentialsReference `json:"cloudCredentialsRef"` + // cloudCredentialsRef points to a secret containing OpenStack credentials + // +required + CloudCredentialsRef CloudCredentialsReference `json:"cloudCredentialsRef,omitzero"` } // 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 +97,20 @@ 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. + // +kubebuilder:validation:MaxLength:=1024 // +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 +125,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. + // +required + Spec ImageSpec `json:"spec,omitzero"` + + // status defines the observed state of the resource. + // +optional Status ImageStatus `json:"status,omitempty"` } @@ -141,8 +153,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 000000000000..57d13fde6359 --- /dev/null +++ b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/zz_generated.keypair-resource.go @@ -0,0 +1,179 @@ +// Code generated by resource-generator. DO NOT EDIT. +/* +Copyright 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. + // +kubebuilder:validation:MaxLength:=1024 + // +optional + ID *string `json:"id,omitempty"` //nolint:kubeapilinter + + // 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,omitzero"` +} + +// 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. + // +kubebuilder:validation:MaxLength:=1024 + // +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. + // +required + Spec KeyPairSpec `json:"spec,omitzero"` + + // 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 000000000000..bc60852dc0b4 --- /dev/null +++ b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/zz_generated.network-resource.go @@ -0,0 +1,179 @@ +// Code generated by resource-generator. DO NOT EDIT. +/* +Copyright 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. + // +kubebuilder:validation:Format:=uuid + // +kubebuilder:validation:MaxLength:=36 + // +optional + ID *string `json:"id,omitempty"` //nolint:kubeapilinter + + // 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,omitzero"` +} + +// 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. + // +kubebuilder:validation:MaxLength:=1024 + // +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. + // +required + Spec NetworkSpec `json:"spec,omitzero"` + + // 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 000000000000..8b1c25ca4563 --- /dev/null +++ b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/zz_generated.port-resource.go @@ -0,0 +1,180 @@ +// Code generated by resource-generator. DO NOT EDIT. +/* +Copyright 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. + // +kubebuilder:validation:Format:=uuid + // +kubebuilder:validation:MaxLength:=36 + // +optional + ID *string `json:"id,omitempty"` //nolint:kubeapilinter + + // 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,omitzero"` +} + +// 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. + // +kubebuilder:validation:MaxLength:=1024 + // +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. + // +required + Spec PortSpec `json:"spec,omitzero"` + + // 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 000000000000..33fce32e2b2a --- /dev/null +++ b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/zz_generated.project-resource.go @@ -0,0 +1,179 @@ +// Code generated by resource-generator. DO NOT EDIT. +/* +Copyright 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. + // +kubebuilder:validation:Format:=uuid + // +kubebuilder:validation:MaxLength:=36 + // +optional + ID *string `json:"id,omitempty"` //nolint:kubeapilinter + + // 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,omitzero"` +} + +// 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. + // +kubebuilder:validation:MaxLength:=1024 + // +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. + // +required + Spec ProjectSpec `json:"spec,omitzero"` + + // 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 000000000000..5891a418b6ac --- /dev/null +++ b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/zz_generated.role-resource.go @@ -0,0 +1,179 @@ +// Code generated by resource-generator. DO NOT EDIT. +/* +Copyright 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. + // +kubebuilder:validation:Format:=uuid + // +kubebuilder:validation:MaxLength:=36 + // +optional + ID *string `json:"id,omitempty"` //nolint:kubeapilinter + + // 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,omitzero"` +} + +// 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. + // +kubebuilder:validation:MaxLength:=1024 + // +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. + // +required + Spec RoleSpec `json:"spec,omitzero"` + + // 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 000000000000..68d83bd5385c --- /dev/null +++ b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/zz_generated.router-resource.go @@ -0,0 +1,179 @@ +// Code generated by resource-generator. DO NOT EDIT. +/* +Copyright 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. + // +kubebuilder:validation:Format:=uuid + // +kubebuilder:validation:MaxLength:=36 + // +optional + ID *string `json:"id,omitempty"` //nolint:kubeapilinter + + // 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,omitzero"` +} + +// 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. + // +kubebuilder:validation:MaxLength:=1024 + // +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. + // +required + Spec RouterSpec `json:"spec,omitzero"` + + // 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 000000000000..ac0a921a62bf --- /dev/null +++ b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/zz_generated.securitygroup-resource.go @@ -0,0 +1,179 @@ +// Code generated by resource-generator. DO NOT EDIT. +/* +Copyright 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. + // +kubebuilder:validation:Format:=uuid + // +kubebuilder:validation:MaxLength:=36 + // +optional + ID *string `json:"id,omitempty"` //nolint:kubeapilinter + + // 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,omitzero"` +} + +// 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. + // +kubebuilder:validation:MaxLength:=1024 + // +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. + // +required + Spec SecurityGroupSpec `json:"spec,omitzero"` + + // 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 000000000000..011c5896d886 --- /dev/null +++ b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/zz_generated.server-resource.go @@ -0,0 +1,179 @@ +// Code generated by resource-generator. DO NOT EDIT. +/* +Copyright 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. + // +kubebuilder:validation:Format:=uuid + // +kubebuilder:validation:MaxLength:=36 + // +optional + ID *string `json:"id,omitempty"` //nolint:kubeapilinter + + // 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,omitzero"` +} + +// 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. + // +kubebuilder:validation:MaxLength:=1024 + // +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. + // +required + Spec ServerSpec `json:"spec,omitzero"` + + // 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 000000000000..9f478e276437 --- /dev/null +++ b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/zz_generated.servergroup-resource.go @@ -0,0 +1,179 @@ +// Code generated by resource-generator. DO NOT EDIT. +/* +Copyright 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. + // +kubebuilder:validation:Format:=uuid + // +kubebuilder:validation:MaxLength:=36 + // +optional + ID *string `json:"id,omitempty"` //nolint:kubeapilinter + + // 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,omitzero"` +} + +// 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. + // +kubebuilder:validation:MaxLength:=1024 + // +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. + // +required + Spec ServerGroupSpec `json:"spec,omitzero"` + + // 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 000000000000..0c0182818e67 --- /dev/null +++ b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/zz_generated.service-resource.go @@ -0,0 +1,179 @@ +// Code generated by resource-generator. DO NOT EDIT. +/* +Copyright 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. + // +kubebuilder:validation:Format:=uuid + // +kubebuilder:validation:MaxLength:=36 + // +optional + ID *string `json:"id,omitempty"` //nolint:kubeapilinter + + // 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,omitzero"` +} + +// 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. + // +kubebuilder:validation:MaxLength:=1024 + // +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. + // +required + Spec ServiceSpec `json:"spec,omitzero"` + + // 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 000000000000..0151f3064c99 --- /dev/null +++ b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/zz_generated.subnet-resource.go @@ -0,0 +1,179 @@ +// Code generated by resource-generator. DO NOT EDIT. +/* +Copyright 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. + // +kubebuilder:validation:Format:=uuid + // +kubebuilder:validation:MaxLength:=36 + // +optional + ID *string `json:"id,omitempty"` //nolint:kubeapilinter + + // 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,omitzero"` +} + +// 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. + // +kubebuilder:validation:MaxLength:=1024 + // +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. + // +required + Spec SubnetSpec `json:"spec,omitzero"` + + // 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.trunk-resource.go b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/zz_generated.trunk-resource.go new file mode 100644 index 000000000000..eb4c5e8442ef --- /dev/null +++ b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/zz_generated.trunk-resource.go @@ -0,0 +1,179 @@ +// Code generated by resource-generator. DO NOT EDIT. +/* +Copyright 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" +) + +// TrunkImport specifies an existing resource which will be imported instead of +// creating a new one +// +kubebuilder:validation:MinProperties:=1 +// +kubebuilder:validation:MaxProperties:=1 +type TrunkImport 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. + // +kubebuilder:validation:Format:=uuid + // +kubebuilder:validation:MaxLength:=36 + // +optional + ID *string `json:"id,omitempty"` //nolint:kubeapilinter + + // 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 *TrunkFilter `json:"filter,omitempty"` +} + +// TrunkSpec 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 TrunkSpec struct { + // import refers to an existing OpenStack resource which will be imported instead of + // creating a new one. + // +optional + Import *TrunkImport `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 *TrunkResourceSpec `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,omitzero"` +} + +// TrunkStatus defines the observed state of an ORC resource. +type TrunkStatus 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. + // +kubebuilder:validation:MaxLength:=1024 + // +optional + ID *string `json:"id,omitempty"` + + // resource contains the observed state of the OpenStack resource. + // +optional + Resource *TrunkResourceStatus `json:"resource,omitempty"` +} + +var _ ObjectWithConditions = &Trunk{} + +func (i *Trunk) 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" + +// Trunk is the Schema for an ORC resource. +type Trunk struct { + metav1.TypeMeta `json:",inline"` + + // metadata contains the object metadata + // +optional + metav1.ObjectMeta `json:"metadata,omitempty"` + + // spec specifies the desired state of the resource. + // +required + Spec TrunkSpec `json:"spec,omitzero"` + + // status defines the observed state of the resource. + // +optional + Status TrunkStatus `json:"status,omitempty"` +} + +// +kubebuilder:object:root=true + +// TrunkList contains a list of Trunk. +type TrunkList struct { + metav1.TypeMeta `json:",inline"` + + // metadata contains the list metadata + // +optional + metav1.ListMeta `json:"metadata,omitempty"` + + // items contains a list of Trunk. + // +required + Items []Trunk `json:"items"` +} + +func (l *TrunkList) GetItems() []Trunk { + return l.Items +} + +func init() { + SchemeBuilder.Register(&Trunk{}, &TrunkList{}) +} + +func (i *Trunk) GetCloudCredentialsRef() (*string, *CloudCredentialsReference) { + if i == nil { + return nil, nil + } + + return &i.Namespace, &i.Spec.CloudCredentialsRef +} + +var _ CloudCredentialsRefProvider = &Trunk{} diff --git a/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/zz_generated.user-resource.go b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/zz_generated.user-resource.go new file mode 100644 index 000000000000..b109c1d3f45a --- /dev/null +++ b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/zz_generated.user-resource.go @@ -0,0 +1,179 @@ +// Code generated by resource-generator. DO NOT EDIT. +/* +Copyright 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" +) + +// UserImport specifies an existing resource which will be imported instead of +// creating a new one +// +kubebuilder:validation:MinProperties:=1 +// +kubebuilder:validation:MaxProperties:=1 +type UserImport 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. + // +kubebuilder:validation:Format:=uuid + // +kubebuilder:validation:MaxLength:=36 + // +optional + ID *string `json:"id,omitempty"` //nolint:kubeapilinter + + // 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 *UserFilter `json:"filter,omitempty"` +} + +// UserSpec 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 UserSpec struct { + // import refers to an existing OpenStack resource which will be imported instead of + // creating a new one. + // +optional + Import *UserImport `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 *UserResourceSpec `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,omitzero"` +} + +// UserStatus defines the observed state of an ORC resource. +type UserStatus 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. + // +kubebuilder:validation:MaxLength:=1024 + // +optional + ID *string `json:"id,omitempty"` + + // resource contains the observed state of the OpenStack resource. + // +optional + Resource *UserResourceStatus `json:"resource,omitempty"` +} + +var _ ObjectWithConditions = &User{} + +func (i *User) 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" + +// User is the Schema for an ORC resource. +type User struct { + metav1.TypeMeta `json:",inline"` + + // metadata contains the object metadata + // +optional + metav1.ObjectMeta `json:"metadata,omitempty"` + + // spec specifies the desired state of the resource. + // +required + Spec UserSpec `json:"spec,omitzero"` + + // status defines the observed state of the resource. + // +optional + Status UserStatus `json:"status,omitempty"` +} + +// +kubebuilder:object:root=true + +// UserList contains a list of User. +type UserList struct { + metav1.TypeMeta `json:",inline"` + + // metadata contains the list metadata + // +optional + metav1.ListMeta `json:"metadata,omitempty"` + + // items contains a list of User. + // +required + Items []User `json:"items"` +} + +func (l *UserList) GetItems() []User { + return l.Items +} + +func init() { + SchemeBuilder.Register(&User{}, &UserList{}) +} + +func (i *User) GetCloudCredentialsRef() (*string, *CloudCredentialsReference) { + if i == nil { + return nil, nil + } + + return &i.Namespace, &i.Spec.CloudCredentialsRef +} + +var _ CloudCredentialsRefProvider = &User{} 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 000000000000..9451474fb279 --- /dev/null +++ b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/zz_generated.volume-resource.go @@ -0,0 +1,179 @@ +// Code generated by resource-generator. DO NOT EDIT. +/* +Copyright 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. + // +kubebuilder:validation:Format:=uuid + // +kubebuilder:validation:MaxLength:=36 + // +optional + ID *string `json:"id,omitempty"` //nolint:kubeapilinter + + // 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,omitzero"` +} + +// 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. + // +kubebuilder:validation:MaxLength:=1024 + // +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. + // +required + Spec VolumeSpec `json:"spec,omitzero"` + + // 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 000000000000..5f583a2bd682 --- /dev/null +++ b/vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/zz_generated.volumetype-resource.go @@ -0,0 +1,179 @@ +// Code generated by resource-generator. DO NOT EDIT. +/* +Copyright 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. + // +kubebuilder:validation:Format:=uuid + // +kubebuilder:validation:MaxLength:=36 + // +optional + ID *string `json:"id,omitempty"` //nolint:kubeapilinter + + // 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,omitzero"` +} + +// 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. + // +kubebuilder:validation:MaxLength:=1024 + // +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. + // +required + Spec VolumeTypeSpec `json:"spec,omitzero"` + + // 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/github.com/onsi/gomega/CHANGELOG.md b/vendor/github.com/onsi/gomega/CHANGELOG.md index 9c94d0e6cfde..5f9966fbe7b5 100644 --- a/vendor/github.com/onsi/gomega/CHANGELOG.md +++ b/vendor/github.com/onsi/gomega/CHANGELOG.md @@ -1,3 +1,13 @@ +## 1.41.0 + +### Features + +Add `BeASlice` and `BeAnArray` matchers + +### Fixes + +Object formatting now detects pointer cycles to avoid runaway formatting output. + ## 1.40.0 We're adopting a new release strategy to minimize dependency bloat in projects that consume Gomega. It is a limitation of the go mod toolchain that _test_ subdependencies of your project's direct dependencies get pulled in as *indirect* dependencies. In the case of Gomega, this ends up pulling in all of Ginkgo into your `go.mod` even if you are only using Gomega (Gomega uses Ginkgo for its own tests). diff --git a/vendor/github.com/onsi/gomega/format/format.go b/vendor/github.com/onsi/gomega/format/format.go index 6c23ba338bc5..d56f9a475354 100644 --- a/vendor/github.com/onsi/gomega/format/format.go +++ b/vendor/github.com/onsi/gomega/format/format.go @@ -262,7 +262,7 @@ func Object(object any, indentation uint) string { if err, ok := object.(error); ok && !isNilValue(value) { // isNilValue check needed here to avoid nil deref due to boxed nil commonRepresentation += "\n" + IndentString(err.Error(), indentation) + "\n" + indent } - return fmt.Sprintf("%s<%s>: %s%s", indent, formatType(value), commonRepresentation, formatValue(value, indentation, true)) + return fmt.Sprintf("%s<%s>: %s%s", indent, formatType(value), commonRepresentation, formatValue(value, indentation, true, map[uintptr]struct{}{})) } /* @@ -306,7 +306,7 @@ func formatType(v reflect.Value) string { } } -func formatValue(value reflect.Value, indentation uint, isTopLevel bool) string { +func formatValue(value reflect.Value, indentation uint, isTopLevel bool, visited map[uintptr]struct{}) string { if indentation > MaxDepth { return "..." } @@ -367,23 +367,28 @@ func formatValue(value reflect.Value, indentation uint, isTopLevel bool) string case reflect.Func: return fmt.Sprintf("0x%x", value.Pointer()) case reflect.Ptr: - return formatValue(value.Elem(), indentation, isTopLevel) + ptr := value.Pointer() + if _, ok := visited[ptr]; ok { + return fmt.Sprintf("0x%x (cyclic reference)", ptr) + } + visited[ptr] = struct{}{} + return formatValue(value.Elem(), indentation, isTopLevel, visited) case reflect.Slice: - return truncateLongStrings(formatSlice(value, indentation)) + return truncateLongStrings(formatSlice(value, indentation, visited)) case reflect.String: return truncateLongStrings(formatString(value.String(), indentation, isTopLevel)) case reflect.Array: - return truncateLongStrings(formatSlice(value, indentation)) + return truncateLongStrings(formatSlice(value, indentation, visited)) case reflect.Map: - return truncateLongStrings(formatMap(value, indentation)) + return truncateLongStrings(formatMap(value, indentation, visited)) case reflect.Struct: if value.Type() == timeType && value.CanInterface() { t, _ := value.Interface().(time.Time) return t.Format(time.RFC3339Nano) } - return truncateLongStrings(formatStruct(value, indentation)) + return truncateLongStrings(formatStruct(value, indentation, visited)) case reflect.Interface: - return formatInterface(value, indentation) + return formatInterface(value, indentation, visited) default: if value.CanInterface() { return truncateLongStrings(fmt.Sprintf("%#v", value.Interface())) @@ -414,7 +419,7 @@ func formatString(object any, indentation uint, isTopLevel bool) string { } } -func formatSlice(v reflect.Value, indentation uint) string { +func formatSlice(v reflect.Value, indentation uint, visited map[uintptr]struct{}) string { if v.Kind() == reflect.Slice && v.Type().Elem().Kind() == reflect.Uint8 && isPrintableString(string(v.Bytes())) { return formatString(v.Bytes(), indentation, false) } @@ -423,7 +428,7 @@ func formatSlice(v reflect.Value, indentation uint) string { result := make([]string, l) longest := 0 for i := range l { - result[i] = formatValue(v.Index(i), indentation+1, false) + result[i] = formatValue(v.Index(i), indentation+1, false, visited) if len(result[i]) > longest { longest = len(result[i]) } @@ -436,14 +441,14 @@ func formatSlice(v reflect.Value, indentation uint) string { return fmt.Sprintf("[%s]", strings.Join(result, ", ")) } -func formatMap(v reflect.Value, indentation uint) string { +func formatMap(v reflect.Value, indentation uint, visited map[uintptr]struct{}) string { l := v.Len() result := make([]string, l) longest := 0 for i, key := range v.MapKeys() { value := v.MapIndex(key) - result[i] = fmt.Sprintf("%s: %s", formatValue(key, indentation+1, false), formatValue(value, indentation+1, false)) + result[i] = fmt.Sprintf("%s: %s", formatValue(key, indentation+1, false, visited), formatValue(value, indentation+1, false, visited)) if len(result[i]) > longest { longest = len(result[i]) } @@ -456,7 +461,7 @@ func formatMap(v reflect.Value, indentation uint) string { return fmt.Sprintf("{%s}", strings.Join(result, ", ")) } -func formatStruct(v reflect.Value, indentation uint) string { +func formatStruct(v reflect.Value, indentation uint, visited map[uintptr]struct{}) string { t := v.Type() l := v.NumField() @@ -465,7 +470,7 @@ func formatStruct(v reflect.Value, indentation uint) string { for i := range l { structField := t.Field(i) fieldEntry := v.Field(i) - representation := fmt.Sprintf("%s: %s", structField.Name, formatValue(fieldEntry, indentation+1, false)) + representation := fmt.Sprintf("%s: %s", structField.Name, formatValue(fieldEntry, indentation+1, false, visited)) result = append(result, representation) if len(representation) > longest { longest = len(representation) @@ -478,8 +483,8 @@ func formatStruct(v reflect.Value, indentation uint) string { return fmt.Sprintf("{%s}", strings.Join(result, ", ")) } -func formatInterface(v reflect.Value, indentation uint) string { - return fmt.Sprintf("<%s>%s", formatType(v.Elem()), formatValue(v.Elem(), indentation, false)) +func formatInterface(v reflect.Value, indentation uint, visited map[uintptr]struct{}) string { + return fmt.Sprintf("<%s>%s", formatType(v.Elem()), formatValue(v.Elem(), indentation, false, visited)) } func isNilValue(a reflect.Value) bool { diff --git a/vendor/github.com/onsi/gomega/gomega_dsl.go b/vendor/github.com/onsi/gomega/gomega_dsl.go index af1341bdbdb8..df16ede113db 100644 --- a/vendor/github.com/onsi/gomega/gomega_dsl.go +++ b/vendor/github.com/onsi/gomega/gomega_dsl.go @@ -22,7 +22,7 @@ import ( "github.com/onsi/gomega/types" ) -const GOMEGA_VERSION = "1.40.0" +const GOMEGA_VERSION = "1.41.0" const nilGomegaPanic = `You are trying to make an assertion, but haven't registered Gomega's fail handler. If you're using Ginkgo then you probably forgot to put your assertion in an It(). diff --git a/vendor/github.com/onsi/gomega/matchers.go b/vendor/github.com/onsi/gomega/matchers.go index 16ca8f46dcfe..bf572260500d 100644 --- a/vendor/github.com/onsi/gomega/matchers.go +++ b/vendor/github.com/onsi/gomega/matchers.go @@ -621,6 +621,18 @@ func BeADirectory() types.GomegaMatcher { return &matchers.BeADirectoryMatcher{} } +// BeASlice succeeds if actual is a value of slice type. +// This is useful when actual has type any (interface{}) and you want to assert it is a slice. +func BeASlice() types.GomegaMatcher { + return &matchers.BeASliceMatcher{} +} + +// BeAnArray succeeds if actual is a value of array type. +// This is useful when actual has type any (interface{}) and you want to assert it is an array. +func BeAnArray() types.GomegaMatcher { + return &matchers.BeAnArrayMatcher{} +} + // HaveHTTPStatus succeeds if the Status or StatusCode field of an HTTP response matches. // Actual must be either a *http.Response or *httptest.ResponseRecorder. // Expected must be either an int or a string. diff --git a/vendor/github.com/onsi/gomega/matchers/be_a_slice_matcher.go b/vendor/github.com/onsi/gomega/matchers/be_a_slice_matcher.go new file mode 100644 index 000000000000..4fcad5127128 --- /dev/null +++ b/vendor/github.com/onsi/gomega/matchers/be_a_slice_matcher.go @@ -0,0 +1,28 @@ +// untested sections: 1 + +package matchers + +import ( + "fmt" + "reflect" + + "github.com/onsi/gomega/format" +) + +type BeASliceMatcher struct { +} + +func (matcher *BeASliceMatcher) Match(actual any) (success bool, err error) { + if actual == nil { + return false, fmt.Errorf("BeASlice matcher expects a value, got nil") + } + return reflect.TypeOf(actual).Kind() == reflect.Slice, nil +} + +func (matcher *BeASliceMatcher) FailureMessage(actual any) (message string) { + return format.Message(actual, "to be a slice") +} + +func (matcher *BeASliceMatcher) NegatedFailureMessage(actual any) (message string) { + return format.Message(actual, "not to be a slice") +} diff --git a/vendor/github.com/onsi/gomega/matchers/be_an_array_matcher.go b/vendor/github.com/onsi/gomega/matchers/be_an_array_matcher.go new file mode 100644 index 000000000000..573aa8198729 --- /dev/null +++ b/vendor/github.com/onsi/gomega/matchers/be_an_array_matcher.go @@ -0,0 +1,28 @@ +// untested sections: 1 + +package matchers + +import ( + "fmt" + "reflect" + + "github.com/onsi/gomega/format" +) + +type BeAnArrayMatcher struct { +} + +func (matcher *BeAnArrayMatcher) Match(actual any) (success bool, err error) { + if actual == nil { + return false, fmt.Errorf("BeAnArray matcher expects a value, got nil") + } + return reflect.TypeOf(actual).Kind() == reflect.Array, nil +} + +func (matcher *BeAnArrayMatcher) FailureMessage(actual any) (message string) { + return format.Message(actual, "to be an array") +} + +func (matcher *BeAnArrayMatcher) NegatedFailureMessage(actual any) (message string) { + return format.Message(actual, "not to be an array") +} diff --git a/vendor/github.com/onsi/gomega/types/types.go b/vendor/github.com/onsi/gomega/types/types.go index 685a46f373e3..e444451ac6ab 100644 --- a/vendor/github.com/onsi/gomega/types/types.go +++ b/vendor/github.com/onsi/gomega/types/types.go @@ -66,6 +66,12 @@ func MatchMayChangeInTheFuture(matcher GomegaMatcher, value any) bool { // AsyncAssertions are returned by Eventually and Consistently and enable matchers to be polled repeatedly to ensure // they are eventually satisfied +// +// The optional optionalDescription argument allows you to annotate the assertion with additional information. +// It is passed as the second argument and can be a format string followed by arguments, or a func() string. +// The description is included in failure messages to provide context. +// +// For details on annotating assertions, see: https://onsi.github.io/gomega/#annotating-assertions type AsyncAssertion interface { Should(matcher GomegaMatcher, optionalDescription ...any) bool ShouldNot(matcher GomegaMatcher, optionalDescription ...any) bool @@ -86,6 +92,12 @@ type AsyncAssertion interface { } // Assertions are returned by Ω and Expect and enable assertions against Gomega matchers +// +// The optional optionalDescription argument allows you to annotate the assertion with additional information. +// It is passed as the second argument and can be a format string followed by arguments, or a func() string. +// The description is included in failure messages to provide context. +// +// For details on annotating assertions, see: https://onsi.github.io/gomega/#annotating-assertions type Assertion interface { Should(matcher GomegaMatcher, optionalDescription ...any) bool ShouldNot(matcher GomegaMatcher, optionalDescription ...any) bool diff --git a/vendor/modules.txt b/vendor/modules.txt index dec5c7dfbebc..7d77f0f6c7b5 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -862,8 +862,8 @@ github.com/googleapis/gax-go/v2/callctx github.com/googleapis/gax-go/v2/internal github.com/googleapis/gax-go/v2/internallog github.com/googleapis/gax-go/v2/internallog/internal -# github.com/gophercloud/gophercloud/v2 v2.10.0 -## explicit; go 1.22 +# github.com/gophercloud/gophercloud/v2 v2.12.0 +## explicit; go 1.25.0 github.com/gophercloud/gophercloud/v2 # github.com/gorilla/mux v1.8.1 ## explicit; go 1.20 @@ -901,9 +901,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.6.0 +## explicit; go 1.25.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 @@ -982,7 +982,7 @@ github.com/onsi/ginkgo/v2/internal/reporters github.com/onsi/ginkgo/v2/internal/testingtproxy github.com/onsi/ginkgo/v2/reporters github.com/onsi/ginkgo/v2/types -# github.com/onsi/gomega v1.40.0 +# github.com/onsi/gomega v1.41.0 ## explicit; go 1.24.0 github.com/onsi/gomega github.com/onsi/gomega/format @@ -2575,7 +2575,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 @@ -2623,13 +2623,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.22.5 ## explicit; go 1.24.0 sigs.k8s.io/controller-runtime sigs.k8s.io/controller-runtime/pkg/builder @@ -2797,7 +2797,7 @@ sigs.k8s.io/randfill/bytesource # sigs.k8s.io/secrets-store-csi-driver v1.4.8 ## explicit; go 1.21 sigs.k8s.io/secrets-store-csi-driver/apis/v1 -# sigs.k8s.io/structured-merge-diff/v6 v6.3.2 +# sigs.k8s.io/structured-merge-diff/v6 v6.4.0 ## explicit; go 1.23 sigs.k8s.io/structured-merge-diff/v6/fieldpath sigs.k8s.io/structured-merge-diff/v6/merge @@ -2810,7 +2810,5 @@ 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 # github.com/aws/karpenter-provider-aws => github.com/openshift/aws-karpenter-provider-aws v0.0.0-20260311064431-f0be9c72e5bf # sigs.k8s.io/karpenter => github.com/openshift/kubernetes-sigs-karpenter v0.0.0-20260310165629-67e201b559d5 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 000000000000..d8dbff3f5439 --- /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 6a2484af9ece..079f5330858e 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 d84500772f12..86dcc086f0fb 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 41a74bf6866e..85add4f6267e 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 02833b1ea22d..3c35efcf3587 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 8b52e62a49b3..615a47f73580 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 a02f02102542..334b9d40bc35 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 5cb066219e7a..8232d64d7a5d 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 b93422b7a336..2b6915b82eca 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 5c7b18d0cbfd..aed3639d64fb 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 4e88356d93d9..52f5b20bb9ef 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 c6ff0853b180..5d6d69a9b36d 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 03d7a7a9ad8e..7d289566db89 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 9665953dd4d0..5a37f75427e4 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 eb54f254dd5a..c0514e67d223 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 13a78b23719c..723cf5a90c93 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 af0969853155..9666455e9035 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 80d78f358553..12e8cc19c5d4 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 c0d39fd02c45..13b591c1823a 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 1ca955156444..b849ea61d654 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 a60f736ba21c..16f4bf07a707 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 9a7e31cae44d..9a1f66bc8b07 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 8a5a92db7d1b..80cb19d36256 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 aef565c0aa2f..b619c6e0d7f2 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 49d1f6655253..5adb8a56c456 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 6ada26c78cd5..6eecc0d326c7 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 15a6fb169b4a..da8dd8e8da1d 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 d0be13af9e30..d06baeba82be 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 1c994e3b88e1..64378f457e68 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 c24ca7dddb4a..94d6fbf2a71d 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 684ef3d07b8c..992d574ddee5 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, + }, + }, + } + } +} diff --git a/vendor/sigs.k8s.io/structured-merge-diff/v6/fieldpath/element.go b/vendor/sigs.k8s.io/structured-merge-diff/v6/fieldpath/element.go index 73436912cdd2..f1607601c4a0 100644 --- a/vendor/sigs.k8s.io/structured-merge-diff/v6/fieldpath/element.go +++ b/vendor/sigs.k8s.io/structured-merge-diff/v6/fieldpath/element.go @@ -19,7 +19,7 @@ package fieldpath import ( "fmt" "iter" - "sort" + "slices" "strings" "sigs.k8s.io/structured-merge-diff/v6/value" @@ -255,19 +255,13 @@ func (s PathElementSet) Copy() PathElementSet { // Insert adds pe to the set. func (s *PathElementSet) Insert(pe PathElement) { - loc := sort.Search(len(s.members), func(i int) bool { - return !s.members[i].Less(pe) + loc, found := slices.BinarySearchFunc(s.members, pe, func(a, b PathElement) int { + return a.Compare(b) }) - if loc == len(s.members) { - s.members = append(s.members, pe) + if found { return } - if s.members[loc].Equals(pe) { - return - } - s.members = append(s.members, PathElement{}) - copy(s.members[loc+1:], s.members[loc:]) - s.members[loc] = pe + s.members = slices.Insert(s.members, loc, pe) } // Union returns a set containing elements that appear in either s or s2. @@ -344,16 +338,10 @@ func (s *PathElementSet) Size() int { return len(s.members) } // Has returns true if pe is a member of the set. func (s *PathElementSet) Has(pe PathElement) bool { - loc := sort.Search(len(s.members), func(i int) bool { - return !s.members[i].Less(pe) + _, found := slices.BinarySearchFunc(s.members, pe, func(a, b PathElement) int { + return a.Compare(b) }) - if loc == len(s.members) { - return false - } - if s.members[loc].Equals(pe) { - return true - } - return false + return found } // Equals returns true if s and s2 have exactly the same members. diff --git a/vendor/sigs.k8s.io/structured-merge-diff/v6/fieldpath/pathelementmap.go b/vendor/sigs.k8s.io/structured-merge-diff/v6/fieldpath/pathelementmap.go index ff7ee510c222..ca50b84e99a2 100644 --- a/vendor/sigs.k8s.io/structured-merge-diff/v6/fieldpath/pathelementmap.go +++ b/vendor/sigs.k8s.io/structured-merge-diff/v6/fieldpath/pathelementmap.go @@ -17,7 +17,7 @@ limitations under the License. package fieldpath import ( - "sort" + "slices" "sigs.k8s.io/structured-merge-diff/v6/value" ) @@ -82,32 +82,23 @@ func MakePathElementMap(size int) PathElementMap { // Insert adds the pathelement and associated value in the map. // If insert is called twice with the same PathElement, the value is replaced. func (s *PathElementMap) Insert(pe PathElement, v interface{}) { - loc := sort.Search(len(s.members), func(i int) bool { - return !s.members[i].PathElement.Less(pe) + loc, found := slices.BinarySearchFunc(s.members, pe, func(a pathElementValue, b PathElement) int { + return a.PathElement.Compare(b) }) - if loc == len(s.members) { - s.members = append(s.members, pathElementValue{pe, v}) - return - } - if s.members[loc].PathElement.Equals(pe) { + if found { s.members[loc].Value = v return } - s.members = append(s.members, pathElementValue{}) - copy(s.members[loc+1:], s.members[loc:]) - s.members[loc] = pathElementValue{pe, v} + s.members = slices.Insert(s.members, loc, pathElementValue{PathElement: pe, Value: v}) } // Get retrieves the value associated with the given PathElement from the map. // (nil, false) is returned if there is no such PathElement. func (s *PathElementMap) Get(pe PathElement) (interface{}, bool) { - loc := sort.Search(len(s.members), func(i int) bool { - return !s.members[i].PathElement.Less(pe) + loc, found := slices.BinarySearchFunc(s.members, pe, func(a pathElementValue, b PathElement) int { + return a.PathElement.Compare(b) }) - if loc == len(s.members) { - return nil, false - } - if s.members[loc].PathElement.Equals(pe) { + if found { return s.members[loc].Value, true } return nil, false diff --git a/vendor/sigs.k8s.io/structured-merge-diff/v6/fieldpath/set.go b/vendor/sigs.k8s.io/structured-merge-diff/v6/fieldpath/set.go index d2d8c8a42be2..d7fe643be29a 100644 --- a/vendor/sigs.k8s.io/structured-merge-diff/v6/fieldpath/set.go +++ b/vendor/sigs.k8s.io/structured-merge-diff/v6/fieldpath/set.go @@ -19,6 +19,7 @@ package fieldpath import ( "fmt" "iter" + "slices" "sort" "strings" @@ -486,19 +487,13 @@ func (s *SetNodeMap) Copy() SetNodeMap { // Descend adds pe to the set if necessary, returning the associated subset. func (s *SetNodeMap) Descend(pe PathElement) *Set { - loc := sort.Search(len(s.members), func(i int) bool { - return !s.members[i].pathElement.Less(pe) + loc, found := slices.BinarySearchFunc(s.members, pe, func(a setNode, b PathElement) int { + return a.pathElement.Compare(b) }) - if loc == len(s.members) { - s.members = append(s.members, setNode{pathElement: pe, set: &Set{}}) + if found { return s.members[loc].set } - if s.members[loc].pathElement.Equals(pe) { - return s.members[loc].set - } - s.members = append(s.members, setNode{}) - copy(s.members[loc+1:], s.members[loc:]) - s.members[loc] = setNode{pathElement: pe, set: &Set{}} + s.members = slices.Insert(s.members, loc, setNode{pathElement: pe, set: &Set{}}) return s.members[loc].set } @@ -523,13 +518,10 @@ func (s *SetNodeMap) Empty() bool { // Get returns (the associated set, true) or (nil, false) if there is none. func (s *SetNodeMap) Get(pe PathElement) (*Set, bool) { - loc := sort.Search(len(s.members), func(i int) bool { - return !s.members[i].pathElement.Less(pe) + loc, found := slices.BinarySearchFunc(s.members, pe, func(a setNode, b PathElement) int { + return a.pathElement.Compare(b) }) - if loc == len(s.members) { - return nil, false - } - if s.members[loc].pathElement.Equals(pe) { + if found { return s.members[loc].set, true } return nil, false diff --git a/vendor/sigs.k8s.io/structured-merge-diff/v6/value/allocator.go b/vendor/sigs.k8s.io/structured-merge-diff/v6/value/allocator.go index f70cd41674bb..acbfe8cebaa5 100644 --- a/vendor/sigs.k8s.io/structured-merge-diff/v6/value/allocator.go +++ b/vendor/sigs.k8s.io/structured-merge-diff/v6/value/allocator.go @@ -16,6 +16,8 @@ limitations under the License. package value +import "reflect" + // Allocator provides a value object allocation strategy. // Value objects can be allocated by passing an allocator to the "Using" // receiver functions on the value interfaces, e.g. Map.ZipUsing(allocator, ...). @@ -24,8 +26,8 @@ package value type Allocator interface { // Free gives the allocator back any value objects returned by the "Using" // receiver functions on the value interfaces. - // interface{} may be any of: Value, Map, List or Range. - Free(interface{}) + // any may be any of: Value, Map, List or Range. + Free(any) // The unexported functions are for "Using" receiver functions of the value types // to request what they need from the allocator. @@ -74,7 +76,7 @@ func (p *heapAllocator) allocListReflectRange() *listReflectRange { return &listReflectRange{vr: &valueReflect{}} } -func (p *heapAllocator) Free(_ interface{}) {} +func (p *heapAllocator) Free(_ any) {} // NewFreelistAllocator creates freelist based allocator. // This allocator provides fast allocation and freeing of short lived value objects. @@ -89,25 +91,25 @@ func (p *heapAllocator) Free(_ interface{}) {} // for all temporary value access. func NewFreelistAllocator() Allocator { return &freelistAllocator{ - valueUnstructured: &freelist{new: func() interface{} { + valueUnstructured: &freelist[*valueUnstructured]{new: func() *valueUnstructured { return &valueUnstructured{} }}, - listUnstructuredRange: &freelist{new: func() interface{} { + listUnstructuredRange: &freelist[*listUnstructuredRange]{new: func() *listUnstructuredRange { return &listUnstructuredRange{vv: &valueUnstructured{}} }}, - valueReflect: &freelist{new: func() interface{} { + valueReflect: &freelist[*valueReflect]{new: func() *valueReflect { return &valueReflect{} }}, - mapReflect: &freelist{new: func() interface{} { + mapReflect: &freelist[*mapReflect]{new: func() *mapReflect { return &mapReflect{} }}, - structReflect: &freelist{new: func() interface{} { + structReflect: &freelist[*structReflect]{new: func() *structReflect { return &structReflect{} }}, - listReflect: &freelist{new: func() interface{} { + listReflect: &freelist[*listReflect]{new: func() *listReflect { return &listReflect{} }}, - listReflectRange: &freelist{new: func() interface{} { + listReflectRange: &freelist[*listReflectRange]{new: func() *listReflectRange { return &listReflectRange{vr: &valueReflect{}} }}, } @@ -119,22 +121,22 @@ func NewFreelistAllocator() Allocator { const freelistMaxSize = 1000 type freelistAllocator struct { - valueUnstructured *freelist - listUnstructuredRange *freelist - valueReflect *freelist - mapReflect *freelist - structReflect *freelist - listReflect *freelist - listReflectRange *freelist + valueUnstructured *freelist[*valueUnstructured] + listUnstructuredRange *freelist[*listUnstructuredRange] + valueReflect *freelist[*valueReflect] + mapReflect *freelist[*mapReflect] + structReflect *freelist[*structReflect] + listReflect *freelist[*listReflect] + listReflectRange *freelist[*listReflectRange] } -type freelist struct { - list []interface{} - new func() interface{} +type freelist[T any] struct { + list []T + new func() T } -func (f *freelist) allocate() interface{} { - var w2 interface{} +func (f *freelist[T]) allocate() T { + var w2 T if n := len(f.list); n > 0 { w2, f.list = f.list[n-1], f.list[:n-1] } else { @@ -143,61 +145,73 @@ func (f *freelist) allocate() interface{} { return w2 } -func (f *freelist) free(v interface{}) { +func (f *freelist[T]) free(v T) { if len(f.list) < freelistMaxSize { f.list = append(f.list, v) } } -func (w *freelistAllocator) Free(value interface{}) { +func (w *freelistAllocator) Free(value any) { switch v := value.(type) { case *valueUnstructured: v.Value = nil // don't hold references to unstructured objects w.valueUnstructured.free(v) case *listUnstructuredRange: + v.list = nil // don't hold references to unstructured objects v.vv.Value = nil // don't hold references to unstructured objects w.listUnstructuredRange.free(v) case *valueReflect: - v.ParentMapKey = nil v.ParentMap = nil + v.ParentMapKey = nil + v.Value = reflect.Value{} // don't hold references to reflected objects w.valueReflect.free(v) case *mapReflect: + v.valueReflect.ParentMap = nil + v.valueReflect.ParentMapKey = nil + v.valueReflect.Value = reflect.Value{} // don't hold references to reflected objects w.mapReflect.free(v) case *structReflect: + v.valueReflect.ParentMap = nil + v.valueReflect.ParentMapKey = nil + v.valueReflect.Value = reflect.Value{} // don't hold references to reflected objects w.structReflect.free(v) case *listReflect: + v.Value = reflect.Value{} // don't hold references to reflected objects w.listReflect.free(v) case *listReflectRange: - v.vr.ParentMapKey = nil + v.list = reflect.Value{} // don't hold references to reflected objects v.vr.ParentMap = nil + v.vr.ParentMapKey = nil + v.vr.Value = reflect.Value{} // don't hold references to reflected objects + v.entry = nil w.listReflectRange.free(v) } } func (w *freelistAllocator) allocValueUnstructured() *valueUnstructured { - return w.valueUnstructured.allocate().(*valueUnstructured) + return w.valueUnstructured.allocate() } func (w *freelistAllocator) allocListUnstructuredRange() *listUnstructuredRange { - return w.listUnstructuredRange.allocate().(*listUnstructuredRange) + return w.listUnstructuredRange.allocate() } func (w *freelistAllocator) allocValueReflect() *valueReflect { - return w.valueReflect.allocate().(*valueReflect) + return w.valueReflect.allocate() } func (w *freelistAllocator) allocStructReflect() *structReflect { - return w.structReflect.allocate().(*structReflect) + return w.structReflect.allocate() } func (w *freelistAllocator) allocMapReflect() *mapReflect { - return w.mapReflect.allocate().(*mapReflect) + return w.mapReflect.allocate() } func (w *freelistAllocator) allocListReflect() *listReflect { - return w.listReflect.allocate().(*listReflect) + return w.listReflect.allocate() } func (w *freelistAllocator) allocListReflectRange() *listReflectRange { - return w.listReflectRange.allocate().(*listReflectRange) + return w.listReflectRange.allocate() } diff --git a/vendor/sigs.k8s.io/structured-merge-diff/v6/value/jsontagutil.go b/vendor/sigs.k8s.io/structured-merge-diff/v6/value/jsontagutil.go index 3aadceb22262..db2561373450 100644 --- a/vendor/sigs.k8s.io/structured-merge-diff/v6/value/jsontagutil.go +++ b/vendor/sigs.k8s.io/structured-merge-diff/v6/value/jsontagutil.go @@ -76,11 +76,16 @@ func OmitZeroFunc(t reflect.Type) func(reflect.Value) bool { // but is based on the highly efficient approach from https://golang.org/src/encoding/json/encode.go func lookupJsonTags(f reflect.StructField) (name string, omit bool, inline bool, omitempty bool, omitzero func(reflect.Value) bool) { + // Skip unexported non-embedded fields, matching encoding/json behavior. + if f.PkgPath != "" && !f.Anonymous { + return "", true, false, false, nil + } tag := f.Tag.Get("json") if tag == "-" { return "", true, false, false, nil } name, opts := parseTag(tag) + inline = f.Anonymous && name == "" if name == "" { name = f.Name } @@ -89,7 +94,7 @@ func lookupJsonTags(f reflect.StructField) (name string, omit bool, inline bool, omitzero = OmitZeroFunc(f.Type) } - return name, false, opts.Contains("inline"), opts.Contains("omitempty"), omitzero + return name, false, inline, opts.Contains("omitempty"), omitzero } func isEmpty(v reflect.Value) bool {