From 8003724038c55d2d4584f812eef7610d919af1ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fatih=20T=C3=BCrken?= Date: Tue, 22 Oct 2024 21:50:53 +0300 Subject: [PATCH] Backport api changes from v1beta2 to v1beta1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Fatih Türken --- .../v1beta1/zz_appconnection_types.go | 20 ++ .../v1beta1/zz_generated.deepcopy.go | 24 ++ .../v1beta1/zz_generated.resolvers.go | 39 +++ .../v1beta1/zz_generated.deepcopy.go | 48 +++ .../v1beta1/zz_generated.resolvers.go | 97 ++++++ .../v1beta1/zz_policy_types.go | 36 ++ .../v1beta1/zz_certificate_types.go | 40 +++ .../v1beta1/zz_generated.deepcopy.go | 48 +++ .../v1beta1/zz_generated.resolvers.go | 99 +++++- .../cloudrun/v1beta1/zz_generated.deepcopy.go | 48 +++ .../v1beta1/zz_generated.resolvers.go | 107 ++++++ apis/cloudrun/v1beta1/zz_v2job_types.go | 20 ++ apis/cloudrun/v1beta1/zz_v2service_types.go | 20 ++ apis/compute/v1beta1/zz_generated.deepcopy.go | 72 ++++ .../compute/v1beta1/zz_generated.resolvers.go | 128 +++++++ .../v1beta1/zz_instancetemplate_types.go | 20 ++ apis/compute/v1beta1/zz_routernat_types.go | 40 +++ .../osconfig/v1beta1/zz_generated.deepcopy.go | 25 ++ .../v1beta1/zz_generated.resolvers.go | 73 ++++ .../v1beta1/zz_patchdeployment_types.go | 20 ++ ...ondcorp.gcp.upbound.io_appconnections.yaml | 158 +++++++++ ...authorization.gcp.upbound.io_policies.yaml | 316 ++++++++++++++++++ ...temanager.gcp.upbound.io_certificates.yaml | 316 ++++++++++++++++++ .../crds/cloudrun.gcp.upbound.io_v2jobs.yaml | 162 +++++++++ .../cloudrun.gcp.upbound.io_v2services.yaml | 158 +++++++++ ...pute.gcp.upbound.io_instancetemplates.yaml | 158 +++++++++ .../compute.gcp.upbound.io_routernats.yaml | 314 +++++++++++++++++ ...onfig.gcp.upbound.io_patchdeployments.yaml | 158 +++++++++ 28 files changed, 2763 insertions(+), 1 deletion(-) create mode 100644 apis/osconfig/v1beta1/zz_generated.resolvers.go diff --git a/apis/beyondcorp/v1beta1/zz_appconnection_types.go b/apis/beyondcorp/v1beta1/zz_appconnection_types.go index ae96eb422..80d84ec27 100755 --- a/apis/beyondcorp/v1beta1/zz_appconnection_types.go +++ b/apis/beyondcorp/v1beta1/zz_appconnection_types.go @@ -20,8 +20,18 @@ type AppConnectionInitParameters struct { ApplicationEndpoint []ApplicationEndpointInitParameters `json:"applicationEndpoint,omitempty" tf:"application_endpoint,omitempty"` // List of AppConnectors that are authorised to be associated with this AppConnection + // +crossplane:generate:reference:type=github.com/upbound/provider-gcp/apis/beyondcorp/v1beta2.AppConnector + // +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractResourceID() Connectors []*string `json:"connectors,omitempty" tf:"connectors,omitempty"` + // References to AppConnector in beyondcorp to populate connectors. + // +kubebuilder:validation:Optional + ConnectorsRefs []v1.Reference `json:"connectorsRefs,omitempty" tf:"-"` + + // Selector for a list of AppConnector in beyondcorp to populate connectors. + // +kubebuilder:validation:Optional + ConnectorsSelector *v1.Selector `json:"connectorsSelector,omitempty" tf:"-"` + // An arbitrary user-provided name for the AppConnection. DisplayName *string `json:"displayName,omitempty" tf:"display_name,omitempty"` @@ -104,9 +114,19 @@ type AppConnectionParameters struct { ApplicationEndpoint []ApplicationEndpointParameters `json:"applicationEndpoint,omitempty" tf:"application_endpoint,omitempty"` // List of AppConnectors that are authorised to be associated with this AppConnection + // +crossplane:generate:reference:type=github.com/upbound/provider-gcp/apis/beyondcorp/v1beta2.AppConnector + // +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractResourceID() // +kubebuilder:validation:Optional Connectors []*string `json:"connectors,omitempty" tf:"connectors,omitempty"` + // References to AppConnector in beyondcorp to populate connectors. + // +kubebuilder:validation:Optional + ConnectorsRefs []v1.Reference `json:"connectorsRefs,omitempty" tf:"-"` + + // Selector for a list of AppConnector in beyondcorp to populate connectors. + // +kubebuilder:validation:Optional + ConnectorsSelector *v1.Selector `json:"connectorsSelector,omitempty" tf:"-"` + // An arbitrary user-provided name for the AppConnection. // +kubebuilder:validation:Optional DisplayName *string `json:"displayName,omitempty" tf:"display_name,omitempty"` diff --git a/apis/beyondcorp/v1beta1/zz_generated.deepcopy.go b/apis/beyondcorp/v1beta1/zz_generated.deepcopy.go index 771c30ce5..acf6071e3 100644 --- a/apis/beyondcorp/v1beta1/zz_generated.deepcopy.go +++ b/apis/beyondcorp/v1beta1/zz_generated.deepcopy.go @@ -116,6 +116,18 @@ func (in *AppConnectionInitParameters) DeepCopyInto(out *AppConnectionInitParame } } } + if in.ConnectorsRefs != nil { + in, out := &in.ConnectorsRefs, &out.ConnectorsRefs + *out = make([]v1.Reference, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.ConnectorsSelector != nil { + in, out := &in.ConnectorsSelector, &out.ConnectorsSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } if in.DisplayName != nil { in, out := &in.DisplayName, &out.DisplayName *out = new(string) @@ -347,6 +359,18 @@ func (in *AppConnectionParameters) DeepCopyInto(out *AppConnectionParameters) { } } } + if in.ConnectorsRefs != nil { + in, out := &in.ConnectorsRefs, &out.ConnectorsRefs + *out = make([]v1.Reference, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.ConnectorsSelector != nil { + in, out := &in.ConnectorsSelector, &out.ConnectorsSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } if in.DisplayName != nil { in, out := &in.DisplayName, &out.DisplayName *out = new(string) diff --git a/apis/beyondcorp/v1beta1/zz_generated.resolvers.go b/apis/beyondcorp/v1beta1/zz_generated.resolvers.go index caf6bdda3..3be091667 100644 --- a/apis/beyondcorp/v1beta1/zz_generated.resolvers.go +++ b/apis/beyondcorp/v1beta1/zz_generated.resolvers.go @@ -24,7 +24,27 @@ func (mg *AppConnection) ResolveReferences( // ResolveReferences of this AppConn r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse + var mrsp reference.MultiResolutionResponse var err error + { + m, l, err = apisresolver.GetManagedResource("beyondcorp.gcp.upbound.io", "v1beta2", "AppConnector", "AppConnectorList") + if err != nil { + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + } + + mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ + CurrentValues: reference.FromPtrValues(mg.Spec.ForProvider.Connectors), + Extract: resource.ExtractResourceID(), + References: mg.Spec.ForProvider.ConnectorsRefs, + Selector: mg.Spec.ForProvider.ConnectorsSelector, + To: reference.To{List: l, Managed: m}, + }) + } + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.Connectors") + } + mg.Spec.ForProvider.Connectors = reference.ToPtrValues(mrsp.ResolvedValues) + mg.Spec.ForProvider.ConnectorsRefs = mrsp.ResolvedReferences for i3 := 0; i3 < len(mg.Spec.ForProvider.Gateway); i3++ { { @@ -47,6 +67,25 @@ func (mg *AppConnection) ResolveReferences( // ResolveReferences of this AppConn mg.Spec.ForProvider.Gateway[i3].AppGatewayRef = rsp.ResolvedReference } + { + m, l, err = apisresolver.GetManagedResource("beyondcorp.gcp.upbound.io", "v1beta2", "AppConnector", "AppConnectorList") + if err != nil { + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + } + mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ + CurrentValues: reference.FromPtrValues(mg.Spec.InitProvider.Connectors), + Extract: resource.ExtractResourceID(), + References: mg.Spec.InitProvider.ConnectorsRefs, + Selector: mg.Spec.InitProvider.ConnectorsSelector, + To: reference.To{List: l, Managed: m}, + }) + } + if err != nil { + return errors.Wrap(err, "mg.Spec.InitProvider.Connectors") + } + mg.Spec.InitProvider.Connectors = reference.ToPtrValues(mrsp.ResolvedValues) + mg.Spec.InitProvider.ConnectorsRefs = mrsp.ResolvedReferences + for i3 := 0; i3 < len(mg.Spec.InitProvider.Gateway); i3++ { { m, l, err = apisresolver.GetManagedResource("beyondcorp.gcp.upbound.io", "v1beta1", "AppGateway", "AppGatewayList") diff --git a/apis/binaryauthorization/v1beta1/zz_generated.deepcopy.go b/apis/binaryauthorization/v1beta1/zz_generated.deepcopy.go index fc6f292d7..d82f2ba86 100644 --- a/apis/binaryauthorization/v1beta1/zz_generated.deepcopy.go +++ b/apis/binaryauthorization/v1beta1/zz_generated.deepcopy.go @@ -403,6 +403,18 @@ func (in *ClusterAdmissionRulesInitParameters) DeepCopyInto(out *ClusterAdmissio } } } + if in.RequireAttestationsByRefs != nil { + in, out := &in.RequireAttestationsByRefs, &out.RequireAttestationsByRefs + *out = make([]v1.Reference, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.RequireAttestationsBySelector != nil { + in, out := &in.RequireAttestationsBySelector, &out.RequireAttestationsBySelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterAdmissionRulesInitParameters. @@ -485,6 +497,18 @@ func (in *ClusterAdmissionRulesParameters) DeepCopyInto(out *ClusterAdmissionRul } } } + if in.RequireAttestationsByRefs != nil { + in, out := &in.RequireAttestationsByRefs, &out.RequireAttestationsByRefs + *out = make([]v1.Reference, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.RequireAttestationsBySelector != nil { + in, out := &in.RequireAttestationsBySelector, &out.RequireAttestationsBySelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterAdmissionRulesParameters. @@ -521,6 +545,18 @@ func (in *DefaultAdmissionRuleInitParameters) DeepCopyInto(out *DefaultAdmission } } } + if in.RequireAttestationsByRefs != nil { + in, out := &in.RequireAttestationsByRefs, &out.RequireAttestationsByRefs + *out = make([]v1.Reference, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.RequireAttestationsBySelector != nil { + in, out := &in.RequireAttestationsBySelector, &out.RequireAttestationsBySelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DefaultAdmissionRuleInitParameters. @@ -593,6 +629,18 @@ func (in *DefaultAdmissionRuleParameters) DeepCopyInto(out *DefaultAdmissionRule } } } + if in.RequireAttestationsByRefs != nil { + in, out := &in.RequireAttestationsByRefs, &out.RequireAttestationsByRefs + *out = make([]v1.Reference, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.RequireAttestationsBySelector != nil { + in, out := &in.RequireAttestationsBySelector, &out.RequireAttestationsBySelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DefaultAdmissionRuleParameters. diff --git a/apis/binaryauthorization/v1beta1/zz_generated.resolvers.go b/apis/binaryauthorization/v1beta1/zz_generated.resolvers.go index 3bddb9c34..97f85fdd5 100644 --- a/apis/binaryauthorization/v1beta1/zz_generated.resolvers.go +++ b/apis/binaryauthorization/v1beta1/zz_generated.resolvers.go @@ -71,3 +71,100 @@ func (mg *Attestor) ResolveReferences(ctx context.Context, c client.Reader) erro return nil } + +// ResolveReferences of this Policy. +func (mg *Policy) ResolveReferences(ctx context.Context, c client.Reader) error { + var m xpresource.Managed + var l xpresource.ManagedList + r := reference.NewAPIResolver(c, mg) + + var mrsp reference.MultiResolutionResponse + var err error + + for i3 := 0; i3 < len(mg.Spec.ForProvider.ClusterAdmissionRules); i3++ { + { + m, l, err = apisresolver.GetManagedResource("binaryauthorization.gcp.upbound.io", "v1beta2", "Attestor", "AttestorList") + if err != nil { + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + } + mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ + CurrentValues: reference.FromPtrValues(mg.Spec.ForProvider.ClusterAdmissionRules[i3].RequireAttestationsBy), + Extract: reference.ExternalName(), + References: mg.Spec.ForProvider.ClusterAdmissionRules[i3].RequireAttestationsByRefs, + Selector: mg.Spec.ForProvider.ClusterAdmissionRules[i3].RequireAttestationsBySelector, + To: reference.To{List: l, Managed: m}, + }) + } + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.ClusterAdmissionRules[i3].RequireAttestationsBy") + } + mg.Spec.ForProvider.ClusterAdmissionRules[i3].RequireAttestationsBy = reference.ToPtrValues(mrsp.ResolvedValues) + mg.Spec.ForProvider.ClusterAdmissionRules[i3].RequireAttestationsByRefs = mrsp.ResolvedReferences + + } + for i3 := 0; i3 < len(mg.Spec.ForProvider.DefaultAdmissionRule); i3++ { + { + m, l, err = apisresolver.GetManagedResource("binaryauthorization.gcp.upbound.io", "v1beta2", "Attestor", "AttestorList") + if err != nil { + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + } + mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ + CurrentValues: reference.FromPtrValues(mg.Spec.ForProvider.DefaultAdmissionRule[i3].RequireAttestationsBy), + Extract: reference.ExternalName(), + References: mg.Spec.ForProvider.DefaultAdmissionRule[i3].RequireAttestationsByRefs, + Selector: mg.Spec.ForProvider.DefaultAdmissionRule[i3].RequireAttestationsBySelector, + To: reference.To{List: l, Managed: m}, + }) + } + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.DefaultAdmissionRule[i3].RequireAttestationsBy") + } + mg.Spec.ForProvider.DefaultAdmissionRule[i3].RequireAttestationsBy = reference.ToPtrValues(mrsp.ResolvedValues) + mg.Spec.ForProvider.DefaultAdmissionRule[i3].RequireAttestationsByRefs = mrsp.ResolvedReferences + + } + for i3 := 0; i3 < len(mg.Spec.InitProvider.ClusterAdmissionRules); i3++ { + { + m, l, err = apisresolver.GetManagedResource("binaryauthorization.gcp.upbound.io", "v1beta2", "Attestor", "AttestorList") + if err != nil { + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + } + mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ + CurrentValues: reference.FromPtrValues(mg.Spec.InitProvider.ClusterAdmissionRules[i3].RequireAttestationsBy), + Extract: reference.ExternalName(), + References: mg.Spec.InitProvider.ClusterAdmissionRules[i3].RequireAttestationsByRefs, + Selector: mg.Spec.InitProvider.ClusterAdmissionRules[i3].RequireAttestationsBySelector, + To: reference.To{List: l, Managed: m}, + }) + } + if err != nil { + return errors.Wrap(err, "mg.Spec.InitProvider.ClusterAdmissionRules[i3].RequireAttestationsBy") + } + mg.Spec.InitProvider.ClusterAdmissionRules[i3].RequireAttestationsBy = reference.ToPtrValues(mrsp.ResolvedValues) + mg.Spec.InitProvider.ClusterAdmissionRules[i3].RequireAttestationsByRefs = mrsp.ResolvedReferences + + } + for i3 := 0; i3 < len(mg.Spec.InitProvider.DefaultAdmissionRule); i3++ { + { + m, l, err = apisresolver.GetManagedResource("binaryauthorization.gcp.upbound.io", "v1beta2", "Attestor", "AttestorList") + if err != nil { + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + } + mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ + CurrentValues: reference.FromPtrValues(mg.Spec.InitProvider.DefaultAdmissionRule[i3].RequireAttestationsBy), + Extract: reference.ExternalName(), + References: mg.Spec.InitProvider.DefaultAdmissionRule[i3].RequireAttestationsByRefs, + Selector: mg.Spec.InitProvider.DefaultAdmissionRule[i3].RequireAttestationsBySelector, + To: reference.To{List: l, Managed: m}, + }) + } + if err != nil { + return errors.Wrap(err, "mg.Spec.InitProvider.DefaultAdmissionRule[i3].RequireAttestationsBy") + } + mg.Spec.InitProvider.DefaultAdmissionRule[i3].RequireAttestationsBy = reference.ToPtrValues(mrsp.ResolvedValues) + mg.Spec.InitProvider.DefaultAdmissionRule[i3].RequireAttestationsByRefs = mrsp.ResolvedReferences + + } + + return nil +} diff --git a/apis/binaryauthorization/v1beta1/zz_policy_types.go b/apis/binaryauthorization/v1beta1/zz_policy_types.go index c167cb23c..5917061e4 100755 --- a/apis/binaryauthorization/v1beta1/zz_policy_types.go +++ b/apis/binaryauthorization/v1beta1/zz_policy_types.go @@ -62,8 +62,17 @@ type ClusterAdmissionRulesInitParameters struct { // request must be able to read the attestor resource. // Note: this field must be non-empty when the evaluation_mode field // specifies REQUIRE_ATTESTATION, otherwise it must be empty. + // +crossplane:generate:reference:type=github.com/upbound/provider-gcp/apis/binaryauthorization/v1beta2.Attestor // +listType=set RequireAttestationsBy []*string `json:"requireAttestationsBy,omitempty" tf:"require_attestations_by,omitempty"` + + // References to Attestor in binaryauthorization to populate requireAttestationsBy. + // +kubebuilder:validation:Optional + RequireAttestationsByRefs []v1.Reference `json:"requireAttestationsByRefs,omitempty" tf:"-"` + + // Selector for a list of Attestor in binaryauthorization to populate requireAttestationsBy. + // +kubebuilder:validation:Optional + RequireAttestationsBySelector *v1.Selector `json:"requireAttestationsBySelector,omitempty" tf:"-"` } type ClusterAdmissionRulesObservation struct { @@ -115,9 +124,18 @@ type ClusterAdmissionRulesParameters struct { // request must be able to read the attestor resource. // Note: this field must be non-empty when the evaluation_mode field // specifies REQUIRE_ATTESTATION, otherwise it must be empty. + // +crossplane:generate:reference:type=github.com/upbound/provider-gcp/apis/binaryauthorization/v1beta2.Attestor // +kubebuilder:validation:Optional // +listType=set RequireAttestationsBy []*string `json:"requireAttestationsBy,omitempty" tf:"require_attestations_by,omitempty"` + + // References to Attestor in binaryauthorization to populate requireAttestationsBy. + // +kubebuilder:validation:Optional + RequireAttestationsByRefs []v1.Reference `json:"requireAttestationsByRefs,omitempty" tf:"-"` + + // Selector for a list of Attestor in binaryauthorization to populate requireAttestationsBy. + // +kubebuilder:validation:Optional + RequireAttestationsBySelector *v1.Selector `json:"requireAttestationsBySelector,omitempty" tf:"-"` } type DefaultAdmissionRuleInitParameters struct { @@ -138,8 +156,17 @@ type DefaultAdmissionRuleInitParameters struct { // request must be able to read the attestor resource. // Note: this field must be non-empty when the evaluation_mode field // specifies REQUIRE_ATTESTATION, otherwise it must be empty. + // +crossplane:generate:reference:type=github.com/upbound/provider-gcp/apis/binaryauthorization/v1beta2.Attestor // +listType=set RequireAttestationsBy []*string `json:"requireAttestationsBy,omitempty" tf:"require_attestations_by,omitempty"` + + // References to Attestor in binaryauthorization to populate requireAttestationsBy. + // +kubebuilder:validation:Optional + RequireAttestationsByRefs []v1.Reference `json:"requireAttestationsByRefs,omitempty" tf:"-"` + + // Selector for a list of Attestor in binaryauthorization to populate requireAttestationsBy. + // +kubebuilder:validation:Optional + RequireAttestationsBySelector *v1.Selector `json:"requireAttestationsBySelector,omitempty" tf:"-"` } type DefaultAdmissionRuleObservation struct { @@ -184,9 +211,18 @@ type DefaultAdmissionRuleParameters struct { // request must be able to read the attestor resource. // Note: this field must be non-empty when the evaluation_mode field // specifies REQUIRE_ATTESTATION, otherwise it must be empty. + // +crossplane:generate:reference:type=github.com/upbound/provider-gcp/apis/binaryauthorization/v1beta2.Attestor // +kubebuilder:validation:Optional // +listType=set RequireAttestationsBy []*string `json:"requireAttestationsBy,omitempty" tf:"require_attestations_by,omitempty"` + + // References to Attestor in binaryauthorization to populate requireAttestationsBy. + // +kubebuilder:validation:Optional + RequireAttestationsByRefs []v1.Reference `json:"requireAttestationsByRefs,omitempty" tf:"-"` + + // Selector for a list of Attestor in binaryauthorization to populate requireAttestationsBy. + // +kubebuilder:validation:Optional + RequireAttestationsBySelector *v1.Selector `json:"requireAttestationsBySelector,omitempty" tf:"-"` } type PolicyInitParameters struct { diff --git a/apis/certificatemanager/v1beta1/zz_certificate_types.go b/apis/certificatemanager/v1beta1/zz_certificate_types.go index 8096fcfc6..31c0c5581 100755 --- a/apis/certificatemanager/v1beta1/zz_certificate_types.go +++ b/apis/certificatemanager/v1beta1/zz_certificate_types.go @@ -178,12 +178,32 @@ type CertificateParameters struct { type ManagedInitParameters struct { // Authorizations that will be used for performing domain authorization. Either issuanceConfig or dnsAuthorizations should be specificed, but not both. + // +crossplane:generate:reference:type=github.com/upbound/provider-gcp/apis/certificatemanager/v1beta1.DNSAuthorization + // +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractResourceID() DNSAuthorizations []*string `json:"dnsAuthorizations,omitempty" tf:"dns_authorizations,omitempty"` + // References to DNSAuthorization in certificatemanager to populate dnsAuthorizations. + // +kubebuilder:validation:Optional + DNSAuthorizationsRefs []v1.Reference `json:"dnsAuthorizationsRefs,omitempty" tf:"-"` + + // Selector for a list of DNSAuthorization in certificatemanager to populate dnsAuthorizations. + // +kubebuilder:validation:Optional + DNSAuthorizationsSelector *v1.Selector `json:"dnsAuthorizationsSelector,omitempty" tf:"-"` + // The domains for which a managed SSL certificate will be generated. // Wildcard domains are only supported with DNS challenge resolution + // +crossplane:generate:reference:type=github.com/upbound/provider-gcp/apis/certificatemanager/v1beta1.DNSAuthorization + // +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractParamPath("domain",false) Domains []*string `json:"domains,omitempty" tf:"domains,omitempty"` + // References to DNSAuthorization in certificatemanager to populate domains. + // +kubebuilder:validation:Optional + DomainsRefs []v1.Reference `json:"domainsRefs,omitempty" tf:"-"` + + // Selector for a list of DNSAuthorization in certificatemanager to populate domains. + // +kubebuilder:validation:Optional + DomainsSelector *v1.Selector `json:"domainsSelector,omitempty" tf:"-"` + // The resource name for a CertificateIssuanceConfig used to configure private PKI certificates in the format projects//locations//certificateIssuanceConfigs/*. // If this field is not set, the certificates will instead be publicly signed as documented at https://cloud.google.com/load-balancing/docs/ssl-certificates/google-managed-certs#caa. // Either issuanceConfig or dnsAuthorizations should be specificed, but not both. @@ -223,14 +243,34 @@ type ManagedObservation struct { type ManagedParameters struct { // Authorizations that will be used for performing domain authorization. Either issuanceConfig or dnsAuthorizations should be specificed, but not both. + // +crossplane:generate:reference:type=github.com/upbound/provider-gcp/apis/certificatemanager/v1beta1.DNSAuthorization + // +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractResourceID() // +kubebuilder:validation:Optional DNSAuthorizations []*string `json:"dnsAuthorizations,omitempty" tf:"dns_authorizations,omitempty"` + // References to DNSAuthorization in certificatemanager to populate dnsAuthorizations. + // +kubebuilder:validation:Optional + DNSAuthorizationsRefs []v1.Reference `json:"dnsAuthorizationsRefs,omitempty" tf:"-"` + + // Selector for a list of DNSAuthorization in certificatemanager to populate dnsAuthorizations. + // +kubebuilder:validation:Optional + DNSAuthorizationsSelector *v1.Selector `json:"dnsAuthorizationsSelector,omitempty" tf:"-"` + // The domains for which a managed SSL certificate will be generated. // Wildcard domains are only supported with DNS challenge resolution + // +crossplane:generate:reference:type=github.com/upbound/provider-gcp/apis/certificatemanager/v1beta1.DNSAuthorization + // +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractParamPath("domain",false) // +kubebuilder:validation:Optional Domains []*string `json:"domains,omitempty" tf:"domains,omitempty"` + // References to DNSAuthorization in certificatemanager to populate domains. + // +kubebuilder:validation:Optional + DomainsRefs []v1.Reference `json:"domainsRefs,omitempty" tf:"-"` + + // Selector for a list of DNSAuthorization in certificatemanager to populate domains. + // +kubebuilder:validation:Optional + DomainsSelector *v1.Selector `json:"domainsSelector,omitempty" tf:"-"` + // The resource name for a CertificateIssuanceConfig used to configure private PKI certificates in the format projects//locations//certificateIssuanceConfigs/*. // If this field is not set, the certificates will instead be publicly signed as documented at https://cloud.google.com/load-balancing/docs/ssl-certificates/google-managed-certs#caa. // Either issuanceConfig or dnsAuthorizations should be specificed, but not both. diff --git a/apis/certificatemanager/v1beta1/zz_generated.deepcopy.go b/apis/certificatemanager/v1beta1/zz_generated.deepcopy.go index 4115b78b8..d7636430f 100644 --- a/apis/certificatemanager/v1beta1/zz_generated.deepcopy.go +++ b/apis/certificatemanager/v1beta1/zz_generated.deepcopy.go @@ -1544,6 +1544,18 @@ func (in *ManagedInitParameters) DeepCopyInto(out *ManagedInitParameters) { } } } + if in.DNSAuthorizationsRefs != nil { + in, out := &in.DNSAuthorizationsRefs, &out.DNSAuthorizationsRefs + *out = make([]v1.Reference, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.DNSAuthorizationsSelector != nil { + in, out := &in.DNSAuthorizationsSelector, &out.DNSAuthorizationsSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } if in.Domains != nil { in, out := &in.Domains, &out.Domains *out = make([]*string, len(*in)) @@ -1555,6 +1567,18 @@ func (in *ManagedInitParameters) DeepCopyInto(out *ManagedInitParameters) { } } } + if in.DomainsRefs != nil { + in, out := &in.DomainsRefs, &out.DomainsRefs + *out = make([]v1.Reference, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.DomainsSelector != nil { + in, out := &in.DomainsSelector, &out.DomainsSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } if in.IssuanceConfig != nil { in, out := &in.IssuanceConfig, &out.IssuanceConfig *out = new(string) @@ -1647,6 +1671,18 @@ func (in *ManagedParameters) DeepCopyInto(out *ManagedParameters) { } } } + if in.DNSAuthorizationsRefs != nil { + in, out := &in.DNSAuthorizationsRefs, &out.DNSAuthorizationsRefs + *out = make([]v1.Reference, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.DNSAuthorizationsSelector != nil { + in, out := &in.DNSAuthorizationsSelector, &out.DNSAuthorizationsSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } if in.Domains != nil { in, out := &in.Domains, &out.Domains *out = make([]*string, len(*in)) @@ -1658,6 +1694,18 @@ func (in *ManagedParameters) DeepCopyInto(out *ManagedParameters) { } } } + if in.DomainsRefs != nil { + in, out := &in.DomainsRefs, &out.DomainsRefs + *out = make([]v1.Reference, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.DomainsSelector != nil { + in, out := &in.DomainsSelector, &out.DomainsSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } if in.IssuanceConfig != nil { in, out := &in.IssuanceConfig, &out.IssuanceConfig *out = new(string) diff --git a/apis/certificatemanager/v1beta1/zz_generated.resolvers.go b/apis/certificatemanager/v1beta1/zz_generated.resolvers.go index d9d03ae39..320d8c939 100644 --- a/apis/certificatemanager/v1beta1/zz_generated.resolvers.go +++ b/apis/certificatemanager/v1beta1/zz_generated.resolvers.go @@ -17,12 +17,109 @@ import ( client "sigs.k8s.io/controller-runtime/pkg/client" ) -func (mg *CertificateMapEntry) ResolveReferences( // ResolveReferences of this CertificateMapEntry. +func (mg *Certificate) ResolveReferences( // ResolveReferences of this Certificate. ctx context.Context, c client.Reader) error { var m xpresource.Managed var l xpresource.ManagedList r := reference.NewAPIResolver(c, mg) + var mrsp reference.MultiResolutionResponse + var err error + + for i3 := 0; i3 < len(mg.Spec.ForProvider.Managed); i3++ { + { + m, l, err = apisresolver.GetManagedResource("certificatemanager.gcp.upbound.io", "v1beta1", "DNSAuthorization", "DNSAuthorizationList") + if err != nil { + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + } + mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ + CurrentValues: reference.FromPtrValues(mg.Spec.ForProvider.Managed[i3].DNSAuthorizations), + Extract: resource.ExtractResourceID(), + References: mg.Spec.ForProvider.Managed[i3].DNSAuthorizationsRefs, + Selector: mg.Spec.ForProvider.Managed[i3].DNSAuthorizationsSelector, + To: reference.To{List: l, Managed: m}, + }) + } + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.Managed[i3].DNSAuthorizations") + } + mg.Spec.ForProvider.Managed[i3].DNSAuthorizations = reference.ToPtrValues(mrsp.ResolvedValues) + mg.Spec.ForProvider.Managed[i3].DNSAuthorizationsRefs = mrsp.ResolvedReferences + + } + for i3 := 0; i3 < len(mg.Spec.ForProvider.Managed); i3++ { + { + m, l, err = apisresolver.GetManagedResource("certificatemanager.gcp.upbound.io", "v1beta1", "DNSAuthorization", "DNSAuthorizationList") + if err != nil { + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + } + mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ + CurrentValues: reference.FromPtrValues(mg.Spec.ForProvider.Managed[i3].Domains), + Extract: resource.ExtractParamPath("domain", false), + References: mg.Spec.ForProvider.Managed[i3].DomainsRefs, + Selector: mg.Spec.ForProvider.Managed[i3].DomainsSelector, + To: reference.To{List: l, Managed: m}, + }) + } + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.Managed[i3].Domains") + } + mg.Spec.ForProvider.Managed[i3].Domains = reference.ToPtrValues(mrsp.ResolvedValues) + mg.Spec.ForProvider.Managed[i3].DomainsRefs = mrsp.ResolvedReferences + + } + for i3 := 0; i3 < len(mg.Spec.InitProvider.Managed); i3++ { + { + m, l, err = apisresolver.GetManagedResource("certificatemanager.gcp.upbound.io", "v1beta1", "DNSAuthorization", "DNSAuthorizationList") + if err != nil { + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + } + mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ + CurrentValues: reference.FromPtrValues(mg.Spec.InitProvider.Managed[i3].DNSAuthorizations), + Extract: resource.ExtractResourceID(), + References: mg.Spec.InitProvider.Managed[i3].DNSAuthorizationsRefs, + Selector: mg.Spec.InitProvider.Managed[i3].DNSAuthorizationsSelector, + To: reference.To{List: l, Managed: m}, + }) + } + if err != nil { + return errors.Wrap(err, "mg.Spec.InitProvider.Managed[i3].DNSAuthorizations") + } + mg.Spec.InitProvider.Managed[i3].DNSAuthorizations = reference.ToPtrValues(mrsp.ResolvedValues) + mg.Spec.InitProvider.Managed[i3].DNSAuthorizationsRefs = mrsp.ResolvedReferences + + } + for i3 := 0; i3 < len(mg.Spec.InitProvider.Managed); i3++ { + { + m, l, err = apisresolver.GetManagedResource("certificatemanager.gcp.upbound.io", "v1beta1", "DNSAuthorization", "DNSAuthorizationList") + if err != nil { + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + } + mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ + CurrentValues: reference.FromPtrValues(mg.Spec.InitProvider.Managed[i3].Domains), + Extract: resource.ExtractParamPath("domain", false), + References: mg.Spec.InitProvider.Managed[i3].DomainsRefs, + Selector: mg.Spec.InitProvider.Managed[i3].DomainsSelector, + To: reference.To{List: l, Managed: m}, + }) + } + if err != nil { + return errors.Wrap(err, "mg.Spec.InitProvider.Managed[i3].Domains") + } + mg.Spec.InitProvider.Managed[i3].Domains = reference.ToPtrValues(mrsp.ResolvedValues) + mg.Spec.InitProvider.Managed[i3].DomainsRefs = mrsp.ResolvedReferences + + } + + return nil +} + +// ResolveReferences of this CertificateMapEntry. +func (mg *CertificateMapEntry) ResolveReferences(ctx context.Context, c client.Reader) error { + var m xpresource.Managed + var l xpresource.ManagedList + r := reference.NewAPIResolver(c, mg) + var rsp reference.ResolutionResponse var mrsp reference.MultiResolutionResponse var err error diff --git a/apis/cloudrun/v1beta1/zz_generated.deepcopy.go b/apis/cloudrun/v1beta1/zz_generated.deepcopy.go index f24b19246..07fc83e6e 100644 --- a/apis/cloudrun/v1beta1/zz_generated.deepcopy.go +++ b/apis/cloudrun/v1beta1/zz_generated.deepcopy.go @@ -102,6 +102,18 @@ func (in *CloudSQLInstanceInitParameters) DeepCopyInto(out *CloudSQLInstanceInit } } } + if in.InstancesRefs != nil { + in, out := &in.InstancesRefs, &out.InstancesRefs + *out = make([]v1.Reference, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.InstancesSelector != nil { + in, out := &in.InstancesSelector, &out.InstancesSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CloudSQLInstanceInitParameters. @@ -154,6 +166,18 @@ func (in *CloudSQLInstanceParameters) DeepCopyInto(out *CloudSQLInstanceParamete } } } + if in.InstancesRefs != nil { + in, out := &in.InstancesRefs, &out.InstancesRefs + *out = make([]v1.Reference, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.InstancesSelector != nil { + in, out := &in.InstancesSelector, &out.InstancesSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CloudSQLInstanceParameters. @@ -10965,6 +10989,18 @@ func (in *VolumesCloudSQLInstanceInitParameters) DeepCopyInto(out *VolumesCloudS } } } + if in.InstancesRefs != nil { + in, out := &in.InstancesRefs, &out.InstancesRefs + *out = make([]v1.Reference, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.InstancesSelector != nil { + in, out := &in.InstancesSelector, &out.InstancesSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumesCloudSQLInstanceInitParameters. @@ -11017,6 +11053,18 @@ func (in *VolumesCloudSQLInstanceParameters) DeepCopyInto(out *VolumesCloudSQLIn } } } + if in.InstancesRefs != nil { + in, out := &in.InstancesRefs, &out.InstancesRefs + *out = make([]v1.Reference, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.InstancesSelector != nil { + in, out := &in.InstancesSelector, &out.InstancesSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumesCloudSQLInstanceParameters. diff --git a/apis/cloudrun/v1beta1/zz_generated.resolvers.go b/apis/cloudrun/v1beta1/zz_generated.resolvers.go index b446fa6e5..004c68826 100644 --- a/apis/cloudrun/v1beta1/zz_generated.resolvers.go +++ b/apis/cloudrun/v1beta1/zz_generated.resolvers.go @@ -9,6 +9,7 @@ package v1beta1 import ( "context" reference "github.com/crossplane/crossplane-runtime/pkg/reference" + resource "github.com/crossplane/upjet/pkg/resource" errors "github.com/pkg/errors" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" @@ -379,6 +380,7 @@ func (mg *V2Job) ResolveReferences(ctx context.Context, c client.Reader) error { r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse + var mrsp reference.MultiResolutionResponse var err error for i3 := 0; i3 < len(mg.Spec.ForProvider.Template); i3++ { @@ -412,6 +414,33 @@ func (mg *V2Job) ResolveReferences(ctx context.Context, c client.Reader) error { } } } + for i3 := 0; i3 < len(mg.Spec.ForProvider.Template); i3++ { + for i4 := 0; i4 < len(mg.Spec.ForProvider.Template[i3].Template); i4++ { + for i5 := 0; i5 < len(mg.Spec.ForProvider.Template[i3].Template[i4].Volumes); i5++ { + for i6 := 0; i6 < len(mg.Spec.ForProvider.Template[i3].Template[i4].Volumes[i5].CloudSQLInstance); i6++ { + { + m, l, err = apisresolver.GetManagedResource("sql.gcp.upbound.io", "v1beta2", "DatabaseInstance", "DatabaseInstanceList") + if err != nil { + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + } + mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ + CurrentValues: reference.FromPtrValues(mg.Spec.ForProvider.Template[i3].Template[i4].Volumes[i5].CloudSQLInstance[i6].Instances), + Extract: resource.ExtractParamPath("connection_name", true), + References: mg.Spec.ForProvider.Template[i3].Template[i4].Volumes[i5].CloudSQLInstance[i6].InstancesRefs, + Selector: mg.Spec.ForProvider.Template[i3].Template[i4].Volumes[i5].CloudSQLInstance[i6].InstancesSelector, + To: reference.To{List: l, Managed: m}, + }) + } + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.Template[i3].Template[i4].Volumes[i5].CloudSQLInstance[i6].Instances") + } + mg.Spec.ForProvider.Template[i3].Template[i4].Volumes[i5].CloudSQLInstance[i6].Instances = reference.ToPtrValues(mrsp.ResolvedValues) + mg.Spec.ForProvider.Template[i3].Template[i4].Volumes[i5].CloudSQLInstance[i6].InstancesRefs = mrsp.ResolvedReferences + + } + } + } + } for i3 := 0; i3 < len(mg.Spec.ForProvider.Template); i3++ { for i4 := 0; i4 < len(mg.Spec.ForProvider.Template[i3].Template); i4++ { for i5 := 0; i5 < len(mg.Spec.ForProvider.Template[i3].Template[i4].Volumes); i5++ { @@ -470,6 +499,33 @@ func (mg *V2Job) ResolveReferences(ctx context.Context, c client.Reader) error { } } } + for i3 := 0; i3 < len(mg.Spec.InitProvider.Template); i3++ { + for i4 := 0; i4 < len(mg.Spec.InitProvider.Template[i3].Template); i4++ { + for i5 := 0; i5 < len(mg.Spec.InitProvider.Template[i3].Template[i4].Volumes); i5++ { + for i6 := 0; i6 < len(mg.Spec.InitProvider.Template[i3].Template[i4].Volumes[i5].CloudSQLInstance); i6++ { + { + m, l, err = apisresolver.GetManagedResource("sql.gcp.upbound.io", "v1beta2", "DatabaseInstance", "DatabaseInstanceList") + if err != nil { + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + } + mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ + CurrentValues: reference.FromPtrValues(mg.Spec.InitProvider.Template[i3].Template[i4].Volumes[i5].CloudSQLInstance[i6].Instances), + Extract: resource.ExtractParamPath("connection_name", true), + References: mg.Spec.InitProvider.Template[i3].Template[i4].Volumes[i5].CloudSQLInstance[i6].InstancesRefs, + Selector: mg.Spec.InitProvider.Template[i3].Template[i4].Volumes[i5].CloudSQLInstance[i6].InstancesSelector, + To: reference.To{List: l, Managed: m}, + }) + } + if err != nil { + return errors.Wrap(err, "mg.Spec.InitProvider.Template[i3].Template[i4].Volumes[i5].CloudSQLInstance[i6].Instances") + } + mg.Spec.InitProvider.Template[i3].Template[i4].Volumes[i5].CloudSQLInstance[i6].Instances = reference.ToPtrValues(mrsp.ResolvedValues) + mg.Spec.InitProvider.Template[i3].Template[i4].Volumes[i5].CloudSQLInstance[i6].InstancesRefs = mrsp.ResolvedReferences + + } + } + } + } for i3 := 0; i3 < len(mg.Spec.InitProvider.Template); i3++ { for i4 := 0; i4 < len(mg.Spec.InitProvider.Template[i3].Template); i4++ { for i5 := 0; i5 < len(mg.Spec.InitProvider.Template[i3].Template[i4].Volumes); i5++ { @@ -508,6 +564,7 @@ func (mg *V2Service) ResolveReferences(ctx context.Context, c client.Reader) err r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse + var mrsp reference.MultiResolutionResponse var err error for i3 := 0; i3 < len(mg.Spec.ForProvider.Template); i3++ { @@ -539,6 +596,31 @@ func (mg *V2Service) ResolveReferences(ctx context.Context, c client.Reader) err } } } + for i3 := 0; i3 < len(mg.Spec.ForProvider.Template); i3++ { + for i4 := 0; i4 < len(mg.Spec.ForProvider.Template[i3].Volumes); i4++ { + for i5 := 0; i5 < len(mg.Spec.ForProvider.Template[i3].Volumes[i4].CloudSQLInstance); i5++ { + { + m, l, err = apisresolver.GetManagedResource("sql.gcp.upbound.io", "v1beta2", "DatabaseInstance", "DatabaseInstanceList") + if err != nil { + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + } + mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ + CurrentValues: reference.FromPtrValues(mg.Spec.ForProvider.Template[i3].Volumes[i4].CloudSQLInstance[i5].Instances), + Extract: resource.ExtractParamPath("connection_name", true), + References: mg.Spec.ForProvider.Template[i3].Volumes[i4].CloudSQLInstance[i5].InstancesRefs, + Selector: mg.Spec.ForProvider.Template[i3].Volumes[i4].CloudSQLInstance[i5].InstancesSelector, + To: reference.To{List: l, Managed: m}, + }) + } + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.Template[i3].Volumes[i4].CloudSQLInstance[i5].Instances") + } + mg.Spec.ForProvider.Template[i3].Volumes[i4].CloudSQLInstance[i5].Instances = reference.ToPtrValues(mrsp.ResolvedValues) + mg.Spec.ForProvider.Template[i3].Volumes[i4].CloudSQLInstance[i5].InstancesRefs = mrsp.ResolvedReferences + + } + } + } for i3 := 0; i3 < len(mg.Spec.ForProvider.Template); i3++ { for i4 := 0; i4 < len(mg.Spec.ForProvider.Template[i3].Volumes); i4++ { for i5 := 0; i5 < len(mg.Spec.ForProvider.Template[i3].Volumes[i4].Gcs); i5++ { @@ -618,6 +700,31 @@ func (mg *V2Service) ResolveReferences(ctx context.Context, c client.Reader) err } } } + for i3 := 0; i3 < len(mg.Spec.InitProvider.Template); i3++ { + for i4 := 0; i4 < len(mg.Spec.InitProvider.Template[i3].Volumes); i4++ { + for i5 := 0; i5 < len(mg.Spec.InitProvider.Template[i3].Volumes[i4].CloudSQLInstance); i5++ { + { + m, l, err = apisresolver.GetManagedResource("sql.gcp.upbound.io", "v1beta2", "DatabaseInstance", "DatabaseInstanceList") + if err != nil { + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + } + mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ + CurrentValues: reference.FromPtrValues(mg.Spec.InitProvider.Template[i3].Volumes[i4].CloudSQLInstance[i5].Instances), + Extract: resource.ExtractParamPath("connection_name", true), + References: mg.Spec.InitProvider.Template[i3].Volumes[i4].CloudSQLInstance[i5].InstancesRefs, + Selector: mg.Spec.InitProvider.Template[i3].Volumes[i4].CloudSQLInstance[i5].InstancesSelector, + To: reference.To{List: l, Managed: m}, + }) + } + if err != nil { + return errors.Wrap(err, "mg.Spec.InitProvider.Template[i3].Volumes[i4].CloudSQLInstance[i5].Instances") + } + mg.Spec.InitProvider.Template[i3].Volumes[i4].CloudSQLInstance[i5].Instances = reference.ToPtrValues(mrsp.ResolvedValues) + mg.Spec.InitProvider.Template[i3].Volumes[i4].CloudSQLInstance[i5].InstancesRefs = mrsp.ResolvedReferences + + } + } + } for i3 := 0; i3 < len(mg.Spec.InitProvider.Template); i3++ { for i4 := 0; i4 < len(mg.Spec.InitProvider.Template[i3].Volumes); i4++ { for i5 := 0; i5 < len(mg.Spec.InitProvider.Template[i3].Volumes[i4].Gcs); i5++ { diff --git a/apis/cloudrun/v1beta1/zz_v2job_types.go b/apis/cloudrun/v1beta1/zz_v2job_types.go index 76af017b5..602969b0e 100755 --- a/apis/cloudrun/v1beta1/zz_v2job_types.go +++ b/apis/cloudrun/v1beta1/zz_v2job_types.go @@ -45,7 +45,17 @@ type BinaryAuthorizationParameters struct { type CloudSQLInstanceInitParameters struct { // The Cloud SQL instance connection names, as can be found in https://console.cloud.google.com/sql/instances. Visit https://cloud.google.com/sql/docs/mysql/connect-run for more information on how to connect Cloud SQL and Cloud Run. Format: {project}:{location}:{instance} + // +crossplane:generate:reference:type=github.com/upbound/provider-gcp/apis/sql/v1beta2.DatabaseInstance + // +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractParamPath("connection_name",true) Instances []*string `json:"instances,omitempty" tf:"instances,omitempty"` + + // References to DatabaseInstance in sql to populate instances. + // +kubebuilder:validation:Optional + InstancesRefs []v1.Reference `json:"instancesRefs,omitempty" tf:"-"` + + // Selector for a list of DatabaseInstance in sql to populate instances. + // +kubebuilder:validation:Optional + InstancesSelector *v1.Selector `json:"instancesSelector,omitempty" tf:"-"` } type CloudSQLInstanceObservation struct { @@ -57,8 +67,18 @@ type CloudSQLInstanceObservation struct { type CloudSQLInstanceParameters struct { // The Cloud SQL instance connection names, as can be found in https://console.cloud.google.com/sql/instances. Visit https://cloud.google.com/sql/docs/mysql/connect-run for more information on how to connect Cloud SQL and Cloud Run. Format: {project}:{location}:{instance} + // +crossplane:generate:reference:type=github.com/upbound/provider-gcp/apis/sql/v1beta2.DatabaseInstance + // +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractParamPath("connection_name",true) // +kubebuilder:validation:Optional Instances []*string `json:"instances,omitempty" tf:"instances,omitempty"` + + // References to DatabaseInstance in sql to populate instances. + // +kubebuilder:validation:Optional + InstancesRefs []v1.Reference `json:"instancesRefs,omitempty" tf:"-"` + + // Selector for a list of DatabaseInstance in sql to populate instances. + // +kubebuilder:validation:Optional + InstancesSelector *v1.Selector `json:"instancesSelector,omitempty" tf:"-"` } type ContainersEnvInitParameters struct { diff --git a/apis/cloudrun/v1beta1/zz_v2service_types.go b/apis/cloudrun/v1beta1/zz_v2service_types.go index 8396cb9ff..398c27899 100755 --- a/apis/cloudrun/v1beta1/zz_v2service_types.go +++ b/apis/cloudrun/v1beta1/zz_v2service_types.go @@ -1822,8 +1822,18 @@ type VPCAccessNetworkInterfacesParameters struct { type VolumesCloudSQLInstanceInitParameters struct { // The Cloud SQL instance connection names, as can be found in https://console.cloud.google.com/sql/instances. Visit https://cloud.google.com/sql/docs/mysql/connect-run for more information on how to connect Cloud SQL and Cloud Run. Format: {project}:{location}:{instance} + // +crossplane:generate:reference:type=github.com/upbound/provider-gcp/apis/sql/v1beta2.DatabaseInstance + // +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractParamPath("connection_name",true) // +listType=set Instances []*string `json:"instances,omitempty" tf:"instances,omitempty"` + + // References to DatabaseInstance in sql to populate instances. + // +kubebuilder:validation:Optional + InstancesRefs []v1.Reference `json:"instancesRefs,omitempty" tf:"-"` + + // Selector for a list of DatabaseInstance in sql to populate instances. + // +kubebuilder:validation:Optional + InstancesSelector *v1.Selector `json:"instancesSelector,omitempty" tf:"-"` } type VolumesCloudSQLInstanceObservation struct { @@ -1836,9 +1846,19 @@ type VolumesCloudSQLInstanceObservation struct { type VolumesCloudSQLInstanceParameters struct { // The Cloud SQL instance connection names, as can be found in https://console.cloud.google.com/sql/instances. Visit https://cloud.google.com/sql/docs/mysql/connect-run for more information on how to connect Cloud SQL and Cloud Run. Format: {project}:{location}:{instance} + // +crossplane:generate:reference:type=github.com/upbound/provider-gcp/apis/sql/v1beta2.DatabaseInstance + // +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractParamPath("connection_name",true) // +kubebuilder:validation:Optional // +listType=set Instances []*string `json:"instances,omitempty" tf:"instances,omitempty"` + + // References to DatabaseInstance in sql to populate instances. + // +kubebuilder:validation:Optional + InstancesRefs []v1.Reference `json:"instancesRefs,omitempty" tf:"-"` + + // Selector for a list of DatabaseInstance in sql to populate instances. + // +kubebuilder:validation:Optional + InstancesSelector *v1.Selector `json:"instancesSelector,omitempty" tf:"-"` } type VolumesSecretItemsInitParameters struct { diff --git a/apis/compute/v1beta1/zz_generated.deepcopy.go b/apis/compute/v1beta1/zz_generated.deepcopy.go index 734dc72ca..dc3cd219f 100644 --- a/apis/compute/v1beta1/zz_generated.deepcopy.go +++ b/apis/compute/v1beta1/zz_generated.deepcopy.go @@ -192,6 +192,18 @@ func (in *ActionInitParameters) DeepCopyInto(out *ActionInitParameters) { } } } + if in.SourceNATActiveIpsRefs != nil { + in, out := &in.SourceNATActiveIpsRefs, &out.SourceNATActiveIpsRefs + *out = make([]v1.Reference, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.SourceNATActiveIpsSelector != nil { + in, out := &in.SourceNATActiveIpsSelector, &out.SourceNATActiveIpsSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } if in.SourceNATDrainIps != nil { in, out := &in.SourceNATDrainIps, &out.SourceNATDrainIps *out = make([]*string, len(*in)) @@ -266,6 +278,18 @@ func (in *ActionParameters) DeepCopyInto(out *ActionParameters) { } } } + if in.SourceNATActiveIpsRefs != nil { + in, out := &in.SourceNATActiveIpsRefs, &out.SourceNATActiveIpsRefs + *out = make([]v1.Reference, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.SourceNATActiveIpsSelector != nil { + in, out := &in.SourceNATActiveIpsSelector, &out.SourceNATActiveIpsSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } if in.SourceNATDrainIps != nil { in, out := &in.SourceNATDrainIps, &out.SourceNATDrainIps *out = make([]*string, len(*in)) @@ -26520,6 +26544,18 @@ func (in *InstanceTemplateDiskInitParameters) DeepCopyInto(out *InstanceTemplate } } } + if in.ResourcePoliciesRefs != nil { + in, out := &in.ResourcePoliciesRefs, &out.ResourcePoliciesRefs + *out = make([]v1.Reference, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.ResourcePoliciesSelector != nil { + in, out := &in.ResourcePoliciesSelector, &out.ResourcePoliciesSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } if in.Source != nil { in, out := &in.Source, &out.Source *out = new(string) @@ -26818,6 +26854,18 @@ func (in *InstanceTemplateDiskParameters) DeepCopyInto(out *InstanceTemplateDisk } } } + if in.ResourcePoliciesRefs != nil { + in, out := &in.ResourcePoliciesRefs, &out.ResourcePoliciesRefs + *out = make([]v1.Reference, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.ResourcePoliciesSelector != nil { + in, out := &in.ResourcePoliciesSelector, &out.ResourcePoliciesSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } if in.Source != nil { in, out := &in.Source, &out.Source *out = new(string) @@ -61647,6 +61695,18 @@ func (in *RouterNATInitParameters) DeepCopyInto(out *RouterNATInitParameters) { } } } + if in.NATIpsRefs != nil { + in, out := &in.NATIpsRefs, &out.NATIpsRefs + *out = make([]v1.Reference, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.NATIpsSelector != nil { + in, out := &in.NATIpsSelector, &out.NATIpsSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } if in.Project != nil { in, out := &in.Project, &out.Project *out = new(string) @@ -62037,6 +62097,18 @@ func (in *RouterNATParameters) DeepCopyInto(out *RouterNATParameters) { } } } + if in.NATIpsRefs != nil { + in, out := &in.NATIpsRefs, &out.NATIpsRefs + *out = make([]v1.Reference, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.NATIpsSelector != nil { + in, out := &in.NATIpsSelector, &out.NATIpsSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } if in.Project != nil { in, out := &in.Project, &out.Project *out = new(string) diff --git a/apis/compute/v1beta1/zz_generated.resolvers.go b/apis/compute/v1beta1/zz_generated.resolvers.go index f2a491047..f043d29da 100644 --- a/apis/compute/v1beta1/zz_generated.resolvers.go +++ b/apis/compute/v1beta1/zz_generated.resolvers.go @@ -2156,8 +2156,30 @@ func (mg *InstanceTemplate) ResolveReferences(ctx context.Context, c client.Read r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse + var mrsp reference.MultiResolutionResponse var err error + for i3 := 0; i3 < len(mg.Spec.ForProvider.Disk); i3++ { + { + m, l, err = apisresolver.GetManagedResource("compute.gcp.upbound.io", "v1beta2", "ResourcePolicy", "ResourcePolicyList") + if err != nil { + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + } + mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ + CurrentValues: reference.FromPtrValues(mg.Spec.ForProvider.Disk[i3].ResourcePolicies), + Extract: resource.ExtractResourceID(), + References: mg.Spec.ForProvider.Disk[i3].ResourcePoliciesRefs, + Selector: mg.Spec.ForProvider.Disk[i3].ResourcePoliciesSelector, + To: reference.To{List: l, Managed: m}, + }) + } + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.Disk[i3].ResourcePolicies") + } + mg.Spec.ForProvider.Disk[i3].ResourcePolicies = reference.ToPtrValues(mrsp.ResolvedValues) + mg.Spec.ForProvider.Disk[i3].ResourcePoliciesRefs = mrsp.ResolvedReferences + + } for i3 := 0; i3 < len(mg.Spec.ForProvider.Disk); i3++ { { m, l, err = apisresolver.GetManagedResource("compute.gcp.upbound.io", "v1beta1", "Disk", "DiskList") @@ -2241,6 +2263,27 @@ func (mg *InstanceTemplate) ResolveReferences(ctx context.Context, c client.Read mg.Spec.ForProvider.ServiceAccount[i3].Email = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.ServiceAccount[i3].EmailRef = rsp.ResolvedReference + } + for i3 := 0; i3 < len(mg.Spec.InitProvider.Disk); i3++ { + { + m, l, err = apisresolver.GetManagedResource("compute.gcp.upbound.io", "v1beta2", "ResourcePolicy", "ResourcePolicyList") + if err != nil { + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + } + mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ + CurrentValues: reference.FromPtrValues(mg.Spec.InitProvider.Disk[i3].ResourcePolicies), + Extract: resource.ExtractResourceID(), + References: mg.Spec.InitProvider.Disk[i3].ResourcePoliciesRefs, + Selector: mg.Spec.InitProvider.Disk[i3].ResourcePoliciesSelector, + To: reference.To{List: l, Managed: m}, + }) + } + if err != nil { + return errors.Wrap(err, "mg.Spec.InitProvider.Disk[i3].ResourcePolicies") + } + mg.Spec.InitProvider.Disk[i3].ResourcePolicies = reference.ToPtrValues(mrsp.ResolvedValues) + mg.Spec.InitProvider.Disk[i3].ResourcePoliciesRefs = mrsp.ResolvedReferences + } for i3 := 0; i3 < len(mg.Spec.InitProvider.Disk); i3++ { { @@ -5100,7 +5143,27 @@ func (mg *RouterNAT) ResolveReferences(ctx context.Context, c client.Reader) err r := reference.NewAPIResolver(c, mg) var rsp reference.ResolutionResponse + var mrsp reference.MultiResolutionResponse var err error + { + m, l, err = apisresolver.GetManagedResource("compute.gcp.upbound.io", "v1beta1", "Address", "AddressList") + if err != nil { + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + } + + mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ + CurrentValues: reference.FromPtrValues(mg.Spec.ForProvider.NATIps), + Extract: resource.ExtractParamPath("self_link", true), + References: mg.Spec.ForProvider.NATIpsRefs, + Selector: mg.Spec.ForProvider.NATIpsSelector, + To: reference.To{List: l, Managed: m}, + }) + } + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.NATIps") + } + mg.Spec.ForProvider.NATIps = reference.ToPtrValues(mrsp.ResolvedValues) + mg.Spec.ForProvider.NATIpsRefs = mrsp.ResolvedReferences { m, l, err = apisresolver.GetManagedResource("compute.gcp.upbound.io", "v1beta1", "Router", "RouterList") if err != nil { @@ -5121,6 +5184,29 @@ func (mg *RouterNAT) ResolveReferences(ctx context.Context, c client.Reader) err mg.Spec.ForProvider.Router = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.RouterRef = rsp.ResolvedReference + for i3 := 0; i3 < len(mg.Spec.ForProvider.Rules); i3++ { + for i4 := 0; i4 < len(mg.Spec.ForProvider.Rules[i3].Action); i4++ { + { + m, l, err = apisresolver.GetManagedResource("compute.gcp.upbound.io", "v1beta1", "Address", "AddressList") + if err != nil { + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + } + mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ + CurrentValues: reference.FromPtrValues(mg.Spec.ForProvider.Rules[i3].Action[i4].SourceNATActiveIps), + Extract: resource.ExtractParamPath("self_link", true), + References: mg.Spec.ForProvider.Rules[i3].Action[i4].SourceNATActiveIpsRefs, + Selector: mg.Spec.ForProvider.Rules[i3].Action[i4].SourceNATActiveIpsSelector, + To: reference.To{List: l, Managed: m}, + }) + } + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.Rules[i3].Action[i4].SourceNATActiveIps") + } + mg.Spec.ForProvider.Rules[i3].Action[i4].SourceNATActiveIps = reference.ToPtrValues(mrsp.ResolvedValues) + mg.Spec.ForProvider.Rules[i3].Action[i4].SourceNATActiveIpsRefs = mrsp.ResolvedReferences + + } + } for i3 := 0; i3 < len(mg.Spec.ForProvider.Subnetwork); i3++ { { m, l, err = apisresolver.GetManagedResource("compute.gcp.upbound.io", "v1beta1", "Subnetwork", "SubnetworkList") @@ -5142,6 +5228,48 @@ func (mg *RouterNAT) ResolveReferences(ctx context.Context, c client.Reader) err mg.Spec.ForProvider.Subnetwork[i3].NameRef = rsp.ResolvedReference } + { + m, l, err = apisresolver.GetManagedResource("compute.gcp.upbound.io", "v1beta1", "Address", "AddressList") + if err != nil { + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + } + mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ + CurrentValues: reference.FromPtrValues(mg.Spec.InitProvider.NATIps), + Extract: resource.ExtractParamPath("self_link", true), + References: mg.Spec.InitProvider.NATIpsRefs, + Selector: mg.Spec.InitProvider.NATIpsSelector, + To: reference.To{List: l, Managed: m}, + }) + } + if err != nil { + return errors.Wrap(err, "mg.Spec.InitProvider.NATIps") + } + mg.Spec.InitProvider.NATIps = reference.ToPtrValues(mrsp.ResolvedValues) + mg.Spec.InitProvider.NATIpsRefs = mrsp.ResolvedReferences + + for i3 := 0; i3 < len(mg.Spec.InitProvider.Rules); i3++ { + for i4 := 0; i4 < len(mg.Spec.InitProvider.Rules[i3].Action); i4++ { + { + m, l, err = apisresolver.GetManagedResource("compute.gcp.upbound.io", "v1beta1", "Address", "AddressList") + if err != nil { + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + } + mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ + CurrentValues: reference.FromPtrValues(mg.Spec.InitProvider.Rules[i3].Action[i4].SourceNATActiveIps), + Extract: resource.ExtractParamPath("self_link", true), + References: mg.Spec.InitProvider.Rules[i3].Action[i4].SourceNATActiveIpsRefs, + Selector: mg.Spec.InitProvider.Rules[i3].Action[i4].SourceNATActiveIpsSelector, + To: reference.To{List: l, Managed: m}, + }) + } + if err != nil { + return errors.Wrap(err, "mg.Spec.InitProvider.Rules[i3].Action[i4].SourceNATActiveIps") + } + mg.Spec.InitProvider.Rules[i3].Action[i4].SourceNATActiveIps = reference.ToPtrValues(mrsp.ResolvedValues) + mg.Spec.InitProvider.Rules[i3].Action[i4].SourceNATActiveIpsRefs = mrsp.ResolvedReferences + + } + } for i3 := 0; i3 < len(mg.Spec.InitProvider.Subnetwork); i3++ { { m, l, err = apisresolver.GetManagedResource("compute.gcp.upbound.io", "v1beta1", "Subnetwork", "SubnetworkList") diff --git a/apis/compute/v1beta1/zz_instancetemplate_types.go b/apis/compute/v1beta1/zz_instancetemplate_types.go index dfe8ccc8b..827ff8269 100755 --- a/apis/compute/v1beta1/zz_instancetemplate_types.go +++ b/apis/compute/v1beta1/zz_instancetemplate_types.go @@ -236,8 +236,18 @@ type InstanceTemplateDiskInitParameters struct { ResourceManagerTags map[string]*string `json:"resourceManagerTags,omitempty" tf:"resource_manager_tags,omitempty"` // - A list (short name or id) of resource policies to attach to this disk for automatic snapshot creations. Currently a max of 1 resource policy is supported. + // +crossplane:generate:reference:type=github.com/upbound/provider-gcp/apis/compute/v1beta2.ResourcePolicy + // +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractResourceID() ResourcePolicies []*string `json:"resourcePolicies,omitempty" tf:"resource_policies,omitempty"` + // References to ResourcePolicy in compute to populate resourcePolicies. + // +kubebuilder:validation:Optional + ResourcePoliciesRefs []v1.Reference `json:"resourcePoliciesRefs,omitempty" tf:"-"` + + // Selector for a list of ResourcePolicy in compute to populate resourcePolicies. + // +kubebuilder:validation:Optional + ResourcePoliciesSelector *v1.Selector `json:"resourcePoliciesSelector,omitempty" tf:"-"` + // The name (not self_link) // of the disk (such as those managed by google_compute_disk) to attach. // ~> Note: Either source, source_image, or source_snapshot is required in a disk block unless the disk type is local-ssd. Check the API docs for details. @@ -441,9 +451,19 @@ type InstanceTemplateDiskParameters struct { ResourceManagerTags map[string]*string `json:"resourceManagerTags,omitempty" tf:"resource_manager_tags,omitempty"` // - A list (short name or id) of resource policies to attach to this disk for automatic snapshot creations. Currently a max of 1 resource policy is supported. + // +crossplane:generate:reference:type=github.com/upbound/provider-gcp/apis/compute/v1beta2.ResourcePolicy + // +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractResourceID() // +kubebuilder:validation:Optional ResourcePolicies []*string `json:"resourcePolicies,omitempty" tf:"resource_policies,omitempty"` + // References to ResourcePolicy in compute to populate resourcePolicies. + // +kubebuilder:validation:Optional + ResourcePoliciesRefs []v1.Reference `json:"resourcePoliciesRefs,omitempty" tf:"-"` + + // Selector for a list of ResourcePolicy in compute to populate resourcePolicies. + // +kubebuilder:validation:Optional + ResourcePoliciesSelector *v1.Selector `json:"resourcePoliciesSelector,omitempty" tf:"-"` + // The name (not self_link) // of the disk (such as those managed by google_compute_disk) to attach. // ~> Note: Either source, source_image, or source_snapshot is required in a disk block unless the disk type is local-ssd. Check the API docs for details. diff --git a/apis/compute/v1beta1/zz_routernat_types.go b/apis/compute/v1beta1/zz_routernat_types.go index 6b9c2bd72..d27a7ea88 100755 --- a/apis/compute/v1beta1/zz_routernat_types.go +++ b/apis/compute/v1beta1/zz_routernat_types.go @@ -18,9 +18,19 @@ type ActionInitParameters struct { // A list of URLs of the IP resources used for this NAT rule. // These IP addresses must be valid static external IP addresses assigned to the project. // This field is used for public NAT. + // +crossplane:generate:reference:type=github.com/upbound/provider-gcp/apis/compute/v1beta1.Address + // +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractParamPath("self_link",true) // +listType=set SourceNATActiveIps []*string `json:"sourceNatActiveIps,omitempty" tf:"source_nat_active_ips,omitempty"` + // References to Address in compute to populate sourceNatActiveIps. + // +kubebuilder:validation:Optional + SourceNATActiveIpsRefs []v1.Reference `json:"sourceNatActiveIpsRefs,omitempty" tf:"-"` + + // Selector for a list of Address in compute to populate sourceNatActiveIps. + // +kubebuilder:validation:Optional + SourceNATActiveIpsSelector *v1.Selector `json:"sourceNatActiveIpsSelector,omitempty" tf:"-"` + // A list of URLs of the IP resources to be drained. // These IPs must be valid static external IPs that have been assigned to the NAT. // These IPs should be used for updating/patching a NAT rule only. @@ -50,10 +60,20 @@ type ActionParameters struct { // A list of URLs of the IP resources used for this NAT rule. // These IP addresses must be valid static external IP addresses assigned to the project. // This field is used for public NAT. + // +crossplane:generate:reference:type=github.com/upbound/provider-gcp/apis/compute/v1beta1.Address + // +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractParamPath("self_link",true) // +kubebuilder:validation:Optional // +listType=set SourceNATActiveIps []*string `json:"sourceNatActiveIps,omitempty" tf:"source_nat_active_ips,omitempty"` + // References to Address in compute to populate sourceNatActiveIps. + // +kubebuilder:validation:Optional + SourceNATActiveIpsRefs []v1.Reference `json:"sourceNatActiveIpsRefs,omitempty" tf:"-"` + + // Selector for a list of Address in compute to populate sourceNatActiveIps. + // +kubebuilder:validation:Optional + SourceNATActiveIpsSelector *v1.Selector `json:"sourceNatActiveIpsSelector,omitempty" tf:"-"` + // A list of URLs of the IP resources to be drained. // These IPs must be valid static external IPs that have been assigned to the NAT. // These IPs should be used for updating/patching a NAT rule only. @@ -116,9 +136,19 @@ type RouterNATInitParameters struct { // Self-links of NAT IPs. Only valid if natIpAllocateOption // is set to MANUAL_ONLY. + // +crossplane:generate:reference:type=github.com/upbound/provider-gcp/apis/compute/v1beta1.Address + // +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractParamPath("self_link",true) // +listType=set NATIps []*string `json:"natIps,omitempty" tf:"nat_ips,omitempty"` + // References to Address in compute to populate natIps. + // +kubebuilder:validation:Optional + NATIpsRefs []v1.Reference `json:"natIpsRefs,omitempty" tf:"-"` + + // Selector for a list of Address in compute to populate natIps. + // +kubebuilder:validation:Optional + NATIpsSelector *v1.Selector `json:"natIpsSelector,omitempty" tf:"-"` + // The ID of the project in which the resource belongs. // If it is not provided, the provider project is used. Project *string `json:"project,omitempty" tf:"project,omitempty"` @@ -363,10 +393,20 @@ type RouterNATParameters struct { // Self-links of NAT IPs. Only valid if natIpAllocateOption // is set to MANUAL_ONLY. + // +crossplane:generate:reference:type=github.com/upbound/provider-gcp/apis/compute/v1beta1.Address + // +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractParamPath("self_link",true) // +kubebuilder:validation:Optional // +listType=set NATIps []*string `json:"natIps,omitempty" tf:"nat_ips,omitempty"` + // References to Address in compute to populate natIps. + // +kubebuilder:validation:Optional + NATIpsRefs []v1.Reference `json:"natIpsRefs,omitempty" tf:"-"` + + // Selector for a list of Address in compute to populate natIps. + // +kubebuilder:validation:Optional + NATIpsSelector *v1.Selector `json:"natIpsSelector,omitempty" tf:"-"` + // The ID of the project in which the resource belongs. // If it is not provided, the provider project is used. // +kubebuilder:validation:Optional diff --git a/apis/osconfig/v1beta1/zz_generated.deepcopy.go b/apis/osconfig/v1beta1/zz_generated.deepcopy.go index 325388b36..c664836a1 100644 --- a/apis/osconfig/v1beta1/zz_generated.deepcopy.go +++ b/apis/osconfig/v1beta1/zz_generated.deepcopy.go @@ -9,6 +9,7 @@ package v1beta1 import ( + "github.com/crossplane/crossplane-runtime/apis/common/v1" runtime "k8s.io/apimachinery/pkg/runtime" ) @@ -3944,6 +3945,18 @@ func (in *PatchDeploymentInstanceFilterInitParameters) DeepCopyInto(out *PatchDe } } } + if in.InstancesRefs != nil { + in, out := &in.InstancesRefs, &out.InstancesRefs + *out = make([]v1.Reference, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.InstancesSelector != nil { + in, out := &in.InstancesSelector, &out.InstancesSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } if in.Zones != nil { in, out := &in.Zones, &out.Zones *out = make([]*string, len(*in)) @@ -4064,6 +4077,18 @@ func (in *PatchDeploymentInstanceFilterParameters) DeepCopyInto(out *PatchDeploy } } } + if in.InstancesRefs != nil { + in, out := &in.InstancesRefs, &out.InstancesRefs + *out = make([]v1.Reference, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.InstancesSelector != nil { + in, out := &in.InstancesSelector, &out.InstancesSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } if in.Zones != nil { in, out := &in.Zones, &out.Zones *out = make([]*string, len(*in)) diff --git a/apis/osconfig/v1beta1/zz_generated.resolvers.go b/apis/osconfig/v1beta1/zz_generated.resolvers.go new file mode 100644 index 000000000..80fae2434 --- /dev/null +++ b/apis/osconfig/v1beta1/zz_generated.resolvers.go @@ -0,0 +1,73 @@ +// SPDX-FileCopyrightText: 2024 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 +// Code generated by angryjet. DO NOT EDIT. +// Code transformed by upjet. DO NOT EDIT. + +package v1beta1 + +import ( + "context" + reference "github.com/crossplane/crossplane-runtime/pkg/reference" + resource "github.com/crossplane/upjet/pkg/resource" + errors "github.com/pkg/errors" + + xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" + apisresolver "github.com/upbound/provider-gcp/internal/apis" + client "sigs.k8s.io/controller-runtime/pkg/client" +) + +func (mg *PatchDeployment) ResolveReferences( // ResolveReferences of this PatchDeployment. + ctx context.Context, c client.Reader) error { + var m xpresource.Managed + var l xpresource.ManagedList + r := reference.NewAPIResolver(c, mg) + + var mrsp reference.MultiResolutionResponse + var err error + + for i3 := 0; i3 < len(mg.Spec.ForProvider.InstanceFilter); i3++ { + { + m, l, err = apisresolver.GetManagedResource("compute.gcp.upbound.io", "v1beta2", "Instance", "InstanceList") + if err != nil { + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + } + mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ + CurrentValues: reference.FromPtrValues(mg.Spec.ForProvider.InstanceFilter[i3].Instances), + Extract: resource.ExtractResourceID(), + References: mg.Spec.ForProvider.InstanceFilter[i3].InstancesRefs, + Selector: mg.Spec.ForProvider.InstanceFilter[i3].InstancesSelector, + To: reference.To{List: l, Managed: m}, + }) + } + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.InstanceFilter[i3].Instances") + } + mg.Spec.ForProvider.InstanceFilter[i3].Instances = reference.ToPtrValues(mrsp.ResolvedValues) + mg.Spec.ForProvider.InstanceFilter[i3].InstancesRefs = mrsp.ResolvedReferences + + } + for i3 := 0; i3 < len(mg.Spec.InitProvider.InstanceFilter); i3++ { + { + m, l, err = apisresolver.GetManagedResource("compute.gcp.upbound.io", "v1beta2", "Instance", "InstanceList") + if err != nil { + return errors.Wrap(err, "failed to get the reference target managed resource and its list for reference resolution") + } + mrsp, err = r.ResolveMultiple(ctx, reference.MultiResolutionRequest{ + CurrentValues: reference.FromPtrValues(mg.Spec.InitProvider.InstanceFilter[i3].Instances), + Extract: resource.ExtractResourceID(), + References: mg.Spec.InitProvider.InstanceFilter[i3].InstancesRefs, + Selector: mg.Spec.InitProvider.InstanceFilter[i3].InstancesSelector, + To: reference.To{List: l, Managed: m}, + }) + } + if err != nil { + return errors.Wrap(err, "mg.Spec.InitProvider.InstanceFilter[i3].Instances") + } + mg.Spec.InitProvider.InstanceFilter[i3].Instances = reference.ToPtrValues(mrsp.ResolvedValues) + mg.Spec.InitProvider.InstanceFilter[i3].InstancesRefs = mrsp.ResolvedReferences + + } + + return nil +} diff --git a/apis/osconfig/v1beta1/zz_patchdeployment_types.go b/apis/osconfig/v1beta1/zz_patchdeployment_types.go index e9b513ceb..69c4f133a 100755 --- a/apis/osconfig/v1beta1/zz_patchdeployment_types.go +++ b/apis/osconfig/v1beta1/zz_patchdeployment_types.go @@ -598,8 +598,18 @@ type PatchDeploymentInstanceFilterInitParameters struct { // Targets any of the VM instances specified. Instances are specified by their URI in the form zones/{{zone}}/instances/{{instance_name}}, // projects/{{project_id}}/zones/{{zone}}/instances/{{instance_name}}, or // https://www.googleapis.com/compute/v1/projects/{{project_id}}/zones/{{zone}}/instances/{{instance_name}} + // +crossplane:generate:reference:type=github.com/upbound/provider-gcp/apis/compute/v1beta2.Instance + // +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractResourceID() Instances []*string `json:"instances,omitempty" tf:"instances,omitempty"` + // References to Instance in compute to populate instances. + // +kubebuilder:validation:Optional + InstancesRefs []v1.Reference `json:"instancesRefs,omitempty" tf:"-"` + + // Selector for a list of Instance in compute to populate instances. + // +kubebuilder:validation:Optional + InstancesSelector *v1.Selector `json:"instancesSelector,omitempty" tf:"-"` + // Targets VM instances in ANY of these zones. Leave empty to target VM instances in any zone. Zones []*string `json:"zones,omitempty" tf:"zones,omitempty"` } @@ -645,9 +655,19 @@ type PatchDeploymentInstanceFilterParameters struct { // Targets any of the VM instances specified. Instances are specified by their URI in the form zones/{{zone}}/instances/{{instance_name}}, // projects/{{project_id}}/zones/{{zone}}/instances/{{instance_name}}, or // https://www.googleapis.com/compute/v1/projects/{{project_id}}/zones/{{zone}}/instances/{{instance_name}} + // +crossplane:generate:reference:type=github.com/upbound/provider-gcp/apis/compute/v1beta2.Instance + // +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractResourceID() // +kubebuilder:validation:Optional Instances []*string `json:"instances,omitempty" tf:"instances,omitempty"` + // References to Instance in compute to populate instances. + // +kubebuilder:validation:Optional + InstancesRefs []v1.Reference `json:"instancesRefs,omitempty" tf:"-"` + + // Selector for a list of Instance in compute to populate instances. + // +kubebuilder:validation:Optional + InstancesSelector *v1.Selector `json:"instancesSelector,omitempty" tf:"-"` + // Targets VM instances in ANY of these zones. Leave empty to target VM instances in any zone. // +kubebuilder:validation:Optional Zones []*string `json:"zones,omitempty" tf:"zones,omitempty"` diff --git a/package/crds/beyondcorp.gcp.upbound.io_appconnections.yaml b/package/crds/beyondcorp.gcp.upbound.io_appconnections.yaml index 66085f769..299d2173f 100644 --- a/package/crds/beyondcorp.gcp.upbound.io_appconnections.yaml +++ b/package/crds/beyondcorp.gcp.upbound.io_appconnections.yaml @@ -95,6 +95,85 @@ spec: items: type: string type: array + connectorsRefs: + description: References to AppConnector in beyondcorp to populate + connectors. + items: + description: A Reference to a named object. + 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 + type: array + connectorsSelector: + description: Selector for a list of AppConnector in beyondcorp + to populate connectors. + properties: + matchControllerRef: + description: |- + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object displayName: description: An arbitrary user-provided name for the AppConnection. type: string @@ -249,6 +328,85 @@ spec: items: type: string type: array + connectorsRefs: + description: References to AppConnector in beyondcorp to populate + connectors. + items: + description: A Reference to a named object. + 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 + type: array + connectorsSelector: + description: Selector for a list of AppConnector in beyondcorp + to populate connectors. + properties: + matchControllerRef: + description: |- + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object displayName: description: An arbitrary user-provided name for the AppConnection. type: string diff --git a/package/crds/binaryauthorization.gcp.upbound.io_policies.yaml b/package/crds/binaryauthorization.gcp.upbound.io_policies.yaml index 6357044cb..adc086c75 100644 --- a/package/crds/binaryauthorization.gcp.upbound.io_policies.yaml +++ b/package/crds/binaryauthorization.gcp.upbound.io_policies.yaml @@ -127,6 +127,85 @@ spec: type: string type: array x-kubernetes-list-type: set + requireAttestationsByRefs: + description: References to Attestor in binaryauthorization + to populate requireAttestationsBy. + items: + description: A Reference to a named object. + 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 + type: array + requireAttestationsBySelector: + description: Selector for a list of Attestor in binaryauthorization + to populate requireAttestationsBy. + properties: + matchControllerRef: + description: |- + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching + labels is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object type: object type: array defaultAdmissionRule: @@ -160,6 +239,85 @@ spec: type: string type: array x-kubernetes-list-type: set + requireAttestationsByRefs: + description: References to Attestor in binaryauthorization + to populate requireAttestationsBy. + items: + description: A Reference to a named object. + 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 + type: array + requireAttestationsBySelector: + description: Selector for a list of Attestor in binaryauthorization + to populate requireAttestationsBy. + properties: + matchControllerRef: + description: |- + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching + labels is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object type: object type: array description: @@ -245,6 +403,85 @@ spec: type: string type: array x-kubernetes-list-type: set + requireAttestationsByRefs: + description: References to Attestor in binaryauthorization + to populate requireAttestationsBy. + items: + description: A Reference to a named object. + 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 + type: array + requireAttestationsBySelector: + description: Selector for a list of Attestor in binaryauthorization + to populate requireAttestationsBy. + properties: + matchControllerRef: + description: |- + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching + labels is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object type: object type: array defaultAdmissionRule: @@ -278,6 +515,85 @@ spec: type: string type: array x-kubernetes-list-type: set + requireAttestationsByRefs: + description: References to Attestor in binaryauthorization + to populate requireAttestationsBy. + items: + description: A Reference to a named object. + 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 + type: array + requireAttestationsBySelector: + description: Selector for a list of Attestor in binaryauthorization + to populate requireAttestationsBy. + properties: + matchControllerRef: + description: |- + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching + labels is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object type: object type: array description: diff --git a/package/crds/certificatemanager.gcp.upbound.io_certificates.yaml b/package/crds/certificatemanager.gcp.upbound.io_certificates.yaml index 638be98b5..f3d946fb5 100644 --- a/package/crds/certificatemanager.gcp.upbound.io_certificates.yaml +++ b/package/crds/certificatemanager.gcp.upbound.io_certificates.yaml @@ -104,6 +104,85 @@ spec: items: type: string type: array + dnsAuthorizationsRefs: + description: References to DNSAuthorization in certificatemanager + to populate dnsAuthorizations. + items: + description: A Reference to a named object. + 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 + type: array + dnsAuthorizationsSelector: + description: Selector for a list of DNSAuthorization in + certificatemanager to populate dnsAuthorizations. + properties: + matchControllerRef: + description: |- + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching + labels is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object domains: description: |- The domains for which a managed SSL certificate will be generated. @@ -111,6 +190,85 @@ spec: items: type: string type: array + domainsRefs: + description: References to DNSAuthorization in certificatemanager + to populate domains. + items: + description: A Reference to a named object. + 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 + type: array + domainsSelector: + description: Selector for a list of DNSAuthorization in + certificatemanager to populate domains. + properties: + matchControllerRef: + description: |- + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching + labels is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object issuanceConfig: description: |- The resource name for a CertificateIssuanceConfig used to configure private PKI certificates in the format projects//locations//certificateIssuanceConfigs/*. @@ -248,6 +406,85 @@ spec: items: type: string type: array + dnsAuthorizationsRefs: + description: References to DNSAuthorization in certificatemanager + to populate dnsAuthorizations. + items: + description: A Reference to a named object. + 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 + type: array + dnsAuthorizationsSelector: + description: Selector for a list of DNSAuthorization in + certificatemanager to populate dnsAuthorizations. + properties: + matchControllerRef: + description: |- + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching + labels is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object domains: description: |- The domains for which a managed SSL certificate will be generated. @@ -255,6 +492,85 @@ spec: items: type: string type: array + domainsRefs: + description: References to DNSAuthorization in certificatemanager + to populate domains. + items: + description: A Reference to a named object. + 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 + type: array + domainsSelector: + description: Selector for a list of DNSAuthorization in + certificatemanager to populate domains. + properties: + matchControllerRef: + description: |- + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching + labels is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object issuanceConfig: description: |- The resource name for a CertificateIssuanceConfig used to configure private PKI certificates in the format projects//locations//certificateIssuanceConfigs/*. diff --git a/package/crds/cloudrun.gcp.upbound.io_v2jobs.yaml b/package/crds/cloudrun.gcp.upbound.io_v2jobs.yaml index c3f4412cf..7f02b7220 100644 --- a/package/crds/cloudrun.gcp.upbound.io_v2jobs.yaml +++ b/package/crds/cloudrun.gcp.upbound.io_v2jobs.yaml @@ -475,6 +475,87 @@ spec: items: type: string type: array + instancesRefs: + description: References to DatabaseInstance + in sql to populate instances. + items: + description: A Reference to a named + object. + 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 + type: array + instancesSelector: + description: Selector for a list of DatabaseInstance + in sql to populate instances. + properties: + matchControllerRef: + description: |- + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an + object with matching labels is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object type: object type: array name: @@ -1069,6 +1150,87 @@ spec: items: type: string type: array + instancesRefs: + description: References to DatabaseInstance + in sql to populate instances. + items: + description: A Reference to a named + object. + 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 + type: array + instancesSelector: + description: Selector for a list of DatabaseInstance + in sql to populate instances. + properties: + matchControllerRef: + description: |- + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an + object with matching labels is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object type: object type: array name: diff --git a/package/crds/cloudrun.gcp.upbound.io_v2services.yaml b/package/crds/cloudrun.gcp.upbound.io_v2services.yaml index 5c0d61988..4c04ad45a 100644 --- a/package/crds/cloudrun.gcp.upbound.io_v2services.yaml +++ b/package/crds/cloudrun.gcp.upbound.io_v2services.yaml @@ -696,6 +696,85 @@ spec: type: string type: array x-kubernetes-list-type: set + instancesRefs: + description: References to DatabaseInstance + in sql to populate instances. + items: + description: A Reference to a named object. + 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 + type: array + instancesSelector: + description: Selector for a list of DatabaseInstance + in sql to populate instances. + properties: + matchControllerRef: + description: |- + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object + with matching labels is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object type: object type: array gcs: @@ -1639,6 +1718,85 @@ spec: type: string type: array x-kubernetes-list-type: set + instancesRefs: + description: References to DatabaseInstance + in sql to populate instances. + items: + description: A Reference to a named object. + 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 + type: array + instancesSelector: + description: Selector for a list of DatabaseInstance + in sql to populate instances. + properties: + matchControllerRef: + description: |- + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object + with matching labels is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object type: object type: array gcs: diff --git a/package/crds/compute.gcp.upbound.io_instancetemplates.yaml b/package/crds/compute.gcp.upbound.io_instancetemplates.yaml index bd0bb6718..60195befd 100644 --- a/package/crds/compute.gcp.upbound.io_instancetemplates.yaml +++ b/package/crds/compute.gcp.upbound.io_instancetemplates.yaml @@ -217,6 +217,85 @@ spec: items: type: string type: array + resourcePoliciesRefs: + description: References to ResourcePolicy in compute to + populate resourcePolicies. + items: + description: A Reference to a named object. + 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 + type: array + resourcePoliciesSelector: + description: Selector for a list of ResourcePolicy in compute + to populate resourcePolicies. + properties: + matchControllerRef: + description: |- + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching + labels is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object source: description: |- The name (not self_link) @@ -1161,6 +1240,85 @@ spec: items: type: string type: array + resourcePoliciesRefs: + description: References to ResourcePolicy in compute to + populate resourcePolicies. + items: + description: A Reference to a named object. + 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 + type: array + resourcePoliciesSelector: + description: Selector for a list of ResourcePolicy in compute + to populate resourcePolicies. + properties: + matchControllerRef: + description: |- + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching + labels is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object source: description: |- The name (not self_link) diff --git a/package/crds/compute.gcp.upbound.io_routernats.yaml b/package/crds/compute.gcp.upbound.io_routernats.yaml index 77fc7959e..03e971928 100644 --- a/package/crds/compute.gcp.upbound.io_routernats.yaml +++ b/package/crds/compute.gcp.upbound.io_routernats.yaml @@ -156,6 +156,84 @@ spec: type: string type: array x-kubernetes-list-type: set + natIpsRefs: + description: References to Address in compute to populate natIps. + items: + description: A Reference to a named object. + 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 + type: array + natIpsSelector: + description: Selector for a list of Address in compute to populate + natIps. + properties: + matchControllerRef: + description: |- + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object project: description: |- The ID of the project in which the resource belongs. @@ -263,6 +341,85 @@ spec: type: string type: array x-kubernetes-list-type: set + sourceNatActiveIpsRefs: + description: References to Address in compute to populate + sourceNatActiveIps. + items: + description: A Reference to a named object. + 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 + type: array + sourceNatActiveIpsSelector: + description: Selector for a list of Address in compute + to populate sourceNatActiveIps. + properties: + matchControllerRef: + description: |- + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with + matching labels is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object sourceNatDrainIps: description: |- A list of URLs of the IP resources to be drained. @@ -535,6 +692,84 @@ spec: type: string type: array x-kubernetes-list-type: set + natIpsRefs: + description: References to Address in compute to populate natIps. + items: + description: A Reference to a named object. + 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 + type: array + natIpsSelector: + description: Selector for a list of Address in compute to populate + natIps. + properties: + matchControllerRef: + description: |- + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object project: description: |- The ID of the project in which the resource belongs. @@ -561,6 +796,85 @@ spec: type: string type: array x-kubernetes-list-type: set + sourceNatActiveIpsRefs: + description: References to Address in compute to populate + sourceNatActiveIps. + items: + description: A Reference to a named object. + 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 + type: array + sourceNatActiveIpsSelector: + description: Selector for a list of Address in compute + to populate sourceNatActiveIps. + properties: + matchControllerRef: + description: |- + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with + matching labels is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object sourceNatDrainIps: description: |- A list of URLs of the IP resources to be drained. diff --git a/package/crds/osconfig.gcp.upbound.io_patchdeployments.yaml b/package/crds/osconfig.gcp.upbound.io_patchdeployments.yaml index 76e08e0c0..73e0e0c37 100644 --- a/package/crds/osconfig.gcp.upbound.io_patchdeployments.yaml +++ b/package/crds/osconfig.gcp.upbound.io_patchdeployments.yaml @@ -124,6 +124,85 @@ spec: items: type: string type: array + instancesRefs: + description: References to Instance in compute to populate + instances. + items: + description: A Reference to a named object. + 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 + type: array + instancesSelector: + description: Selector for a list of Instance in compute + to populate instances. + properties: + matchControllerRef: + description: |- + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching + labels is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object zones: description: Targets VM instances in ANY of these zones. Leave empty to target VM instances in any zone. @@ -715,6 +794,85 @@ spec: items: type: string type: array + instancesRefs: + description: References to Instance in compute to populate + instances. + items: + description: A Reference to a named object. + 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 + type: array + instancesSelector: + description: Selector for a list of Instance in compute + to populate instances. + properties: + matchControllerRef: + description: |- + MatchControllerRef ensures an object with the same controller reference + as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching + labels is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: |- + Resolution specifies whether resolution of this reference is required. + The default is 'Required', which means the reconcile will fail if the + reference cannot be resolved. 'Optional' means this reference will be + a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: |- + Resolve specifies when this reference should be resolved. The default + is 'IfNotPresent', which will attempt to resolve the reference only when + the corresponding field is not present. Use 'Always' to resolve the + reference on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object zones: description: Targets VM instances in ANY of these zones. Leave empty to target VM instances in any zone.