Skip to content

Commit

Permalink
fixed crossplane.yaml version, updated provider name, and added secre…
Browse files Browse the repository at this point in the history
…t.yaml template
  • Loading branch information
Umit Demirtas authored and Umit Demirtas committed Sep 21, 2023
1 parent 197ac0f commit 7dfd152
Show file tree
Hide file tree
Showing 77 changed files with 222 additions and 196 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# ====================================================================================
# Setup Project

PROJECT_NAME ?= upjet-provider-vra
PROJECT_NAME ?= provider-vra
PROJECT_REPO ?= github.com/ankasoftco/$(PROJECT_NAME)

export TERRAFORM_VERSION ?= 1.5.5
Expand Down Expand Up @@ -89,7 +89,7 @@ fallthrough: submodules

# NOTE(hasheddan): we force image building to happen prior to xpkg build so that
# we ensure image is present in daemon.
xpkg.build.upjet-provider-vra: do.build.images
xpkg.build.provider-vra: do.build.images

# NOTE(hasheddan): we ensure up is installed prior to running platform-specific
# build steps in parallel to avoid encountering an installation race condition.
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
# Provider vRA

`upjet-provider-vra` is a [Crossplane](https://crossplane.io/) provider that
`provider-vra` is a [Crossplane](https://crossplane.io/) provider that
is built using [Upjet](https://github.com/upbound/upjet) code
generation tools and exposes XRM-conformant managed resources for the
vRA API.

## Getting Started

Install the provider by using the following command after changing the image tag
to the [latest release](https://marketplace.upbound.io/providers/ankasoftco/upjet-provider-vra):
to the [latest release](https://marketplace.upbound.io/providers/ankasoftco/provider-vra):

```
up ctp provider install ankasoftco/upjet-provider-vra:v0.1.0
up ctp provider install ankasoftco/provider-vra:v0.1.0
```

Alternatively, you can use declarative installation:
Expand All @@ -21,15 +21,15 @@ cat <<EOF | kubectl apply -f -
apiVersion: pkg.crossplane.io/v1
kind: Provider
metadata:
name: upjet-provider-vra
name: provider-vra
spec:
package: ankasoftco/upjet-provider-vra:v0.1.0
package: ankasoftco/provider-vra:v0.1.0
EOF
```

Notice that in this example Provider resource is referencing ControllerConfig with debug enabled.

You can see the API reference [here](https://doc.crds.dev/github.com/ankasoftco/upjet-provider-vra).
You can see the API reference [here](https://doc.crds.dev/github.com/ankasoftco/provider-vra).

## Developing

Expand Down Expand Up @@ -60,4 +60,4 @@ make build
## Report a Bug

For filing bugs, suggesting improvements, or requesting new features, please
open an [issue](https://github.com/ankasoftco/upjet-provider-vra/issues).
open an [issue](https://github.com/ankasoftco/provider-vra/issues).
2 changes: 1 addition & 1 deletion apis/blockdevice/v1alpha1/zz_blockdevice_types.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion apis/blockdevice/v1alpha1/zz_generated.resolvers.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion apis/blueprint/v1alpha1/zz_blueprint_types.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion apis/blueprint/v1alpha1/zz_generated.resolvers.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion apis/contentsource/v1alpha1/zz_contentsource_types.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion apis/contentsource/v1alpha1/zz_generated.resolvers.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion apis/deployment/v1alpha1/zz_deployment_types.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion apis/deployment/v1alpha1/zz_generated.resolvers.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion apis/loadbalancer/v1alpha1/zz_generated.resolvers.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion apis/loadbalancer/v1alpha1/zz_loadbalancer_types.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion apis/machine/v1alpha1/zz_generated.resolvers.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion apis/machine/v1alpha1/zz_machine_types.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion apis/network/v1alpha1/zz_generated.resolvers.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion apis/network/v1alpha1/zz_network_types.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

40 changes: 20 additions & 20 deletions apis/zz_register.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion cmd/generator/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (

"github.com/upbound/upjet/pkg/pipeline"

"github.com/ankasoftco/upjet-provider-vra/config"
"github.com/ankasoftco/provider-vra/config"
)

func main() {
Expand Down
16 changes: 8 additions & 8 deletions cmd/provider/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ import (
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/log/zap"

"github.com/ankasoftco/upjet-provider-vra/apis"
"github.com/ankasoftco/upjet-provider-vra/apis/v1alpha1"
"github.com/ankasoftco/upjet-provider-vra/config"
"github.com/ankasoftco/upjet-provider-vra/internal/clients"
"github.com/ankasoftco/upjet-provider-vra/internal/controller"
"github.com/ankasoftco/upjet-provider-vra/internal/features"
"github.com/ankasoftco/provider-vra/apis"
"github.com/ankasoftco/provider-vra/apis/v1alpha1"
"github.com/ankasoftco/provider-vra/config"
"github.com/ankasoftco/provider-vra/internal/clients"
"github.com/ankasoftco/provider-vra/internal/controller"
"github.com/ankasoftco/provider-vra/internal/features"
)

func main() {
Expand All @@ -54,7 +54,7 @@ func main() {
kingpin.MustParse(app.Parse(os.Args[1:]))

zl := zap.New(zap.UseDevMode(*debug))
log := logging.NewLogrLogger(zl.WithName("upjet-provider-vra"))
log := logging.NewLogrLogger(zl.WithName("provider-vra"))
if *debug {
// The controller-runtime runs with a no-op logger by default. It is
// *very* verbose even at info level, so we only provide it a real
Expand All @@ -69,7 +69,7 @@ func main() {

mgr, err := ctrl.NewManager(cfg, ctrl.Options{
LeaderElection: *leaderElection,
LeaderElectionID: "crossplane-leader-election-upjet-provider-vra",
LeaderElectionID: "crossplane-leader-election-provider-vra",
SyncPeriod: syncPeriod,
LeaderElectionResourceLock: resourcelock.LeasesResourceLock,
LeaseDuration: func() *time.Duration { d := 60 * time.Second; return &d }(),
Expand Down
2 changes: 1 addition & 1 deletion config/block_device/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ func Configure(p *config.Provider) {
r.Kind = "BlockDevice"
r.Version = "v1alpha1"
r.References["project_id"] = config.Reference{
Type: "github.com/ankasoftco/upjet-provider-vra/apis/project/v1alpha1.Project",
Type: "github.com/ankasoftco/provider-vra/apis/project/v1alpha1.Project",
}
})

Expand Down
4 changes: 2 additions & 2 deletions config/blueprint/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ func Configure(p *config.Provider) {
r.ShortGroup = "blueprint"
r.Version = "v1alpha1"
r.References["project_id"] = config.Reference{
Type: "github.com/ankasoftco/upjet-provider-vra/apis/project/v1alpha1.Project",
Type: "github.com/ankasoftco/provider-vra/apis/project/v1alpha1.Project",
}
})

Expand All @@ -18,7 +18,7 @@ func Configure(p *config.Provider) {
r.ShortGroup = "blueprint"
r.Version = "v1alpha1"
r.References["blueprint_id"] = config.Reference{
Type: "Blueprint", //github.com/crossplane-contrib/upjet-provider-vra/apis/blueprint/v1alpha1.Blueprint
Type: "Blueprint", //github.com/crossplane-contrib/provider-vra/apis/blueprint/v1alpha1.Blueprint

Check failure on line 21 in config/blueprint/config.go

View workflow job for this annotation

GitHub Actions / lint

commentFormatting: put a space between `//` and comment text (gocritic)
}
})
}
2 changes: 1 addition & 1 deletion config/catalog_item/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ func Configure(p *config.Provider) {
r.Kind = "CatalogItemEntitlement"
r.Version = "v1alpha1"
r.References["project_id"] = config.Reference{
Type: "github.com/ankasoftco/upjet-provider-vra/apis/project/v1alpha1.Project",
Type: "github.com/ankasoftco/provider-vra/apis/project/v1alpha1.Project",
}
})
}
4 changes: 2 additions & 2 deletions config/catalog_source/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ func Configure(p *config.Provider) {
r.Kind = "CatalogSourceBlueprint"
r.Version = "v1alpha1"
r.References["project_id"] = config.Reference{
Type: "github.com/ankasoftco/upjet-provider-vra/apis/project/v1alpha1.Project",
Type: "github.com/ankasoftco/provider-vra/apis/project/v1alpha1.Project",
}
})

Expand All @@ -18,7 +18,7 @@ func Configure(p *config.Provider) {
r.Kind = "CatalogSourceEntitlement"
r.Version = "v1alpha1"
r.References["project_id"] = config.Reference{
Type: "github.com/ankasoftco/upjet-provider-vra/apis/project/v1alpha1.Project",
Type: "github.com/ankasoftco/provider-vra/apis/project/v1alpha1.Project",
}
})
}
2 changes: 1 addition & 1 deletion config/content_source/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ func Configure(p *config.Provider) {
r.Kind = "ContentSource"
r.Version = "v1alpha1"
r.References["project_id"] = config.Reference{
Type: "github.com/ankasoftco/upjet-provider-vra/apis/project/v1alpha1.Project",
Type: "github.com/ankasoftco/provider-vra/apis/project/v1alpha1.Project",
}
})
}
Loading

0 comments on commit 7dfd152

Please sign in to comment.