Skip to content

Commit

Permalink
Replace config.Resource.OverrideFieldNames usages with config.Resourc…
Browse files Browse the repository at this point in the history
…e.PreviousVersions

for the prevention of the type name conflicts in the generated multi-versioned CRDs.

- config.Resource.OverrideFieldNames is being deprecated in favor of
  config.Resource.PreviousVersions.
- Bump upjet to commit b5622a10e14d.

Signed-off-by: Alper Rifat Ulucinar <[email protected]>
  • Loading branch information
ulucinar committed May 14, 2024
1 parent c8bcc64 commit f425b8d
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 34 deletions.
10 changes: 0 additions & 10 deletions config/compute/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -507,16 +507,6 @@ func Configure(p *config.Provider) { //nolint: gocyclo
p.AddResourceConfigurator("google_compute_project_metadata_item", func(r *config.Resource) {
r.MetaResource.ArgumentDocs["id"] = "an identifier for the resource with format `{{key}}`"
})
p.AddResourceConfigurator("google_compute_http_health_check", func(r *config.Resource) {
r.OverrideFieldNames["HTTPHealthCheckInitParameters"] = "HTTPHealthCheckInitParameters_2"
r.OverrideFieldNames["HTTPHealthCheckParameters"] = "HTTPHealthCheckParameters_2"
r.OverrideFieldNames["HTTPHealthCheckObservation"] = "HTTPHealthCheckObservation_2"
})
p.AddResourceConfigurator("google_compute_https_health_check", func(r *config.Resource) {
r.OverrideFieldNames["HTTPSHealthCheckInitParameters"] = "HTTPSHealthCheckInitParameters_2"
r.OverrideFieldNames["HTTPSHealthCheckParameters"] = "HTTPSHealthCheckParameters_2"
r.OverrideFieldNames["HTTPSHealthCheckObservation"] = "HTTPSHealthCheckObservation_2"
})
}

// InstanceGroupExtractor extracts Instance Group from
Expand Down
19 changes: 0 additions & 19 deletions config/dialogflowcx/config.go

This file was deleted.

3 changes: 1 addition & 2 deletions config/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ import (
"github.com/upbound/provider-gcp/config/containerazure"
"github.com/upbound/provider-gcp/config/dataflow"
"github.com/upbound/provider-gcp/config/dataproc"
"github.com/upbound/provider-gcp/config/dialogflowcx"
"github.com/upbound/provider-gcp/config/dns"
"github.com/upbound/provider-gcp/config/endpoints"
"github.com/upbound/provider-gcp/config/firebaserules"
Expand Down Expand Up @@ -208,7 +207,6 @@ func GetProvider(_ context.Context, generationProvider bool) (*ujconfig.Provider
container.Configure,
dataflow.Configure,
dataproc.Configure,
dialogflowcx.Configure,
dns.Configure,
endpoints.Configure,
firebaserules.Configure,
Expand Down Expand Up @@ -268,6 +266,7 @@ func bumpVersionsWithEmbeddedLists(pc *ujconfig.Provider) {
continue
}
r.Version = "v1beta2"
r.PreviousVersions = []string{VersionV1Beta1}
// we would like to set the storage version to v1beta1 to facilitate
// downgrades.
r.SetCRDStorageVersion("v1beta1")
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -180,4 +180,4 @@ require (
sigs.k8s.io/yaml v1.4.0 // indirect
)

replace github.com/crossplane/upjet => github.com/ulucinar/upbound-upjet v0.0.0-20240509162309-c606b4cbc0a7
replace github.com/crossplane/upjet => github.com/ulucinar/upbound-upjet v0.0.0-20240514111512-b5622a10e14d
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -386,8 +386,8 @@ github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcU
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/tmccombs/hcl2json v0.3.3 h1:+DLNYqpWE0CsOQiEZu+OZm5ZBImake3wtITYxQ8uLFQ=
github.com/tmccombs/hcl2json v0.3.3/go.mod h1:Y2chtz2x9bAeRTvSibVRVgbLJhLJXKlUeIvjeVdnm4w=
github.com/ulucinar/upbound-upjet v0.0.0-20240509162309-c606b4cbc0a7 h1:/xTXls5lzaLwVxVO4ButpKDKne31VIJR+LVRv+FAvao=
github.com/ulucinar/upbound-upjet v0.0.0-20240509162309-c606b4cbc0a7/go.mod h1:3pDVtCgyBc5f2Zx4K5HEPxxhjndmOc5CHCJNpIivK/g=
github.com/ulucinar/upbound-upjet v0.0.0-20240514111512-b5622a10e14d h1:nz0ZB3a5HA/nbU5XcnU/cFVSvwdOybGujB5yOORjjk4=
github.com/ulucinar/upbound-upjet v0.0.0-20240514111512-b5622a10e14d/go.mod h1:3pDVtCgyBc5f2Zx4K5HEPxxhjndmOc5CHCJNpIivK/g=
github.com/vmihailenco/msgpack v3.3.3+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk=
github.com/vmihailenco/msgpack v4.0.4+incompatible h1:dSLoQfGFAo3F6OoNhwUmLwVgaUXK79GlxNBwueZn0xI=
github.com/vmihailenco/msgpack v4.0.4+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk=
Expand Down

0 comments on commit f425b8d

Please sign in to comment.