Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Break provider-gcp up by service #288

Merged
merged 4 commits into from
May 2, 2023

Conversation

ulucinar
Copy link
Collaborator

@ulucinar ulucinar commented Apr 25, 2023

Description of your changes

Relevant proposal: crossplane/crossplane#3939
Depends on: crossplane/upjet#194

This PR proposes the following changes according to the proposal crossplane/crossplane#3939:

  • Subpackages belonging to each API group is produced. An example is: provider-gcp-cloudplatform.
  • ProviderConfig, ProviderConfigUsage and StoreConfig are part of a config package named provider-gcp-config.
  • The monolith package (containing all the CRDs and associated controllers) is still produced.
  • Each produced package except for the monolith package has the pkg.crossplane.io/provider-family label in its package metadata.
  • Each service package except for the config package declares a dependency to the config package.

It also introduces the SUBPACKAGES make variable so that it's possible to build the individual subpackages. An example for building is:

make -j 3 SUBPACKAGES="monolith config cloudplatform" build.all

One can also use the same variable to push those (already built) packages:

make -j 3 SUBPACKAGES="monolith config cloudplatform" BRANCH_NAME=main publish

I have:

  • Run make reviewable test to ensure this PR is ready for review.

How has this code been tested

Tested by building and published the following family of packages using crossplane/upjet#194:
.../upbound/provider-gcp-{group}:v0.31.0-rc.1.9.g5fe711b5, where {group} is a service name such as cloudplatform. There also exists the monolith package .../upbound/provider-gcp:v0.31.0-rc.1.9.g5fe711b5.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we know of a lightweight templating tool that we can quickly integrate into our build pipelines?

@ulucinar ulucinar force-pushed the gcp-family branch 3 times, most recently from 1bbafb9 to 70658bc Compare April 26, 2023 15:00
- This PR implements the upstream proposal at:
  crossplane/crossplane#3939

- Subpackages belonging to each API group is produced. An example is:
  provider-gcp-cloudplatform.
- ProviderConfig, ProviderConfigUsage and StoreConfig are part of a
  config package named provider-gcp-config.
- The monolith package (containing all the CRDs and associated controllers)
  is still produced.
- Each produced package except for the monolith package has the
  `pkg.crossplane.io/provider-family` label in its package metadata.
- Each service package except for the config package declares a
  dependency to the config package.

Signed-off-by: Alper Rifat Ulucinar <ulucinar@users.noreply.github.com>
- Default the SUBPACKAGES make var to only "monolith"

Signed-off-by: Alper Rifat Ulucinar <ulucinar@users.noreply.github.com>
@ulucinar
Copy link
Collaborator Author

/test-examples="examples/cloudplatform/serviceaccount.yaml"

@ulucinar
Copy link
Collaborator Author

The initial uptest attempt failed and I've observed this previously:
image

I think this is happening because the CRD is not in established state. So, retrying:
/test-examples="examples/cloudplatform/serviceaccount.yaml"

Copy link
Collaborator

@turkenh turkenh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @ulucinar!

Signed-off-by: Alper Rifat Ulucinar <ulucinar@users.noreply.github.com>
@ulucinar
Copy link
Collaborator Author

/test-examples="examples/cloudplatform/serviceaccount.yaml"

Signed-off-by: Alper Rifat Ulucinar <ulucinar@users.noreply.github.com>
@ulucinar ulucinar merged commit 0e94d43 into crossplane-contrib:main May 2, 2023
@ulucinar ulucinar deleted the gcp-family branch May 2, 2023 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants