generated from crossplane/upjet-provider-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add K8S CRDs for repositories and branches
- Loading branch information
Showing
21 changed files
with
1,665 additions
and
1,042 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package branch | ||
|
||
import "github.com/upbound/upjet/pkg/config" | ||
|
||
func Configure(p *config.Provider) { | ||
p.AddResourceConfigurator("github_branch", func(r *config.Resource) { | ||
// We need to override the default group that upjet generated for | ||
// this resource, which would be "github" | ||
r.ShortGroup = "branch" | ||
|
||
// 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/herbergt/provider-github/apis/repository/v1alpha1.Repository", | ||
} | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package repository | ||
|
||
import "github.com/upbound/upjet/pkg/config" | ||
|
||
// Configure configures individual resources by adding custom ResourceConfigurators. | ||
func Configure(p *config.Provider) { | ||
p.AddResourceConfigurator("github_repository", func(r *config.Resource) { | ||
// We need to override the default group that upjet generated for | ||
// this resource, which would be "github" | ||
r.ShortGroup = "repository" | ||
}) | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: example-creds | ||
namespace: crossplane-system | ||
type: Opaque | ||
stringData: | ||
credentials: | | ||
{ | ||
"token": "your-secret" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,5 @@ type: Opaque | |
stringData: | ||
credentials: | | ||
{ | ||
"username": "admin", | ||
"password": "t0ps3cr3t11" | ||
"token": "y0ur-t0k3n" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.