From 4fff303a7241f93a969a7105a7ada1b9851b544c Mon Sep 17 00:00:00 2001 From: MyzaTaras Date: Fri, 20 Jan 2023 17:56:44 +0200 Subject: [PATCH] Moving memcache (1), mlengine (1), networkmanagement (1) resources to v1beta1 version Moving memcache: - google_memcache_instance Moving mlengine: - google_ml_engine_model Moving networkmanagement: - google_network_management_connectivity_test --- .../memcache/v1beta1/zz_generated.deepcopy.go | 629 ++++++++++ apis/memcache/v1beta1/zz_generated.managed.go | 86 ++ .../v1beta1/zz_generated.managedlist.go | 29 + .../v1beta1/zz_generated.resolvers.go | 53 + .../v1beta1/zz_generated_terraformed.go | 100 ++ apis/memcache/v1beta1/zz_groupversion_info.go | 44 + apis/memcache/v1beta1/zz_instance_types.go | 323 +++++ .../mlengine/v1beta1/zz_generated.deepcopy.go | 247 ++++ apis/mlengine/v1beta1/zz_generated.managed.go | 86 ++ .../v1beta1/zz_generated.managedlist.go | 29 + .../v1beta1/zz_generated_terraformed.go | 100 ++ apis/mlengine/v1beta1/zz_groupversion_info.go | 44 + apis/mlengine/v1beta1/zz_model_types.go | 130 +++ .../v1beta1/zz_connectivitytest_types.go | 299 +++++ .../v1beta1/zz_generated.deepcopy.go | 410 +++++++ .../v1beta1/zz_generated.managed.go | 86 ++ .../v1beta1/zz_generated.managedlist.go | 29 + .../v1beta1/zz_generated.resolvers.go | 182 +++ .../v1beta1/zz_generated_terraformed.go | 100 ++ .../v1beta1/zz_groupversion_info.go | 44 + apis/zz_register.go | 6 + config/externalname.go | 15 + config/externalnamenottested.go | 15 - examples-generated/memcache/instance.yaml | 69 ++ examples-generated/mlengine/model.yaml | 17 + .../networkmanagement/connectivitytest.yaml | 86 ++ examples/memcache/instance.yaml | 83 ++ examples/mlengine/model.yaml | 14 + .../networkmanagement/connectivitytest.yaml | 100 ++ .../memcache/instance/zz_controller.go | 63 + .../mlengine/model/zz_controller.go | 63 + .../connectivitytest/zz_controller.go | 63 + internal/controller/zz_setup.go | 6 + .../memcache.gcp.upbound.io_instances.yaml | 596 ++++++++++ .../crds/mlengine.gcp.upbound.io_models.yaml | 341 ++++++ ...ment.gcp.upbound.io_connectivitytests.yaml | 1038 +++++++++++++++++ 36 files changed, 5610 insertions(+), 15 deletions(-) create mode 100644 apis/memcache/v1beta1/zz_generated.deepcopy.go create mode 100644 apis/memcache/v1beta1/zz_generated.managed.go create mode 100644 apis/memcache/v1beta1/zz_generated.managedlist.go create mode 100644 apis/memcache/v1beta1/zz_generated.resolvers.go create mode 100755 apis/memcache/v1beta1/zz_generated_terraformed.go create mode 100755 apis/memcache/v1beta1/zz_groupversion_info.go create mode 100755 apis/memcache/v1beta1/zz_instance_types.go create mode 100644 apis/mlengine/v1beta1/zz_generated.deepcopy.go create mode 100644 apis/mlengine/v1beta1/zz_generated.managed.go create mode 100644 apis/mlengine/v1beta1/zz_generated.managedlist.go create mode 100755 apis/mlengine/v1beta1/zz_generated_terraformed.go create mode 100755 apis/mlengine/v1beta1/zz_groupversion_info.go create mode 100755 apis/mlengine/v1beta1/zz_model_types.go create mode 100755 apis/networkmanagement/v1beta1/zz_connectivitytest_types.go create mode 100644 apis/networkmanagement/v1beta1/zz_generated.deepcopy.go create mode 100644 apis/networkmanagement/v1beta1/zz_generated.managed.go create mode 100644 apis/networkmanagement/v1beta1/zz_generated.managedlist.go create mode 100644 apis/networkmanagement/v1beta1/zz_generated.resolvers.go create mode 100755 apis/networkmanagement/v1beta1/zz_generated_terraformed.go create mode 100755 apis/networkmanagement/v1beta1/zz_groupversion_info.go create mode 100644 examples-generated/memcache/instance.yaml create mode 100644 examples-generated/mlengine/model.yaml create mode 100644 examples-generated/networkmanagement/connectivitytest.yaml create mode 100644 examples/memcache/instance.yaml create mode 100644 examples/mlengine/model.yaml create mode 100644 examples/networkmanagement/connectivitytest.yaml create mode 100755 internal/controller/memcache/instance/zz_controller.go create mode 100755 internal/controller/mlengine/model/zz_controller.go create mode 100755 internal/controller/networkmanagement/connectivitytest/zz_controller.go create mode 100644 package/crds/memcache.gcp.upbound.io_instances.yaml create mode 100644 package/crds/mlengine.gcp.upbound.io_models.yaml create mode 100644 package/crds/networkmanagement.gcp.upbound.io_connectivitytests.yaml diff --git a/apis/memcache/v1beta1/zz_generated.deepcopy.go b/apis/memcache/v1beta1/zz_generated.deepcopy.go new file mode 100644 index 000000000..a4f153a19 --- /dev/null +++ b/apis/memcache/v1beta1/zz_generated.deepcopy.go @@ -0,0 +1,629 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +/* +Copyright 2021 The Crossplane 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 v1beta1 + +import ( + "github.com/crossplane/crossplane-runtime/apis/common/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 *Instance) DeepCopyInto(out *Instance) { + *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 Instance. +func (in *Instance) DeepCopy() *Instance { + if in == nil { + return nil + } + out := new(Instance) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Instance) 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 *InstanceList) DeepCopyInto(out *InstanceList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Instance, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InstanceList. +func (in *InstanceList) DeepCopy() *InstanceList { + if in == nil { + return nil + } + out := new(InstanceList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *InstanceList) 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 *InstanceObservation) DeepCopyInto(out *InstanceObservation) { + *out = *in + if in.CreateTime != nil { + in, out := &in.CreateTime, &out.CreateTime + *out = new(string) + **out = **in + } + if in.DiscoveryEndpoint != nil { + in, out := &in.DiscoveryEndpoint, &out.DiscoveryEndpoint + *out = new(string) + **out = **in + } + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } + if in.MaintenancePolicy != nil { + in, out := &in.MaintenancePolicy, &out.MaintenancePolicy + *out = make([]MaintenancePolicyObservation, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.MaintenanceSchedule != nil { + in, out := &in.MaintenanceSchedule, &out.MaintenanceSchedule + *out = make([]MaintenanceScheduleObservation, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.MemcacheFullVersion != nil { + in, out := &in.MemcacheFullVersion, &out.MemcacheFullVersion + *out = new(string) + **out = **in + } + if in.MemcacheNodes != nil { + in, out := &in.MemcacheNodes, &out.MemcacheNodes + *out = make([]MemcacheNodesObservation, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.MemcacheParameters != nil { + in, out := &in.MemcacheParameters, &out.MemcacheParameters + *out = make([]MemcacheParametersObservation, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InstanceObservation. +func (in *InstanceObservation) DeepCopy() *InstanceObservation { + if in == nil { + return nil + } + out := new(InstanceObservation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *InstanceParameters) DeepCopyInto(out *InstanceParameters) { + *out = *in + if in.AuthorizedNetwork != nil { + in, out := &in.AuthorizedNetwork, &out.AuthorizedNetwork + *out = new(string) + **out = **in + } + if in.AuthorizedNetworkRef != nil { + in, out := &in.AuthorizedNetworkRef, &out.AuthorizedNetworkRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.AuthorizedNetworkSelector != nil { + in, out := &in.AuthorizedNetworkSelector, &out.AuthorizedNetworkSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } + if in.DisplayName != nil { + in, out := &in.DisplayName, &out.DisplayName + *out = new(string) + **out = **in + } + if in.Labels != nil { + in, out := &in.Labels, &out.Labels + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + in, out := &val, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } + if in.MaintenancePolicy != nil { + in, out := &in.MaintenancePolicy, &out.MaintenancePolicy + *out = make([]MaintenancePolicyParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.MemcacheParameters != nil { + in, out := &in.MemcacheParameters, &out.MemcacheParameters + *out = make([]MemcacheParametersParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.MemcacheVersion != nil { + in, out := &in.MemcacheVersion, &out.MemcacheVersion + *out = new(string) + **out = **in + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.NodeConfig != nil { + in, out := &in.NodeConfig, &out.NodeConfig + *out = make([]NodeConfigParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.NodeCount != nil { + in, out := &in.NodeCount, &out.NodeCount + *out = new(float64) + **out = **in + } + if in.Project != nil { + in, out := &in.Project, &out.Project + *out = new(string) + **out = **in + } + if in.Region != nil { + in, out := &in.Region, &out.Region + *out = new(string) + **out = **in + } + if in.Zones != nil { + in, out := &in.Zones, &out.Zones + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InstanceParameters. +func (in *InstanceParameters) DeepCopy() *InstanceParameters { + if in == nil { + return nil + } + out := new(InstanceParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *InstanceSpec) DeepCopyInto(out *InstanceSpec) { + *out = *in + in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) + in.ForProvider.DeepCopyInto(&out.ForProvider) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InstanceSpec. +func (in *InstanceSpec) DeepCopy() *InstanceSpec { + if in == nil { + return nil + } + out := new(InstanceSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *InstanceStatus) DeepCopyInto(out *InstanceStatus) { + *out = *in + in.ResourceStatus.DeepCopyInto(&out.ResourceStatus) + in.AtProvider.DeepCopyInto(&out.AtProvider) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InstanceStatus. +func (in *InstanceStatus) DeepCopy() *InstanceStatus { + if in == nil { + return nil + } + out := new(InstanceStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MaintenancePolicyObservation) DeepCopyInto(out *MaintenancePolicyObservation) { + *out = *in + if in.CreateTime != nil { + in, out := &in.CreateTime, &out.CreateTime + *out = new(string) + **out = **in + } + if in.UpdateTime != nil { + in, out := &in.UpdateTime, &out.UpdateTime + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MaintenancePolicyObservation. +func (in *MaintenancePolicyObservation) DeepCopy() *MaintenancePolicyObservation { + if in == nil { + return nil + } + out := new(MaintenancePolicyObservation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MaintenancePolicyParameters) DeepCopyInto(out *MaintenancePolicyParameters) { + *out = *in + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(string) + **out = **in + } + if in.WeeklyMaintenanceWindow != nil { + in, out := &in.WeeklyMaintenanceWindow, &out.WeeklyMaintenanceWindow + *out = make([]WeeklyMaintenanceWindowParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MaintenancePolicyParameters. +func (in *MaintenancePolicyParameters) DeepCopy() *MaintenancePolicyParameters { + if in == nil { + return nil + } + out := new(MaintenancePolicyParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MaintenanceScheduleObservation) DeepCopyInto(out *MaintenanceScheduleObservation) { + *out = *in + if in.EndTime != nil { + in, out := &in.EndTime, &out.EndTime + *out = new(string) + **out = **in + } + if in.ScheduleDeadlineTime != nil { + in, out := &in.ScheduleDeadlineTime, &out.ScheduleDeadlineTime + *out = new(string) + **out = **in + } + if in.StartTime != nil { + in, out := &in.StartTime, &out.StartTime + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MaintenanceScheduleObservation. +func (in *MaintenanceScheduleObservation) DeepCopy() *MaintenanceScheduleObservation { + if in == nil { + return nil + } + out := new(MaintenanceScheduleObservation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MaintenanceScheduleParameters) DeepCopyInto(out *MaintenanceScheduleParameters) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MaintenanceScheduleParameters. +func (in *MaintenanceScheduleParameters) DeepCopy() *MaintenanceScheduleParameters { + if in == nil { + return nil + } + out := new(MaintenanceScheduleParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MemcacheNodesObservation) DeepCopyInto(out *MemcacheNodesObservation) { + *out = *in + if in.Host != nil { + in, out := &in.Host, &out.Host + *out = new(string) + **out = **in + } + if in.NodeID != nil { + in, out := &in.NodeID, &out.NodeID + *out = new(string) + **out = **in + } + if in.Port != nil { + in, out := &in.Port, &out.Port + *out = new(float64) + **out = **in + } + if in.State != nil { + in, out := &in.State, &out.State + *out = new(string) + **out = **in + } + if in.Zone != nil { + in, out := &in.Zone, &out.Zone + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MemcacheNodesObservation. +func (in *MemcacheNodesObservation) DeepCopy() *MemcacheNodesObservation { + if in == nil { + return nil + } + out := new(MemcacheNodesObservation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MemcacheNodesParameters) DeepCopyInto(out *MemcacheNodesParameters) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MemcacheNodesParameters. +func (in *MemcacheNodesParameters) DeepCopy() *MemcacheNodesParameters { + if in == nil { + return nil + } + out := new(MemcacheNodesParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MemcacheParametersObservation) DeepCopyInto(out *MemcacheParametersObservation) { + *out = *in + 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 MemcacheParametersObservation. +func (in *MemcacheParametersObservation) DeepCopy() *MemcacheParametersObservation { + if in == nil { + return nil + } + out := new(MemcacheParametersObservation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MemcacheParametersParameters) DeepCopyInto(out *MemcacheParametersParameters) { + *out = *in + if in.Params != nil { + in, out := &in.Params, &out.Params + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + in, out := &val, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MemcacheParametersParameters. +func (in *MemcacheParametersParameters) DeepCopy() *MemcacheParametersParameters { + if in == nil { + return nil + } + out := new(MemcacheParametersParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NodeConfigObservation) DeepCopyInto(out *NodeConfigObservation) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeConfigObservation. +func (in *NodeConfigObservation) DeepCopy() *NodeConfigObservation { + if in == nil { + return nil + } + out := new(NodeConfigObservation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NodeConfigParameters) DeepCopyInto(out *NodeConfigParameters) { + *out = *in + if in.CPUCount != nil { + in, out := &in.CPUCount, &out.CPUCount + *out = new(float64) + **out = **in + } + if in.MemorySizeMb != nil { + in, out := &in.MemorySizeMb, &out.MemorySizeMb + *out = new(float64) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeConfigParameters. +func (in *NodeConfigParameters) DeepCopy() *NodeConfigParameters { + if in == nil { + return nil + } + out := new(NodeConfigParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StartTimeObservation) DeepCopyInto(out *StartTimeObservation) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StartTimeObservation. +func (in *StartTimeObservation) DeepCopy() *StartTimeObservation { + if in == nil { + return nil + } + out := new(StartTimeObservation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StartTimeParameters) DeepCopyInto(out *StartTimeParameters) { + *out = *in + if in.Hours != nil { + in, out := &in.Hours, &out.Hours + *out = new(float64) + **out = **in + } + if in.Minutes != nil { + in, out := &in.Minutes, &out.Minutes + *out = new(float64) + **out = **in + } + if in.Nanos != nil { + in, out := &in.Nanos, &out.Nanos + *out = new(float64) + **out = **in + } + if in.Seconds != nil { + in, out := &in.Seconds, &out.Seconds + *out = new(float64) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StartTimeParameters. +func (in *StartTimeParameters) DeepCopy() *StartTimeParameters { + if in == nil { + return nil + } + out := new(StartTimeParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *WeeklyMaintenanceWindowObservation) DeepCopyInto(out *WeeklyMaintenanceWindowObservation) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WeeklyMaintenanceWindowObservation. +func (in *WeeklyMaintenanceWindowObservation) DeepCopy() *WeeklyMaintenanceWindowObservation { + if in == nil { + return nil + } + out := new(WeeklyMaintenanceWindowObservation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *WeeklyMaintenanceWindowParameters) DeepCopyInto(out *WeeklyMaintenanceWindowParameters) { + *out = *in + if in.Day != nil { + in, out := &in.Day, &out.Day + *out = new(string) + **out = **in + } + if in.Duration != nil { + in, out := &in.Duration, &out.Duration + *out = new(string) + **out = **in + } + if in.StartTime != nil { + in, out := &in.StartTime, &out.StartTime + *out = make([]StartTimeParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WeeklyMaintenanceWindowParameters. +func (in *WeeklyMaintenanceWindowParameters) DeepCopy() *WeeklyMaintenanceWindowParameters { + if in == nil { + return nil + } + out := new(WeeklyMaintenanceWindowParameters) + in.DeepCopyInto(out) + return out +} diff --git a/apis/memcache/v1beta1/zz_generated.managed.go b/apis/memcache/v1beta1/zz_generated.managed.go new file mode 100644 index 000000000..7132f445d --- /dev/null +++ b/apis/memcache/v1beta1/zz_generated.managed.go @@ -0,0 +1,86 @@ +/* +Copyright 2021 The Crossplane 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 angryjet. DO NOT EDIT. + +package v1beta1 + +import xpv1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + +// GetCondition of this Instance. +func (mg *Instance) GetCondition(ct xpv1.ConditionType) xpv1.Condition { + return mg.Status.GetCondition(ct) +} + +// GetDeletionPolicy of this Instance. +func (mg *Instance) GetDeletionPolicy() xpv1.DeletionPolicy { + return mg.Spec.DeletionPolicy +} + +// GetProviderConfigReference of this Instance. +func (mg *Instance) GetProviderConfigReference() *xpv1.Reference { + return mg.Spec.ProviderConfigReference +} + +/* +GetProviderReference of this Instance. +Deprecated: Use GetProviderConfigReference. +*/ +func (mg *Instance) GetProviderReference() *xpv1.Reference { + return mg.Spec.ProviderReference +} + +// GetPublishConnectionDetailsTo of this Instance. +func (mg *Instance) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { + return mg.Spec.PublishConnectionDetailsTo +} + +// GetWriteConnectionSecretToReference of this Instance. +func (mg *Instance) GetWriteConnectionSecretToReference() *xpv1.SecretReference { + return mg.Spec.WriteConnectionSecretToReference +} + +// SetConditions of this Instance. +func (mg *Instance) SetConditions(c ...xpv1.Condition) { + mg.Status.SetConditions(c...) +} + +// SetDeletionPolicy of this Instance. +func (mg *Instance) SetDeletionPolicy(r xpv1.DeletionPolicy) { + mg.Spec.DeletionPolicy = r +} + +// SetProviderConfigReference of this Instance. +func (mg *Instance) SetProviderConfigReference(r *xpv1.Reference) { + mg.Spec.ProviderConfigReference = r +} + +/* +SetProviderReference of this Instance. +Deprecated: Use SetProviderConfigReference. +*/ +func (mg *Instance) SetProviderReference(r *xpv1.Reference) { + mg.Spec.ProviderReference = r +} + +// SetPublishConnectionDetailsTo of this Instance. +func (mg *Instance) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { + mg.Spec.PublishConnectionDetailsTo = r +} + +// SetWriteConnectionSecretToReference of this Instance. +func (mg *Instance) SetWriteConnectionSecretToReference(r *xpv1.SecretReference) { + mg.Spec.WriteConnectionSecretToReference = r +} diff --git a/apis/memcache/v1beta1/zz_generated.managedlist.go b/apis/memcache/v1beta1/zz_generated.managedlist.go new file mode 100644 index 000000000..5e70c31fe --- /dev/null +++ b/apis/memcache/v1beta1/zz_generated.managedlist.go @@ -0,0 +1,29 @@ +/* +Copyright 2021 The Crossplane 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 angryjet. DO NOT EDIT. + +package v1beta1 + +import resource "github.com/crossplane/crossplane-runtime/pkg/resource" + +// GetItems of this InstanceList. +func (l *InstanceList) GetItems() []resource.Managed { + items := make([]resource.Managed, len(l.Items)) + for i := range l.Items { + items[i] = &l.Items[i] + } + return items +} diff --git a/apis/memcache/v1beta1/zz_generated.resolvers.go b/apis/memcache/v1beta1/zz_generated.resolvers.go new file mode 100644 index 000000000..5dc6c047d --- /dev/null +++ b/apis/memcache/v1beta1/zz_generated.resolvers.go @@ -0,0 +1,53 @@ +/* +Copyright 2021 The Crossplane 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 angryjet. DO NOT EDIT. + +package v1beta1 + +import ( + "context" + reference "github.com/crossplane/crossplane-runtime/pkg/reference" + errors "github.com/pkg/errors" + v1beta1 "github.com/upbound/provider-gcp/apis/servicenetworking/v1beta1" + resource "github.com/upbound/upjet/pkg/resource" + client "sigs.k8s.io/controller-runtime/pkg/client" +) + +// ResolveReferences of this Instance. +func (mg *Instance) ResolveReferences(ctx context.Context, c client.Reader) error { + r := reference.NewAPIResolver(c, mg) + + var rsp reference.ResolutionResponse + var err error + + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.AuthorizedNetwork), + Extract: resource.ExtractParamPath("network", false), + Reference: mg.Spec.ForProvider.AuthorizedNetworkRef, + Selector: mg.Spec.ForProvider.AuthorizedNetworkSelector, + To: reference.To{ + List: &v1beta1.ConnectionList{}, + Managed: &v1beta1.Connection{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.AuthorizedNetwork") + } + mg.Spec.ForProvider.AuthorizedNetwork = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.ForProvider.AuthorizedNetworkRef = rsp.ResolvedReference + + return nil +} diff --git a/apis/memcache/v1beta1/zz_generated_terraformed.go b/apis/memcache/v1beta1/zz_generated_terraformed.go new file mode 100755 index 000000000..44ddad6fd --- /dev/null +++ b/apis/memcache/v1beta1/zz_generated_terraformed.go @@ -0,0 +1,100 @@ +/* +Copyright 2021 The Crossplane 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 upjet. DO NOT EDIT. + +package v1beta1 + +import ( + "github.com/pkg/errors" + + "github.com/upbound/upjet/pkg/resource" + "github.com/upbound/upjet/pkg/resource/json" +) + +// GetTerraformResourceType returns Terraform resource type for this Instance +func (mg *Instance) GetTerraformResourceType() string { + return "google_memcache_instance" +} + +// GetConnectionDetailsMapping for this Instance +func (tr *Instance) GetConnectionDetailsMapping() map[string]string { + return nil +} + +// GetObservation of this Instance +func (tr *Instance) GetObservation() (map[string]any, error) { + o, err := json.TFParser.Marshal(tr.Status.AtProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(o, &base) +} + +// SetObservation for this Instance +func (tr *Instance) SetObservation(obs map[string]any) error { + p, err := json.TFParser.Marshal(obs) + if err != nil { + return err + } + return json.TFParser.Unmarshal(p, &tr.Status.AtProvider) +} + +// GetID returns ID of underlying Terraform resource of this Instance +func (tr *Instance) GetID() string { + if tr.Status.AtProvider.ID == nil { + return "" + } + return *tr.Status.AtProvider.ID +} + +// GetParameters of this Instance +func (tr *Instance) GetParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.ForProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// SetParameters for this Instance +func (tr *Instance) SetParameters(params map[string]any) error { + p, err := json.TFParser.Marshal(params) + if err != nil { + return err + } + return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) +} + +// LateInitialize this Instance using its observed tfState. +// returns True if there are any spec changes for the resource. +func (tr *Instance) LateInitialize(attrs []byte) (bool, error) { + params := &InstanceParameters{} + if err := json.TFParser.Unmarshal(attrs, params); err != nil { + return false, errors.Wrap(err, "failed to unmarshal Terraform state parameters for late-initialization") + } + opts := []resource.GenericLateInitializerOption{resource.WithZeroValueJSONOmitEmptyFilter(resource.CNameWildcard)} + + li := resource.NewGenericLateInitializer(opts...) + return li.LateInitialize(&tr.Spec.ForProvider, params) +} + +// GetTerraformSchemaVersion returns the associated Terraform schema version +func (tr *Instance) GetTerraformSchemaVersion() int { + return 0 +} diff --git a/apis/memcache/v1beta1/zz_groupversion_info.go b/apis/memcache/v1beta1/zz_groupversion_info.go new file mode 100755 index 000000000..7411a903a --- /dev/null +++ b/apis/memcache/v1beta1/zz_groupversion_info.go @@ -0,0 +1,44 @@ +/* +Copyright 2021 The Crossplane 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 upjet. DO NOT EDIT. + +// +kubebuilder:object:generate=true +// +groupName=memcache.gcp.upbound.io +// +versionName=v1beta1 +package v1beta1 + +import ( + "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/controller-runtime/pkg/scheme" +) + +// Package type metadata. +const ( + CRDGroup = "memcache.gcp.upbound.io" + CRDVersion = "v1beta1" +) + +var ( + // CRDGroupVersion is the API Group Version used to register the objects + CRDGroupVersion = schema.GroupVersion{Group: CRDGroup, Version: CRDVersion} + + // SchemeBuilder is used to add go types to the GroupVersionKind scheme + SchemeBuilder = &scheme.Builder{GroupVersion: CRDGroupVersion} + + // AddToScheme adds the types in this group-version to the given scheme. + AddToScheme = SchemeBuilder.AddToScheme +) diff --git a/apis/memcache/v1beta1/zz_instance_types.go b/apis/memcache/v1beta1/zz_instance_types.go new file mode 100755 index 000000000..5f4a1de56 --- /dev/null +++ b/apis/memcache/v1beta1/zz_instance_types.go @@ -0,0 +1,323 @@ +/* +Copyright 2021 The Crossplane 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 upjet. DO NOT EDIT. + +package v1beta1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime/schema" + + v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" +) + +type InstanceObservation struct { + + // Creation timestamp in RFC3339 text format. + CreateTime *string `json:"createTime,omitempty" tf:"create_time,omitempty"` + + // Endpoint for Discovery API + DiscoveryEndpoint *string `json:"discoveryEndpoint,omitempty" tf:"discovery_endpoint,omitempty"` + + // an identifier for the resource with format projects/{{project}}/locations/{{region}}/instances/{{name}} + ID *string `json:"id,omitempty" tf:"id,omitempty"` + + // Maintenance policy for an instance. + // Structure is documented below. + // +kubebuilder:validation:Optional + MaintenancePolicy []MaintenancePolicyObservation `json:"maintenancePolicy,omitempty" tf:"maintenance_policy,omitempty"` + + // Output only. Published maintenance schedule. + // Structure is documented below. + MaintenanceSchedule []MaintenanceScheduleObservation `json:"maintenanceSchedule,omitempty" tf:"maintenance_schedule,omitempty"` + + // The full version of memcached server running on this instance. + MemcacheFullVersion *string `json:"memcacheFullVersion,omitempty" tf:"memcache_full_version,omitempty"` + + // Additional information about the instance state, if available. + // Structure is documented below. + MemcacheNodes []MemcacheNodesObservation `json:"memcacheNodes,omitempty" tf:"memcache_nodes,omitempty"` + + // User-specified parameters for this memcache instance. + // Structure is documented below. + // +kubebuilder:validation:Optional + MemcacheParameters []MemcacheParametersObservation `json:"memcacheParameters,omitempty" tf:"memcache_parameters,omitempty"` +} + +type InstanceParameters struct { + + // The full name of the GCE network to connect the instance to. If not provided, + // 'default' will be used. + // +crossplane:generate:reference:type=github.com/upbound/provider-gcp/apis/servicenetworking/v1beta1.Connection + // +crossplane:generate:reference:extractor=github.com/upbound/upjet/pkg/resource.ExtractParamPath("network",false) + // +kubebuilder:validation:Optional + AuthorizedNetwork *string `json:"authorizedNetwork,omitempty" tf:"authorized_network,omitempty"` + + // Reference to a Connection in servicenetworking to populate authorizedNetwork. + // +kubebuilder:validation:Optional + AuthorizedNetworkRef *v1.Reference `json:"authorizedNetworkRef,omitempty" tf:"-"` + + // Selector for a Connection in servicenetworking to populate authorizedNetwork. + // +kubebuilder:validation:Optional + AuthorizedNetworkSelector *v1.Selector `json:"authorizedNetworkSelector,omitempty" tf:"-"` + + // A user-visible name for the instance. + // +kubebuilder:validation:Optional + DisplayName *string `json:"displayName,omitempty" tf:"display_name,omitempty"` + + // Resource labels to represent user-provided metadata. + // +kubebuilder:validation:Optional + Labels map[string]*string `json:"labels,omitempty" tf:"labels,omitempty"` + + // Maintenance policy for an instance. + // Structure is documented below. + // +kubebuilder:validation:Optional + MaintenancePolicy []MaintenancePolicyParameters `json:"maintenancePolicy,omitempty" tf:"maintenance_policy,omitempty"` + + // User-specified parameters for this memcache instance. + // Structure is documented below. + // +kubebuilder:validation:Optional + MemcacheParameters []MemcacheParametersParameters `json:"memcacheParameters,omitempty" tf:"memcache_parameters,omitempty"` + + // The major version of Memcached software. If not provided, latest supported version will be used. + // Currently the latest supported major version is MEMCACHE_1_5. The minor version will be automatically + // determined by our system based on the latest supported minor version. + // Default value is MEMCACHE_1_5. + // Possible values are MEMCACHE_1_5. + // +kubebuilder:validation:Optional + MemcacheVersion *string `json:"memcacheVersion,omitempty" tf:"memcache_version,omitempty"` + + // The resource name of the instance. + // +kubebuilder:validation:Required + Name *string `json:"name" tf:"name,omitempty"` + + // Configuration for memcache nodes. + // Structure is documented below. + // +kubebuilder:validation:Required + NodeConfig []NodeConfigParameters `json:"nodeConfig" tf:"node_config,omitempty"` + + // Number of nodes in the memcache instance. + // +kubebuilder:validation:Required + NodeCount *float64 `json:"nodeCount" tf:"node_count,omitempty"` + + // The ID of the project in which the resource belongs. + // If it is not provided, the provider project is used. + // +kubebuilder:validation:Optional + Project *string `json:"project,omitempty" tf:"project,omitempty"` + + // The region of the Memcache instance. If it is not provided, the provider region is used. + // +kubebuilder:validation:Optional + Region *string `json:"region,omitempty" tf:"region,omitempty"` + + // Zones where memcache nodes should be provisioned. If not + // provided, all zones will be used. + // +kubebuilder:validation:Optional + Zones []*string `json:"zones,omitempty" tf:"zones,omitempty"` +} + +type MaintenancePolicyObservation struct { + + // Output only. The time when the policy was created. + // A timestamp in RFC3339 UTC "Zulu" format, with nanosecond + // resolution and up to nine fractional digits + CreateTime *string `json:"createTime,omitempty" tf:"create_time,omitempty"` + + // Output only. The time when the policy was updated. + // A timestamp in RFC3339 UTC "Zulu" format, with nanosecond + // resolution and up to nine fractional digits. + UpdateTime *string `json:"updateTime,omitempty" tf:"update_time,omitempty"` +} + +type MaintenancePolicyParameters struct { + + // Optional. Description of what this policy is for. + // Create/Update methods return INVALID_ARGUMENT if the + // length is greater than 512. + // +kubebuilder:validation:Optional + Description *string `json:"description,omitempty" tf:"description,omitempty"` + + // Required. Maintenance window that is applied to resources covered by this policy. + // Minimum 1. For the current version, the maximum number of weekly_maintenance_windows + // is expected to be one. + // Structure is documented below. + // +kubebuilder:validation:Required + WeeklyMaintenanceWindow []WeeklyMaintenanceWindowParameters `json:"weeklyMaintenanceWindow" tf:"weekly_maintenance_window,omitempty"` +} + +type MaintenanceScheduleObservation struct { + + // Output only. The end time of any upcoming scheduled maintenance for this instance. + // A timestamp in RFC3339 UTC "Zulu" format, with nanosecond + // resolution and up to nine fractional digits. + EndTime *string `json:"endTime,omitempty" tf:"end_time,omitempty"` + + // Output only. The deadline that the maintenance schedule start time + // can not go beyond, including reschedule. + // A timestamp in RFC3339 UTC "Zulu" format, with nanosecond + // resolution and up to nine fractional digits. + ScheduleDeadlineTime *string `json:"scheduleDeadlineTime,omitempty" tf:"schedule_deadline_time,omitempty"` + + // Output only. The start time of any upcoming scheduled maintenance for this instance. + // A timestamp in RFC3339 UTC "Zulu" format, with nanosecond + // resolution and up to nine fractional digits. + StartTime *string `json:"startTime,omitempty" tf:"start_time,omitempty"` +} + +type MaintenanceScheduleParameters struct { +} + +type MemcacheNodesObservation struct { + + // Hostname or IP address of the Memcached node used by the clients to connect to the Memcached server on this node. + Host *string `json:"host,omitempty" tf:"host,omitempty"` + + // Identifier of the Memcached node. The node id does not include project or location like the Memcached instance name. + NodeID *string `json:"nodeId,omitempty" tf:"node_id,omitempty"` + + // The port number of the Memcached server on this node. + Port *float64 `json:"port,omitempty" tf:"port,omitempty"` + + // Current state of the Memcached node. + State *string `json:"state,omitempty" tf:"state,omitempty"` + + // Location (GCP Zone) for the Memcached node. + Zone *string `json:"zone,omitempty" tf:"zone,omitempty"` +} + +type MemcacheNodesParameters struct { +} + +type MemcacheParametersObservation struct { + + // This is a unique ID associated with this set of parameters. + ID *string `json:"id,omitempty" tf:"id,omitempty"` +} + +type MemcacheParametersParameters struct { + + // User-defined set of parameters to use in the memcache process. + // +kubebuilder:validation:Optional + Params map[string]*string `json:"params,omitempty" tf:"params,omitempty"` +} + +type NodeConfigObservation struct { +} + +type NodeConfigParameters struct { + + // Number of CPUs per node. + // +kubebuilder:validation:Required + CPUCount *float64 `json:"cpuCount" tf:"cpu_count,omitempty"` + + // Memory size in Mebibytes for each memcache node. + // +kubebuilder:validation:Required + MemorySizeMb *float64 `json:"memorySizeMb" tf:"memory_size_mb,omitempty"` +} + +type StartTimeObservation struct { +} + +type StartTimeParameters struct { + + // Hours of day in 24 hour format. Should be from 0 to 23. + // An API may choose to allow the value "24:00:00" for scenarios like business closing time. + // +kubebuilder:validation:Optional + Hours *float64 `json:"hours,omitempty" tf:"hours,omitempty"` + + // Minutes of hour of day. Must be from 0 to 59. + // +kubebuilder:validation:Optional + Minutes *float64 `json:"minutes,omitempty" tf:"minutes,omitempty"` + + // Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999. + // +kubebuilder:validation:Optional + Nanos *float64 `json:"nanos,omitempty" tf:"nanos,omitempty"` + + // Seconds of minutes of the time. Must normally be from 0 to 59. + // An API may allow the value 60 if it allows leap-seconds. + // +kubebuilder:validation:Optional + Seconds *float64 `json:"seconds,omitempty" tf:"seconds,omitempty"` +} + +type WeeklyMaintenanceWindowObservation struct { +} + +type WeeklyMaintenanceWindowParameters struct { + + // Required. The day of week that maintenance updates occur. + // +kubebuilder:validation:Required + Day *string `json:"day" tf:"day,omitempty"` + + // Required. The length of the maintenance window, ranging from 3 hours to 8 hours. + // A duration in seconds with up to nine fractional digits, + // terminated by 's'. Example: "3.5s". + // +kubebuilder:validation:Required + Duration *string `json:"duration" tf:"duration,omitempty"` + + // Required. Start time of the window in UTC time. + // Structure is documented below. + // +kubebuilder:validation:Required + StartTime []StartTimeParameters `json:"startTime" tf:"start_time,omitempty"` +} + +// InstanceSpec defines the desired state of Instance +type InstanceSpec struct { + v1.ResourceSpec `json:",inline"` + ForProvider InstanceParameters `json:"forProvider"` +} + +// InstanceStatus defines the observed state of Instance. +type InstanceStatus struct { + v1.ResourceStatus `json:",inline"` + AtProvider InstanceObservation `json:"atProvider,omitempty"` +} + +// +kubebuilder:object:root=true + +// Instance is the Schema for the Instances API. A Google Cloud Memcache instance. +// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" +// +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" +// +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name" +// +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" +// +kubebuilder:subresource:status +// +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,gcp} +type Instance struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + Spec InstanceSpec `json:"spec"` + Status InstanceStatus `json:"status,omitempty"` +} + +// +kubebuilder:object:root=true + +// InstanceList contains a list of Instances +type InstanceList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []Instance `json:"items"` +} + +// Repository type metadata. +var ( + Instance_Kind = "Instance" + Instance_GroupKind = schema.GroupKind{Group: CRDGroup, Kind: Instance_Kind}.String() + Instance_KindAPIVersion = Instance_Kind + "." + CRDGroupVersion.String() + Instance_GroupVersionKind = CRDGroupVersion.WithKind(Instance_Kind) +) + +func init() { + SchemeBuilder.Register(&Instance{}, &InstanceList{}) +} diff --git a/apis/mlengine/v1beta1/zz_generated.deepcopy.go b/apis/mlengine/v1beta1/zz_generated.deepcopy.go new file mode 100644 index 000000000..aaa8957b7 --- /dev/null +++ b/apis/mlengine/v1beta1/zz_generated.deepcopy.go @@ -0,0 +1,247 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +/* +Copyright 2021 The Crossplane 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 v1beta1 + +import ( + 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 *DefaultVersionObservation) DeepCopyInto(out *DefaultVersionObservation) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DefaultVersionObservation. +func (in *DefaultVersionObservation) DeepCopy() *DefaultVersionObservation { + if in == nil { + return nil + } + out := new(DefaultVersionObservation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DefaultVersionParameters) DeepCopyInto(out *DefaultVersionParameters) { + *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 DefaultVersionParameters. +func (in *DefaultVersionParameters) DeepCopy() *DefaultVersionParameters { + if in == nil { + return nil + } + out := new(DefaultVersionParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Model) DeepCopyInto(out *Model) { + *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 Model. +func (in *Model) DeepCopy() *Model { + if in == nil { + return nil + } + out := new(Model) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Model) 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 *ModelList) DeepCopyInto(out *ModelList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Model, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ModelList. +func (in *ModelList) DeepCopy() *ModelList { + if in == nil { + return nil + } + out := new(ModelList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ModelList) 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 *ModelObservation) DeepCopyInto(out *ModelObservation) { + *out = *in + 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 ModelObservation. +func (in *ModelObservation) DeepCopy() *ModelObservation { + if in == nil { + return nil + } + out := new(ModelObservation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ModelParameters) DeepCopyInto(out *ModelParameters) { + *out = *in + if in.DefaultVersion != nil { + in, out := &in.DefaultVersion, &out.DefaultVersion + *out = make([]DefaultVersionParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(string) + **out = **in + } + if in.Labels != nil { + in, out := &in.Labels, &out.Labels + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + in, out := &val, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.OnlinePredictionConsoleLogging != nil { + in, out := &in.OnlinePredictionConsoleLogging, &out.OnlinePredictionConsoleLogging + *out = new(bool) + **out = **in + } + if in.OnlinePredictionLogging != nil { + in, out := &in.OnlinePredictionLogging, &out.OnlinePredictionLogging + *out = new(bool) + **out = **in + } + if in.Project != nil { + in, out := &in.Project, &out.Project + *out = new(string) + **out = **in + } + if in.Regions != nil { + in, out := &in.Regions, &out.Regions + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ModelParameters. +func (in *ModelParameters) DeepCopy() *ModelParameters { + if in == nil { + return nil + } + out := new(ModelParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ModelSpec) DeepCopyInto(out *ModelSpec) { + *out = *in + in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) + in.ForProvider.DeepCopyInto(&out.ForProvider) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ModelSpec. +func (in *ModelSpec) DeepCopy() *ModelSpec { + if in == nil { + return nil + } + out := new(ModelSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ModelStatus) DeepCopyInto(out *ModelStatus) { + *out = *in + in.ResourceStatus.DeepCopyInto(&out.ResourceStatus) + in.AtProvider.DeepCopyInto(&out.AtProvider) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ModelStatus. +func (in *ModelStatus) DeepCopy() *ModelStatus { + if in == nil { + return nil + } + out := new(ModelStatus) + in.DeepCopyInto(out) + return out +} diff --git a/apis/mlengine/v1beta1/zz_generated.managed.go b/apis/mlengine/v1beta1/zz_generated.managed.go new file mode 100644 index 000000000..14d74d935 --- /dev/null +++ b/apis/mlengine/v1beta1/zz_generated.managed.go @@ -0,0 +1,86 @@ +/* +Copyright 2021 The Crossplane 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 angryjet. DO NOT EDIT. + +package v1beta1 + +import xpv1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + +// GetCondition of this Model. +func (mg *Model) GetCondition(ct xpv1.ConditionType) xpv1.Condition { + return mg.Status.GetCondition(ct) +} + +// GetDeletionPolicy of this Model. +func (mg *Model) GetDeletionPolicy() xpv1.DeletionPolicy { + return mg.Spec.DeletionPolicy +} + +// GetProviderConfigReference of this Model. +func (mg *Model) GetProviderConfigReference() *xpv1.Reference { + return mg.Spec.ProviderConfigReference +} + +/* +GetProviderReference of this Model. +Deprecated: Use GetProviderConfigReference. +*/ +func (mg *Model) GetProviderReference() *xpv1.Reference { + return mg.Spec.ProviderReference +} + +// GetPublishConnectionDetailsTo of this Model. +func (mg *Model) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { + return mg.Spec.PublishConnectionDetailsTo +} + +// GetWriteConnectionSecretToReference of this Model. +func (mg *Model) GetWriteConnectionSecretToReference() *xpv1.SecretReference { + return mg.Spec.WriteConnectionSecretToReference +} + +// SetConditions of this Model. +func (mg *Model) SetConditions(c ...xpv1.Condition) { + mg.Status.SetConditions(c...) +} + +// SetDeletionPolicy of this Model. +func (mg *Model) SetDeletionPolicy(r xpv1.DeletionPolicy) { + mg.Spec.DeletionPolicy = r +} + +// SetProviderConfigReference of this Model. +func (mg *Model) SetProviderConfigReference(r *xpv1.Reference) { + mg.Spec.ProviderConfigReference = r +} + +/* +SetProviderReference of this Model. +Deprecated: Use SetProviderConfigReference. +*/ +func (mg *Model) SetProviderReference(r *xpv1.Reference) { + mg.Spec.ProviderReference = r +} + +// SetPublishConnectionDetailsTo of this Model. +func (mg *Model) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { + mg.Spec.PublishConnectionDetailsTo = r +} + +// SetWriteConnectionSecretToReference of this Model. +func (mg *Model) SetWriteConnectionSecretToReference(r *xpv1.SecretReference) { + mg.Spec.WriteConnectionSecretToReference = r +} diff --git a/apis/mlengine/v1beta1/zz_generated.managedlist.go b/apis/mlengine/v1beta1/zz_generated.managedlist.go new file mode 100644 index 000000000..ae72861c0 --- /dev/null +++ b/apis/mlengine/v1beta1/zz_generated.managedlist.go @@ -0,0 +1,29 @@ +/* +Copyright 2021 The Crossplane 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 angryjet. DO NOT EDIT. + +package v1beta1 + +import resource "github.com/crossplane/crossplane-runtime/pkg/resource" + +// GetItems of this ModelList. +func (l *ModelList) GetItems() []resource.Managed { + items := make([]resource.Managed, len(l.Items)) + for i := range l.Items { + items[i] = &l.Items[i] + } + return items +} diff --git a/apis/mlengine/v1beta1/zz_generated_terraformed.go b/apis/mlengine/v1beta1/zz_generated_terraformed.go new file mode 100755 index 000000000..363539383 --- /dev/null +++ b/apis/mlengine/v1beta1/zz_generated_terraformed.go @@ -0,0 +1,100 @@ +/* +Copyright 2021 The Crossplane 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 upjet. DO NOT EDIT. + +package v1beta1 + +import ( + "github.com/pkg/errors" + + "github.com/upbound/upjet/pkg/resource" + "github.com/upbound/upjet/pkg/resource/json" +) + +// GetTerraformResourceType returns Terraform resource type for this Model +func (mg *Model) GetTerraformResourceType() string { + return "google_ml_engine_model" +} + +// GetConnectionDetailsMapping for this Model +func (tr *Model) GetConnectionDetailsMapping() map[string]string { + return nil +} + +// GetObservation of this Model +func (tr *Model) GetObservation() (map[string]any, error) { + o, err := json.TFParser.Marshal(tr.Status.AtProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(o, &base) +} + +// SetObservation for this Model +func (tr *Model) SetObservation(obs map[string]any) error { + p, err := json.TFParser.Marshal(obs) + if err != nil { + return err + } + return json.TFParser.Unmarshal(p, &tr.Status.AtProvider) +} + +// GetID returns ID of underlying Terraform resource of this Model +func (tr *Model) GetID() string { + if tr.Status.AtProvider.ID == nil { + return "" + } + return *tr.Status.AtProvider.ID +} + +// GetParameters of this Model +func (tr *Model) GetParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.ForProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// SetParameters for this Model +func (tr *Model) SetParameters(params map[string]any) error { + p, err := json.TFParser.Marshal(params) + if err != nil { + return err + } + return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) +} + +// LateInitialize this Model using its observed tfState. +// returns True if there are any spec changes for the resource. +func (tr *Model) LateInitialize(attrs []byte) (bool, error) { + params := &ModelParameters{} + if err := json.TFParser.Unmarshal(attrs, params); err != nil { + return false, errors.Wrap(err, "failed to unmarshal Terraform state parameters for late-initialization") + } + opts := []resource.GenericLateInitializerOption{resource.WithZeroValueJSONOmitEmptyFilter(resource.CNameWildcard)} + + li := resource.NewGenericLateInitializer(opts...) + return li.LateInitialize(&tr.Spec.ForProvider, params) +} + +// GetTerraformSchemaVersion returns the associated Terraform schema version +func (tr *Model) GetTerraformSchemaVersion() int { + return 0 +} diff --git a/apis/mlengine/v1beta1/zz_groupversion_info.go b/apis/mlengine/v1beta1/zz_groupversion_info.go new file mode 100755 index 000000000..0980b3d49 --- /dev/null +++ b/apis/mlengine/v1beta1/zz_groupversion_info.go @@ -0,0 +1,44 @@ +/* +Copyright 2021 The Crossplane 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 upjet. DO NOT EDIT. + +// +kubebuilder:object:generate=true +// +groupName=mlengine.gcp.upbound.io +// +versionName=v1beta1 +package v1beta1 + +import ( + "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/controller-runtime/pkg/scheme" +) + +// Package type metadata. +const ( + CRDGroup = "mlengine.gcp.upbound.io" + CRDVersion = "v1beta1" +) + +var ( + // CRDGroupVersion is the API Group Version used to register the objects + CRDGroupVersion = schema.GroupVersion{Group: CRDGroup, Version: CRDVersion} + + // SchemeBuilder is used to add go types to the GroupVersionKind scheme + SchemeBuilder = &scheme.Builder{GroupVersion: CRDGroupVersion} + + // AddToScheme adds the types in this group-version to the given scheme. + AddToScheme = SchemeBuilder.AddToScheme +) diff --git a/apis/mlengine/v1beta1/zz_model_types.go b/apis/mlengine/v1beta1/zz_model_types.go new file mode 100755 index 000000000..f98d1b138 --- /dev/null +++ b/apis/mlengine/v1beta1/zz_model_types.go @@ -0,0 +1,130 @@ +/* +Copyright 2021 The Crossplane 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 upjet. DO NOT EDIT. + +package v1beta1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime/schema" + + v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" +) + +type DefaultVersionObservation struct { +} + +type DefaultVersionParameters struct { + + // The name specified for the version when it was created. + // +kubebuilder:validation:Required + Name *string `json:"name" tf:"name,omitempty"` +} + +type ModelObservation struct { + + // an identifier for the resource with format projects/{{project}}/models/{{name}} + ID *string `json:"id,omitempty" tf:"id,omitempty"` +} + +type ModelParameters struct { + + // The default version of the model. This version will be used to handle + // prediction requests that do not specify a version. + // Structure is documented below. + // +kubebuilder:validation:Optional + DefaultVersion []DefaultVersionParameters `json:"defaultVersion,omitempty" tf:"default_version,omitempty"` + + // The description specified for the model when it was created. + // +kubebuilder:validation:Optional + Description *string `json:"description,omitempty" tf:"description,omitempty"` + + // One or more labels that you can add, to organize your models. + // +kubebuilder:validation:Optional + Labels map[string]*string `json:"labels,omitempty" tf:"labels,omitempty"` + + // The name specified for the model. + // +kubebuilder:validation:Required + Name *string `json:"name" tf:"name,omitempty"` + + // If true, online prediction nodes send stderr and stdout streams to Stackdriver Logging + // +kubebuilder:validation:Optional + OnlinePredictionConsoleLogging *bool `json:"onlinePredictionConsoleLogging,omitempty" tf:"online_prediction_console_logging,omitempty"` + + // If true, online prediction access logs are sent to StackDriver Logging. + // +kubebuilder:validation:Optional + OnlinePredictionLogging *bool `json:"onlinePredictionLogging,omitempty" tf:"online_prediction_logging,omitempty"` + + // The ID of the project in which the resource belongs. + // If it is not provided, the provider project is used. + // +kubebuilder:validation:Optional + Project *string `json:"project,omitempty" tf:"project,omitempty"` + + // The list of regions where the model is going to be deployed. + // Currently only one region per model is supported + // +kubebuilder:validation:Optional + Regions []*string `json:"regions,omitempty" tf:"regions,omitempty"` +} + +// ModelSpec defines the desired state of Model +type ModelSpec struct { + v1.ResourceSpec `json:",inline"` + ForProvider ModelParameters `json:"forProvider"` +} + +// ModelStatus defines the observed state of Model. +type ModelStatus struct { + v1.ResourceStatus `json:",inline"` + AtProvider ModelObservation `json:"atProvider,omitempty"` +} + +// +kubebuilder:object:root=true + +// Model is the Schema for the Models API. Represents a machine learning solution. +// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" +// +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" +// +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name" +// +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" +// +kubebuilder:subresource:status +// +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,gcp} +type Model struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + Spec ModelSpec `json:"spec"` + Status ModelStatus `json:"status,omitempty"` +} + +// +kubebuilder:object:root=true + +// ModelList contains a list of Models +type ModelList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []Model `json:"items"` +} + +// Repository type metadata. +var ( + Model_Kind = "Model" + Model_GroupKind = schema.GroupKind{Group: CRDGroup, Kind: Model_Kind}.String() + Model_KindAPIVersion = Model_Kind + "." + CRDGroupVersion.String() + Model_GroupVersionKind = CRDGroupVersion.WithKind(Model_Kind) +) + +func init() { + SchemeBuilder.Register(&Model{}, &ModelList{}) +} diff --git a/apis/networkmanagement/v1beta1/zz_connectivitytest_types.go b/apis/networkmanagement/v1beta1/zz_connectivitytest_types.go new file mode 100755 index 000000000..74c0d615a --- /dev/null +++ b/apis/networkmanagement/v1beta1/zz_connectivitytest_types.go @@ -0,0 +1,299 @@ +/* +Copyright 2021 The Crossplane 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 upjet. DO NOT EDIT. + +package v1beta1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime/schema" + + v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" +) + +type ConnectivityTestObservation struct { + + // an identifier for the resource with format projects/{{project}}/locations/global/connectivityTests/{{name}} + ID *string `json:"id,omitempty" tf:"id,omitempty"` +} + +type ConnectivityTestParameters struct { + + // The user-supplied description of the Connectivity Test. + // Maximum of 512 characters. + // +kubebuilder:validation:Optional + Description *string `json:"description,omitempty" tf:"description,omitempty"` + + // Required. Destination specification of the Connectivity Test. + // You can use a combination of destination IP address, Compute + // Engine VM instance, or VPC network to uniquely identify the + // destination location. + // Even if the destination IP address is not unique, the source IP + // location is unique. Usually, the analysis can infer the destination + // endpoint from route information. + // If the destination you specify is a VM instance and the instance has + // multiple network interfaces, then you must also specify either a + // destination IP address or VPC network to identify the destination + // interface. + // A reachability analysis proceeds even if the destination location + // is ambiguous. However, the result can include endpoints that you + // don't intend to test. + // Structure is documented below. + // +kubebuilder:validation:Required + Destination []DestinationParameters `json:"destination" tf:"destination,omitempty"` + + // Resource labels to represent user-provided metadata. + // +kubebuilder:validation:Optional + Labels map[string]*string `json:"labels,omitempty" tf:"labels,omitempty"` + + // Unique name for the connectivity test. + // +kubebuilder:validation:Required + Name *string `json:"name" tf:"name,omitempty"` + + // The ID of the project in which the resource belongs. + // If it is not provided, the provider project is used. + // +kubebuilder:validation:Optional + Project *string `json:"project,omitempty" tf:"project,omitempty"` + + // IP Protocol of the test. When not provided, "TCP" is assumed. + // +kubebuilder:validation:Optional + Protocol *string `json:"protocol,omitempty" tf:"protocol,omitempty"` + + // Other projects that may be relevant for reachability analysis. + // This is applicable to scenarios where a test can cross project + // boundaries. + // +kubebuilder:validation:Optional + RelatedProjects []*string `json:"relatedProjects,omitempty" tf:"related_projects,omitempty"` + + // Required. Source specification of the Connectivity Test. + // You can use a combination of source IP address, virtual machine + // (VM) instance, or Compute Engine network to uniquely identify the + // source location. + // Examples: If the source IP address is an internal IP address within + // a Google Cloud Virtual Private Cloud (VPC) network, then you must + // also specify the VPC network. Otherwise, specify the VM instance, + // which already contains its internal IP address and VPC network + // information. + // If the source of the test is within an on-premises network, then + // you must provide the destination VPC network. + // If the source endpoint is a Compute Engine VM instance with multiple + // network interfaces, the instance itself is not sufficient to + // identify the endpoint. So, you must also specify the source IP + // address or VPC network. + // A reachability analysis proceeds even if the source location is + // ambiguous. However, the test result may include endpoints that + // you don't intend to test. + // Structure is documented below. + // +kubebuilder:validation:Required + Source []SourceParameters `json:"source" tf:"source,omitempty"` +} + +type DestinationObservation struct { +} + +type DestinationParameters struct { + + // The IP address of the endpoint, which can be an external or + // internal IP. An IPv6 address is only allowed when the test's + // destination is a global load balancer VIP. + // +crossplane:generate:reference:type=github.com/upbound/provider-gcp/apis/compute/v1beta1.Address + // +crossplane:generate:reference:extractor=github.com/upbound/upjet/pkg/resource.ExtractParamPath("address",false) + // +kubebuilder:validation:Optional + IPAddress *string `json:"ipAddress,omitempty" tf:"ip_address,omitempty"` + + // Reference to a Address in compute to populate ipAddress. + // +kubebuilder:validation:Optional + IPAddressRef *v1.Reference `json:"ipAddressRef,omitempty" tf:"-"` + + // Selector for a Address in compute to populate ipAddress. + // +kubebuilder:validation:Optional + IPAddressSelector *v1.Selector `json:"ipAddressSelector,omitempty" tf:"-"` + + // A Compute Engine instance URI. + // +crossplane:generate:reference:type=github.com/upbound/provider-gcp/apis/compute/v1beta1.Instance + // +crossplane:generate:reference:extractor=github.com/upbound/upjet/pkg/resource.ExtractResourceID() + // +kubebuilder:validation:Optional + Instance *string `json:"instance,omitempty" tf:"instance,omitempty"` + + // Reference to a Instance in compute to populate instance. + // +kubebuilder:validation:Optional + InstanceRef *v1.Reference `json:"instanceRef,omitempty" tf:"-"` + + // Selector for a Instance in compute to populate instance. + // +kubebuilder:validation:Optional + InstanceSelector *v1.Selector `json:"instanceSelector,omitempty" tf:"-"` + + // A Compute Engine network URI. + // +crossplane:generate:reference:type=github.com/upbound/provider-gcp/apis/compute/v1beta1.Network + // +crossplane:generate:reference:extractor=github.com/upbound/upjet/pkg/resource.ExtractResourceID() + // +kubebuilder:validation:Optional + Network *string `json:"network,omitempty" tf:"network,omitempty"` + + // Reference to a Network in compute to populate network. + // +kubebuilder:validation:Optional + NetworkRef *v1.Reference `json:"networkRef,omitempty" tf:"-"` + + // Selector for a Network in compute to populate network. + // +kubebuilder:validation:Optional + NetworkSelector *v1.Selector `json:"networkSelector,omitempty" tf:"-"` + + // The IP protocol port of the endpoint. Only applicable when + // protocol is TCP or UDP. + // +kubebuilder:validation:Optional + Port *float64 `json:"port,omitempty" tf:"port,omitempty"` + + // Project ID where the endpoint is located. The Project ID can be + // derived from the URI if you provide a VM instance or network URI. + // The following are two cases where you must provide the project ID: + // +crossplane:generate:reference:type=github.com/upbound/provider-gcp/apis/compute/v1beta1.Address + // +crossplane:generate:reference:extractor=github.com/upbound/upjet/pkg/resource.ExtractParamPath("project",false) + // +kubebuilder:validation:Optional + ProjectID *string `json:"projectId,omitempty" tf:"project_id,omitempty"` + + // Reference to a Address in compute to populate projectId. + // +kubebuilder:validation:Optional + ProjectIDRef *v1.Reference `json:"projectIdRef,omitempty" tf:"-"` + + // Selector for a Address in compute to populate projectId. + // +kubebuilder:validation:Optional + ProjectIDSelector *v1.Selector `json:"projectIdSelector,omitempty" tf:"-"` +} + +type SourceObservation struct { +} + +type SourceParameters struct { + + // The IP address of the endpoint, which can be an external or + // internal IP. An IPv6 address is only allowed when the test's + // destination is a global load balancer VIP. + // +crossplane:generate:reference:type=github.com/upbound/provider-gcp/apis/compute/v1beta1.Address + // +crossplane:generate:reference:extractor=github.com/upbound/upjet/pkg/resource.ExtractParamPath("address",false) + // +kubebuilder:validation:Optional + IPAddress *string `json:"ipAddress,omitempty" tf:"ip_address,omitempty"` + + // Reference to a Address in compute to populate ipAddress. + // +kubebuilder:validation:Optional + IPAddressRef *v1.Reference `json:"ipAddressRef,omitempty" tf:"-"` + + // Selector for a Address in compute to populate ipAddress. + // +kubebuilder:validation:Optional + IPAddressSelector *v1.Selector `json:"ipAddressSelector,omitempty" tf:"-"` + + // A Compute Engine instance URI. + // +crossplane:generate:reference:type=github.com/upbound/provider-gcp/apis/compute/v1beta1.Instance + // +crossplane:generate:reference:extractor=github.com/upbound/upjet/pkg/resource.ExtractResourceID() + // +kubebuilder:validation:Optional + Instance *string `json:"instance,omitempty" tf:"instance,omitempty"` + + // Reference to a Instance in compute to populate instance. + // +kubebuilder:validation:Optional + InstanceRef *v1.Reference `json:"instanceRef,omitempty" tf:"-"` + + // Selector for a Instance in compute to populate instance. + // +kubebuilder:validation:Optional + InstanceSelector *v1.Selector `json:"instanceSelector,omitempty" tf:"-"` + + // A Compute Engine network URI. + // +crossplane:generate:reference:type=github.com/upbound/provider-gcp/apis/compute/v1beta1.Network + // +crossplane:generate:reference:extractor=github.com/upbound/upjet/pkg/resource.ExtractResourceID() + // +kubebuilder:validation:Optional + Network *string `json:"network,omitempty" tf:"network,omitempty"` + + // Reference to a Network in compute to populate network. + // +kubebuilder:validation:Optional + NetworkRef *v1.Reference `json:"networkRef,omitempty" tf:"-"` + + // Selector for a Network in compute to populate network. + // +kubebuilder:validation:Optional + NetworkSelector *v1.Selector `json:"networkSelector,omitempty" tf:"-"` + + // Type of the network where the endpoint is located. + // Possible values are GCP_NETWORK and NON_GCP_NETWORK. + // +kubebuilder:validation:Optional + NetworkType *string `json:"networkType,omitempty" tf:"network_type,omitempty"` + + // The IP protocol port of the endpoint. Only applicable when + // protocol is TCP or UDP. + // +kubebuilder:validation:Optional + Port *float64 `json:"port,omitempty" tf:"port,omitempty"` + + // Project ID where the endpoint is located. The Project ID can be + // derived from the URI if you provide a VM instance or network URI. + // The following are two cases where you must provide the project ID: + // +crossplane:generate:reference:type=github.com/upbound/provider-gcp/apis/compute/v1beta1.Address + // +crossplane:generate:reference:extractor=github.com/upbound/upjet/pkg/resource.ExtractParamPath("project",false) + // +kubebuilder:validation:Optional + ProjectID *string `json:"projectId,omitempty" tf:"project_id,omitempty"` + + // Reference to a Address in compute to populate projectId. + // +kubebuilder:validation:Optional + ProjectIDRef *v1.Reference `json:"projectIdRef,omitempty" tf:"-"` + + // Selector for a Address in compute to populate projectId. + // +kubebuilder:validation:Optional + ProjectIDSelector *v1.Selector `json:"projectIdSelector,omitempty" tf:"-"` +} + +// ConnectivityTestSpec defines the desired state of ConnectivityTest +type ConnectivityTestSpec struct { + v1.ResourceSpec `json:",inline"` + ForProvider ConnectivityTestParameters `json:"forProvider"` +} + +// ConnectivityTestStatus defines the observed state of ConnectivityTest. +type ConnectivityTestStatus struct { + v1.ResourceStatus `json:",inline"` + AtProvider ConnectivityTestObservation `json:"atProvider,omitempty"` +} + +// +kubebuilder:object:root=true + +// ConnectivityTest is the Schema for the ConnectivityTests API. A connectivity test are a static analysis of your resource configurations that enables you to evaluate connectivity to and from Google Cloud resources in your Virtual Private Cloud (VPC) network. +// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" +// +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" +// +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name" +// +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" +// +kubebuilder:subresource:status +// +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,gcp} +type ConnectivityTest struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + Spec ConnectivityTestSpec `json:"spec"` + Status ConnectivityTestStatus `json:"status,omitempty"` +} + +// +kubebuilder:object:root=true + +// ConnectivityTestList contains a list of ConnectivityTests +type ConnectivityTestList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []ConnectivityTest `json:"items"` +} + +// Repository type metadata. +var ( + ConnectivityTest_Kind = "ConnectivityTest" + ConnectivityTest_GroupKind = schema.GroupKind{Group: CRDGroup, Kind: ConnectivityTest_Kind}.String() + ConnectivityTest_KindAPIVersion = ConnectivityTest_Kind + "." + CRDGroupVersion.String() + ConnectivityTest_GroupVersionKind = CRDGroupVersion.WithKind(ConnectivityTest_Kind) +) + +func init() { + SchemeBuilder.Register(&ConnectivityTest{}, &ConnectivityTestList{}) +} diff --git a/apis/networkmanagement/v1beta1/zz_generated.deepcopy.go b/apis/networkmanagement/v1beta1/zz_generated.deepcopy.go new file mode 100644 index 000000000..7ea837ed1 --- /dev/null +++ b/apis/networkmanagement/v1beta1/zz_generated.deepcopy.go @@ -0,0 +1,410 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +/* +Copyright 2021 The Crossplane 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 v1beta1 + +import ( + "github.com/crossplane/crossplane-runtime/apis/common/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 *ConnectivityTest) DeepCopyInto(out *ConnectivityTest) { + *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 ConnectivityTest. +func (in *ConnectivityTest) DeepCopy() *ConnectivityTest { + if in == nil { + return nil + } + out := new(ConnectivityTest) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ConnectivityTest) 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 *ConnectivityTestList) DeepCopyInto(out *ConnectivityTestList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ConnectivityTest, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConnectivityTestList. +func (in *ConnectivityTestList) DeepCopy() *ConnectivityTestList { + if in == nil { + return nil + } + out := new(ConnectivityTestList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ConnectivityTestList) 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 *ConnectivityTestObservation) DeepCopyInto(out *ConnectivityTestObservation) { + *out = *in + 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 ConnectivityTestObservation. +func (in *ConnectivityTestObservation) DeepCopy() *ConnectivityTestObservation { + if in == nil { + return nil + } + out := new(ConnectivityTestObservation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ConnectivityTestParameters) DeepCopyInto(out *ConnectivityTestParameters) { + *out = *in + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(string) + **out = **in + } + if in.Destination != nil { + in, out := &in.Destination, &out.Destination + *out = make([]DestinationParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Labels != nil { + in, out := &in.Labels, &out.Labels + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + in, out := &val, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.Project != nil { + in, out := &in.Project, &out.Project + *out = new(string) + **out = **in + } + if in.Protocol != nil { + in, out := &in.Protocol, &out.Protocol + *out = new(string) + **out = **in + } + if in.RelatedProjects != nil { + in, out := &in.RelatedProjects, &out.RelatedProjects + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } + if in.Source != nil { + in, out := &in.Source, &out.Source + *out = make([]SourceParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConnectivityTestParameters. +func (in *ConnectivityTestParameters) DeepCopy() *ConnectivityTestParameters { + if in == nil { + return nil + } + out := new(ConnectivityTestParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ConnectivityTestSpec) DeepCopyInto(out *ConnectivityTestSpec) { + *out = *in + in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) + in.ForProvider.DeepCopyInto(&out.ForProvider) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConnectivityTestSpec. +func (in *ConnectivityTestSpec) DeepCopy() *ConnectivityTestSpec { + if in == nil { + return nil + } + out := new(ConnectivityTestSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ConnectivityTestStatus) DeepCopyInto(out *ConnectivityTestStatus) { + *out = *in + in.ResourceStatus.DeepCopyInto(&out.ResourceStatus) + in.AtProvider.DeepCopyInto(&out.AtProvider) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConnectivityTestStatus. +func (in *ConnectivityTestStatus) DeepCopy() *ConnectivityTestStatus { + if in == nil { + return nil + } + out := new(ConnectivityTestStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DestinationObservation) DeepCopyInto(out *DestinationObservation) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DestinationObservation. +func (in *DestinationObservation) DeepCopy() *DestinationObservation { + if in == nil { + return nil + } + out := new(DestinationObservation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DestinationParameters) DeepCopyInto(out *DestinationParameters) { + *out = *in + if in.IPAddress != nil { + in, out := &in.IPAddress, &out.IPAddress + *out = new(string) + **out = **in + } + if in.IPAddressRef != nil { + in, out := &in.IPAddressRef, &out.IPAddressRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.IPAddressSelector != nil { + in, out := &in.IPAddressSelector, &out.IPAddressSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } + if in.Instance != nil { + in, out := &in.Instance, &out.Instance + *out = new(string) + **out = **in + } + if in.InstanceRef != nil { + in, out := &in.InstanceRef, &out.InstanceRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.InstanceSelector != nil { + in, out := &in.InstanceSelector, &out.InstanceSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } + if in.Network != nil { + in, out := &in.Network, &out.Network + *out = new(string) + **out = **in + } + if in.NetworkRef != nil { + in, out := &in.NetworkRef, &out.NetworkRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.NetworkSelector != nil { + in, out := &in.NetworkSelector, &out.NetworkSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } + if in.Port != nil { + in, out := &in.Port, &out.Port + *out = new(float64) + **out = **in + } + if in.ProjectID != nil { + in, out := &in.ProjectID, &out.ProjectID + *out = new(string) + **out = **in + } + if in.ProjectIDRef != nil { + in, out := &in.ProjectIDRef, &out.ProjectIDRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.ProjectIDSelector != nil { + in, out := &in.ProjectIDSelector, &out.ProjectIDSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DestinationParameters. +func (in *DestinationParameters) DeepCopy() *DestinationParameters { + if in == nil { + return nil + } + out := new(DestinationParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SourceObservation) DeepCopyInto(out *SourceObservation) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SourceObservation. +func (in *SourceObservation) DeepCopy() *SourceObservation { + if in == nil { + return nil + } + out := new(SourceObservation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SourceParameters) DeepCopyInto(out *SourceParameters) { + *out = *in + if in.IPAddress != nil { + in, out := &in.IPAddress, &out.IPAddress + *out = new(string) + **out = **in + } + if in.IPAddressRef != nil { + in, out := &in.IPAddressRef, &out.IPAddressRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.IPAddressSelector != nil { + in, out := &in.IPAddressSelector, &out.IPAddressSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } + if in.Instance != nil { + in, out := &in.Instance, &out.Instance + *out = new(string) + **out = **in + } + if in.InstanceRef != nil { + in, out := &in.InstanceRef, &out.InstanceRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.InstanceSelector != nil { + in, out := &in.InstanceSelector, &out.InstanceSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } + if in.Network != nil { + in, out := &in.Network, &out.Network + *out = new(string) + **out = **in + } + if in.NetworkRef != nil { + in, out := &in.NetworkRef, &out.NetworkRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.NetworkSelector != nil { + in, out := &in.NetworkSelector, &out.NetworkSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } + if in.NetworkType != nil { + in, out := &in.NetworkType, &out.NetworkType + *out = new(string) + **out = **in + } + if in.Port != nil { + in, out := &in.Port, &out.Port + *out = new(float64) + **out = **in + } + if in.ProjectID != nil { + in, out := &in.ProjectID, &out.ProjectID + *out = new(string) + **out = **in + } + if in.ProjectIDRef != nil { + in, out := &in.ProjectIDRef, &out.ProjectIDRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.ProjectIDSelector != nil { + in, out := &in.ProjectIDSelector, &out.ProjectIDSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SourceParameters. +func (in *SourceParameters) DeepCopy() *SourceParameters { + if in == nil { + return nil + } + out := new(SourceParameters) + in.DeepCopyInto(out) + return out +} diff --git a/apis/networkmanagement/v1beta1/zz_generated.managed.go b/apis/networkmanagement/v1beta1/zz_generated.managed.go new file mode 100644 index 000000000..cf8a937e9 --- /dev/null +++ b/apis/networkmanagement/v1beta1/zz_generated.managed.go @@ -0,0 +1,86 @@ +/* +Copyright 2021 The Crossplane 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 angryjet. DO NOT EDIT. + +package v1beta1 + +import xpv1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + +// GetCondition of this ConnectivityTest. +func (mg *ConnectivityTest) GetCondition(ct xpv1.ConditionType) xpv1.Condition { + return mg.Status.GetCondition(ct) +} + +// GetDeletionPolicy of this ConnectivityTest. +func (mg *ConnectivityTest) GetDeletionPolicy() xpv1.DeletionPolicy { + return mg.Spec.DeletionPolicy +} + +// GetProviderConfigReference of this ConnectivityTest. +func (mg *ConnectivityTest) GetProviderConfigReference() *xpv1.Reference { + return mg.Spec.ProviderConfigReference +} + +/* +GetProviderReference of this ConnectivityTest. +Deprecated: Use GetProviderConfigReference. +*/ +func (mg *ConnectivityTest) GetProviderReference() *xpv1.Reference { + return mg.Spec.ProviderReference +} + +// GetPublishConnectionDetailsTo of this ConnectivityTest. +func (mg *ConnectivityTest) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { + return mg.Spec.PublishConnectionDetailsTo +} + +// GetWriteConnectionSecretToReference of this ConnectivityTest. +func (mg *ConnectivityTest) GetWriteConnectionSecretToReference() *xpv1.SecretReference { + return mg.Spec.WriteConnectionSecretToReference +} + +// SetConditions of this ConnectivityTest. +func (mg *ConnectivityTest) SetConditions(c ...xpv1.Condition) { + mg.Status.SetConditions(c...) +} + +// SetDeletionPolicy of this ConnectivityTest. +func (mg *ConnectivityTest) SetDeletionPolicy(r xpv1.DeletionPolicy) { + mg.Spec.DeletionPolicy = r +} + +// SetProviderConfigReference of this ConnectivityTest. +func (mg *ConnectivityTest) SetProviderConfigReference(r *xpv1.Reference) { + mg.Spec.ProviderConfigReference = r +} + +/* +SetProviderReference of this ConnectivityTest. +Deprecated: Use SetProviderConfigReference. +*/ +func (mg *ConnectivityTest) SetProviderReference(r *xpv1.Reference) { + mg.Spec.ProviderReference = r +} + +// SetPublishConnectionDetailsTo of this ConnectivityTest. +func (mg *ConnectivityTest) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { + mg.Spec.PublishConnectionDetailsTo = r +} + +// SetWriteConnectionSecretToReference of this ConnectivityTest. +func (mg *ConnectivityTest) SetWriteConnectionSecretToReference(r *xpv1.SecretReference) { + mg.Spec.WriteConnectionSecretToReference = r +} diff --git a/apis/networkmanagement/v1beta1/zz_generated.managedlist.go b/apis/networkmanagement/v1beta1/zz_generated.managedlist.go new file mode 100644 index 000000000..fe13ebe29 --- /dev/null +++ b/apis/networkmanagement/v1beta1/zz_generated.managedlist.go @@ -0,0 +1,29 @@ +/* +Copyright 2021 The Crossplane 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 angryjet. DO NOT EDIT. + +package v1beta1 + +import resource "github.com/crossplane/crossplane-runtime/pkg/resource" + +// GetItems of this ConnectivityTestList. +func (l *ConnectivityTestList) GetItems() []resource.Managed { + items := make([]resource.Managed, len(l.Items)) + for i := range l.Items { + items[i] = &l.Items[i] + } + return items +} diff --git a/apis/networkmanagement/v1beta1/zz_generated.resolvers.go b/apis/networkmanagement/v1beta1/zz_generated.resolvers.go new file mode 100644 index 000000000..57ac8d27d --- /dev/null +++ b/apis/networkmanagement/v1beta1/zz_generated.resolvers.go @@ -0,0 +1,182 @@ +/* +Copyright 2021 The Crossplane 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 angryjet. DO NOT EDIT. + +package v1beta1 + +import ( + "context" + reference "github.com/crossplane/crossplane-runtime/pkg/reference" + errors "github.com/pkg/errors" + v1beta1 "github.com/upbound/provider-gcp/apis/compute/v1beta1" + resource "github.com/upbound/upjet/pkg/resource" + client "sigs.k8s.io/controller-runtime/pkg/client" +) + +// ResolveReferences of this ConnectivityTest. +func (mg *ConnectivityTest) ResolveReferences(ctx context.Context, c client.Reader) error { + r := reference.NewAPIResolver(c, mg) + + var rsp reference.ResolutionResponse + var err error + + for i3 := 0; i3 < len(mg.Spec.ForProvider.Destination); i3++ { + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.Destination[i3].IPAddress), + Extract: resource.ExtractParamPath("address", false), + Reference: mg.Spec.ForProvider.Destination[i3].IPAddressRef, + Selector: mg.Spec.ForProvider.Destination[i3].IPAddressSelector, + To: reference.To{ + List: &v1beta1.AddressList{}, + Managed: &v1beta1.Address{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.Destination[i3].IPAddress") + } + mg.Spec.ForProvider.Destination[i3].IPAddress = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.ForProvider.Destination[i3].IPAddressRef = rsp.ResolvedReference + + } + for i3 := 0; i3 < len(mg.Spec.ForProvider.Destination); i3++ { + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.Destination[i3].Instance), + Extract: resource.ExtractResourceID(), + Reference: mg.Spec.ForProvider.Destination[i3].InstanceRef, + Selector: mg.Spec.ForProvider.Destination[i3].InstanceSelector, + To: reference.To{ + List: &v1beta1.InstanceList{}, + Managed: &v1beta1.Instance{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.Destination[i3].Instance") + } + mg.Spec.ForProvider.Destination[i3].Instance = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.ForProvider.Destination[i3].InstanceRef = rsp.ResolvedReference + + } + for i3 := 0; i3 < len(mg.Spec.ForProvider.Destination); i3++ { + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.Destination[i3].Network), + Extract: resource.ExtractResourceID(), + Reference: mg.Spec.ForProvider.Destination[i3].NetworkRef, + Selector: mg.Spec.ForProvider.Destination[i3].NetworkSelector, + To: reference.To{ + List: &v1beta1.NetworkList{}, + Managed: &v1beta1.Network{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.Destination[i3].Network") + } + mg.Spec.ForProvider.Destination[i3].Network = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.ForProvider.Destination[i3].NetworkRef = rsp.ResolvedReference + + } + for i3 := 0; i3 < len(mg.Spec.ForProvider.Destination); i3++ { + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.Destination[i3].ProjectID), + Extract: resource.ExtractParamPath("project", false), + Reference: mg.Spec.ForProvider.Destination[i3].ProjectIDRef, + Selector: mg.Spec.ForProvider.Destination[i3].ProjectIDSelector, + To: reference.To{ + List: &v1beta1.AddressList{}, + Managed: &v1beta1.Address{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.Destination[i3].ProjectID") + } + mg.Spec.ForProvider.Destination[i3].ProjectID = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.ForProvider.Destination[i3].ProjectIDRef = rsp.ResolvedReference + + } + for i3 := 0; i3 < len(mg.Spec.ForProvider.Source); i3++ { + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.Source[i3].IPAddress), + Extract: resource.ExtractParamPath("address", false), + Reference: mg.Spec.ForProvider.Source[i3].IPAddressRef, + Selector: mg.Spec.ForProvider.Source[i3].IPAddressSelector, + To: reference.To{ + List: &v1beta1.AddressList{}, + Managed: &v1beta1.Address{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.Source[i3].IPAddress") + } + mg.Spec.ForProvider.Source[i3].IPAddress = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.ForProvider.Source[i3].IPAddressRef = rsp.ResolvedReference + + } + for i3 := 0; i3 < len(mg.Spec.ForProvider.Source); i3++ { + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.Source[i3].Instance), + Extract: resource.ExtractResourceID(), + Reference: mg.Spec.ForProvider.Source[i3].InstanceRef, + Selector: mg.Spec.ForProvider.Source[i3].InstanceSelector, + To: reference.To{ + List: &v1beta1.InstanceList{}, + Managed: &v1beta1.Instance{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.Source[i3].Instance") + } + mg.Spec.ForProvider.Source[i3].Instance = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.ForProvider.Source[i3].InstanceRef = rsp.ResolvedReference + + } + for i3 := 0; i3 < len(mg.Spec.ForProvider.Source); i3++ { + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.Source[i3].Network), + Extract: resource.ExtractResourceID(), + Reference: mg.Spec.ForProvider.Source[i3].NetworkRef, + Selector: mg.Spec.ForProvider.Source[i3].NetworkSelector, + To: reference.To{ + List: &v1beta1.NetworkList{}, + Managed: &v1beta1.Network{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.Source[i3].Network") + } + mg.Spec.ForProvider.Source[i3].Network = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.ForProvider.Source[i3].NetworkRef = rsp.ResolvedReference + + } + for i3 := 0; i3 < len(mg.Spec.ForProvider.Source); i3++ { + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.Source[i3].ProjectID), + Extract: resource.ExtractParamPath("project", false), + Reference: mg.Spec.ForProvider.Source[i3].ProjectIDRef, + Selector: mg.Spec.ForProvider.Source[i3].ProjectIDSelector, + To: reference.To{ + List: &v1beta1.AddressList{}, + Managed: &v1beta1.Address{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.Source[i3].ProjectID") + } + mg.Spec.ForProvider.Source[i3].ProjectID = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.ForProvider.Source[i3].ProjectIDRef = rsp.ResolvedReference + + } + + return nil +} diff --git a/apis/networkmanagement/v1beta1/zz_generated_terraformed.go b/apis/networkmanagement/v1beta1/zz_generated_terraformed.go new file mode 100755 index 000000000..4a3985ea8 --- /dev/null +++ b/apis/networkmanagement/v1beta1/zz_generated_terraformed.go @@ -0,0 +1,100 @@ +/* +Copyright 2021 The Crossplane 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 upjet. DO NOT EDIT. + +package v1beta1 + +import ( + "github.com/pkg/errors" + + "github.com/upbound/upjet/pkg/resource" + "github.com/upbound/upjet/pkg/resource/json" +) + +// GetTerraformResourceType returns Terraform resource type for this ConnectivityTest +func (mg *ConnectivityTest) GetTerraformResourceType() string { + return "google_network_management_connectivity_test" +} + +// GetConnectionDetailsMapping for this ConnectivityTest +func (tr *ConnectivityTest) GetConnectionDetailsMapping() map[string]string { + return nil +} + +// GetObservation of this ConnectivityTest +func (tr *ConnectivityTest) GetObservation() (map[string]any, error) { + o, err := json.TFParser.Marshal(tr.Status.AtProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(o, &base) +} + +// SetObservation for this ConnectivityTest +func (tr *ConnectivityTest) SetObservation(obs map[string]any) error { + p, err := json.TFParser.Marshal(obs) + if err != nil { + return err + } + return json.TFParser.Unmarshal(p, &tr.Status.AtProvider) +} + +// GetID returns ID of underlying Terraform resource of this ConnectivityTest +func (tr *ConnectivityTest) GetID() string { + if tr.Status.AtProvider.ID == nil { + return "" + } + return *tr.Status.AtProvider.ID +} + +// GetParameters of this ConnectivityTest +func (tr *ConnectivityTest) GetParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.ForProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// SetParameters for this ConnectivityTest +func (tr *ConnectivityTest) SetParameters(params map[string]any) error { + p, err := json.TFParser.Marshal(params) + if err != nil { + return err + } + return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) +} + +// LateInitialize this ConnectivityTest using its observed tfState. +// returns True if there are any spec changes for the resource. +func (tr *ConnectivityTest) LateInitialize(attrs []byte) (bool, error) { + params := &ConnectivityTestParameters{} + if err := json.TFParser.Unmarshal(attrs, params); err != nil { + return false, errors.Wrap(err, "failed to unmarshal Terraform state parameters for late-initialization") + } + opts := []resource.GenericLateInitializerOption{resource.WithZeroValueJSONOmitEmptyFilter(resource.CNameWildcard)} + + li := resource.NewGenericLateInitializer(opts...) + return li.LateInitialize(&tr.Spec.ForProvider, params) +} + +// GetTerraformSchemaVersion returns the associated Terraform schema version +func (tr *ConnectivityTest) GetTerraformSchemaVersion() int { + return 0 +} diff --git a/apis/networkmanagement/v1beta1/zz_groupversion_info.go b/apis/networkmanagement/v1beta1/zz_groupversion_info.go new file mode 100755 index 000000000..d19edb902 --- /dev/null +++ b/apis/networkmanagement/v1beta1/zz_groupversion_info.go @@ -0,0 +1,44 @@ +/* +Copyright 2021 The Crossplane 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 upjet. DO NOT EDIT. + +// +kubebuilder:object:generate=true +// +groupName=networkmanagement.gcp.upbound.io +// +versionName=v1beta1 +package v1beta1 + +import ( + "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/controller-runtime/pkg/scheme" +) + +// Package type metadata. +const ( + CRDGroup = "networkmanagement.gcp.upbound.io" + CRDVersion = "v1beta1" +) + +var ( + // CRDGroupVersion is the API Group Version used to register the objects + CRDGroupVersion = schema.GroupVersion{Group: CRDGroup, Version: CRDVersion} + + // SchemeBuilder is used to add go types to the GroupVersionKind scheme + SchemeBuilder = &scheme.Builder{GroupVersion: CRDGroupVersion} + + // AddToScheme adds the types in this group-version to the given scheme. + AddToScheme = SchemeBuilder.AddToScheme +) diff --git a/apis/zz_register.go b/apis/zz_register.go index ac04315ee..30f5fea63 100755 --- a/apis/zz_register.go +++ b/apis/zz_register.go @@ -56,7 +56,10 @@ import ( v1beta1iap "github.com/upbound/provider-gcp/apis/iap/v1beta1" v1beta1identityplatform "github.com/upbound/provider-gcp/apis/identityplatform/v1beta1" v1beta1kms "github.com/upbound/provider-gcp/apis/kms/v1beta1" + v1beta1memcache "github.com/upbound/provider-gcp/apis/memcache/v1beta1" + v1beta1mlengine "github.com/upbound/provider-gcp/apis/mlengine/v1beta1" v1beta1monitoring "github.com/upbound/provider-gcp/apis/monitoring/v1beta1" + v1beta1networkmanagement "github.com/upbound/provider-gcp/apis/networkmanagement/v1beta1" v1beta1notebooks "github.com/upbound/provider-gcp/apis/notebooks/v1beta1" v1beta1osconfig "github.com/upbound/provider-gcp/apis/osconfig/v1beta1" v1beta1oslogin "github.com/upbound/provider-gcp/apis/oslogin/v1beta1" @@ -110,7 +113,10 @@ func init() { v1beta1iap.SchemeBuilder.AddToScheme, v1beta1identityplatform.SchemeBuilder.AddToScheme, v1beta1kms.SchemeBuilder.AddToScheme, + v1beta1memcache.SchemeBuilder.AddToScheme, + v1beta1mlengine.SchemeBuilder.AddToScheme, v1beta1monitoring.SchemeBuilder.AddToScheme, + v1beta1networkmanagement.SchemeBuilder.AddToScheme, v1beta1notebooks.SchemeBuilder.AddToScheme, v1beta1osconfig.SchemeBuilder.AddToScheme, v1beta1oslogin.SchemeBuilder.AddToScheme, diff --git a/config/externalname.go b/config/externalname.go index 22a2e4a19..ec2c5b456 100644 --- a/config/externalname.go +++ b/config/externalname.go @@ -471,6 +471,21 @@ var externalNameConfigs = map[string]config.ExternalName{ // Imported by using the following format: projects/{{project}}/locations/{{location}}/runtimes/{{name}} "google_notebooks_runtime_iam_member": config.IdentifierFromProvider, + // networkmanagement + // + // ConnectivityTest can be imported using Name + "google_network_management_connectivity_test": config.IdentifierFromProvider, + + // mlengine + // + // Model can be imported using Name + "google_ml_engine_model": config.IdentifierFromProvider, + + // memcache + // + // nstance can be imported using Name + "google_memcache_instance": config.IdentifierFromProvider, + // osconfig // // Imported by using the following format: projects/{{project}}/locations/{{location}}/osPolicyAssignments/{{name}} diff --git a/config/externalnamenottested.go b/config/externalnamenottested.go index d1a7d5259..bcd882021 100644 --- a/config/externalnamenottested.go +++ b/config/externalnamenottested.go @@ -263,16 +263,6 @@ var ExternalNameNotTestedConfigs = map[string]config.ExternalName{ // projects/my-project/sinks/my-sink "google_logging_project_sink": config.TemplatedStringAsIdentifier("name", "projects/{{ .setup.configuration.project }}/sinks/{{ .external_name }}"), - // memcache - // - // nstance can be imported using Name - "google_memcache_instance": config.NameAsIdentifier, - - // mlengine - // - // Model can be imported using Name - "google_ml_engine_model": config.NameAsIdentifier, - // monitoring // // Service can be imported using Name @@ -293,11 +283,6 @@ var ExternalNameNotTestedConfigs = map[string]config.ExternalName{ // Spoke can be imported using {{location}}/{{name}} "google_network_connectivity_spoke": config.TemplatedStringAsIdentifier("name", "{{ .parameters.location }}/{{ .external_name }}"), - // networkmanagement - // - // ConnectivityTest can be imported using Name - "google_network_management_connectivity_test": config.NameAsIdentifier, - // networkservices // // EdgeCacheKeyset can be imported using Name diff --git a/examples-generated/memcache/instance.yaml b/examples-generated/memcache/instance.yaml new file mode 100644 index 000000000..51035bdf6 --- /dev/null +++ b/examples-generated/memcache/instance.yaml @@ -0,0 +1,69 @@ +apiVersion: memcache.gcp.upbound.io/v1beta1 +kind: Instance +metadata: + annotations: + meta.upbound.io/example-id: memcache/v1beta1/instance + labels: + testing.upbound.io/example-name: instance + name: instance +spec: + forProvider: + authorizedNetworkSelector: + matchLabels: + testing.upbound.io/example-name: private_service_connection + maintenancePolicy: + - weeklyMaintenanceWindow: + - day: SATURDAY + duration: 14400s + startTime: + - hours: 0 + minutes: 30 + nanos: 0 + seconds: 0 + memcacheVersion: MEMCACHE_1_5 + name: test-instance + nodeConfig: + - cpuCount: 1 + memorySizeMb: 1024 + nodeCount: 1 + +--- + +apiVersion: compute.gcp.upbound.io/v1beta1 +kind: GlobalAddress +metadata: + annotations: + meta.upbound.io/example-id: memcache/v1beta1/instance + labels: + testing.upbound.io/example-name: service_range + name: service-range +spec: + forProvider: + addressType: INTERNAL + networkSelector: + matchLabels: + testing.upbound.io/example-name: google_compute_network + prefixLength: 16 + purpose: VPC_PEERING + +--- + +apiVersion: servicenetworking.gcp.upbound.io/v1beta1 +kind: Connection +metadata: + annotations: + meta.upbound.io/example-id: memcache/v1beta1/instance + labels: + testing.upbound.io/example-name: private_service_connection + name: private-service-connection +spec: + forProvider: + networkSelector: + matchLabels: + testing.upbound.io/example-name: google_compute_network + reservedPeeringRangesRefs: + - name: service_range + service: servicenetworking.googleapis.com + +--- + diff --git a/examples-generated/mlengine/model.yaml b/examples-generated/mlengine/model.yaml new file mode 100644 index 000000000..accd4dbeb --- /dev/null +++ b/examples-generated/mlengine/model.yaml @@ -0,0 +1,17 @@ +apiVersion: mlengine.gcp.upbound.io/v1beta1 +kind: Model +metadata: + annotations: + meta.upbound.io/example-id: mlengine/v1beta1/model + labels: + testing.upbound.io/example-name: default + name: default +spec: + forProvider: + description: My model + name: default + regions: + - us-central1 + +--- + diff --git a/examples-generated/networkmanagement/connectivitytest.yaml b/examples-generated/networkmanagement/connectivitytest.yaml new file mode 100644 index 000000000..3779dfeb3 --- /dev/null +++ b/examples-generated/networkmanagement/connectivitytest.yaml @@ -0,0 +1,86 @@ +apiVersion: networkmanagement.gcp.upbound.io/v1beta1 +kind: ConnectivityTest +metadata: + annotations: + meta.upbound.io/example-id: networkmanagement/v1beta1/connectivitytest + labels: + testing.upbound.io/example-name: instance-test + name: instance-test +spec: + forProvider: + destination: + - instanceSelector: + matchLabels: + testing.upbound.io/example-name: destination + name: conn-test-instances + protocol: TCP + source: + - instanceSelector: + matchLabels: + testing.upbound.io/example-name: source + +--- + +apiVersion: compute.gcp.upbound.io/v1beta1 +kind: Instance +metadata: + annotations: + meta.upbound.io/example-id: networkmanagement/v1beta1/connectivitytest + labels: + testing.upbound.io/example-name: destination + name: destination +spec: + forProvider: + bootDisk: + - initializeParams: + - imageSelector: + matchLabels: + testing.upbound.io/example-name: google_compute_image + machineType: e2-medium + networkInterface: + - accessConfig: + - {} + networkSelector: + matchLabels: + testing.upbound.io/example-name: vpc + +--- + +apiVersion: compute.gcp.upbound.io/v1beta1 +kind: Instance +metadata: + annotations: + meta.upbound.io/example-id: networkmanagement/v1beta1/connectivitytest + labels: + testing.upbound.io/example-name: source + name: source +spec: + forProvider: + bootDisk: + - initializeParams: + - imageSelector: + matchLabels: + testing.upbound.io/example-name: google_compute_image + machineType: e2-medium + networkInterface: + - accessConfig: + - {} + networkSelector: + matchLabels: + testing.upbound.io/example-name: vpc + +--- + +apiVersion: compute.gcp.upbound.io/v1beta1 +kind: Network +metadata: + annotations: + meta.upbound.io/example-id: networkmanagement/v1beta1/connectivitytest + labels: + testing.upbound.io/example-name: vpc + name: vpc +spec: + forProvider: {} + +--- + diff --git a/examples/memcache/instance.yaml b/examples/memcache/instance.yaml new file mode 100644 index 000000000..053c1838d --- /dev/null +++ b/examples/memcache/instance.yaml @@ -0,0 +1,83 @@ +apiVersion: memcache.gcp.upbound.io/v1beta1 +kind: Instance +metadata: + annotations: + meta.upbound.io/example-id: memcache/v1beta1/instance + labels: + testing.upbound.io/example-name: instance + name: instance +spec: + forProvider: + region: us-central1 + authorizedNetworkSelector: + matchLabels: + testing.upbound.io/example-name: private_service_connection + maintenancePolicy: + - weeklyMaintenanceWindow: + - day: SATURDAY + duration: 14400s + startTime: + - hours: 0 + minutes: 30 + nanos: 0 + seconds: 0 + memcacheVersion: MEMCACHE_1_5 + name: test-instance + nodeConfig: + - cpuCount: 1 + memorySizeMb: 1024 + nodeCount: 1 + +--- + +apiVersion: compute.gcp.upbound.io/v1beta1 +kind: GlobalAddress +metadata: + annotations: + meta.upbound.io/example-id: memcache/v1beta1/instance + labels: + testing.upbound.io/example-name: service_range + name: service-range +spec: + forProvider: + addressType: INTERNAL + networkSelector: + matchLabels: + testing.upbound.io/example-name: google_compute_network + prefixLength: 16 + purpose: VPC_PEERING + +--- + +apiVersion: servicenetworking.gcp.upbound.io/v1beta1 +kind: Connection +metadata: + annotations: + meta.upbound.io/example-id: memcache/v1beta1/instance + labels: + testing.upbound.io/example-name: private_service_connection + name: private-service-connection +spec: + forProvider: + networkSelector: + matchLabels: + testing.upbound.io/example-name: google_compute_network + reservedPeeringRangesSelector: + matchLabels: + testing.upbound.io/example-name: service_range + service: servicenetworking.googleapis.com + +--- + +apiVersion: compute.gcp.upbound.io/v1beta1 +kind: Network +metadata: + annotations: + uptest.upbound.io/timeout: "4800" + meta.upbound.io/example-id: memcache/v1beta1/instance + labels: + testing.upbound.io/example-name: google_compute_network + name: google-compute-network +spec: + forProvider: + autoCreateSubnetworks: false diff --git a/examples/mlengine/model.yaml b/examples/mlengine/model.yaml new file mode 100644 index 000000000..a5a237629 --- /dev/null +++ b/examples/mlengine/model.yaml @@ -0,0 +1,14 @@ +apiVersion: mlengine.gcp.upbound.io/v1beta1 +kind: Model +metadata: + annotations: + meta.upbound.io/example-id: mlengine/v1beta1/model + labels: + testing.upbound.io/example-name: model + name: model +spec: + forProvider: + description: My model + name: model + regions: + - us-central1 diff --git a/examples/networkmanagement/connectivitytest.yaml b/examples/networkmanagement/connectivitytest.yaml new file mode 100644 index 000000000..275594e57 --- /dev/null +++ b/examples/networkmanagement/connectivitytest.yaml @@ -0,0 +1,100 @@ +apiVersion: networkmanagement.gcp.upbound.io/v1beta1 +kind: ConnectivityTest +metadata: + annotations: + meta.upbound.io/example-id: networkmanagement/v1beta1/connectivitytest + labels: + testing.upbound.io/example-name: instance-test + name: instance-test +spec: + forProvider: + destination: + - instanceSelector: + matchLabels: + testing.upbound.io/example-name: destination + name: conn-test-instances + protocol: TCP + source: + - instanceSelector: + matchLabels: + testing.upbound.io/example-name: source + +--- + +apiVersion: compute.gcp.upbound.io/v1beta1 +kind: Instance +metadata: + annotations: + meta.upbound.io/example-id: networkmanagement/v1beta1/connectivitytest + labels: + testing.upbound.io/example-name: destination + name: destination +spec: + forProvider: + zone: us-central1-a + bootDisk: + - initializeParams: + - imageSelector: + matchLabels: + testing.upbound.io/example-name: image + machineType: e2-medium + networkInterface: + - accessConfig: + - {} + networkSelector: + matchLabels: + testing.upbound.io/example-name: vpc + +--- + +apiVersion: compute.gcp.upbound.io/v1beta1 +kind: Instance +metadata: + annotations: + meta.upbound.io/example-id: networkmanagement/v1beta1/connectivitytest + labels: + testing.upbound.io/example-name: source + name: source +spec: + forProvider: + zone: us-central1-a + bootDisk: + - initializeParams: + - imageSelector: + matchLabels: + testing.upbound.io/example-name: image + machineType: e2-medium + networkInterface: + - accessConfig: + - {} + networkSelector: + matchLabels: + testing.upbound.io/example-name: vpc + +--- + +apiVersion: compute.gcp.upbound.io/v1beta1 +kind: Network +metadata: + annotations: + meta.upbound.io/example-id: networkmanagement/v1beta1/connectivitytest + labels: + testing.upbound.io/example-name: vpc + name: vpc +spec: + forProvider: {} + +--- + +apiVersion: compute.gcp.upbound.io/v1beta1 +kind: Image +metadata: + annotations: + meta.upbound.io/example-id: networkmanagement/v1beta1/connectivitytest + labels: + testing.upbound.io/example-name: image + name: image +spec: + forProvider: + rawDisk: + - source: https://storage.googleapis.com/bosh-gce-raw-stemcells/bosh-stemcell-97.98-google-kvm-ubuntu-xenial-go_agent-raw-1557960142.tar.gz diff --git a/internal/controller/memcache/instance/zz_controller.go b/internal/controller/memcache/instance/zz_controller.go new file mode 100755 index 000000000..8a4a76299 --- /dev/null +++ b/internal/controller/memcache/instance/zz_controller.go @@ -0,0 +1,63 @@ +/* +Copyright 2021 The Crossplane 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 upjet. DO NOT EDIT. + +package instance + +import ( + "time" + + "github.com/crossplane/crossplane-runtime/pkg/connection" + "github.com/crossplane/crossplane-runtime/pkg/event" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" + "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" + xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" + tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/terraform" + ctrl "sigs.k8s.io/controller-runtime" + + v1beta1 "github.com/upbound/provider-gcp/apis/memcache/v1beta1" +) + +// Setup adds a controller that reconciles Instance managed resources. +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { + name := managed.ControllerName(v1beta1.Instance_GroupVersionKind.String()) + var initializers managed.InitializerChain + cps := []managed.ConnectionPublisher{managed.NewAPISecretPublisher(mgr.GetClient(), mgr.GetScheme())} + if o.SecretStoreConfigGVK != nil { + cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK)) + } + r := managed.NewReconciler(mgr, + xpresource.ManagedKind(v1beta1.Instance_GroupVersionKind), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["google_memcache_instance"], + tjcontroller.WithCallbackProvider(tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1beta1.Instance_GroupVersionKind))), + )), + managed.WithLogger(o.Logger.WithValues("controller", name)), + managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), + managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithTimeout(3*time.Minute), + managed.WithInitializers(initializers), + managed.WithConnectionPublishers(cps...), + managed.WithPollInterval(o.PollInterval), + ) + + return ctrl.NewControllerManagedBy(mgr). + Named(name). + WithOptions(o.ForControllerRuntime()). + For(&v1beta1.Instance{}). + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) +} diff --git a/internal/controller/mlengine/model/zz_controller.go b/internal/controller/mlengine/model/zz_controller.go new file mode 100755 index 000000000..17821f77a --- /dev/null +++ b/internal/controller/mlengine/model/zz_controller.go @@ -0,0 +1,63 @@ +/* +Copyright 2021 The Crossplane 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 upjet. DO NOT EDIT. + +package model + +import ( + "time" + + "github.com/crossplane/crossplane-runtime/pkg/connection" + "github.com/crossplane/crossplane-runtime/pkg/event" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" + "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" + xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" + tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/terraform" + ctrl "sigs.k8s.io/controller-runtime" + + v1beta1 "github.com/upbound/provider-gcp/apis/mlengine/v1beta1" +) + +// Setup adds a controller that reconciles Model managed resources. +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { + name := managed.ControllerName(v1beta1.Model_GroupVersionKind.String()) + var initializers managed.InitializerChain + cps := []managed.ConnectionPublisher{managed.NewAPISecretPublisher(mgr.GetClient(), mgr.GetScheme())} + if o.SecretStoreConfigGVK != nil { + cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK)) + } + r := managed.NewReconciler(mgr, + xpresource.ManagedKind(v1beta1.Model_GroupVersionKind), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["google_ml_engine_model"], + tjcontroller.WithCallbackProvider(tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1beta1.Model_GroupVersionKind))), + )), + managed.WithLogger(o.Logger.WithValues("controller", name)), + managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), + managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithTimeout(3*time.Minute), + managed.WithInitializers(initializers), + managed.WithConnectionPublishers(cps...), + managed.WithPollInterval(o.PollInterval), + ) + + return ctrl.NewControllerManagedBy(mgr). + Named(name). + WithOptions(o.ForControllerRuntime()). + For(&v1beta1.Model{}). + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) +} diff --git a/internal/controller/networkmanagement/connectivitytest/zz_controller.go b/internal/controller/networkmanagement/connectivitytest/zz_controller.go new file mode 100755 index 000000000..76afc65a5 --- /dev/null +++ b/internal/controller/networkmanagement/connectivitytest/zz_controller.go @@ -0,0 +1,63 @@ +/* +Copyright 2021 The Crossplane 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 upjet. DO NOT EDIT. + +package connectivitytest + +import ( + "time" + + "github.com/crossplane/crossplane-runtime/pkg/connection" + "github.com/crossplane/crossplane-runtime/pkg/event" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" + "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" + xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" + tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/terraform" + ctrl "sigs.k8s.io/controller-runtime" + + v1beta1 "github.com/upbound/provider-gcp/apis/networkmanagement/v1beta1" +) + +// Setup adds a controller that reconciles ConnectivityTest managed resources. +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { + name := managed.ControllerName(v1beta1.ConnectivityTest_GroupVersionKind.String()) + var initializers managed.InitializerChain + cps := []managed.ConnectionPublisher{managed.NewAPISecretPublisher(mgr.GetClient(), mgr.GetScheme())} + if o.SecretStoreConfigGVK != nil { + cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK)) + } + r := managed.NewReconciler(mgr, + xpresource.ManagedKind(v1beta1.ConnectivityTest_GroupVersionKind), + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["google_network_management_connectivity_test"], + tjcontroller.WithCallbackProvider(tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1beta1.ConnectivityTest_GroupVersionKind))), + )), + managed.WithLogger(o.Logger.WithValues("controller", name)), + managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), + managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + managed.WithTimeout(3*time.Minute), + managed.WithInitializers(initializers), + managed.WithConnectionPublishers(cps...), + managed.WithPollInterval(o.PollInterval), + ) + + return ctrl.NewControllerManagedBy(mgr). + Named(name). + WithOptions(o.ForControllerRuntime()). + For(&v1beta1.ConnectivityTest{}). + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) +} diff --git a/internal/controller/zz_setup.go b/internal/controller/zz_setup.go index fc14c04a3..75790c80d 100755 --- a/internal/controller/zz_setup.go +++ b/internal/controller/zz_setup.go @@ -203,9 +203,12 @@ import ( keyringiammember "github.com/upbound/provider-gcp/internal/controller/kms/keyringiammember" keyringimportjob "github.com/upbound/provider-gcp/internal/controller/kms/keyringimportjob" secretciphertext "github.com/upbound/provider-gcp/internal/controller/kms/secretciphertext" + instancememcache "github.com/upbound/provider-gcp/internal/controller/memcache/instance" + model "github.com/upbound/provider-gcp/internal/controller/mlengine/model" alertpolicy "github.com/upbound/provider-gcp/internal/controller/monitoring/alertpolicy" notificationchannel "github.com/upbound/provider-gcp/internal/controller/monitoring/notificationchannel" uptimecheckconfig "github.com/upbound/provider-gcp/internal/controller/monitoring/uptimecheckconfig" + connectivitytest "github.com/upbound/provider-gcp/internal/controller/networkmanagement/connectivitytest" environmentnotebooks "github.com/upbound/provider-gcp/internal/controller/notebooks/environment" instancenotebooks "github.com/upbound/provider-gcp/internal/controller/notebooks/instance" instanceiammembernotebooks "github.com/upbound/provider-gcp/internal/controller/notebooks/instanceiammember" @@ -452,9 +455,12 @@ func Setup(mgr ctrl.Manager, o controller.Options) error { keyringiammember.Setup, keyringimportjob.Setup, secretciphertext.Setup, + instancememcache.Setup, + model.Setup, alertpolicy.Setup, notificationchannel.Setup, uptimecheckconfig.Setup, + connectivitytest.Setup, environmentnotebooks.Setup, instancenotebooks.Setup, instanceiammembernotebooks.Setup, diff --git a/package/crds/memcache.gcp.upbound.io_instances.yaml b/package/crds/memcache.gcp.upbound.io_instances.yaml new file mode 100644 index 000000000..44e6e0741 --- /dev/null +++ b/package/crds/memcache.gcp.upbound.io_instances.yaml @@ -0,0 +1,596 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.8.0 + creationTimestamp: null + name: instances.memcache.gcp.upbound.io +spec: + group: memcache.gcp.upbound.io + names: + categories: + - crossplane + - managed + - gcp + kind: Instance + listKind: InstanceList + plural: instances + singular: instance + scope: Cluster + versions: + - additionalPrinterColumns: + - jsonPath: .status.conditions[?(@.type=='Ready')].status + name: READY + type: string + - jsonPath: .status.conditions[?(@.type=='Synced')].status + name: SYNCED + type: string + - jsonPath: .metadata.annotations.crossplane\.io/external-name + name: EXTERNAL-NAME + type: string + - jsonPath: .metadata.creationTimestamp + name: AGE + type: date + name: v1beta1 + schema: + openAPIV3Schema: + description: Instance is the Schema for the Instances API. A Google Cloud + Memcache instance. + 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: InstanceSpec defines the desired state of Instance + properties: + deletionPolicy: + default: Delete + description: DeletionPolicy specifies what will happen to the underlying + external when this managed resource is deleted - either "Delete" + or "Orphan" the external resource. + enum: + - Orphan + - Delete + type: string + forProvider: + properties: + authorizedNetwork: + description: The full name of the GCE network to connect the instance + to. If not provided, 'default' will be used. + type: string + authorizedNetworkRef: + description: Reference to a Connection in servicenetworking to + populate authorizedNetwork. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + authorizedNetworkSelector: + description: Selector for a Connection in servicenetworking to + populate authorizedNetwork. + properties: + matchControllerRef: + description: MatchControllerRef ensures an object with the + same controller reference as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object + displayName: + description: A user-visible name for the instance. + type: string + labels: + additionalProperties: + type: string + description: Resource labels to represent user-provided metadata. + type: object + maintenancePolicy: + description: Maintenance policy for an instance. Structure is + documented below. + items: + properties: + description: + description: Optional. Description of what this policy is + for. Create/Update methods return INVALID_ARGUMENT if + the length is greater than 512. + type: string + weeklyMaintenanceWindow: + description: Required. Maintenance window that is applied + to resources covered by this policy. Minimum 1. For the + current version, the maximum number of weekly_maintenance_windows + is expected to be one. Structure is documented below. + items: + properties: + day: + description: Required. The day of week that maintenance + updates occur. + type: string + duration: + description: 'Required. The length of the maintenance + window, ranging from 3 hours to 8 hours. A duration + in seconds with up to nine fractional digits, terminated + by ''s''. Example: "3.5s".' + type: string + startTime: + description: Required. Start time of the window in + UTC time. Structure is documented below. + items: + properties: + hours: + description: Hours of day in 24 hour format. + Should be from 0 to 23. An API may choose + to allow the value "24:00:00" for scenarios + like business closing time. + type: number + minutes: + description: Minutes of hour of day. Must be + from 0 to 59. + type: number + nanos: + description: Fractions of seconds in nanoseconds. + Must be from 0 to 999,999,999. + type: number + seconds: + description: Seconds of minutes of the time. + Must normally be from 0 to 59. An API may + allow the value 60 if it allows leap-seconds. + type: number + type: object + type: array + required: + - day + - duration + - startTime + type: object + type: array + required: + - weeklyMaintenanceWindow + type: object + type: array + memcacheParameters: + description: User-specified parameters for this memcache instance. + Structure is documented below. + items: + properties: + params: + additionalProperties: + type: string + description: User-defined set of parameters to use in the + memcache process. + type: object + type: object + type: array + memcacheVersion: + description: The major version of Memcached software. If not provided, + latest supported version will be used. Currently the latest + supported major version is MEMCACHE_1_5. The minor version will + be automatically determined by our system based on the latest + supported minor version. Default value is MEMCACHE_1_5. Possible + values are MEMCACHE_1_5. + type: string + name: + description: The resource name of the instance. + type: string + nodeConfig: + description: Configuration for memcache nodes. Structure is documented + below. + items: + properties: + cpuCount: + description: Number of CPUs per node. + type: number + memorySizeMb: + description: Memory size in Mebibytes for each memcache + node. + type: number + required: + - cpuCount + - memorySizeMb + type: object + type: array + nodeCount: + description: Number of nodes in the memcache instance. + type: number + project: + description: The ID of the project in which the resource belongs. + If it is not provided, the provider project is used. + type: string + region: + description: The region of the Memcache instance. If it is not + provided, the provider region is used. + type: string + zones: + description: Zones where memcache nodes should be provisioned. If + not provided, all zones will be used. + items: + type: string + type: array + required: + - name + - nodeConfig + - nodeCount + type: object + providerConfigRef: + default: + name: default + description: ProviderConfigReference specifies how the provider that + will be used to create, observe, update, and delete this managed + resource should be configured. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of this + reference is required. The default is 'Required', which + means the reconcile will fail if the reference cannot be + resolved. 'Optional' means this reference will be a no-op + if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will attempt + to resolve the reference only when the corresponding field + is not present. Use 'Always' to resolve the reference on + every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + providerRef: + description: 'ProviderReference specifies the provider that will be + used to create, observe, update, and delete this managed resource. + Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of this + reference is required. The default is 'Required', which + means the reconcile will fail if the reference cannot be + resolved. 'Optional' means this reference will be a no-op + if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will attempt + to resolve the reference only when the corresponding field + is not present. Use 'Always' to resolve the reference on + every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + publishConnectionDetailsTo: + description: PublishConnectionDetailsTo specifies the connection secret + config which contains a name, metadata and a reference to secret + store config to which any connection details for this managed resource + should be written. Connection details frequently include the endpoint, + username, and password required to connect to the managed resource. + properties: + configRef: + default: + name: default + description: SecretStoreConfigRef specifies which secret store + config should be used for this ConnectionSecret. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + metadata: + description: Metadata is the metadata for connection secret. + properties: + annotations: + additionalProperties: + type: string + description: Annotations are the annotations to be added to + connection secret. - For Kubernetes secrets, this will be + used as "metadata.annotations". - It is up to Secret Store + implementation for others store types. + type: object + labels: + additionalProperties: + type: string + description: Labels are the labels/tags to be added to connection + secret. - For Kubernetes secrets, this will be used as "metadata.labels". + - It is up to Secret Store implementation for others store + types. + type: object + type: + description: Type is the SecretType for the connection secret. + - Only valid for Kubernetes Secret Stores. + type: string + type: object + name: + description: Name is the name of the connection secret. + type: string + required: + - name + type: object + writeConnectionSecretToRef: + description: WriteConnectionSecretToReference specifies the namespace + and name of a Secret to which any connection details for this managed + resource should be written. Connection details frequently include + the endpoint, username, and password required to connect to the + managed resource. This field is planned to be replaced in a future + release in favor of PublishConnectionDetailsTo. Currently, both + could be set independently and connection details would be published + to both without affecting each other. + properties: + name: + description: Name of the secret. + type: string + namespace: + description: Namespace of the secret. + type: string + required: + - name + - namespace + type: object + required: + - forProvider + type: object + status: + description: InstanceStatus defines the observed state of Instance. + properties: + atProvider: + properties: + createTime: + description: Creation timestamp in RFC3339 text format. + type: string + discoveryEndpoint: + description: Endpoint for Discovery API + type: string + id: + description: an identifier for the resource with format projects/{{project}}/locations/{{region}}/instances/{{name}} + type: string + maintenancePolicy: + description: Maintenance policy for an instance. Structure is + documented below. + items: + properties: + createTime: + description: Output only. The time when the policy was created. + A timestamp in RFC3339 UTC "Zulu" format, with nanosecond + resolution and up to nine fractional digits + type: string + updateTime: + description: Output only. The time when the policy was updated. + A timestamp in RFC3339 UTC "Zulu" format, with nanosecond + resolution and up to nine fractional digits. + type: string + type: object + type: array + maintenanceSchedule: + description: Output only. Published maintenance schedule. Structure + is documented below. + items: + properties: + endTime: + description: Output only. The end time of any upcoming scheduled + maintenance for this instance. A timestamp in RFC3339 + UTC "Zulu" format, with nanosecond resolution and up to + nine fractional digits. + type: string + scheduleDeadlineTime: + description: Output only. The deadline that the maintenance + schedule start time can not go beyond, including reschedule. + A timestamp in RFC3339 UTC "Zulu" format, with nanosecond + resolution and up to nine fractional digits. + type: string + startTime: + description: Output only. The start time of any upcoming + scheduled maintenance for this instance. A timestamp in + RFC3339 UTC "Zulu" format, with nanosecond resolution + and up to nine fractional digits. + type: string + type: object + type: array + memcacheFullVersion: + description: The full version of memcached server running on this + instance. + type: string + memcacheNodes: + description: Additional information about the instance state, + if available. Structure is documented below. + items: + properties: + host: + description: Hostname or IP address of the Memcached node + used by the clients to connect to the Memcached server + on this node. + type: string + nodeId: + description: Identifier of the Memcached node. The node + id does not include project or location like the Memcached + instance name. + type: string + port: + description: The port number of the Memcached server on + this node. + type: number + state: + description: Current state of the Memcached node. + type: string + zone: + description: Location (GCP Zone) for the Memcached node. + type: string + type: object + type: array + memcacheParameters: + description: User-specified parameters for this memcache instance. + Structure is documented below. + items: + properties: + id: + description: This is a unique ID associated with this set + of parameters. + type: string + type: object + type: array + type: object + conditions: + description: Conditions of the resource. + items: + description: A Condition that may apply to a resource. + properties: + lastTransitionTime: + description: LastTransitionTime is the last time this condition + transitioned from one status to another. + format: date-time + type: string + message: + description: A Message containing details about this condition's + last transition from one status to another, if any. + type: string + reason: + description: A Reason for this condition's last transition from + one status to another. + type: string + status: + description: Status of this condition; is it currently True, + False, or Unknown? + type: string + type: + description: Type of this condition. At most one of each condition + type may apply to a resource at any point in time. + type: string + required: + - lastTransitionTime + - reason + - status + - type + type: object + type: array + type: object + required: + - spec + type: object + served: true + storage: true + subresources: + status: {} +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] diff --git a/package/crds/mlengine.gcp.upbound.io_models.yaml b/package/crds/mlengine.gcp.upbound.io_models.yaml new file mode 100644 index 000000000..1b51df4d4 --- /dev/null +++ b/package/crds/mlengine.gcp.upbound.io_models.yaml @@ -0,0 +1,341 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.8.0 + creationTimestamp: null + name: models.mlengine.gcp.upbound.io +spec: + group: mlengine.gcp.upbound.io + names: + categories: + - crossplane + - managed + - gcp + kind: Model + listKind: ModelList + plural: models + singular: model + scope: Cluster + versions: + - additionalPrinterColumns: + - jsonPath: .status.conditions[?(@.type=='Ready')].status + name: READY + type: string + - jsonPath: .status.conditions[?(@.type=='Synced')].status + name: SYNCED + type: string + - jsonPath: .metadata.annotations.crossplane\.io/external-name + name: EXTERNAL-NAME + type: string + - jsonPath: .metadata.creationTimestamp + name: AGE + type: date + name: v1beta1 + schema: + openAPIV3Schema: + description: Model is the Schema for the Models API. Represents a machine + learning solution. + 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: ModelSpec defines the desired state of Model + properties: + deletionPolicy: + default: Delete + description: DeletionPolicy specifies what will happen to the underlying + external when this managed resource is deleted - either "Delete" + or "Orphan" the external resource. + enum: + - Orphan + - Delete + type: string + forProvider: + properties: + defaultVersion: + description: The default version of the model. This version will + be used to handle prediction requests that do not specify a + version. Structure is documented below. + items: + properties: + name: + description: The name specified for the version when it + was created. + type: string + required: + - name + type: object + type: array + description: + description: The description specified for the model when it was + created. + type: string + labels: + additionalProperties: + type: string + description: One or more labels that you can add, to organize + your models. + type: object + name: + description: The name specified for the model. + type: string + onlinePredictionConsoleLogging: + description: If true, online prediction nodes send stderr and + stdout streams to Stackdriver Logging + type: boolean + onlinePredictionLogging: + description: If true, online prediction access logs are sent to + StackDriver Logging. + type: boolean + project: + description: The ID of the project in which the resource belongs. + If it is not provided, the provider project is used. + type: string + regions: + description: The list of regions where the model is going to be + deployed. Currently only one region per model is supported + items: + type: string + type: array + required: + - name + type: object + providerConfigRef: + default: + name: default + description: ProviderConfigReference specifies how the provider that + will be used to create, observe, update, and delete this managed + resource should be configured. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of this + reference is required. The default is 'Required', which + means the reconcile will fail if the reference cannot be + resolved. 'Optional' means this reference will be a no-op + if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will attempt + to resolve the reference only when the corresponding field + is not present. Use 'Always' to resolve the reference on + every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + providerRef: + description: 'ProviderReference specifies the provider that will be + used to create, observe, update, and delete this managed resource. + Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of this + reference is required. The default is 'Required', which + means the reconcile will fail if the reference cannot be + resolved. 'Optional' means this reference will be a no-op + if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will attempt + to resolve the reference only when the corresponding field + is not present. Use 'Always' to resolve the reference on + every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + publishConnectionDetailsTo: + description: PublishConnectionDetailsTo specifies the connection secret + config which contains a name, metadata and a reference to secret + store config to which any connection details for this managed resource + should be written. Connection details frequently include the endpoint, + username, and password required to connect to the managed resource. + properties: + configRef: + default: + name: default + description: SecretStoreConfigRef specifies which secret store + config should be used for this ConnectionSecret. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + metadata: + description: Metadata is the metadata for connection secret. + properties: + annotations: + additionalProperties: + type: string + description: Annotations are the annotations to be added to + connection secret. - For Kubernetes secrets, this will be + used as "metadata.annotations". - It is up to Secret Store + implementation for others store types. + type: object + labels: + additionalProperties: + type: string + description: Labels are the labels/tags to be added to connection + secret. - For Kubernetes secrets, this will be used as "metadata.labels". + - It is up to Secret Store implementation for others store + types. + type: object + type: + description: Type is the SecretType for the connection secret. + - Only valid for Kubernetes Secret Stores. + type: string + type: object + name: + description: Name is the name of the connection secret. + type: string + required: + - name + type: object + writeConnectionSecretToRef: + description: WriteConnectionSecretToReference specifies the namespace + and name of a Secret to which any connection details for this managed + resource should be written. Connection details frequently include + the endpoint, username, and password required to connect to the + managed resource. This field is planned to be replaced in a future + release in favor of PublishConnectionDetailsTo. Currently, both + could be set independently and connection details would be published + to both without affecting each other. + properties: + name: + description: Name of the secret. + type: string + namespace: + description: Namespace of the secret. + type: string + required: + - name + - namespace + type: object + required: + - forProvider + type: object + status: + description: ModelStatus defines the observed state of Model. + properties: + atProvider: + properties: + id: + description: an identifier for the resource with format projects/{{project}}/models/{{name}} + type: string + type: object + conditions: + description: Conditions of the resource. + items: + description: A Condition that may apply to a resource. + properties: + lastTransitionTime: + description: LastTransitionTime is the last time this condition + transitioned from one status to another. + format: date-time + type: string + message: + description: A Message containing details about this condition's + last transition from one status to another, if any. + type: string + reason: + description: A Reason for this condition's last transition from + one status to another. + type: string + status: + description: Status of this condition; is it currently True, + False, or Unknown? + type: string + type: + description: Type of this condition. At most one of each condition + type may apply to a resource at any point in time. + type: string + required: + - lastTransitionTime + - reason + - status + - type + type: object + type: array + type: object + required: + - spec + type: object + served: true + storage: true + subresources: + status: {} +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] diff --git a/package/crds/networkmanagement.gcp.upbound.io_connectivitytests.yaml b/package/crds/networkmanagement.gcp.upbound.io_connectivitytests.yaml new file mode 100644 index 000000000..fdec01837 --- /dev/null +++ b/package/crds/networkmanagement.gcp.upbound.io_connectivitytests.yaml @@ -0,0 +1,1038 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.8.0 + creationTimestamp: null + name: connectivitytests.networkmanagement.gcp.upbound.io +spec: + group: networkmanagement.gcp.upbound.io + names: + categories: + - crossplane + - managed + - gcp + kind: ConnectivityTest + listKind: ConnectivityTestList + plural: connectivitytests + singular: connectivitytest + scope: Cluster + versions: + - additionalPrinterColumns: + - jsonPath: .status.conditions[?(@.type=='Ready')].status + name: READY + type: string + - jsonPath: .status.conditions[?(@.type=='Synced')].status + name: SYNCED + type: string + - jsonPath: .metadata.annotations.crossplane\.io/external-name + name: EXTERNAL-NAME + type: string + - jsonPath: .metadata.creationTimestamp + name: AGE + type: date + name: v1beta1 + schema: + openAPIV3Schema: + description: ConnectivityTest is the Schema for the ConnectivityTests API. + A connectivity test are a static analysis of your resource configurations + that enables you to evaluate connectivity to and from Google Cloud resources + in your Virtual Private Cloud (VPC) network. + 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: ConnectivityTestSpec defines the desired state of ConnectivityTest + properties: + deletionPolicy: + default: Delete + description: DeletionPolicy specifies what will happen to the underlying + external when this managed resource is deleted - either "Delete" + or "Orphan" the external resource. + enum: + - Orphan + - Delete + type: string + forProvider: + properties: + description: + description: The user-supplied description of the Connectivity + Test. Maximum of 512 characters. + type: string + destination: + description: Required. Destination specification of the Connectivity + Test. You can use a combination of destination IP address, Compute + Engine VM instance, or VPC network to uniquely identify the + destination location. Even if the destination IP address is + not unique, the source IP location is unique. Usually, the analysis + can infer the destination endpoint from route information. If + the destination you specify is a VM instance and the instance + has multiple network interfaces, then you must also specify + either a destination IP address or VPC network to identify the + destination interface. A reachability analysis proceeds even + if the destination location is ambiguous. However, the result + can include endpoints that you don't intend to test. Structure + is documented below. + items: + properties: + instance: + description: A Compute Engine instance URI. + type: string + instanceRef: + description: Reference to a Instance in compute to populate + instance. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution + of this reference is required. The default is + 'Required', which means the reconcile will fail + if the reference cannot be resolved. 'Optional' + means this reference will be a no-op if it cannot + be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference + should be resolved. The default is 'IfNotPresent', + which will attempt to resolve the reference only + when the corresponding field is not present. Use + 'Always' to resolve the reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + instanceSelector: + description: Selector for a Instance in compute to populate + instance. + properties: + matchControllerRef: + description: MatchControllerRef ensures an object with + the same controller reference as the selecting object + is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching + labels is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution + of this reference is required. The default is + 'Required', which means the reconcile will fail + if the reference cannot be resolved. 'Optional' + means this reference will be a no-op if it cannot + be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference + should be resolved. The default is 'IfNotPresent', + which will attempt to resolve the reference only + when the corresponding field is not present. Use + 'Always' to resolve the reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object + ipAddress: + description: The IP address of the endpoint, which can be + an external or internal IP. An IPv6 address is only allowed + when the test's destination is a global load balancer + VIP. + type: string + ipAddressRef: + description: Reference to a Address in compute to populate + ipAddress. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution + of this reference is required. The default is + 'Required', which means the reconcile will fail + if the reference cannot be resolved. 'Optional' + means this reference will be a no-op if it cannot + be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference + should be resolved. The default is 'IfNotPresent', + which will attempt to resolve the reference only + when the corresponding field is not present. Use + 'Always' to resolve the reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + ipAddressSelector: + description: Selector for a Address in compute to populate + ipAddress. + properties: + matchControllerRef: + description: MatchControllerRef ensures an object with + the same controller reference as the selecting object + is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching + labels is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution + of this reference is required. The default is + 'Required', which means the reconcile will fail + if the reference cannot be resolved. 'Optional' + means this reference will be a no-op if it cannot + be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference + should be resolved. The default is 'IfNotPresent', + which will attempt to resolve the reference only + when the corresponding field is not present. Use + 'Always' to resolve the reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object + network: + description: A Compute Engine network URI. + type: string + networkRef: + description: Reference to a Network in compute to populate + network. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution + of this reference is required. The default is + 'Required', which means the reconcile will fail + if the reference cannot be resolved. 'Optional' + means this reference will be a no-op if it cannot + be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference + should be resolved. The default is 'IfNotPresent', + which will attempt to resolve the reference only + when the corresponding field is not present. Use + 'Always' to resolve the reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + networkSelector: + description: Selector for a Network in compute to populate + network. + properties: + matchControllerRef: + description: MatchControllerRef ensures an object with + the same controller reference as the selecting object + is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching + labels is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution + of this reference is required. The default is + 'Required', which means the reconcile will fail + if the reference cannot be resolved. 'Optional' + means this reference will be a no-op if it cannot + be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference + should be resolved. The default is 'IfNotPresent', + which will attempt to resolve the reference only + when the corresponding field is not present. Use + 'Always' to resolve the reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object + port: + description: The IP protocol port of the endpoint. Only + applicable when protocol is TCP or UDP. + type: number + projectId: + description: 'Project ID where the endpoint is located. + The Project ID can be derived from the URI if you provide + a VM instance or network URI. The following are two cases + where you must provide the project ID:' + type: string + projectIdRef: + description: Reference to a Address in compute to populate + projectId. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution + of this reference is required. The default is + 'Required', which means the reconcile will fail + if the reference cannot be resolved. 'Optional' + means this reference will be a no-op if it cannot + be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference + should be resolved. The default is 'IfNotPresent', + which will attempt to resolve the reference only + when the corresponding field is not present. Use + 'Always' to resolve the reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + projectIdSelector: + description: Selector for a Address in compute to populate + projectId. + properties: + matchControllerRef: + description: MatchControllerRef ensures an object with + the same controller reference as the selecting object + is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching + labels is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution + of this reference is required. The default is + 'Required', which means the reconcile will fail + if the reference cannot be resolved. 'Optional' + means this reference will be a no-op if it cannot + be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference + should be resolved. The default is 'IfNotPresent', + which will attempt to resolve the reference only + when the corresponding field is not present. Use + 'Always' to resolve the reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object + type: object + type: array + labels: + additionalProperties: + type: string + description: Resource labels to represent user-provided metadata. + type: object + name: + description: Unique name for the connectivity test. + type: string + project: + description: The ID of the project in which the resource belongs. + If it is not provided, the provider project is used. + type: string + protocol: + description: IP Protocol of the test. When not provided, "TCP" + is assumed. + type: string + relatedProjects: + description: Other projects that may be relevant for reachability + analysis. This is applicable to scenarios where a test can cross + project boundaries. + items: + type: string + type: array + source: + description: 'Required. Source specification of the Connectivity + Test. You can use a combination of source IP address, virtual + machine (VM) instance, or Compute Engine network to uniquely + identify the source location. Examples: If the source IP address + is an internal IP address within a Google Cloud Virtual Private + Cloud (VPC) network, then you must also specify the VPC network. + Otherwise, specify the VM instance, which already contains its + internal IP address and VPC network information. If the source + of the test is within an on-premises network, then you must + provide the destination VPC network. If the source endpoint + is a Compute Engine VM instance with multiple network interfaces, + the instance itself is not sufficient to identify the endpoint. + So, you must also specify the source IP address or VPC network. + A reachability analysis proceeds even if the source location + is ambiguous. However, the test result may include endpoints + that you don''t intend to test. Structure is documented below.' + items: + properties: + instance: + description: A Compute Engine instance URI. + type: string + instanceRef: + description: Reference to a Instance in compute to populate + instance. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution + of this reference is required. The default is + 'Required', which means the reconcile will fail + if the reference cannot be resolved. 'Optional' + means this reference will be a no-op if it cannot + be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference + should be resolved. The default is 'IfNotPresent', + which will attempt to resolve the reference only + when the corresponding field is not present. Use + 'Always' to resolve the reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + instanceSelector: + description: Selector for a Instance in compute to populate + instance. + properties: + matchControllerRef: + description: MatchControllerRef ensures an object with + the same controller reference as the selecting object + is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching + labels is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution + of this reference is required. The default is + 'Required', which means the reconcile will fail + if the reference cannot be resolved. 'Optional' + means this reference will be a no-op if it cannot + be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference + should be resolved. The default is 'IfNotPresent', + which will attempt to resolve the reference only + when the corresponding field is not present. Use + 'Always' to resolve the reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object + ipAddress: + description: The IP address of the endpoint, which can be + an external or internal IP. An IPv6 address is only allowed + when the test's destination is a global load balancer + VIP. + type: string + ipAddressRef: + description: Reference to a Address in compute to populate + ipAddress. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution + of this reference is required. The default is + 'Required', which means the reconcile will fail + if the reference cannot be resolved. 'Optional' + means this reference will be a no-op if it cannot + be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference + should be resolved. The default is 'IfNotPresent', + which will attempt to resolve the reference only + when the corresponding field is not present. Use + 'Always' to resolve the reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + ipAddressSelector: + description: Selector for a Address in compute to populate + ipAddress. + properties: + matchControllerRef: + description: MatchControllerRef ensures an object with + the same controller reference as the selecting object + is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching + labels is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution + of this reference is required. The default is + 'Required', which means the reconcile will fail + if the reference cannot be resolved. 'Optional' + means this reference will be a no-op if it cannot + be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference + should be resolved. The default is 'IfNotPresent', + which will attempt to resolve the reference only + when the corresponding field is not present. Use + 'Always' to resolve the reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object + network: + description: A Compute Engine network URI. + type: string + networkRef: + description: Reference to a Network in compute to populate + network. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution + of this reference is required. The default is + 'Required', which means the reconcile will fail + if the reference cannot be resolved. 'Optional' + means this reference will be a no-op if it cannot + be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference + should be resolved. The default is 'IfNotPresent', + which will attempt to resolve the reference only + when the corresponding field is not present. Use + 'Always' to resolve the reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + networkSelector: + description: Selector for a Network in compute to populate + network. + properties: + matchControllerRef: + description: MatchControllerRef ensures an object with + the same controller reference as the selecting object + is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching + labels is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution + of this reference is required. The default is + 'Required', which means the reconcile will fail + if the reference cannot be resolved. 'Optional' + means this reference will be a no-op if it cannot + be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference + should be resolved. The default is 'IfNotPresent', + which will attempt to resolve the reference only + when the corresponding field is not present. Use + 'Always' to resolve the reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object + networkType: + description: Type of the network where the endpoint is located. + Possible values are GCP_NETWORK and NON_GCP_NETWORK. + type: string + port: + description: The IP protocol port of the endpoint. Only + applicable when protocol is TCP or UDP. + type: number + projectId: + description: 'Project ID where the endpoint is located. + The Project ID can be derived from the URI if you provide + a VM instance or network URI. The following are two cases + where you must provide the project ID:' + type: string + projectIdRef: + description: Reference to a Address in compute to populate + projectId. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution + of this reference is required. The default is + 'Required', which means the reconcile will fail + if the reference cannot be resolved. 'Optional' + means this reference will be a no-op if it cannot + be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference + should be resolved. The default is 'IfNotPresent', + which will attempt to resolve the reference only + when the corresponding field is not present. Use + 'Always' to resolve the reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + projectIdSelector: + description: Selector for a Address in compute to populate + projectId. + properties: + matchControllerRef: + description: MatchControllerRef ensures an object with + the same controller reference as the selecting object + is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching + labels is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution + of this reference is required. The default is + 'Required', which means the reconcile will fail + if the reference cannot be resolved. 'Optional' + means this reference will be a no-op if it cannot + be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference + should be resolved. The default is 'IfNotPresent', + which will attempt to resolve the reference only + when the corresponding field is not present. Use + 'Always' to resolve the reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object + type: object + type: array + required: + - destination + - name + - source + type: object + providerConfigRef: + default: + name: default + description: ProviderConfigReference specifies how the provider that + will be used to create, observe, update, and delete this managed + resource should be configured. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of this + reference is required. The default is 'Required', which + means the reconcile will fail if the reference cannot be + resolved. 'Optional' means this reference will be a no-op + if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will attempt + to resolve the reference only when the corresponding field + is not present. Use 'Always' to resolve the reference on + every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + providerRef: + description: 'ProviderReference specifies the provider that will be + used to create, observe, update, and delete this managed resource. + Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of this + reference is required. The default is 'Required', which + means the reconcile will fail if the reference cannot be + resolved. 'Optional' means this reference will be a no-op + if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will attempt + to resolve the reference only when the corresponding field + is not present. Use 'Always' to resolve the reference on + every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + publishConnectionDetailsTo: + description: PublishConnectionDetailsTo specifies the connection secret + config which contains a name, metadata and a reference to secret + store config to which any connection details for this managed resource + should be written. Connection details frequently include the endpoint, + username, and password required to connect to the managed resource. + properties: + configRef: + default: + name: default + description: SecretStoreConfigRef specifies which secret store + config should be used for this ConnectionSecret. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + metadata: + description: Metadata is the metadata for connection secret. + properties: + annotations: + additionalProperties: + type: string + description: Annotations are the annotations to be added to + connection secret. - For Kubernetes secrets, this will be + used as "metadata.annotations". - It is up to Secret Store + implementation for others store types. + type: object + labels: + additionalProperties: + type: string + description: Labels are the labels/tags to be added to connection + secret. - For Kubernetes secrets, this will be used as "metadata.labels". + - It is up to Secret Store implementation for others store + types. + type: object + type: + description: Type is the SecretType for the connection secret. + - Only valid for Kubernetes Secret Stores. + type: string + type: object + name: + description: Name is the name of the connection secret. + type: string + required: + - name + type: object + writeConnectionSecretToRef: + description: WriteConnectionSecretToReference specifies the namespace + and name of a Secret to which any connection details for this managed + resource should be written. Connection details frequently include + the endpoint, username, and password required to connect to the + managed resource. This field is planned to be replaced in a future + release in favor of PublishConnectionDetailsTo. Currently, both + could be set independently and connection details would be published + to both without affecting each other. + properties: + name: + description: Name of the secret. + type: string + namespace: + description: Namespace of the secret. + type: string + required: + - name + - namespace + type: object + required: + - forProvider + type: object + status: + description: ConnectivityTestStatus defines the observed state of ConnectivityTest. + properties: + atProvider: + properties: + id: + description: an identifier for the resource with format projects/{{project}}/locations/global/connectivityTests/{{name}} + type: string + type: object + conditions: + description: Conditions of the resource. + items: + description: A Condition that may apply to a resource. + properties: + lastTransitionTime: + description: LastTransitionTime is the last time this condition + transitioned from one status to another. + format: date-time + type: string + message: + description: A Message containing details about this condition's + last transition from one status to another, if any. + type: string + reason: + description: A Reason for this condition's last transition from + one status to another. + type: string + status: + description: Status of this condition; is it currently True, + False, or Unknown? + type: string + type: + description: Type of this condition. At most one of each condition + type may apply to a resource at any point in time. + type: string + required: + - lastTransitionTime + - reason + - status + - type + type: object + type: array + type: object + required: + - spec + type: object + served: true + storage: true + subresources: + status: {} +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: []