Skip to content

Commit

Permalink
go.mod: use upjet and rename to official-provider-template
Browse files Browse the repository at this point in the history
Signed-off-by: Muvaffak Onus <me@muvaf.com>
  • Loading branch information
muvaf committed Jun 1, 2022
1 parent d938ff2 commit 591c36d
Show file tree
Hide file tree
Showing 33 changed files with 265 additions and 186 deletions.
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ linters-settings:
goimports:
# put imports beginning with prefix after 3rd-party packages;
# it's a comma-separated list of prefixes
local-prefixes: github.com/crossplane-contrib/provider-jet-template
local-prefixes: github.com/upbound/official-provider-template

gocyclo:
# minimal code complexity to report, 30 by default (but we recommend 10-20)
Expand Down
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# ====================================================================================
# Setup Project

PROJECT_NAME := provider-jet-template
PROJECT_REPO := github.com/crossplane-contrib/$(PROJECT_NAME)
PROJECT_NAME := official-provider-template
PROJECT_REPO := github.com/upbound/$(PROJECT_NAME)

export TERRAFORM_VERSION := 1.1.6
export TERRAFORM_VERSION := 1.2.1

export TERRAFORM_PROVIDER_SOURCE := hashicorp/null
export TERRAFORM_PROVIDER_VERSION := 3.1.0
Expand Down Expand Up @@ -52,7 +52,7 @@ GO111MODULE = on
# Setup Images

DOCKER_REGISTRY ?= crossplane
IMAGES = provider-jet-template provider-jet-template-controller
IMAGES = official-provider-template official-provider-template-controller
-include build/makelib/image.mk

# ====================================================================================
Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# Terrajet Template Provider

`provider-jet-template` is a [Crossplane](https://crossplane.io/) provider that
`official-provider-template` is a [Crossplane](https://crossplane.io/) provider that
is built using [Terrajet](https://github.com/crossplane/terrajet) code
generation tools and exposes XRM-conformant managed resources for the
Template API.

## Getting Started

Install the provider by using the following command after changing the image tag
to the [latest release](https://github.com/crossplane-contrib/provider-jet-template/releases):
to the [latest release](https://github.com/upbound/official-provider-template/releases):
```
kubectl crossplane install provider crossplane/provider-jet-template:v0.1.0
kubectl crossplane install provider crossplane/official-provider-template:v0.1.0
```

Alternatively, you can use declarative installation:
Expand All @@ -20,7 +20,7 @@ kubectl apply -f examples/install.yaml

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/crossplane-contrib/provider-jet-template).
You can see the API reference [here](https://doc.crds.dev/github.com/upbound/official-provider-template).

## Developing

Expand Down Expand Up @@ -50,7 +50,7 @@ make build
## Report a Bug

For filing bugs, suggesting improvements, or requesting new features, please
open an [issue](https://github.com/crossplane-contrib/provider-jet-template/issues).
open an [issue](https://github.com/upbound/official-provider-template/issues).

## Contact

Expand All @@ -64,17 +64,17 @@ Please use the following to reach members of the community:

## Governance and Owners

provider-jet-template is run according to the same
official-provider-template is run according to the same
[Governance](https://github.com/crossplane/crossplane/blob/master/GOVERNANCE.md)
and [Ownership](https://github.com/crossplane/crossplane/blob/master/OWNERS.md)
structure as the core Crossplane project.

## Code of Conduct

provider-jet-template adheres to the same [Code of
official-provider-template adheres to the same [Code of
Conduct](https://github.com/crossplane/crossplane/blob/master/CODE_OF_CONDUCT.md)
as the core Crossplane project.

## Licensing

provider-jet-template is under the Apache 2.0 license.
official-provider-template is under the Apache 2.0 license.
6 changes: 3 additions & 3 deletions apis/null/v1alpha1/zz_generated_terraformed.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/null/v1alpha1/zz_groupversion_info.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/null/v1alpha1/zz_resource_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/v1alpha1/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ limitations under the License.

// Package v1alpha1 contains the core resources of the template jet provider.
// +kubebuilder:object:generate=true
// +groupName=template.jet.crossplane.io
// +groupName=template.upbound.io
// +versionName=v1alpha1
package v1alpha1
2 changes: 1 addition & 1 deletion apis/v1alpha1/register.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (

// Package type metadata.
const (
Group = "template.jet.crossplane.io"
Group = "template.upbound.io"
Version = "v1alpha1"
)

Expand Down
6 changes: 3 additions & 3 deletions apis/zz_register.go

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

Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ include ../../../build/makelib/common.mk

# ====================================================================================
# Options
IMAGE = $(BUILD_REGISTRY)/provider-jet-template-controller-$(ARCH)
IMAGE = $(BUILD_REGISTRY)/official-provider-template-controller-$(ARCH)
include ../../../build/makelib/image.mk

# ====================================================================================
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ include ../../../build/makelib/common.mk
# ====================================================================================
# Options
DOCKER_REGISTRY ?= crossplane
IMAGE = $(BUILD_REGISTRY)/provider-jet-template-$(ARCH)
IMAGE = $(BUILD_REGISTRY)/official-provider-template-$(ARCH)
OSBASEIMAGE = scratch
include ../../../build/makelib/image.mk

Expand Down
4 changes: 2 additions & 2 deletions cmd/generator/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ import (
"os"
"path/filepath"

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

"github.com/crossplane-contrib/provider-jet-template/config"
"github.com/upbound/official-provider-template/config"
)

func main() {
Expand Down
20 changes: 10 additions & 10 deletions cmd/provider/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,21 @@ import (
"github.com/crossplane/crossplane-runtime/pkg/logging"
"github.com/crossplane/crossplane-runtime/pkg/ratelimiter"
"github.com/crossplane/crossplane-runtime/pkg/resource"
tjcontroller "github.com/crossplane/terrajet/pkg/controller"
"github.com/crossplane/terrajet/pkg/terraform"
tjcontroller "github.com/upbound/upjet/pkg/controller"
"github.com/upbound/upjet/pkg/terraform"
"gopkg.in/alecthomas/kingpin.v2"
kerrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/tools/leaderelection/resourcelock"
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/log/zap"

"github.com/crossplane-contrib/provider-jet-template/apis"
"github.com/crossplane-contrib/provider-jet-template/apis/v1alpha1"
"github.com/crossplane-contrib/provider-jet-template/config"
"github.com/crossplane-contrib/provider-jet-template/internal/clients"
"github.com/crossplane-contrib/provider-jet-template/internal/controller"
"github.com/crossplane-contrib/provider-jet-template/internal/features"
"github.com/upbound/official-provider-template/apis"
"github.com/upbound/official-provider-template/apis/v1alpha1"
"github.com/upbound/official-provider-template/config"
"github.com/upbound/official-provider-template/internal/clients"
"github.com/upbound/official-provider-template/internal/controller"
"github.com/upbound/official-provider-template/internal/features"
)

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

zl := zap.New(zap.UseDevMode(*debug))
log := logging.NewLogrLogger(zl.WithName("provider-jet-template"))
log := logging.NewLogrLogger(zl.WithName("official-provider-template"))
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 @@ -76,7 +76,7 @@ func main() {

mgr, err := ctrl.NewManager(cfg, ctrl.Options{
LeaderElection: *leaderElection,
LeaderElectionID: "crossplane-leader-election-provider-jet-template",
LeaderElectionID: "crossplane-leader-election-official-provider-template",
SyncPeriod: syncPeriod,
LeaderElectionResourceLock: resourcelock.LeasesResourceLock,
LeaseDuration: func() *time.Duration { d := 60 * time.Second; return &d }(),
Expand Down
2 changes: 1 addition & 1 deletion config/null/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ limitations under the License.
package null

import (
tjconfig "github.com/crossplane/terrajet/pkg/config"
tjconfig "github.com/upbound/upjet/pkg/config"
)

// Configure configures the null group
Expand Down
7 changes: 4 additions & 3 deletions config/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,16 @@ import (
// Note(turkenh): we are importing this to embed provider schema document
_ "embed"

tjconfig "github.com/crossplane/terrajet/pkg/config"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"

"github.com/crossplane-contrib/provider-jet-template/config/null"
tjconfig "github.com/upbound/upjet/pkg/config"

"github.com/upbound/official-provider-template/config/null"
)

const (
resourcePrefix = "template"
modulePath = "github.com/crossplane-contrib/provider-jet-template"
modulePath = "github.com/upbound/official-provider-template"
)

//go:embed schema.json
Expand Down
8 changes: 4 additions & 4 deletions examples/install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ kind: ControllerConfig
metadata:
name: jet-template-config
labels:
app: crossplane-provider-jet-template
app: crossplane-official-provider-template
spec:
image: crossplane/provider-jet-template-controller:v0.1.0
image: crossplane/official-provider-template-controller:v0.1.0
args: ["-d"]
---
apiVersion: pkg.crossplane.io/v1
kind: Provider
metadata:
name: crossplane-provider-jet-template
name: crossplane-official-provider-template
spec:
package: crossplane/provider-jet-template:v0.1.0
package: crossplane/official-provider-template:v0.1.0
controllerConfigRef:
name: jet-template-config
2 changes: 1 addition & 1 deletion examples/null/resource.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: null.template.jet.crossplane.io/v1alpha1
apiVersion: null.template.upbound.io/v1alpha1
kind: Resource
metadata:
name: example
Expand Down
2 changes: 1 addition & 1 deletion examples/providerconfig/providerconfig.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: template.jet.crossplane.io/v1alpha1
apiVersion: template.upbound.io/v1alpha1
kind: ProviderConfig
metadata:
name: default
Expand Down
2 changes: 1 addition & 1 deletion examples/storeconfig/vault.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: template.jet.crossplane.io/v1alpha1
apiVersion: template.upbound.io/v1alpha1
kind: StoreConfig
metadata:
name: vault
Expand Down
Loading

0 comments on commit 591c36d

Please sign in to comment.