diff --git a/apis/dbs/v1alpha1/zz_generated.deepcopy.go b/apis/dbs/v1alpha1/zz_generated.deepcopy.go index 5955af8..82aaf8c 100644 --- a/apis/dbs/v1alpha1/zz_generated.deepcopy.go +++ b/apis/dbs/v1alpha1/zz_generated.deepcopy.go @@ -312,8 +312,8 @@ func (in *SubscriptionInitParameters) DeepCopyInto(out *SubscriptionInitParamete *out = new(string) **out = **in } - if in.DataTypeRefRef != nil { - in, out := &in.DataTypeRefRef, &out.DataTypeRefRef + if in.DataTypeRef != nil { + in, out := &in.DataTypeRef, &out.DataTypeRef *out = new(v1.Reference) (*in).DeepCopyInto(*out) } @@ -474,8 +474,8 @@ func (in *SubscriptionParameters) DeepCopyInto(out *SubscriptionParameters) { *out = new(string) **out = **in } - if in.DataTypeRefRef != nil { - in, out := &in.DataTypeRefRef, &out.DataTypeRefRef + if in.DataTypeRef != nil { + in, out := &in.DataTypeRef, &out.DataTypeRef *out = new(v1.Reference) (*in).DeepCopyInto(*out) } diff --git a/apis/dbs/v1alpha1/zz_generated.resolvers.go b/apis/dbs/v1alpha1/zz_generated.resolvers.go index 4916a3a..a5a7dd3 100644 --- a/apis/dbs/v1alpha1/zz_generated.resolvers.go +++ b/apis/dbs/v1alpha1/zz_generated.resolvers.go @@ -24,7 +24,7 @@ func (mg *Subscription) ResolveReferences(ctx context.Context, c client.Reader) rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.DataType), Extract: common.ExtractResourceName(), - Reference: mg.Spec.ForProvider.DataTypeRefRef, + Reference: mg.Spec.ForProvider.DataTypeRef, Selector: mg.Spec.ForProvider.DataTypeSelector, To: reference.To{ List: &v1alpha1.DataTypeList{}, @@ -35,7 +35,7 @@ func (mg *Subscription) ResolveReferences(ctx context.Context, c client.Reader) return errors.Wrap(err, "mg.Spec.ForProvider.DataType") } mg.Spec.ForProvider.DataType = reference.ToPtrValue(rsp.ResolvedValue) - mg.Spec.ForProvider.DataTypeRefRef = rsp.ResolvedReference + mg.Spec.ForProvider.DataTypeRef = rsp.ResolvedReference rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.SubscriberID), @@ -56,7 +56,7 @@ func (mg *Subscription) ResolveReferences(ctx context.Context, c client.Reader) rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.DataType), Extract: common.ExtractResourceName(), - Reference: mg.Spec.InitProvider.DataTypeRefRef, + Reference: mg.Spec.InitProvider.DataTypeRef, Selector: mg.Spec.InitProvider.DataTypeSelector, To: reference.To{ List: &v1alpha1.DataTypeList{}, @@ -67,7 +67,7 @@ func (mg *Subscription) ResolveReferences(ctx context.Context, c client.Reader) return errors.Wrap(err, "mg.Spec.InitProvider.DataType") } mg.Spec.InitProvider.DataType = reference.ToPtrValue(rsp.ResolvedValue) - mg.Spec.InitProvider.DataTypeRefRef = rsp.ResolvedReference + mg.Spec.InitProvider.DataTypeRef = rsp.ResolvedReference rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.SubscriberID), diff --git a/apis/dbs/v1alpha1/zz_subscription_types.go b/apis/dbs/v1alpha1/zz_subscription_types.go index d9397de..fdacf83 100755 --- a/apis/dbs/v1alpha1/zz_subscription_types.go +++ b/apis/dbs/v1alpha1/zz_subscription_types.go @@ -21,13 +21,13 @@ type SubscriptionInitParameters struct { // +crossplane:generate:reference:type=github.com/philips-software/provider-hsdp/apis/mdm/v1alpha1.DataType // +crossplane:generate:reference:extractor=github.com/philips-software/provider-hsdp/config/common.ExtractResourceName() - // +crossplane:generate:reference:refFieldName=DataTypeRefRef + // +crossplane:generate:reference:refFieldName=DataTypeRef // +crossplane:generate:reference:selectorFieldName=DataTypeSelector DataType *string `json:"dataType,omitempty" tf:"data_type,omitempty"` // Reference to a DataType in mdm to populate dataType. // +kubebuilder:validation:Optional - DataTypeRefRef *v1.Reference `json:"dataTypeRefRef,omitempty" tf:"-"` + DataTypeRef *v1.Reference `json:"dataTypeRef,omitempty" tf:"-"` // Selector for a DataType in mdm to populate dataType. // +kubebuilder:validation:Optional @@ -81,14 +81,14 @@ type SubscriptionParameters struct { // +crossplane:generate:reference:type=github.com/philips-software/provider-hsdp/apis/mdm/v1alpha1.DataType // +crossplane:generate:reference:extractor=github.com/philips-software/provider-hsdp/config/common.ExtractResourceName() - // +crossplane:generate:reference:refFieldName=DataTypeRefRef + // +crossplane:generate:reference:refFieldName=DataTypeRef // +crossplane:generate:reference:selectorFieldName=DataTypeSelector // +kubebuilder:validation:Optional DataType *string `json:"dataType,omitempty" tf:"data_type,omitempty"` // Reference to a DataType in mdm to populate dataType. // +kubebuilder:validation:Optional - DataTypeRefRef *v1.Reference `json:"dataTypeRefRef,omitempty" tf:"-"` + DataTypeRef *v1.Reference `json:"dataTypeRef,omitempty" tf:"-"` // Selector for a DataType in mdm to populate dataType. // +kubebuilder:validation:Optional diff --git a/config/connect/dbs/config.go b/config/connect/dbs/config.go index 77e6b6f..47281a1 100644 --- a/config/connect/dbs/config.go +++ b/config/connect/dbs/config.go @@ -31,7 +31,7 @@ func Configure(p *config.Provider) { } r.References["data_type"] = config.Reference{ Type: "github.com/philips-software/provider-hsdp/apis/mdm/v1alpha1.DataType", - RefFieldName: "DataTypeRefRef", + RefFieldName: "DataTypeRef", SelectorFieldName: "DataTypeSelector", Extractor: common.ExtractResourceNameFuncPath, } diff --git a/package/crds/dbs.hsdp.crossplane.io_subscriptions.yaml b/package/crds/dbs.hsdp.crossplane.io_subscriptions.yaml index 75f1e9f..8c71ca7 100644 --- a/package/crds/dbs.hsdp.crossplane.io_subscriptions.yaml +++ b/package/crds/dbs.hsdp.crossplane.io_subscriptions.yaml @@ -74,7 +74,7 @@ spec: properties: dataType: type: string - dataTypeRefRef: + dataTypeRef: description: Reference to a DataType in mdm to populate dataType. properties: name: @@ -248,7 +248,7 @@ spec: properties: dataType: type: string - dataTypeRefRef: + dataTypeRef: description: Reference to a DataType in mdm to populate dataType. properties: name: