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

Update new provider documentation #115

Merged
merged 5 commits into from
Oct 22, 2022
Merged

Conversation

muvaf
Copy link
Member

@muvaf muvaf commented Oct 20, 2022

Description of your changes

Updates to work with Upjet.

Fixes #114

I have:

  • Read and followed Crossplane's contribution process.
  • Run make reviewable to ensure this PR is ready for review.
  • Added backport release-x.y labels to auto-backport this PR if necessary.

How has this code been tested

Together with crossplane/upjet-provider-template#7 and confirmed that I see repo and branch.

Copy link
Collaborator

@ulucinar ulucinar left a comment

Choose a reason for hiding this comment

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

Thanks @muvaf, lgtm. Left some comments for you to consider.

pkg/registry/meta.go Show resolved Hide resolved
pkg/config/provider.go Outdated Show resolved Hide resolved
)

func GetProvider() *tjconfig.Provider {
...
for _, configure := range []func(provider *tjconfig.Provider){
// add custom config functions
- null.Configure,
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: Why do we have the literal null here?

Copy link
Member Author

Choose a reason for hiding this comment

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

It's because the provider name is null, i.e. hashicorp/null.

// This resource need the repository in which branch would be created
// as an input. And by defining it as a reference to Repository
// object, we can build cross resource referencing. See
// repositoryRef in the example in the Testing section below.
r.References["repository"] = config.Reference{
Type: "github.com/crossplane-contrib/provider-jet-github/apis/repository/v1alpha1.Repository",
Type: "github.com/myorg/provider-github/apis/repository/v1alpha1.Repository",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Looking at the examples below, should myorg be upbound or vice versa?

Copy link
Member Author

Choose a reason for hiding this comment

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

It should be myorg everywhere in the user's provider since they'll need to use their own organization. Is there an inconsistency you caught?

docs/generating-a-provider.md Outdated Show resolved Hide resolved
Signed-off-by: Muvaffak Onus <[email protected]>
@muvaf muvaf merged commit f2c9c80 into crossplane:main Oct 22, 2022
@muvaf muvaf deleted the upd-new-provider branch October 22, 2022 10:36
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.

Is generating-a-provider doc up do date?
2 participants