From f6a042ba938f539ecc7f7758779f162329aeb8c0 Mon Sep 17 00:00:00 2001 From: ISMAIL KABOUBI Date: Wed, 3 Jan 2024 19:13:26 +0100 Subject: [PATCH] feat(apis): adding dns apis --- apis/dns/v1alpha1/zz_generated.deepcopy.go | 1269 +++++++++++++++++ apis/dns/v1alpha1/zz_generated.managed.go | 188 +++ apis/dns/v1alpha1/zz_generated.managedlist.go | 35 + apis/dns/v1alpha1/zz_generated_terraformed.go | 270 ++++ apis/dns/v1alpha1/zz_groupversion_info.go | 36 + apis/dns/v1alpha1/zz_zone_types.go | 422 ++++++ apis/dns/v1alpha1/zz_zonerecord_types.go | 143 ++ apis/dns/v1alpha1/zz_zoneredirection_types.go | 163 +++ apis/zz_register.go | 2 + config/dns/config.go | 20 + config/external_name.go | 3 + config/provider.go | 3 + examples-generated/dns/zone.yaml | 20 + examples-generated/dns/zonerecord.yaml | 15 + examples-generated/dns/zoneredirection.yaml | 14 + internal/controller/dns/zone/zz_controller.go | 67 + .../dns/zonerecord/zz_controller.go | 67 + .../dns/zoneredirection/zz_controller.go | 67 + internal/controller/zz_setup.go | 6 + .../crds/dns.ovh.edixos.io_zonerecords.yaml | 354 +++++ .../dns.ovh.edixos.io_zoneredirections.yaml | 372 +++++ package/crds/dns.ovh.edixos.io_zones.yaml | 585 ++++++++ 22 files changed, 4121 insertions(+) create mode 100644 apis/dns/v1alpha1/zz_generated.deepcopy.go create mode 100644 apis/dns/v1alpha1/zz_generated.managed.go create mode 100644 apis/dns/v1alpha1/zz_generated.managedlist.go create mode 100755 apis/dns/v1alpha1/zz_generated_terraformed.go create mode 100755 apis/dns/v1alpha1/zz_groupversion_info.go create mode 100755 apis/dns/v1alpha1/zz_zone_types.go create mode 100755 apis/dns/v1alpha1/zz_zonerecord_types.go create mode 100755 apis/dns/v1alpha1/zz_zoneredirection_types.go create mode 100644 config/dns/config.go create mode 100644 examples-generated/dns/zone.yaml create mode 100644 examples-generated/dns/zonerecord.yaml create mode 100644 examples-generated/dns/zoneredirection.yaml create mode 100755 internal/controller/dns/zone/zz_controller.go create mode 100755 internal/controller/dns/zonerecord/zz_controller.go create mode 100755 internal/controller/dns/zoneredirection/zz_controller.go create mode 100644 package/crds/dns.ovh.edixos.io_zonerecords.yaml create mode 100644 package/crds/dns.ovh.edixos.io_zoneredirections.yaml create mode 100644 package/crds/dns.ovh.edixos.io_zones.yaml diff --git a/apis/dns/v1alpha1/zz_generated.deepcopy.go b/apis/dns/v1alpha1/zz_generated.deepcopy.go new file mode 100644 index 0000000..a230f76 --- /dev/null +++ b/apis/dns/v1alpha1/zz_generated.deepcopy.go @@ -0,0 +1,1269 @@ +//go:build !ignore_autogenerated + +/* +Copyright 2022 Upbound Inc. +*/ + +// Code generated by controller-gen. DO NOT EDIT. + +package v1alpha1 + +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 *ConfigurationInitParameters) DeepCopyInto(out *ConfigurationInitParameters) { + *out = *in + if in.Label != nil { + in, out := &in.Label, &out.Label + *out = new(string) + **out = **in + } + if in.Value != nil { + in, out := &in.Value, &out.Value + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigurationInitParameters. +func (in *ConfigurationInitParameters) DeepCopy() *ConfigurationInitParameters { + if in == nil { + return nil + } + out := new(ConfigurationInitParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ConfigurationObservation) DeepCopyInto(out *ConfigurationObservation) { + *out = *in + if in.Label != nil { + in, out := &in.Label, &out.Label + *out = new(string) + **out = **in + } + if in.Value != nil { + in, out := &in.Value, &out.Value + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigurationObservation. +func (in *ConfigurationObservation) DeepCopy() *ConfigurationObservation { + if in == nil { + return nil + } + out := new(ConfigurationObservation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ConfigurationParameters) DeepCopyInto(out *ConfigurationParameters) { + *out = *in + if in.Label != nil { + in, out := &in.Label, &out.Label + *out = new(string) + **out = **in + } + if in.Value != nil { + in, out := &in.Value, &out.Value + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigurationParameters. +func (in *ConfigurationParameters) DeepCopy() *ConfigurationParameters { + if in == nil { + return nil + } + out := new(ConfigurationParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DetailsInitParameters) DeepCopyInto(out *DetailsInitParameters) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DetailsInitParameters. +func (in *DetailsInitParameters) DeepCopy() *DetailsInitParameters { + if in == nil { + return nil + } + out := new(DetailsInitParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DetailsObservation) DeepCopyInto(out *DetailsObservation) { + *out = *in + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(string) + **out = **in + } + if in.Domain != nil { + in, out := &in.Domain, &out.Domain + *out = new(string) + **out = **in + } + if in.OrderDetailID != nil { + in, out := &in.OrderDetailID, &out.OrderDetailID + *out = new(float64) + **out = **in + } + if in.Quantity != nil { + in, out := &in.Quantity, &out.Quantity + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DetailsObservation. +func (in *DetailsObservation) DeepCopy() *DetailsObservation { + if in == nil { + return nil + } + out := new(DetailsObservation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DetailsParameters) DeepCopyInto(out *DetailsParameters) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DetailsParameters. +func (in *DetailsParameters) DeepCopy() *DetailsParameters { + if in == nil { + return nil + } + out := new(DetailsParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OrderInitParameters) DeepCopyInto(out *OrderInitParameters) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OrderInitParameters. +func (in *OrderInitParameters) DeepCopy() *OrderInitParameters { + if in == nil { + return nil + } + out := new(OrderInitParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OrderObservation) DeepCopyInto(out *OrderObservation) { + *out = *in + if in.Date != nil { + in, out := &in.Date, &out.Date + *out = new(string) + **out = **in + } + if in.Details != nil { + in, out := &in.Details, &out.Details + *out = make([]DetailsObservation, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.ExpirationDate != nil { + in, out := &in.ExpirationDate, &out.ExpirationDate + *out = new(string) + **out = **in + } + if in.OrderID != nil { + in, out := &in.OrderID, &out.OrderID + *out = new(float64) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OrderObservation. +func (in *OrderObservation) DeepCopy() *OrderObservation { + if in == nil { + return nil + } + out := new(OrderObservation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OrderParameters) DeepCopyInto(out *OrderParameters) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OrderParameters. +func (in *OrderParameters) DeepCopy() *OrderParameters { + if in == nil { + return nil + } + out := new(OrderParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PlanInitParameters) DeepCopyInto(out *PlanInitParameters) { + *out = *in + if in.CatalogName != nil { + in, out := &in.CatalogName, &out.CatalogName + *out = new(string) + **out = **in + } + if in.Configuration != nil { + in, out := &in.Configuration, &out.Configuration + *out = make([]ConfigurationInitParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Duration != nil { + in, out := &in.Duration, &out.Duration + *out = new(string) + **out = **in + } + if in.PlanCode != nil { + in, out := &in.PlanCode, &out.PlanCode + *out = new(string) + **out = **in + } + if in.PricingMode != nil { + in, out := &in.PricingMode, &out.PricingMode + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PlanInitParameters. +func (in *PlanInitParameters) DeepCopy() *PlanInitParameters { + if in == nil { + return nil + } + out := new(PlanInitParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PlanObservation) DeepCopyInto(out *PlanObservation) { + *out = *in + if in.CatalogName != nil { + in, out := &in.CatalogName, &out.CatalogName + *out = new(string) + **out = **in + } + if in.Configuration != nil { + in, out := &in.Configuration, &out.Configuration + *out = make([]ConfigurationObservation, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Duration != nil { + in, out := &in.Duration, &out.Duration + *out = new(string) + **out = **in + } + if in.PlanCode != nil { + in, out := &in.PlanCode, &out.PlanCode + *out = new(string) + **out = **in + } + if in.PricingMode != nil { + in, out := &in.PricingMode, &out.PricingMode + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PlanObservation. +func (in *PlanObservation) DeepCopy() *PlanObservation { + if in == nil { + return nil + } + out := new(PlanObservation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PlanOptionConfigurationInitParameters) DeepCopyInto(out *PlanOptionConfigurationInitParameters) { + *out = *in + if in.Label != nil { + in, out := &in.Label, &out.Label + *out = new(string) + **out = **in + } + if in.Value != nil { + in, out := &in.Value, &out.Value + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PlanOptionConfigurationInitParameters. +func (in *PlanOptionConfigurationInitParameters) DeepCopy() *PlanOptionConfigurationInitParameters { + if in == nil { + return nil + } + out := new(PlanOptionConfigurationInitParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PlanOptionConfigurationObservation) DeepCopyInto(out *PlanOptionConfigurationObservation) { + *out = *in + if in.Label != nil { + in, out := &in.Label, &out.Label + *out = new(string) + **out = **in + } + if in.Value != nil { + in, out := &in.Value, &out.Value + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PlanOptionConfigurationObservation. +func (in *PlanOptionConfigurationObservation) DeepCopy() *PlanOptionConfigurationObservation { + if in == nil { + return nil + } + out := new(PlanOptionConfigurationObservation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PlanOptionConfigurationParameters) DeepCopyInto(out *PlanOptionConfigurationParameters) { + *out = *in + if in.Label != nil { + in, out := &in.Label, &out.Label + *out = new(string) + **out = **in + } + if in.Value != nil { + in, out := &in.Value, &out.Value + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PlanOptionConfigurationParameters. +func (in *PlanOptionConfigurationParameters) DeepCopy() *PlanOptionConfigurationParameters { + if in == nil { + return nil + } + out := new(PlanOptionConfigurationParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PlanOptionInitParameters) DeepCopyInto(out *PlanOptionInitParameters) { + *out = *in + if in.CatalogName != nil { + in, out := &in.CatalogName, &out.CatalogName + *out = new(string) + **out = **in + } + if in.Configuration != nil { + in, out := &in.Configuration, &out.Configuration + *out = make([]PlanOptionConfigurationInitParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Duration != nil { + in, out := &in.Duration, &out.Duration + *out = new(string) + **out = **in + } + if in.PlanCode != nil { + in, out := &in.PlanCode, &out.PlanCode + *out = new(string) + **out = **in + } + if in.PricingMode != nil { + in, out := &in.PricingMode, &out.PricingMode + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PlanOptionInitParameters. +func (in *PlanOptionInitParameters) DeepCopy() *PlanOptionInitParameters { + if in == nil { + return nil + } + out := new(PlanOptionInitParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PlanOptionObservation) DeepCopyInto(out *PlanOptionObservation) { + *out = *in + if in.CatalogName != nil { + in, out := &in.CatalogName, &out.CatalogName + *out = new(string) + **out = **in + } + if in.Configuration != nil { + in, out := &in.Configuration, &out.Configuration + *out = make([]PlanOptionConfigurationObservation, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Duration != nil { + in, out := &in.Duration, &out.Duration + *out = new(string) + **out = **in + } + if in.PlanCode != nil { + in, out := &in.PlanCode, &out.PlanCode + *out = new(string) + **out = **in + } + if in.PricingMode != nil { + in, out := &in.PricingMode, &out.PricingMode + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PlanOptionObservation. +func (in *PlanOptionObservation) DeepCopy() *PlanOptionObservation { + if in == nil { + return nil + } + out := new(PlanOptionObservation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PlanOptionParameters) DeepCopyInto(out *PlanOptionParameters) { + *out = *in + if in.CatalogName != nil { + in, out := &in.CatalogName, &out.CatalogName + *out = new(string) + **out = **in + } + if in.Configuration != nil { + in, out := &in.Configuration, &out.Configuration + *out = make([]PlanOptionConfigurationParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Duration != nil { + in, out := &in.Duration, &out.Duration + *out = new(string) + **out = **in + } + if in.PlanCode != nil { + in, out := &in.PlanCode, &out.PlanCode + *out = new(string) + **out = **in + } + if in.PricingMode != nil { + in, out := &in.PricingMode, &out.PricingMode + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PlanOptionParameters. +func (in *PlanOptionParameters) DeepCopy() *PlanOptionParameters { + if in == nil { + return nil + } + out := new(PlanOptionParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PlanParameters) DeepCopyInto(out *PlanParameters) { + *out = *in + if in.CatalogName != nil { + in, out := &in.CatalogName, &out.CatalogName + *out = new(string) + **out = **in + } + if in.Configuration != nil { + in, out := &in.Configuration, &out.Configuration + *out = make([]ConfigurationParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Duration != nil { + in, out := &in.Duration, &out.Duration + *out = new(string) + **out = **in + } + if in.PlanCode != nil { + in, out := &in.PlanCode, &out.PlanCode + *out = new(string) + **out = **in + } + if in.PricingMode != nil { + in, out := &in.PricingMode, &out.PricingMode + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PlanParameters. +func (in *PlanParameters) DeepCopy() *PlanParameters { + if in == nil { + return nil + } + out := new(PlanParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Zone) DeepCopyInto(out *Zone) { + *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 Zone. +func (in *Zone) DeepCopy() *Zone { + if in == nil { + return nil + } + out := new(Zone) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Zone) 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 *ZoneInitParameters) DeepCopyInto(out *ZoneInitParameters) { + *out = *in + if in.OvhSubsidiary != nil { + in, out := &in.OvhSubsidiary, &out.OvhSubsidiary + *out = new(string) + **out = **in + } + if in.PaymentMean != nil { + in, out := &in.PaymentMean, &out.PaymentMean + *out = new(string) + **out = **in + } + if in.Plan != nil { + in, out := &in.Plan, &out.Plan + *out = make([]PlanInitParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.PlanOption != nil { + in, out := &in.PlanOption, &out.PlanOption + *out = make([]PlanOptionInitParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ZoneInitParameters. +func (in *ZoneInitParameters) DeepCopy() *ZoneInitParameters { + if in == nil { + return nil + } + out := new(ZoneInitParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ZoneList) DeepCopyInto(out *ZoneList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Zone, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ZoneList. +func (in *ZoneList) DeepCopy() *ZoneList { + if in == nil { + return nil + } + out := new(ZoneList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ZoneList) 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 *ZoneObservation) DeepCopyInto(out *ZoneObservation) { + *out = *in + if in.DNSSECSupported != nil { + in, out := &in.DNSSECSupported, &out.DNSSECSupported + *out = new(bool) + **out = **in + } + if in.HasDNSAnycast != nil { + in, out := &in.HasDNSAnycast, &out.HasDNSAnycast + *out = new(bool) + **out = **in + } + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } + if in.LastUpdate != nil { + in, out := &in.LastUpdate, &out.LastUpdate + *out = new(string) + **out = **in + } + if in.NameServers != nil { + in, out := &in.NameServers, &out.NameServers + *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.Order != nil { + in, out := &in.Order, &out.Order + *out = make([]OrderObservation, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.OvhSubsidiary != nil { + in, out := &in.OvhSubsidiary, &out.OvhSubsidiary + *out = new(string) + **out = **in + } + if in.PaymentMean != nil { + in, out := &in.PaymentMean, &out.PaymentMean + *out = new(string) + **out = **in + } + if in.Plan != nil { + in, out := &in.Plan, &out.Plan + *out = make([]PlanObservation, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.PlanOption != nil { + in, out := &in.PlanOption, &out.PlanOption + *out = make([]PlanOptionObservation, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Urn != nil { + in, out := &in.Urn, &out.Urn + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ZoneObservation. +func (in *ZoneObservation) DeepCopy() *ZoneObservation { + if in == nil { + return nil + } + out := new(ZoneObservation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ZoneParameters) DeepCopyInto(out *ZoneParameters) { + *out = *in + if in.OvhSubsidiary != nil { + in, out := &in.OvhSubsidiary, &out.OvhSubsidiary + *out = new(string) + **out = **in + } + if in.PaymentMean != nil { + in, out := &in.PaymentMean, &out.PaymentMean + *out = new(string) + **out = **in + } + if in.Plan != nil { + in, out := &in.Plan, &out.Plan + *out = make([]PlanParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.PlanOption != nil { + in, out := &in.PlanOption, &out.PlanOption + *out = make([]PlanOptionParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ZoneParameters. +func (in *ZoneParameters) DeepCopy() *ZoneParameters { + if in == nil { + return nil + } + out := new(ZoneParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ZoneRecord) DeepCopyInto(out *ZoneRecord) { + *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 ZoneRecord. +func (in *ZoneRecord) DeepCopy() *ZoneRecord { + if in == nil { + return nil + } + out := new(ZoneRecord) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ZoneRecord) 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 *ZoneRecordInitParameters) DeepCopyInto(out *ZoneRecordInitParameters) { + *out = *in + if in.Fieldtype != nil { + in, out := &in.Fieldtype, &out.Fieldtype + *out = new(string) + **out = **in + } + if in.Subdomain != nil { + in, out := &in.Subdomain, &out.Subdomain + *out = new(string) + **out = **in + } + if in.TTL != nil { + in, out := &in.TTL, &out.TTL + *out = new(float64) + **out = **in + } + if in.Target != nil { + in, out := &in.Target, &out.Target + *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 ZoneRecordInitParameters. +func (in *ZoneRecordInitParameters) DeepCopy() *ZoneRecordInitParameters { + if in == nil { + return nil + } + out := new(ZoneRecordInitParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ZoneRecordList) DeepCopyInto(out *ZoneRecordList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ZoneRecord, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ZoneRecordList. +func (in *ZoneRecordList) DeepCopy() *ZoneRecordList { + if in == nil { + return nil + } + out := new(ZoneRecordList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ZoneRecordList) 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 *ZoneRecordObservation) DeepCopyInto(out *ZoneRecordObservation) { + *out = *in + if in.Fieldtype != nil { + in, out := &in.Fieldtype, &out.Fieldtype + *out = new(string) + **out = **in + } + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } + if in.Subdomain != nil { + in, out := &in.Subdomain, &out.Subdomain + *out = new(string) + **out = **in + } + if in.TTL != nil { + in, out := &in.TTL, &out.TTL + *out = new(float64) + **out = **in + } + if in.Target != nil { + in, out := &in.Target, &out.Target + *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 ZoneRecordObservation. +func (in *ZoneRecordObservation) DeepCopy() *ZoneRecordObservation { + if in == nil { + return nil + } + out := new(ZoneRecordObservation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ZoneRecordParameters) DeepCopyInto(out *ZoneRecordParameters) { + *out = *in + if in.Fieldtype != nil { + in, out := &in.Fieldtype, &out.Fieldtype + *out = new(string) + **out = **in + } + if in.Subdomain != nil { + in, out := &in.Subdomain, &out.Subdomain + *out = new(string) + **out = **in + } + if in.TTL != nil { + in, out := &in.TTL, &out.TTL + *out = new(float64) + **out = **in + } + if in.Target != nil { + in, out := &in.Target, &out.Target + *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 ZoneRecordParameters. +func (in *ZoneRecordParameters) DeepCopy() *ZoneRecordParameters { + if in == nil { + return nil + } + out := new(ZoneRecordParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ZoneRecordSpec) DeepCopyInto(out *ZoneRecordSpec) { + *out = *in + in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) + in.ForProvider.DeepCopyInto(&out.ForProvider) + in.InitProvider.DeepCopyInto(&out.InitProvider) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ZoneRecordSpec. +func (in *ZoneRecordSpec) DeepCopy() *ZoneRecordSpec { + if in == nil { + return nil + } + out := new(ZoneRecordSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ZoneRecordStatus) DeepCopyInto(out *ZoneRecordStatus) { + *out = *in + in.ResourceStatus.DeepCopyInto(&out.ResourceStatus) + in.AtProvider.DeepCopyInto(&out.AtProvider) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ZoneRecordStatus. +func (in *ZoneRecordStatus) DeepCopy() *ZoneRecordStatus { + if in == nil { + return nil + } + out := new(ZoneRecordStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ZoneRedirection) DeepCopyInto(out *ZoneRedirection) { + *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 ZoneRedirection. +func (in *ZoneRedirection) DeepCopy() *ZoneRedirection { + if in == nil { + return nil + } + out := new(ZoneRedirection) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ZoneRedirection) 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 *ZoneRedirectionInitParameters) DeepCopyInto(out *ZoneRedirectionInitParameters) { + *out = *in + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(string) + **out = **in + } + if in.Keywords != nil { + in, out := &in.Keywords, &out.Keywords + *out = new(string) + **out = **in + } + if in.Subdomain != nil { + in, out := &in.Subdomain, &out.Subdomain + *out = new(string) + **out = **in + } + if in.Target != nil { + in, out := &in.Target, &out.Target + *out = new(string) + **out = **in + } + if in.Title != nil { + in, out := &in.Title, &out.Title + *out = new(string) + **out = **in + } + if in.Type != nil { + in, out := &in.Type, &out.Type + *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 ZoneRedirectionInitParameters. +func (in *ZoneRedirectionInitParameters) DeepCopy() *ZoneRedirectionInitParameters { + if in == nil { + return nil + } + out := new(ZoneRedirectionInitParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ZoneRedirectionList) DeepCopyInto(out *ZoneRedirectionList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ZoneRedirection, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ZoneRedirectionList. +func (in *ZoneRedirectionList) DeepCopy() *ZoneRedirectionList { + if in == nil { + return nil + } + out := new(ZoneRedirectionList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ZoneRedirectionList) 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 *ZoneRedirectionObservation) DeepCopyInto(out *ZoneRedirectionObservation) { + *out = *in + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(string) + **out = **in + } + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } + if in.Keywords != nil { + in, out := &in.Keywords, &out.Keywords + *out = new(string) + **out = **in + } + if in.Subdomain != nil { + in, out := &in.Subdomain, &out.Subdomain + *out = new(string) + **out = **in + } + if in.Target != nil { + in, out := &in.Target, &out.Target + *out = new(string) + **out = **in + } + if in.Title != nil { + in, out := &in.Title, &out.Title + *out = new(string) + **out = **in + } + if in.Type != nil { + in, out := &in.Type, &out.Type + *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 ZoneRedirectionObservation. +func (in *ZoneRedirectionObservation) DeepCopy() *ZoneRedirectionObservation { + if in == nil { + return nil + } + out := new(ZoneRedirectionObservation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ZoneRedirectionParameters) DeepCopyInto(out *ZoneRedirectionParameters) { + *out = *in + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(string) + **out = **in + } + if in.Keywords != nil { + in, out := &in.Keywords, &out.Keywords + *out = new(string) + **out = **in + } + if in.Subdomain != nil { + in, out := &in.Subdomain, &out.Subdomain + *out = new(string) + **out = **in + } + if in.Target != nil { + in, out := &in.Target, &out.Target + *out = new(string) + **out = **in + } + if in.Title != nil { + in, out := &in.Title, &out.Title + *out = new(string) + **out = **in + } + if in.Type != nil { + in, out := &in.Type, &out.Type + *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 ZoneRedirectionParameters. +func (in *ZoneRedirectionParameters) DeepCopy() *ZoneRedirectionParameters { + if in == nil { + return nil + } + out := new(ZoneRedirectionParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ZoneRedirectionSpec) DeepCopyInto(out *ZoneRedirectionSpec) { + *out = *in + in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) + in.ForProvider.DeepCopyInto(&out.ForProvider) + in.InitProvider.DeepCopyInto(&out.InitProvider) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ZoneRedirectionSpec. +func (in *ZoneRedirectionSpec) DeepCopy() *ZoneRedirectionSpec { + if in == nil { + return nil + } + out := new(ZoneRedirectionSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ZoneRedirectionStatus) DeepCopyInto(out *ZoneRedirectionStatus) { + *out = *in + in.ResourceStatus.DeepCopyInto(&out.ResourceStatus) + in.AtProvider.DeepCopyInto(&out.AtProvider) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ZoneRedirectionStatus. +func (in *ZoneRedirectionStatus) DeepCopy() *ZoneRedirectionStatus { + if in == nil { + return nil + } + out := new(ZoneRedirectionStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ZoneSpec) DeepCopyInto(out *ZoneSpec) { + *out = *in + in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) + in.ForProvider.DeepCopyInto(&out.ForProvider) + in.InitProvider.DeepCopyInto(&out.InitProvider) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ZoneSpec. +func (in *ZoneSpec) DeepCopy() *ZoneSpec { + if in == nil { + return nil + } + out := new(ZoneSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ZoneStatus) DeepCopyInto(out *ZoneStatus) { + *out = *in + in.ResourceStatus.DeepCopyInto(&out.ResourceStatus) + in.AtProvider.DeepCopyInto(&out.AtProvider) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ZoneStatus. +func (in *ZoneStatus) DeepCopy() *ZoneStatus { + if in == nil { + return nil + } + out := new(ZoneStatus) + in.DeepCopyInto(out) + return out +} diff --git a/apis/dns/v1alpha1/zz_generated.managed.go b/apis/dns/v1alpha1/zz_generated.managed.go new file mode 100644 index 0000000..4d68b6a --- /dev/null +++ b/apis/dns/v1alpha1/zz_generated.managed.go @@ -0,0 +1,188 @@ +/* +Copyright 2022 Upbound Inc. +*/ +// Code generated by angryjet. DO NOT EDIT. + +package v1alpha1 + +import xpv1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + +// GetCondition of this Zone. +func (mg *Zone) GetCondition(ct xpv1.ConditionType) xpv1.Condition { + return mg.Status.GetCondition(ct) +} + +// GetDeletionPolicy of this Zone. +func (mg *Zone) GetDeletionPolicy() xpv1.DeletionPolicy { + return mg.Spec.DeletionPolicy +} + +// GetManagementPolicies of this Zone. +func (mg *Zone) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies +} + +// GetProviderConfigReference of this Zone. +func (mg *Zone) GetProviderConfigReference() *xpv1.Reference { + return mg.Spec.ProviderConfigReference +} + +// GetPublishConnectionDetailsTo of this Zone. +func (mg *Zone) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { + return mg.Spec.PublishConnectionDetailsTo +} + +// GetWriteConnectionSecretToReference of this Zone. +func (mg *Zone) GetWriteConnectionSecretToReference() *xpv1.SecretReference { + return mg.Spec.WriteConnectionSecretToReference +} + +// SetConditions of this Zone. +func (mg *Zone) SetConditions(c ...xpv1.Condition) { + mg.Status.SetConditions(c...) +} + +// SetDeletionPolicy of this Zone. +func (mg *Zone) SetDeletionPolicy(r xpv1.DeletionPolicy) { + mg.Spec.DeletionPolicy = r +} + +// SetManagementPolicies of this Zone. +func (mg *Zone) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r +} + +// SetProviderConfigReference of this Zone. +func (mg *Zone) SetProviderConfigReference(r *xpv1.Reference) { + mg.Spec.ProviderConfigReference = r +} + +// SetPublishConnectionDetailsTo of this Zone. +func (mg *Zone) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { + mg.Spec.PublishConnectionDetailsTo = r +} + +// SetWriteConnectionSecretToReference of this Zone. +func (mg *Zone) SetWriteConnectionSecretToReference(r *xpv1.SecretReference) { + mg.Spec.WriteConnectionSecretToReference = r +} + +// GetCondition of this ZoneRecord. +func (mg *ZoneRecord) GetCondition(ct xpv1.ConditionType) xpv1.Condition { + return mg.Status.GetCondition(ct) +} + +// GetDeletionPolicy of this ZoneRecord. +func (mg *ZoneRecord) GetDeletionPolicy() xpv1.DeletionPolicy { + return mg.Spec.DeletionPolicy +} + +// GetManagementPolicies of this ZoneRecord. +func (mg *ZoneRecord) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies +} + +// GetProviderConfigReference of this ZoneRecord. +func (mg *ZoneRecord) GetProviderConfigReference() *xpv1.Reference { + return mg.Spec.ProviderConfigReference +} + +// GetPublishConnectionDetailsTo of this ZoneRecord. +func (mg *ZoneRecord) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { + return mg.Spec.PublishConnectionDetailsTo +} + +// GetWriteConnectionSecretToReference of this ZoneRecord. +func (mg *ZoneRecord) GetWriteConnectionSecretToReference() *xpv1.SecretReference { + return mg.Spec.WriteConnectionSecretToReference +} + +// SetConditions of this ZoneRecord. +func (mg *ZoneRecord) SetConditions(c ...xpv1.Condition) { + mg.Status.SetConditions(c...) +} + +// SetDeletionPolicy of this ZoneRecord. +func (mg *ZoneRecord) SetDeletionPolicy(r xpv1.DeletionPolicy) { + mg.Spec.DeletionPolicy = r +} + +// SetManagementPolicies of this ZoneRecord. +func (mg *ZoneRecord) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r +} + +// SetProviderConfigReference of this ZoneRecord. +func (mg *ZoneRecord) SetProviderConfigReference(r *xpv1.Reference) { + mg.Spec.ProviderConfigReference = r +} + +// SetPublishConnectionDetailsTo of this ZoneRecord. +func (mg *ZoneRecord) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { + mg.Spec.PublishConnectionDetailsTo = r +} + +// SetWriteConnectionSecretToReference of this ZoneRecord. +func (mg *ZoneRecord) SetWriteConnectionSecretToReference(r *xpv1.SecretReference) { + mg.Spec.WriteConnectionSecretToReference = r +} + +// GetCondition of this ZoneRedirection. +func (mg *ZoneRedirection) GetCondition(ct xpv1.ConditionType) xpv1.Condition { + return mg.Status.GetCondition(ct) +} + +// GetDeletionPolicy of this ZoneRedirection. +func (mg *ZoneRedirection) GetDeletionPolicy() xpv1.DeletionPolicy { + return mg.Spec.DeletionPolicy +} + +// GetManagementPolicies of this ZoneRedirection. +func (mg *ZoneRedirection) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies +} + +// GetProviderConfigReference of this ZoneRedirection. +func (mg *ZoneRedirection) GetProviderConfigReference() *xpv1.Reference { + return mg.Spec.ProviderConfigReference +} + +// GetPublishConnectionDetailsTo of this ZoneRedirection. +func (mg *ZoneRedirection) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { + return mg.Spec.PublishConnectionDetailsTo +} + +// GetWriteConnectionSecretToReference of this ZoneRedirection. +func (mg *ZoneRedirection) GetWriteConnectionSecretToReference() *xpv1.SecretReference { + return mg.Spec.WriteConnectionSecretToReference +} + +// SetConditions of this ZoneRedirection. +func (mg *ZoneRedirection) SetConditions(c ...xpv1.Condition) { + mg.Status.SetConditions(c...) +} + +// SetDeletionPolicy of this ZoneRedirection. +func (mg *ZoneRedirection) SetDeletionPolicy(r xpv1.DeletionPolicy) { + mg.Spec.DeletionPolicy = r +} + +// SetManagementPolicies of this ZoneRedirection. +func (mg *ZoneRedirection) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r +} + +// SetProviderConfigReference of this ZoneRedirection. +func (mg *ZoneRedirection) SetProviderConfigReference(r *xpv1.Reference) { + mg.Spec.ProviderConfigReference = r +} + +// SetPublishConnectionDetailsTo of this ZoneRedirection. +func (mg *ZoneRedirection) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { + mg.Spec.PublishConnectionDetailsTo = r +} + +// SetWriteConnectionSecretToReference of this ZoneRedirection. +func (mg *ZoneRedirection) SetWriteConnectionSecretToReference(r *xpv1.SecretReference) { + mg.Spec.WriteConnectionSecretToReference = r +} diff --git a/apis/dns/v1alpha1/zz_generated.managedlist.go b/apis/dns/v1alpha1/zz_generated.managedlist.go new file mode 100644 index 0000000..bfe5b12 --- /dev/null +++ b/apis/dns/v1alpha1/zz_generated.managedlist.go @@ -0,0 +1,35 @@ +/* +Copyright 2022 Upbound Inc. +*/ +// Code generated by angryjet. DO NOT EDIT. + +package v1alpha1 + +import resource "github.com/crossplane/crossplane-runtime/pkg/resource" + +// GetItems of this ZoneList. +func (l *ZoneList) GetItems() []resource.Managed { + items := make([]resource.Managed, len(l.Items)) + for i := range l.Items { + items[i] = &l.Items[i] + } + return items +} + +// GetItems of this ZoneRecordList. +func (l *ZoneRecordList) GetItems() []resource.Managed { + items := make([]resource.Managed, len(l.Items)) + for i := range l.Items { + items[i] = &l.Items[i] + } + return items +} + +// GetItems of this ZoneRedirectionList. +func (l *ZoneRedirectionList) 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/dns/v1alpha1/zz_generated_terraformed.go b/apis/dns/v1alpha1/zz_generated_terraformed.go new file mode 100755 index 0000000..b1df44a --- /dev/null +++ b/apis/dns/v1alpha1/zz_generated_terraformed.go @@ -0,0 +1,270 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + +/* +Copyright 2022 Upbound Inc. +*/ + +// Code generated by upjet. DO NOT EDIT. + +package v1alpha1 + +import ( + "github.com/pkg/errors" + + "github.com/crossplane/upjet/pkg/resource" + "github.com/crossplane/upjet/pkg/resource/json" +) + +// GetTerraformResourceType returns Terraform resource type for this Zone +func (mg *Zone) GetTerraformResourceType() string { + return "ovh_domain_zone" +} + +// GetConnectionDetailsMapping for this Zone +func (tr *Zone) GetConnectionDetailsMapping() map[string]string { + return nil +} + +// GetObservation of this Zone +func (tr *Zone) 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 Zone +func (tr *Zone) 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 Zone +func (tr *Zone) GetID() string { + if tr.Status.AtProvider.ID == nil { + return "" + } + return *tr.Status.AtProvider.ID +} + +// GetParameters of this Zone +func (tr *Zone) 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 Zone +func (tr *Zone) 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) +} + +// GetInitParameters of this Zone +func (tr *Zone) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// LateInitialize this Zone using its observed tfState. +// returns True if there are any spec changes for the resource. +func (tr *Zone) LateInitialize(attrs []byte) (bool, error) { + params := &ZoneParameters{} + 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 *Zone) GetTerraformSchemaVersion() int { + return 0 +} + +// GetTerraformResourceType returns Terraform resource type for this ZoneRecord +func (mg *ZoneRecord) GetTerraformResourceType() string { + return "ovh_domain_zone_record" +} + +// GetConnectionDetailsMapping for this ZoneRecord +func (tr *ZoneRecord) GetConnectionDetailsMapping() map[string]string { + return nil +} + +// GetObservation of this ZoneRecord +func (tr *ZoneRecord) 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 ZoneRecord +func (tr *ZoneRecord) 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 ZoneRecord +func (tr *ZoneRecord) GetID() string { + if tr.Status.AtProvider.ID == nil { + return "" + } + return *tr.Status.AtProvider.ID +} + +// GetParameters of this ZoneRecord +func (tr *ZoneRecord) 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 ZoneRecord +func (tr *ZoneRecord) 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) +} + +// GetInitParameters of this ZoneRecord +func (tr *ZoneRecord) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// LateInitialize this ZoneRecord using its observed tfState. +// returns True if there are any spec changes for the resource. +func (tr *ZoneRecord) LateInitialize(attrs []byte) (bool, error) { + params := &ZoneRecordParameters{} + 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 *ZoneRecord) GetTerraformSchemaVersion() int { + return 0 +} + +// GetTerraformResourceType returns Terraform resource type for this ZoneRedirection +func (mg *ZoneRedirection) GetTerraformResourceType() string { + return "ovh_domain_zone_redirection" +} + +// GetConnectionDetailsMapping for this ZoneRedirection +func (tr *ZoneRedirection) GetConnectionDetailsMapping() map[string]string { + return nil +} + +// GetObservation of this ZoneRedirection +func (tr *ZoneRedirection) 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 ZoneRedirection +func (tr *ZoneRedirection) 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 ZoneRedirection +func (tr *ZoneRedirection) GetID() string { + if tr.Status.AtProvider.ID == nil { + return "" + } + return *tr.Status.AtProvider.ID +} + +// GetParameters of this ZoneRedirection +func (tr *ZoneRedirection) 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 ZoneRedirection +func (tr *ZoneRedirection) 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) +} + +// GetInitParameters of this ZoneRedirection +func (tr *ZoneRedirection) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// LateInitialize this ZoneRedirection using its observed tfState. +// returns True if there are any spec changes for the resource. +func (tr *ZoneRedirection) LateInitialize(attrs []byte) (bool, error) { + params := &ZoneRedirectionParameters{} + 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 *ZoneRedirection) GetTerraformSchemaVersion() int { + return 0 +} diff --git a/apis/dns/v1alpha1/zz_groupversion_info.go b/apis/dns/v1alpha1/zz_groupversion_info.go new file mode 100755 index 0000000..d24b430 --- /dev/null +++ b/apis/dns/v1alpha1/zz_groupversion_info.go @@ -0,0 +1,36 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + +/* +Copyright 2022 Upbound Inc. +*/ + +// Code generated by upjet. DO NOT EDIT. + +// +kubebuilder:object:generate=true +// +groupName=dns.ovh.edixos.io +// +versionName=v1alpha1 +package v1alpha1 + +import ( + "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/controller-runtime/pkg/scheme" +) + +// Package type metadata. +const ( + CRDGroup = "dns.ovh.edixos.io" + CRDVersion = "v1alpha1" +) + +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/dns/v1alpha1/zz_zone_types.go b/apis/dns/v1alpha1/zz_zone_types.go new file mode 100755 index 0000000..309090e --- /dev/null +++ b/apis/dns/v1alpha1/zz_zone_types.go @@ -0,0 +1,422 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + +/* +Copyright 2022 Upbound Inc. +*/ + +// Code generated by upjet. DO NOT EDIT. + +package v1alpha1 + +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 ConfigurationInitParameters struct { + + // Identifier of the resource + // Identifier of the resource + Label *string `json:"label,omitempty" tf:"label,omitempty"` + + // Path to the resource in API.OVH.COM + // Path to the resource in API.OVH.COM + Value *string `json:"value,omitempty" tf:"value,omitempty"` +} + +type ConfigurationObservation struct { + + // Identifier of the resource + // Identifier of the resource + Label *string `json:"label,omitempty" tf:"label,omitempty"` + + // Path to the resource in API.OVH.COM + // Path to the resource in API.OVH.COM + Value *string `json:"value,omitempty" tf:"value,omitempty"` +} + +type ConfigurationParameters struct { + + // Identifier of the resource + // Identifier of the resource + // +kubebuilder:validation:Optional + Label *string `json:"label" tf:"label,omitempty"` + + // Path to the resource in API.OVH.COM + // Path to the resource in API.OVH.COM + // +kubebuilder:validation:Optional + Value *string `json:"value" tf:"value,omitempty"` +} + +type DetailsInitParameters struct { +} + +type DetailsObservation struct { + + // description + Description *string `json:"description,omitempty" tf:"description,omitempty"` + + // expiration date + Domain *string `json:"domain,omitempty" tf:"domain,omitempty"` + + // order detail id + OrderDetailID *float64 `json:"orderDetailId,omitempty" tf:"order_detail_id,omitempty"` + + // quantity + Quantity *string `json:"quantity,omitempty" tf:"quantity,omitempty"` +} + +type DetailsParameters struct { +} + +type OrderInitParameters struct { +} + +type OrderObservation struct { + + // date + Date *string `json:"date,omitempty" tf:"date,omitempty"` + + // Information about a Bill entry + Details []DetailsObservation `json:"details,omitempty" tf:"details,omitempty"` + + // expiration date + ExpirationDate *string `json:"expirationDate,omitempty" tf:"expiration_date,omitempty"` + + // order id + OrderID *float64 `json:"orderId,omitempty" tf:"order_id,omitempty"` +} + +type OrderParameters struct { +} + +type PlanInitParameters struct { + + // Catalog name + // Catalog name + CatalogName *string `json:"catalogName,omitempty" tf:"catalog_name,omitempty"` + + // Representation of a configuration item for personalizing product + // Representation of a configuration item for personalizing product + Configuration []ConfigurationInitParameters `json:"configuration,omitempty" tf:"configuration,omitempty"` + + // duration + // duration + Duration *string `json:"duration,omitempty" tf:"duration,omitempty"` + + // Plan code + // Plan code + PlanCode *string `json:"planCode,omitempty" tf:"plan_code,omitempty"` + + // Pricing model identifier + // Pricing model identifier + PricingMode *string `json:"pricingMode,omitempty" tf:"pricing_mode,omitempty"` +} + +type PlanObservation struct { + + // Catalog name + // Catalog name + CatalogName *string `json:"catalogName,omitempty" tf:"catalog_name,omitempty"` + + // Representation of a configuration item for personalizing product + // Representation of a configuration item for personalizing product + Configuration []ConfigurationObservation `json:"configuration,omitempty" tf:"configuration,omitempty"` + + // duration + // duration + Duration *string `json:"duration,omitempty" tf:"duration,omitempty"` + + // Plan code + // Plan code + PlanCode *string `json:"planCode,omitempty" tf:"plan_code,omitempty"` + + // Pricing model identifier + // Pricing model identifier + PricingMode *string `json:"pricingMode,omitempty" tf:"pricing_mode,omitempty"` +} + +type PlanOptionConfigurationInitParameters struct { + + // Identifier of the resource + // Identifier of the resource + Label *string `json:"label,omitempty" tf:"label,omitempty"` + + // Path to the resource in API.OVH.COM + // Path to the resource in API.OVH.COM + Value *string `json:"value,omitempty" tf:"value,omitempty"` +} + +type PlanOptionConfigurationObservation struct { + + // Identifier of the resource + // Identifier of the resource + Label *string `json:"label,omitempty" tf:"label,omitempty"` + + // Path to the resource in API.OVH.COM + // Path to the resource in API.OVH.COM + Value *string `json:"value,omitempty" tf:"value,omitempty"` +} + +type PlanOptionConfigurationParameters struct { + + // Identifier of the resource + // Identifier of the resource + // +kubebuilder:validation:Optional + Label *string `json:"label" tf:"label,omitempty"` + + // Path to the resource in API.OVH.COM + // Path to the resource in API.OVH.COM + // +kubebuilder:validation:Optional + Value *string `json:"value" tf:"value,omitempty"` +} + +type PlanOptionInitParameters struct { + + // Catalog name + // Catalog name + CatalogName *string `json:"catalogName,omitempty" tf:"catalog_name,omitempty"` + + // Representation of a configuration item for personalizing product + // Representation of a configuration item for personalizing product + Configuration []PlanOptionConfigurationInitParameters `json:"configuration,omitempty" tf:"configuration,omitempty"` + + // duration + // duration + Duration *string `json:"duration,omitempty" tf:"duration,omitempty"` + + // Plan code + // Plan code + PlanCode *string `json:"planCode,omitempty" tf:"plan_code,omitempty"` + + // Pricing model identifier + // Pricing model identifier + PricingMode *string `json:"pricingMode,omitempty" tf:"pricing_mode,omitempty"` +} + +type PlanOptionObservation struct { + + // Catalog name + // Catalog name + CatalogName *string `json:"catalogName,omitempty" tf:"catalog_name,omitempty"` + + // Representation of a configuration item for personalizing product + // Representation of a configuration item for personalizing product + Configuration []PlanOptionConfigurationObservation `json:"configuration,omitempty" tf:"configuration,omitempty"` + + // duration + // duration + Duration *string `json:"duration,omitempty" tf:"duration,omitempty"` + + // Plan code + // Plan code + PlanCode *string `json:"planCode,omitempty" tf:"plan_code,omitempty"` + + // Pricing model identifier + // Pricing model identifier + PricingMode *string `json:"pricingMode,omitempty" tf:"pricing_mode,omitempty"` +} + +type PlanOptionParameters struct { + + // Catalog name + // Catalog name + // +kubebuilder:validation:Optional + CatalogName *string `json:"catalogName,omitempty" tf:"catalog_name,omitempty"` + + // Representation of a configuration item for personalizing product + // Representation of a configuration item for personalizing product + // +kubebuilder:validation:Optional + Configuration []PlanOptionConfigurationParameters `json:"configuration,omitempty" tf:"configuration,omitempty"` + + // duration + // duration + // +kubebuilder:validation:Optional + Duration *string `json:"duration" tf:"duration,omitempty"` + + // Plan code + // Plan code + // +kubebuilder:validation:Optional + PlanCode *string `json:"planCode" tf:"plan_code,omitempty"` + + // Pricing model identifier + // Pricing model identifier + // +kubebuilder:validation:Optional + PricingMode *string `json:"pricingMode" tf:"pricing_mode,omitempty"` +} + +type PlanParameters struct { + + // Catalog name + // Catalog name + // +kubebuilder:validation:Optional + CatalogName *string `json:"catalogName,omitempty" tf:"catalog_name,omitempty"` + + // Representation of a configuration item for personalizing product + // Representation of a configuration item for personalizing product + // +kubebuilder:validation:Optional + Configuration []ConfigurationParameters `json:"configuration,omitempty" tf:"configuration,omitempty"` + + // duration + // duration + // +kubebuilder:validation:Optional + Duration *string `json:"duration" tf:"duration,omitempty"` + + // Plan code + // Plan code + // +kubebuilder:validation:Optional + PlanCode *string `json:"planCode" tf:"plan_code,omitempty"` + + // Pricing model identifier + // Pricing model identifier + // +kubebuilder:validation:Optional + PricingMode *string `json:"pricingMode" tf:"pricing_mode,omitempty"` +} + +type ZoneInitParameters struct { + + // OVHcloud Subsidiary. Country of OVHcloud legal entity you'll be billed by. List of supported subsidiaries available on API at /1.0/me.json under + // Ovh Subsidiary + OvhSubsidiary *string `json:"ovhSubsidiary,omitempty" tf:"ovh_subsidiary,omitempty"` + + // Ovh payment mode + PaymentMean *string `json:"paymentMean,omitempty" tf:"payment_mean,omitempty"` + + // Product Plan to order + // Product Plan to order + Plan []PlanInitParameters `json:"plan,omitempty" tf:"plan,omitempty"` + + // Product Plan to order + // Product Plan to order + PlanOption []PlanOptionInitParameters `json:"planOption,omitempty" tf:"plan_option,omitempty"` +} + +type ZoneObservation struct { + + // Is DNSSEC supported by this zone + // Is DNSSEC supported by this zone + DNSSECSupported *bool `json:"dnssecSupported,omitempty" tf:"dnssec_supported,omitempty"` + + // hasDnsAnycast flag of the DNS zone + // hasDnsAnycast flag of the DNS zone + HasDNSAnycast *bool `json:"hasDnsAnycast,omitempty" tf:"has_dns_anycast,omitempty"` + + ID *string `json:"id,omitempty" tf:"id,omitempty"` + + // Last update date of the DNS zone + // Last update date of the DNS zone + LastUpdate *string `json:"lastUpdate,omitempty" tf:"last_update,omitempty"` + + // Name servers that host the DNS zone + // Name servers that host the DNS zone + NameServers []*string `json:"nameServers,omitempty" tf:"name_servers,omitempty"` + + // Details about an Order + // Details about an Order + Order []OrderObservation `json:"order,omitempty" tf:"order,omitempty"` + + // OVHcloud Subsidiary. Country of OVHcloud legal entity you'll be billed by. List of supported subsidiaries available on API at /1.0/me.json under + // Ovh Subsidiary + OvhSubsidiary *string `json:"ovhSubsidiary,omitempty" tf:"ovh_subsidiary,omitempty"` + + // Ovh payment mode + PaymentMean *string `json:"paymentMean,omitempty" tf:"payment_mean,omitempty"` + + // Product Plan to order + // Product Plan to order + Plan []PlanObservation `json:"plan,omitempty" tf:"plan,omitempty"` + + // Product Plan to order + // Product Plan to order + PlanOption []PlanOptionObservation `json:"planOption,omitempty" tf:"plan_option,omitempty"` + + Urn *string `json:"urn,omitempty" tf:"urn,omitempty"` +} + +type ZoneParameters struct { + + // OVHcloud Subsidiary. Country of OVHcloud legal entity you'll be billed by. List of supported subsidiaries available on API at /1.0/me.json under + // Ovh Subsidiary + // +kubebuilder:validation:Optional + OvhSubsidiary *string `json:"ovhSubsidiary,omitempty" tf:"ovh_subsidiary,omitempty"` + + // Ovh payment mode + // +kubebuilder:validation:Optional + PaymentMean *string `json:"paymentMean,omitempty" tf:"payment_mean,omitempty"` + + // Product Plan to order + // Product Plan to order + // +kubebuilder:validation:Optional + Plan []PlanParameters `json:"plan,omitempty" tf:"plan,omitempty"` + + // Product Plan to order + // Product Plan to order + // +kubebuilder:validation:Optional + PlanOption []PlanOptionParameters `json:"planOption,omitempty" tf:"plan_option,omitempty"` +} + +// ZoneSpec defines the desired state of Zone +type ZoneSpec struct { + v1.ResourceSpec `json:",inline"` + ForProvider ZoneParameters `json:"forProvider"` + // THIS IS A BETA FIELD. It will be honored + // unless the Management Policies feature flag is disabled. + // InitProvider holds the same fields as ForProvider, with the exception + // of Identifier and other resource reference fields. The fields that are + // in InitProvider are merged into ForProvider when the resource is created. + // The same fields are also added to the terraform ignore_changes hook, to + // avoid updating them after creation. This is useful for fields that are + // required on creation, but we do not desire to update them after creation, + // for example because of an external controller is managing them, like an + // autoscaler. + InitProvider ZoneInitParameters `json:"initProvider,omitempty"` +} + +// ZoneStatus defines the observed state of Zone. +type ZoneStatus struct { + v1.ResourceStatus `json:",inline"` + AtProvider ZoneObservation `json:"atProvider,omitempty"` +} + +// +kubebuilder:object:root=true + +// Zone is the Schema for the Zones API. ovh_domain_zone.html.markdownsubcategory : "Domain names" +// +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,ovh} +type Zone struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.ovhSubsidiary) || (has(self.initProvider) && has(self.initProvider.ovhSubsidiary))",message="spec.forProvider.ovhSubsidiary is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.plan) || (has(self.initProvider) && has(self.initProvider.plan))",message="spec.forProvider.plan is a required parameter" + Spec ZoneSpec `json:"spec"` + Status ZoneStatus `json:"status,omitempty"` +} + +// +kubebuilder:object:root=true + +// ZoneList contains a list of Zones +type ZoneList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []Zone `json:"items"` +} + +// Repository type metadata. +var ( + Zone_Kind = "Zone" + Zone_GroupKind = schema.GroupKind{Group: CRDGroup, Kind: Zone_Kind}.String() + Zone_KindAPIVersion = Zone_Kind + "." + CRDGroupVersion.String() + Zone_GroupVersionKind = CRDGroupVersion.WithKind(Zone_Kind) +) + +func init() { + SchemeBuilder.Register(&Zone{}, &ZoneList{}) +} diff --git a/apis/dns/v1alpha1/zz_zonerecord_types.go b/apis/dns/v1alpha1/zz_zonerecord_types.go new file mode 100755 index 0000000..9115b6e --- /dev/null +++ b/apis/dns/v1alpha1/zz_zonerecord_types.go @@ -0,0 +1,143 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + +/* +Copyright 2022 Upbound Inc. +*/ + +// Code generated by upjet. DO NOT EDIT. + +package v1alpha1 + +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 ZoneRecordInitParameters struct { + + // The type of the record + Fieldtype *string `json:"fieldtype,omitempty" tf:"fieldtype,omitempty"` + + // The name of the record. It can be an empty string. + Subdomain *string `json:"subdomain,omitempty" tf:"subdomain,omitempty"` + + // The TTL of the record, it shall be >= to 60. + TTL *float64 `json:"ttl,omitempty" tf:"ttl,omitempty"` + + // The value of the record + Target *string `json:"target,omitempty" tf:"target,omitempty"` + + // The domain to add the record to + Zone *string `json:"zone,omitempty" tf:"zone,omitempty"` +} + +type ZoneRecordObservation struct { + + // The type of the record + Fieldtype *string `json:"fieldtype,omitempty" tf:"fieldtype,omitempty"` + + // The record ID + ID *string `json:"id,omitempty" tf:"id,omitempty"` + + // The name of the record. It can be an empty string. + Subdomain *string `json:"subdomain,omitempty" tf:"subdomain,omitempty"` + + // The TTL of the record, it shall be >= to 60. + TTL *float64 `json:"ttl,omitempty" tf:"ttl,omitempty"` + + // The value of the record + Target *string `json:"target,omitempty" tf:"target,omitempty"` + + // The domain to add the record to + Zone *string `json:"zone,omitempty" tf:"zone,omitempty"` +} + +type ZoneRecordParameters struct { + + // The type of the record + // +kubebuilder:validation:Optional + Fieldtype *string `json:"fieldtype,omitempty" tf:"fieldtype,omitempty"` + + // The name of the record. It can be an empty string. + // +kubebuilder:validation:Optional + Subdomain *string `json:"subdomain,omitempty" tf:"subdomain,omitempty"` + + // The TTL of the record, it shall be >= to 60. + // +kubebuilder:validation:Optional + TTL *float64 `json:"ttl,omitempty" tf:"ttl,omitempty"` + + // The value of the record + // +kubebuilder:validation:Optional + Target *string `json:"target,omitempty" tf:"target,omitempty"` + + // The domain to add the record to + // +kubebuilder:validation:Optional + Zone *string `json:"zone,omitempty" tf:"zone,omitempty"` +} + +// ZoneRecordSpec defines the desired state of ZoneRecord +type ZoneRecordSpec struct { + v1.ResourceSpec `json:",inline"` + ForProvider ZoneRecordParameters `json:"forProvider"` + // THIS IS A BETA FIELD. It will be honored + // unless the Management Policies feature flag is disabled. + // InitProvider holds the same fields as ForProvider, with the exception + // of Identifier and other resource reference fields. The fields that are + // in InitProvider are merged into ForProvider when the resource is created. + // The same fields are also added to the terraform ignore_changes hook, to + // avoid updating them after creation. This is useful for fields that are + // required on creation, but we do not desire to update them after creation, + // for example because of an external controller is managing them, like an + // autoscaler. + InitProvider ZoneRecordInitParameters `json:"initProvider,omitempty"` +} + +// ZoneRecordStatus defines the observed state of ZoneRecord. +type ZoneRecordStatus struct { + v1.ResourceStatus `json:",inline"` + AtProvider ZoneRecordObservation `json:"atProvider,omitempty"` +} + +// +kubebuilder:object:root=true + +// ZoneRecord is the Schema for the ZoneRecords API. ovh_domain_zone_record.html.markdownsubcategory : "Domain names" +// +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,ovh} +type ZoneRecord struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.fieldtype) || (has(self.initProvider) && has(self.initProvider.fieldtype))",message="spec.forProvider.fieldtype is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.target) || (has(self.initProvider) && has(self.initProvider.target))",message="spec.forProvider.target is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.zone) || (has(self.initProvider) && has(self.initProvider.zone))",message="spec.forProvider.zone is a required parameter" + Spec ZoneRecordSpec `json:"spec"` + Status ZoneRecordStatus `json:"status,omitempty"` +} + +// +kubebuilder:object:root=true + +// ZoneRecordList contains a list of ZoneRecords +type ZoneRecordList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []ZoneRecord `json:"items"` +} + +// Repository type metadata. +var ( + ZoneRecord_Kind = "ZoneRecord" + ZoneRecord_GroupKind = schema.GroupKind{Group: CRDGroup, Kind: ZoneRecord_Kind}.String() + ZoneRecord_KindAPIVersion = ZoneRecord_Kind + "." + CRDGroupVersion.String() + ZoneRecord_GroupVersionKind = CRDGroupVersion.WithKind(ZoneRecord_Kind) +) + +func init() { + SchemeBuilder.Register(&ZoneRecord{}, &ZoneRecordList{}) +} diff --git a/apis/dns/v1alpha1/zz_zoneredirection_types.go b/apis/dns/v1alpha1/zz_zoneredirection_types.go new file mode 100755 index 0000000..9452c34 --- /dev/null +++ b/apis/dns/v1alpha1/zz_zoneredirection_types.go @@ -0,0 +1,163 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + +/* +Copyright 2022 Upbound Inc. +*/ + +// Code generated by upjet. DO NOT EDIT. + +package v1alpha1 + +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 ZoneRedirectionInitParameters struct { + + // A description of this redirection + Description *string `json:"description,omitempty" tf:"description,omitempty"` + + // Keywords to describe this redirection + Keywords *string `json:"keywords,omitempty" tf:"keywords,omitempty"` + + // The name of the redirection + Subdomain *string `json:"subdomain,omitempty" tf:"subdomain,omitempty"` + + // The value of the redirection + Target *string `json:"target,omitempty" tf:"target,omitempty"` + + // Title of this redirection + Title *string `json:"title,omitempty" tf:"title,omitempty"` + + // The type of the redirection, with values: + Type *string `json:"type,omitempty" tf:"type,omitempty"` + + // The domain to add the redirection to + Zone *string `json:"zone,omitempty" tf:"zone,omitempty"` +} + +type ZoneRedirectionObservation struct { + + // A description of this redirection + Description *string `json:"description,omitempty" tf:"description,omitempty"` + + // The redirection ID + ID *string `json:"id,omitempty" tf:"id,omitempty"` + + // Keywords to describe this redirection + Keywords *string `json:"keywords,omitempty" tf:"keywords,omitempty"` + + // The name of the redirection + Subdomain *string `json:"subdomain,omitempty" tf:"subdomain,omitempty"` + + // The value of the redirection + Target *string `json:"target,omitempty" tf:"target,omitempty"` + + // Title of this redirection + Title *string `json:"title,omitempty" tf:"title,omitempty"` + + // The type of the redirection, with values: + Type *string `json:"type,omitempty" tf:"type,omitempty"` + + // The domain to add the redirection to + Zone *string `json:"zone,omitempty" tf:"zone,omitempty"` +} + +type ZoneRedirectionParameters struct { + + // A description of this redirection + // +kubebuilder:validation:Optional + Description *string `json:"description,omitempty" tf:"description,omitempty"` + + // Keywords to describe this redirection + // +kubebuilder:validation:Optional + Keywords *string `json:"keywords,omitempty" tf:"keywords,omitempty"` + + // The name of the redirection + // +kubebuilder:validation:Optional + Subdomain *string `json:"subdomain,omitempty" tf:"subdomain,omitempty"` + + // The value of the redirection + // +kubebuilder:validation:Optional + Target *string `json:"target,omitempty" tf:"target,omitempty"` + + // Title of this redirection + // +kubebuilder:validation:Optional + Title *string `json:"title,omitempty" tf:"title,omitempty"` + + // The type of the redirection, with values: + // +kubebuilder:validation:Optional + Type *string `json:"type,omitempty" tf:"type,omitempty"` + + // The domain to add the redirection to + // +kubebuilder:validation:Optional + Zone *string `json:"zone,omitempty" tf:"zone,omitempty"` +} + +// ZoneRedirectionSpec defines the desired state of ZoneRedirection +type ZoneRedirectionSpec struct { + v1.ResourceSpec `json:",inline"` + ForProvider ZoneRedirectionParameters `json:"forProvider"` + // THIS IS A BETA FIELD. It will be honored + // unless the Management Policies feature flag is disabled. + // InitProvider holds the same fields as ForProvider, with the exception + // of Identifier and other resource reference fields. The fields that are + // in InitProvider are merged into ForProvider when the resource is created. + // The same fields are also added to the terraform ignore_changes hook, to + // avoid updating them after creation. This is useful for fields that are + // required on creation, but we do not desire to update them after creation, + // for example because of an external controller is managing them, like an + // autoscaler. + InitProvider ZoneRedirectionInitParameters `json:"initProvider,omitempty"` +} + +// ZoneRedirectionStatus defines the observed state of ZoneRedirection. +type ZoneRedirectionStatus struct { + v1.ResourceStatus `json:",inline"` + AtProvider ZoneRedirectionObservation `json:"atProvider,omitempty"` +} + +// +kubebuilder:object:root=true + +// ZoneRedirection is the Schema for the ZoneRedirections API. ovh_domain_zone_redirection.html.markdownsubcategory : "Domain names" +// +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,ovh} +type ZoneRedirection struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.target) || (has(self.initProvider) && has(self.initProvider.target))",message="spec.forProvider.target is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.type) || (has(self.initProvider) && has(self.initProvider.type))",message="spec.forProvider.type is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.zone) || (has(self.initProvider) && has(self.initProvider.zone))",message="spec.forProvider.zone is a required parameter" + Spec ZoneRedirectionSpec `json:"spec"` + Status ZoneRedirectionStatus `json:"status,omitempty"` +} + +// +kubebuilder:object:root=true + +// ZoneRedirectionList contains a list of ZoneRedirections +type ZoneRedirectionList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []ZoneRedirection `json:"items"` +} + +// Repository type metadata. +var ( + ZoneRedirection_Kind = "ZoneRedirection" + ZoneRedirection_GroupKind = schema.GroupKind{Group: CRDGroup, Kind: ZoneRedirection_Kind}.String() + ZoneRedirection_KindAPIVersion = ZoneRedirection_Kind + "." + CRDGroupVersion.String() + ZoneRedirection_GroupVersionKind = CRDGroupVersion.WithKind(ZoneRedirection_Kind) +) + +func init() { + SchemeBuilder.Register(&ZoneRedirection{}, &ZoneRedirectionList{}) +} diff --git a/apis/zz_register.go b/apis/zz_register.go index 95c84a8..f6c22ac 100755 --- a/apis/zz_register.go +++ b/apis/zz_register.go @@ -18,6 +18,7 @@ import ( v1alpha1additionalip "github.com/edixos/provider-ovh/apis/additionalip/v1alpha1" v1alpha1clouddiskarray "github.com/edixos/provider-ovh/apis/clouddiskarray/v1alpha1" v1alpha1dedicatedserver "github.com/edixos/provider-ovh/apis/dedicatedserver/v1alpha1" + v1alpha1dns "github.com/edixos/provider-ovh/apis/dns/v1alpha1" v1alpha1publiccloudnetwork "github.com/edixos/provider-ovh/apis/publiccloudnetwork/v1alpha1" v1alpha1apis "github.com/edixos/provider-ovh/apis/v1alpha1" v1beta1 "github.com/edixos/provider-ovh/apis/v1beta1" @@ -31,6 +32,7 @@ func init() { v1alpha1additionalip.SchemeBuilder.AddToScheme, v1alpha1clouddiskarray.SchemeBuilder.AddToScheme, v1alpha1dedicatedserver.SchemeBuilder.AddToScheme, + v1alpha1dns.SchemeBuilder.AddToScheme, v1alpha1publiccloudnetwork.SchemeBuilder.AddToScheme, v1alpha1apis.SchemeBuilder.AddToScheme, v1beta1.SchemeBuilder.AddToScheme, diff --git a/config/dns/config.go b/config/dns/config.go new file mode 100644 index 0000000..b5cd9dd --- /dev/null +++ b/config/dns/config.go @@ -0,0 +1,20 @@ +package dns + +import "github.com/crossplane/upjet/pkg/config" + +const ( + shortName = "dns" +) + +// Configure configures individual resources by adding custom ResourceConfigurators. +func Configure(p *config.Provider) { + p.AddResourceConfigurator("ovh_domain_zone", func(r *config.Resource) { + r.ShortGroup = shortName + }) + p.AddResourceConfigurator("ovh_domain_zone_record", func(r *config.Resource) { + r.ShortGroup = shortName + }) + p.AddResourceConfigurator("ovh_domain_zone_redirection", func(r *config.Resource) { + r.ShortGroup = shortName + }) +} diff --git a/config/external_name.go b/config/external_name.go index abd41fb..72d6211 100644 --- a/config/external_name.go +++ b/config/external_name.go @@ -34,6 +34,9 @@ var ExternalNameConfigs = map[string]config.ExternalName{ "ovh_me_installation_template_partition_scheme_partition": config.NameAsIdentifier, "ovh_me_ipxe_script": config.NameAsIdentifier, "ovh_dedicated_server_networking": config.NameAsIdentifier, + "ovh_domain_zone": config.NameAsIdentifier, + "ovh_domain_zone_record": config.NameAsIdentifier, + "ovh_domain_zone_redirection": config.NameAsIdentifier, } // ExternalNameConfigurations applies all external name configs listed in the diff --git a/config/provider.go b/config/provider.go index 8a08b67..d539db2 100644 --- a/config/provider.go +++ b/config/provider.go @@ -8,6 +8,8 @@ import ( // Note(turkenh): we are importing this to embed provider schema document _ "embed" + "github.com/edixos/provider-ovh/config/dns" + "github.com/edixos/provider-ovh/config/dedicated_server" "github.com/edixos/provider-ovh/config/cloud_disk_array" @@ -50,6 +52,7 @@ func GetProvider() *ujconfig.Provider { vm_instances.Configure, cloud_disk_array.Configure, dedicated_server.Configure, + dns.Configure, } { configure(pc) } diff --git a/examples-generated/dns/zone.yaml b/examples-generated/dns/zone.yaml new file mode 100644 index 0000000..3c44e17 --- /dev/null +++ b/examples-generated/dns/zone.yaml @@ -0,0 +1,20 @@ +apiVersion: dns.ovh.edixos.io/v1alpha1 +kind: Zone +metadata: + annotations: + meta.upbound.io/example-id: dns/v1alpha1/zone + labels: + testing.upbound.io/example-name: zone + name: zone +spec: + forProvider: + ovhSubsidiary: ${data.ovh_order_cart.mycart.ovh_subsidiary} + plan: + - configuration: + - label: zone + value: myzone.mydomain.com + - label: template + value: minimized + duration: ${data.ovh_order_cart_product_plan.zone.selected_price.0.duration} + planCode: ${data.ovh_order_cart_product_plan.zone.plan_code} + pricingMode: ${data.ovh_order_cart_product_plan.zone.selected_price.0.pricing_mode} diff --git a/examples-generated/dns/zonerecord.yaml b/examples-generated/dns/zonerecord.yaml new file mode 100644 index 0000000..e71c474 --- /dev/null +++ b/examples-generated/dns/zonerecord.yaml @@ -0,0 +1,15 @@ +apiVersion: dns.ovh.edixos.io/v1alpha1 +kind: ZoneRecord +metadata: + annotations: + meta.upbound.io/example-id: dns/v1alpha1/zonerecord + labels: + testing.upbound.io/example-name: test + name: test +spec: + forProvider: + fieldtype: A + subdomain: test + target: 0.0.0.0 + ttl: 3600 + zone: testdemo.ovh diff --git a/examples-generated/dns/zoneredirection.yaml b/examples-generated/dns/zoneredirection.yaml new file mode 100644 index 0000000..463ec9e --- /dev/null +++ b/examples-generated/dns/zoneredirection.yaml @@ -0,0 +1,14 @@ +apiVersion: dns.ovh.edixos.io/v1alpha1 +kind: ZoneRedirection +metadata: + annotations: + meta.upbound.io/example-id: dns/v1alpha1/zoneredirection + labels: + testing.upbound.io/example-name: test + name: test +spec: + forProvider: + subdomain: test + target: http://www.ovh + type: visiblePermanent + zone: testdemo.ovh diff --git a/internal/controller/dns/zone/zz_controller.go b/internal/controller/dns/zone/zz_controller.go new file mode 100755 index 0000000..913e708 --- /dev/null +++ b/internal/controller/dns/zone/zz_controller.go @@ -0,0 +1,67 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + +/* +Copyright 2022 Upbound Inc. +*/ + +// Code generated by upjet. DO NOT EDIT. + +package zone + +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/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/terraform" + ctrl "sigs.k8s.io/controller-runtime" + + v1alpha1 "github.com/edixos/provider-ovh/apis/dns/v1alpha1" + features "github.com/edixos/provider-ovh/internal/features" +) + +// Setup adds a controller that reconciles Zone managed resources. +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { + name := managed.ControllerName(v1alpha1.Zone_GroupVersionKind.String()) + var initializers managed.InitializerChain + initializers = append(initializers, managed.NewNameAsExternalName(mgr.GetClient())) + cps := []managed.ConnectionPublisher{managed.NewAPISecretPublisher(mgr.GetClient(), mgr.GetScheme())} + if o.SecretStoreConfigGVK != nil { + cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) + } + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.Zone_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.Zone_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler)) + opts := []managed.ReconcilerOption{ + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["ovh_domain_zone"], tjcontroller.WithLogger(o.Logger), tjcontroller.WithConnectorEventHandler(eventHandler), + tjcontroller.WithCallbackProvider(ac), + )), + 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), + } + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { + opts = append(opts, managed.WithManagementPolicies()) + } + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.Zone_GroupVersionKind), opts...) + + return ctrl.NewControllerManagedBy(mgr). + Named(name). + WithOptions(o.ForControllerRuntime()). + WithEventFilter(xpresource.DesiredStateChanged()). + Watches(&v1alpha1.Zone{}, eventHandler). + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) +} diff --git a/internal/controller/dns/zonerecord/zz_controller.go b/internal/controller/dns/zonerecord/zz_controller.go new file mode 100755 index 0000000..f929ae1 --- /dev/null +++ b/internal/controller/dns/zonerecord/zz_controller.go @@ -0,0 +1,67 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + +/* +Copyright 2022 Upbound Inc. +*/ + +// Code generated by upjet. DO NOT EDIT. + +package zonerecord + +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/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/terraform" + ctrl "sigs.k8s.io/controller-runtime" + + v1alpha1 "github.com/edixos/provider-ovh/apis/dns/v1alpha1" + features "github.com/edixos/provider-ovh/internal/features" +) + +// Setup adds a controller that reconciles ZoneRecord managed resources. +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { + name := managed.ControllerName(v1alpha1.ZoneRecord_GroupVersionKind.String()) + var initializers managed.InitializerChain + initializers = append(initializers, managed.NewNameAsExternalName(mgr.GetClient())) + cps := []managed.ConnectionPublisher{managed.NewAPISecretPublisher(mgr.GetClient(), mgr.GetScheme())} + if o.SecretStoreConfigGVK != nil { + cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) + } + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.ZoneRecord_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.ZoneRecord_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler)) + opts := []managed.ReconcilerOption{ + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["ovh_domain_zone_record"], tjcontroller.WithLogger(o.Logger), tjcontroller.WithConnectorEventHandler(eventHandler), + tjcontroller.WithCallbackProvider(ac), + )), + 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), + } + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { + opts = append(opts, managed.WithManagementPolicies()) + } + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.ZoneRecord_GroupVersionKind), opts...) + + return ctrl.NewControllerManagedBy(mgr). + Named(name). + WithOptions(o.ForControllerRuntime()). + WithEventFilter(xpresource.DesiredStateChanged()). + Watches(&v1alpha1.ZoneRecord{}, eventHandler). + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) +} diff --git a/internal/controller/dns/zoneredirection/zz_controller.go b/internal/controller/dns/zoneredirection/zz_controller.go new file mode 100755 index 0000000..4f96ce0 --- /dev/null +++ b/internal/controller/dns/zoneredirection/zz_controller.go @@ -0,0 +1,67 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + +/* +Copyright 2022 Upbound Inc. +*/ + +// Code generated by upjet. DO NOT EDIT. + +package zoneredirection + +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/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/terraform" + ctrl "sigs.k8s.io/controller-runtime" + + v1alpha1 "github.com/edixos/provider-ovh/apis/dns/v1alpha1" + features "github.com/edixos/provider-ovh/internal/features" +) + +// Setup adds a controller that reconciles ZoneRedirection managed resources. +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { + name := managed.ControllerName(v1alpha1.ZoneRedirection_GroupVersionKind.String()) + var initializers managed.InitializerChain + initializers = append(initializers, managed.NewNameAsExternalName(mgr.GetClient())) + cps := []managed.ConnectionPublisher{managed.NewAPISecretPublisher(mgr.GetClient(), mgr.GetScheme())} + if o.SecretStoreConfigGVK != nil { + cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) + } + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.ZoneRedirection_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.ZoneRedirection_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler)) + opts := []managed.ReconcilerOption{ + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["ovh_domain_zone_redirection"], tjcontroller.WithLogger(o.Logger), tjcontroller.WithConnectorEventHandler(eventHandler), + tjcontroller.WithCallbackProvider(ac), + )), + 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), + } + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { + opts = append(opts, managed.WithManagementPolicies()) + } + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.ZoneRedirection_GroupVersionKind), opts...) + + return ctrl.NewControllerManagedBy(mgr). + Named(name). + WithOptions(o.ForControllerRuntime()). + WithEventFilter(xpresource.DesiredStateChanged()). + Watches(&v1alpha1.ZoneRedirection{}, eventHandler). + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) +} diff --git a/internal/controller/zz_setup.go b/internal/controller/zz_setup.go index 6217f85..8a3528b 100755 --- a/internal/controller/zz_setup.go +++ b/internal/controller/zz_setup.go @@ -30,6 +30,9 @@ import ( servernetworking "github.com/edixos/provider-ovh/internal/controller/dedicatedserver/servernetworking" serverreboottask "github.com/edixos/provider-ovh/internal/controller/dedicatedserver/serverreboottask" serverupdate "github.com/edixos/provider-ovh/internal/controller/dedicatedserver/serverupdate" + zone "github.com/edixos/provider-ovh/internal/controller/dns/zone" + zonerecord "github.com/edixos/provider-ovh/internal/controller/dns/zonerecord" + zoneredirection "github.com/edixos/provider-ovh/internal/controller/dns/zoneredirection" providerconfig "github.com/edixos/provider-ovh/internal/controller/providerconfig" projectnetworkprivate "github.com/edixos/provider-ovh/internal/controller/publiccloudnetwork/projectnetworkprivate" projectnetworkprivatesubnet "github.com/edixos/provider-ovh/internal/controller/publiccloudnetwork/projectnetworkprivatesubnet" @@ -61,6 +64,9 @@ func Setup(mgr ctrl.Manager, o controller.Options) error { servernetworking.Setup, serverreboottask.Setup, serverupdate.Setup, + zone.Setup, + zonerecord.Setup, + zoneredirection.Setup, providerconfig.Setup, projectnetworkprivate.Setup, projectnetworkprivatesubnet.Setup, diff --git a/package/crds/dns.ovh.edixos.io_zonerecords.yaml b/package/crds/dns.ovh.edixos.io_zonerecords.yaml new file mode 100644 index 0000000..29b0874 --- /dev/null +++ b/package/crds/dns.ovh.edixos.io_zonerecords.yaml @@ -0,0 +1,354 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.13.0 + name: zonerecords.dns.ovh.edixos.io +spec: + group: dns.ovh.edixos.io + names: + categories: + - crossplane + - managed + - ovh + kind: ZoneRecord + listKind: ZoneRecordList + plural: zonerecords + singular: zonerecord + 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: v1alpha1 + schema: + openAPIV3Schema: + description: 'ZoneRecord is the Schema for the ZoneRecords API. ovh_domain_zone_record.html.markdownsubcategory + : "Domain names"' + 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: ZoneRecordSpec defines the desired state of ZoneRecord + 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. This field is planned to be deprecated + in favor of the ManagementPolicies field in a future release. Currently, + both could be set independently and non-default values would be + honored if the feature flag is enabled. See the design doc for more + information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' + enum: + - Orphan + - Delete + type: string + forProvider: + properties: + fieldtype: + description: The type of the record + type: string + subdomain: + description: The name of the record. It can be an empty string. + type: string + target: + description: The value of the record + type: string + ttl: + description: The TTL of the record, it shall be >= to 60. + type: number + zone: + description: The domain to add the record to + type: string + type: object + initProvider: + description: THIS IS A BETA FIELD. It will be honored unless the Management + Policies feature flag is disabled. InitProvider holds the same fields + as ForProvider, with the exception of Identifier and other resource + reference fields. The fields that are in InitProvider are merged + into ForProvider when the resource is created. The same fields are + also added to the terraform ignore_changes hook, to avoid updating + them after creation. This is useful for fields that are required + on creation, but we do not desire to update them after creation, + for example because of an external controller is managing them, + like an autoscaler. + properties: + fieldtype: + description: The type of the record + type: string + subdomain: + description: The name of the record. It can be an empty string. + type: string + target: + description: The value of the record + type: string + ttl: + description: The TTL of the record, it shall be >= to 60. + type: number + zone: + description: The domain to add the record to + type: string + type: object + managementPolicies: + default: + - '*' + description: 'THIS IS A BETA FIELD. It is on by default but can be + opted out through a Crossplane feature flag. ManagementPolicies + specify the array of actions Crossplane is allowed to take on the + managed and external resources. This field is planned to replace + the DeletionPolicy field in a future release. Currently, both could + be set independently and non-default values would be honored if + the feature flag is enabled. If both are custom, the DeletionPolicy + field will be ignored. See the design doc for more information: + https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + items: + description: A ManagementAction represents an action that the Crossplane + controllers can take on an external resource. + enum: + - Observe + - Create + - Update + - Delete + - LateInitialize + - '*' + type: string + type: array + 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 + 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 + x-kubernetes-validations: + - message: spec.forProvider.fieldtype is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.fieldtype) + || (has(self.initProvider) && has(self.initProvider.fieldtype))' + - message: spec.forProvider.target is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.target) + || (has(self.initProvider) && has(self.initProvider.target))' + - message: spec.forProvider.zone is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.zone) + || (has(self.initProvider) && has(self.initProvider.zone))' + status: + description: ZoneRecordStatus defines the observed state of ZoneRecord. + properties: + atProvider: + properties: + fieldtype: + description: The type of the record + type: string + id: + description: The record ID + type: string + subdomain: + description: The name of the record. It can be an empty string. + type: string + target: + description: The value of the record + type: string + ttl: + description: The TTL of the record, it shall be >= to 60. + type: number + zone: + description: The domain to add the record to + 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 + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + type: object + required: + - spec + type: object + served: true + storage: true + subresources: + status: {} diff --git a/package/crds/dns.ovh.edixos.io_zoneredirections.yaml b/package/crds/dns.ovh.edixos.io_zoneredirections.yaml new file mode 100644 index 0000000..39ff82d --- /dev/null +++ b/package/crds/dns.ovh.edixos.io_zoneredirections.yaml @@ -0,0 +1,372 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.13.0 + name: zoneredirections.dns.ovh.edixos.io +spec: + group: dns.ovh.edixos.io + names: + categories: + - crossplane + - managed + - ovh + kind: ZoneRedirection + listKind: ZoneRedirectionList + plural: zoneredirections + singular: zoneredirection + 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: v1alpha1 + schema: + openAPIV3Schema: + description: 'ZoneRedirection is the Schema for the ZoneRedirections API. + ovh_domain_zone_redirection.html.markdownsubcategory : "Domain names"' + 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: ZoneRedirectionSpec defines the desired state of ZoneRedirection + 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. This field is planned to be deprecated + in favor of the ManagementPolicies field in a future release. Currently, + both could be set independently and non-default values would be + honored if the feature flag is enabled. See the design doc for more + information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' + enum: + - Orphan + - Delete + type: string + forProvider: + properties: + description: + description: A description of this redirection + type: string + keywords: + description: Keywords to describe this redirection + type: string + subdomain: + description: The name of the redirection + type: string + target: + description: The value of the redirection + type: string + title: + description: Title of this redirection + type: string + type: + description: 'The type of the redirection, with values:' + type: string + zone: + description: The domain to add the redirection to + type: string + type: object + initProvider: + description: THIS IS A BETA FIELD. It will be honored unless the Management + Policies feature flag is disabled. InitProvider holds the same fields + as ForProvider, with the exception of Identifier and other resource + reference fields. The fields that are in InitProvider are merged + into ForProvider when the resource is created. The same fields are + also added to the terraform ignore_changes hook, to avoid updating + them after creation. This is useful for fields that are required + on creation, but we do not desire to update them after creation, + for example because of an external controller is managing them, + like an autoscaler. + properties: + description: + description: A description of this redirection + type: string + keywords: + description: Keywords to describe this redirection + type: string + subdomain: + description: The name of the redirection + type: string + target: + description: The value of the redirection + type: string + title: + description: Title of this redirection + type: string + type: + description: 'The type of the redirection, with values:' + type: string + zone: + description: The domain to add the redirection to + type: string + type: object + managementPolicies: + default: + - '*' + description: 'THIS IS A BETA FIELD. It is on by default but can be + opted out through a Crossplane feature flag. ManagementPolicies + specify the array of actions Crossplane is allowed to take on the + managed and external resources. This field is planned to replace + the DeletionPolicy field in a future release. Currently, both could + be set independently and non-default values would be honored if + the feature flag is enabled. If both are custom, the DeletionPolicy + field will be ignored. See the design doc for more information: + https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + items: + description: A ManagementAction represents an action that the Crossplane + controllers can take on an external resource. + enum: + - Observe + - Create + - Update + - Delete + - LateInitialize + - '*' + type: string + type: array + 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 + 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 + x-kubernetes-validations: + - message: spec.forProvider.target is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.target) + || (has(self.initProvider) && has(self.initProvider.target))' + - message: spec.forProvider.type is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.type) + || (has(self.initProvider) && has(self.initProvider.type))' + - message: spec.forProvider.zone is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.zone) + || (has(self.initProvider) && has(self.initProvider.zone))' + status: + description: ZoneRedirectionStatus defines the observed state of ZoneRedirection. + properties: + atProvider: + properties: + description: + description: A description of this redirection + type: string + id: + description: The redirection ID + type: string + keywords: + description: Keywords to describe this redirection + type: string + subdomain: + description: The name of the redirection + type: string + target: + description: The value of the redirection + type: string + title: + description: Title of this redirection + type: string + type: + description: 'The type of the redirection, with values:' + type: string + zone: + description: The domain to add the redirection to + 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 + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + type: object + required: + - spec + type: object + served: true + storage: true + subresources: + status: {} diff --git a/package/crds/dns.ovh.edixos.io_zones.yaml b/package/crds/dns.ovh.edixos.io_zones.yaml new file mode 100644 index 0000000..3042840 --- /dev/null +++ b/package/crds/dns.ovh.edixos.io_zones.yaml @@ -0,0 +1,585 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.13.0 + name: zones.dns.ovh.edixos.io +spec: + group: dns.ovh.edixos.io + names: + categories: + - crossplane + - managed + - ovh + kind: Zone + listKind: ZoneList + plural: zones + singular: zone + 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: v1alpha1 + schema: + openAPIV3Schema: + description: 'Zone is the Schema for the Zones API. ovh_domain_zone.html.markdownsubcategory + : "Domain names"' + 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: ZoneSpec defines the desired state of Zone + 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. This field is planned to be deprecated + in favor of the ManagementPolicies field in a future release. Currently, + both could be set independently and non-default values would be + honored if the feature flag is enabled. See the design doc for more + information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' + enum: + - Orphan + - Delete + type: string + forProvider: + properties: + ovhSubsidiary: + description: OVHcloud Subsidiary. Country of OVHcloud legal entity + you'll be billed by. List of supported subsidiaries available + on API at /1.0/me.json under Ovh Subsidiary + type: string + paymentMean: + description: Ovh payment mode + type: string + plan: + description: Product Plan to order Product Plan to order + items: + properties: + catalogName: + description: Catalog name Catalog name + type: string + configuration: + description: Representation of a configuration item for + personalizing product Representation of a configuration + item for personalizing product + items: + properties: + label: + description: Identifier of the resource Identifier + of the resource + type: string + value: + description: Path to the resource in API.OVH.COM Path + to the resource in API.OVH.COM + type: string + type: object + type: array + duration: + description: duration duration + type: string + planCode: + description: Plan code Plan code + type: string + pricingMode: + description: Pricing model identifier Pricing model identifier + type: string + type: object + type: array + planOption: + description: Product Plan to order Product Plan to order + items: + properties: + catalogName: + description: Catalog name Catalog name + type: string + configuration: + description: Representation of a configuration item for + personalizing product Representation of a configuration + item for personalizing product + items: + properties: + label: + description: Identifier of the resource Identifier + of the resource + type: string + value: + description: Path to the resource in API.OVH.COM Path + to the resource in API.OVH.COM + type: string + type: object + type: array + duration: + description: duration duration + type: string + planCode: + description: Plan code Plan code + type: string + pricingMode: + description: Pricing model identifier Pricing model identifier + type: string + type: object + type: array + type: object + initProvider: + description: THIS IS A BETA FIELD. It will be honored unless the Management + Policies feature flag is disabled. InitProvider holds the same fields + as ForProvider, with the exception of Identifier and other resource + reference fields. The fields that are in InitProvider are merged + into ForProvider when the resource is created. The same fields are + also added to the terraform ignore_changes hook, to avoid updating + them after creation. This is useful for fields that are required + on creation, but we do not desire to update them after creation, + for example because of an external controller is managing them, + like an autoscaler. + properties: + ovhSubsidiary: + description: OVHcloud Subsidiary. Country of OVHcloud legal entity + you'll be billed by. List of supported subsidiaries available + on API at /1.0/me.json under Ovh Subsidiary + type: string + paymentMean: + description: Ovh payment mode + type: string + plan: + description: Product Plan to order Product Plan to order + items: + properties: + catalogName: + description: Catalog name Catalog name + type: string + configuration: + description: Representation of a configuration item for + personalizing product Representation of a configuration + item for personalizing product + items: + properties: + label: + description: Identifier of the resource Identifier + of the resource + type: string + value: + description: Path to the resource in API.OVH.COM Path + to the resource in API.OVH.COM + type: string + type: object + type: array + duration: + description: duration duration + type: string + planCode: + description: Plan code Plan code + type: string + pricingMode: + description: Pricing model identifier Pricing model identifier + type: string + type: object + type: array + planOption: + description: Product Plan to order Product Plan to order + items: + properties: + catalogName: + description: Catalog name Catalog name + type: string + configuration: + description: Representation of a configuration item for + personalizing product Representation of a configuration + item for personalizing product + items: + properties: + label: + description: Identifier of the resource Identifier + of the resource + type: string + value: + description: Path to the resource in API.OVH.COM Path + to the resource in API.OVH.COM + type: string + type: object + type: array + duration: + description: duration duration + type: string + planCode: + description: Plan code Plan code + type: string + pricingMode: + description: Pricing model identifier Pricing model identifier + type: string + type: object + type: array + type: object + managementPolicies: + default: + - '*' + description: 'THIS IS A BETA FIELD. It is on by default but can be + opted out through a Crossplane feature flag. ManagementPolicies + specify the array of actions Crossplane is allowed to take on the + managed and external resources. This field is planned to replace + the DeletionPolicy field in a future release. Currently, both could + be set independently and non-default values would be honored if + the feature flag is enabled. If both are custom, the DeletionPolicy + field will be ignored. See the design doc for more information: + https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + items: + description: A ManagementAction represents an action that the Crossplane + controllers can take on an external resource. + enum: + - Observe + - Create + - Update + - Delete + - LateInitialize + - '*' + type: string + type: array + 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 + 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 + x-kubernetes-validations: + - message: spec.forProvider.ovhSubsidiary is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.ovhSubsidiary) + || (has(self.initProvider) && has(self.initProvider.ovhSubsidiary))' + - message: spec.forProvider.plan is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.plan) + || (has(self.initProvider) && has(self.initProvider.plan))' + status: + description: ZoneStatus defines the observed state of Zone. + properties: + atProvider: + properties: + dnssecSupported: + description: Is DNSSEC supported by this zone Is DNSSEC supported + by this zone + type: boolean + hasDnsAnycast: + description: hasDnsAnycast flag of the DNS zone hasDnsAnycast + flag of the DNS zone + type: boolean + id: + type: string + lastUpdate: + description: Last update date of the DNS zone Last update date + of the DNS zone + type: string + nameServers: + description: Name servers that host the DNS zone Name servers + that host the DNS zone + items: + type: string + type: array + order: + description: Details about an Order Details about an Order + items: + properties: + date: + description: date + type: string + details: + description: Information about a Bill entry + items: + properties: + description: + description: description + type: string + domain: + description: expiration date + type: string + orderDetailId: + description: order detail id + type: number + quantity: + description: quantity + type: string + type: object + type: array + expirationDate: + description: expiration date + type: string + orderId: + description: order id + type: number + type: object + type: array + ovhSubsidiary: + description: OVHcloud Subsidiary. Country of OVHcloud legal entity + you'll be billed by. List of supported subsidiaries available + on API at /1.0/me.json under Ovh Subsidiary + type: string + paymentMean: + description: Ovh payment mode + type: string + plan: + description: Product Plan to order Product Plan to order + items: + properties: + catalogName: + description: Catalog name Catalog name + type: string + configuration: + description: Representation of a configuration item for + personalizing product Representation of a configuration + item for personalizing product + items: + properties: + label: + description: Identifier of the resource Identifier + of the resource + type: string + value: + description: Path to the resource in API.OVH.COM Path + to the resource in API.OVH.COM + type: string + type: object + type: array + duration: + description: duration duration + type: string + planCode: + description: Plan code Plan code + type: string + pricingMode: + description: Pricing model identifier Pricing model identifier + type: string + type: object + type: array + planOption: + description: Product Plan to order Product Plan to order + items: + properties: + catalogName: + description: Catalog name Catalog name + type: string + configuration: + description: Representation of a configuration item for + personalizing product Representation of a configuration + item for personalizing product + items: + properties: + label: + description: Identifier of the resource Identifier + of the resource + type: string + value: + description: Path to the resource in API.OVH.COM Path + to the resource in API.OVH.COM + type: string + type: object + type: array + duration: + description: duration duration + type: string + planCode: + description: Plan code Plan code + type: string + pricingMode: + description: Pricing model identifier Pricing model identifier + type: string + type: object + type: array + urn: + 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 + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + type: object + required: + - spec + type: object + served: true + storage: true + subresources: + status: {}