Skip to content

Commit

Permalink
Update generated files
Browse files Browse the repository at this point in the history
Signed-off-by: Jean du Plessis <[email protected]>
  • Loading branch information
jeanduplessis committed Nov 13, 2023
1 parent 946d683 commit 6b56b8d
Show file tree
Hide file tree
Showing 21 changed files with 124 additions and 56 deletions.
28 changes: 16 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@
# ====================================================================================
# Setup Project

PROJECT_NAME ?= upjet-provider-template
PROJECT_REPO ?= github.com/crossplane/$(PROJECT_NAME)
PROJECT_NAME := upjet-provider-template
PROJECT_REPO := github.com/crossplane/$(PROJECT_NAME)

export TERRAFORM_VERSION ?= 1.5.5
export TERRAFORM_VERSION := 1.5.5

export TERRAFORM_PROVIDER_SOURCE ?= hashicorp/null
export TERRAFORM_PROVIDER_SOURCE := hashicorp/null
export TERRAFORM_PROVIDER_REPO ?= https://github.com/hashicorp/terraform-provider-null
export TERRAFORM_PROVIDER_VERSION ?= 3.1.0
export TERRAFORM_PROVIDER_DOWNLOAD_NAME ?= terraform-provider-null
export TERRAFORM_PROVIDER_DOWNLOAD_URL_PREFIX ?= https://releases.hashicorp.com/$(TERRAFORM_PROVIDER_DOWNLOAD_NAME)/$(TERRAFORM_PROVIDER_VERSION)
export TERRAFORM_NATIVE_PROVIDER_BINARY ?= terraform-provider-null_v3.1.0_x5
export TERRAFORM_PROVIDER_VERSION := 3.1.0
export TERRAFORM_PROVIDER_DOWNLOAD_NAME := terraform-provider-null
export TERRAFORM_PROVIDER_DOWNLOAD_URL_PREFIX := https://releases.hashicorp.com/$(TERRAFORM_PROVIDER_DOWNLOAD_NAME)/$(TERRAFORM_PROVIDER_VERSION)
export TERRAFORM_NATIVE_PROVIDER_BINARY := terraform-provider-null_v3.1.0_x5
export TERRAFORM_DOCS_PATH ?= docs/resources


Expand Down Expand Up @@ -44,8 +44,12 @@ NPROCS ?= 1
# to half the number of CPU cores.
GO_TEST_PARALLEL := $(shell echo $$(( $(NPROCS) / 2 )))

GO_REQUIRED_VERSION ?= 1.19
GOLANGCILINT_VERSION ?= 1.50.0
GO_REQUIRED_VERSION ?= 1.20

# GOLANGCILINT_VERSION is inherited from build submodule by default.
# Uncomment below if you need to override the version.
# GOLANGCILINT_VERSION ?= 1.54.0

GO_STATIC_PACKAGES = $(GO_PROJECT)/cmd/provider $(GO_PROJECT)/cmd/generator
GO_LDFLAGS += -X $(GO_PROJECT)/internal/version.Version=$(VERSION)
GO_SUBDIRS += cmd internal apis
Expand All @@ -55,9 +59,9 @@ GO_SUBDIRS += cmd internal apis
# Setup Kubernetes tools

KIND_VERSION = v0.15.0
UP_VERSION = v0.18.0
UP_VERSION = v0.19.2
UP_CHANNEL = stable
UPTEST_VERSION = v0.5.0
UPTEST_VERSION = v0.6.1
-include build/makelib/k8s_tools.mk

# ====================================================================================
Expand Down
4 changes: 2 additions & 2 deletions apis/null/v1alpha1/zz_generated.deepcopy.go

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

1 change: 0 additions & 1 deletion apis/null/v1alpha1/zz_generated.managed.go

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

1 change: 0 additions & 1 deletion apis/null/v1alpha1/zz_generated.managedlist.go

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

4 changes: 2 additions & 2 deletions apis/v1alpha1/zz_generated.deepcopy.go

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

3 changes: 1 addition & 2 deletions apis/v1beta1/zz_generated.deepcopy.go

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

28 changes: 28 additions & 0 deletions apis/v1beta1/zz_generated.pc.go

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

28 changes: 28 additions & 0 deletions apis/v1beta1/zz_generated.pcu.go

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

17 changes: 17 additions & 0 deletions apis/v1beta1/zz_generated.pculist.go

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

3 changes: 1 addition & 2 deletions cmd/generator/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ import (
"os"
"path/filepath"

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

"github.com/crossplane/upjet-provider-template/config"
"github.com/crossplane/upjet/pkg/pipeline"
)

func main() {
Expand Down
24 changes: 12 additions & 12 deletions cmd/provider/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ import (
"path/filepath"
"time"

xpv1 "github.com/crossplane/crossplane-runtime/apis/common/v1"
xpcontroller "github.com/crossplane/crossplane-runtime/pkg/controller"
"github.com/crossplane/crossplane-runtime/pkg/feature"
"github.com/crossplane/crossplane-runtime/pkg/logging"
"github.com/crossplane/crossplane-runtime/pkg/ratelimiter"
"github.com/crossplane/crossplane-runtime/pkg/resource"
"github.com/crossplane/upjet-provider-template/apis"
"github.com/crossplane/upjet-provider-template/apis/v1alpha1"
"github.com/crossplane/upjet-provider-template/config"
"github.com/crossplane/upjet-provider-template/internal/clients"
"github.com/crossplane/upjet-provider-template/internal/controller"
"github.com/crossplane/upjet-provider-template/internal/features"
tjcontroller "github.com/crossplane/upjet/pkg/controller"
"github.com/crossplane/upjet/pkg/terraform"
"gopkg.in/alecthomas/kingpin.v2"
Expand All @@ -26,12 +26,12 @@ import (
"sigs.k8s.io/controller-runtime/pkg/cache"
"sigs.k8s.io/controller-runtime/pkg/log/zap"

"github.com/crossplane/upjet-provider-template/apis"
"github.com/crossplane/upjet-provider-template/apis/v1alpha1"
"github.com/crossplane/upjet-provider-template/config"
"github.com/crossplane/upjet-provider-template/internal/clients"
"github.com/crossplane/upjet-provider-template/internal/controller"
"github.com/crossplane/upjet-provider-template/internal/features"
xpv1 "github.com/crossplane/crossplane-runtime/apis/common/v1"
xpcontroller "github.com/crossplane/crossplane-runtime/pkg/controller"
"github.com/crossplane/crossplane-runtime/pkg/feature"
"github.com/crossplane/crossplane-runtime/pkg/logging"
"github.com/crossplane/crossplane-runtime/pkg/ratelimiter"
"github.com/crossplane/crossplane-runtime/pkg/resource"
)

func main() {
Expand Down
7 changes: 3 additions & 4 deletions config/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@
package config

import (
// Note(turkenh): we are importing this to embed provider schema document
_ "embed"

"github.com/crossplane/upjet-provider-template/config/null"
ujconfig "github.com/crossplane/upjet/pkg/config"

"github.com/crossplane/upjet-provider-template/config/null"
// Note(turkenh): we are importing this to embed provider schema document
_ "embed"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion examples-generated/null/resource.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: null.template.upbound.io/v1alpha1
apiVersion: null.template.crossplane.io/v1alpha1
kind: Resource
metadata:
annotations:
Expand Down
1 change: 0 additions & 1 deletion go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,6 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk
golang.org/x/crypto v0.0.0-20190426145343-a29dc8fdc734/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20190911031432-227b76d455e7/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4=
Expand Down
7 changes: 3 additions & 4 deletions internal/clients/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,13 @@ import (
"context"
"encoding/json"

"github.com/crossplane/crossplane-runtime/pkg/resource"
"github.com/crossplane/upjet-provider-template/apis/v1beta1"
"github.com/crossplane/upjet/pkg/terraform"
"github.com/pkg/errors"
"k8s.io/apimachinery/pkg/types"
"sigs.k8s.io/controller-runtime/pkg/client"

"github.com/crossplane/upjet/pkg/terraform"

"github.com/crossplane/upjet-provider-template/apis/v1beta1"
"github.com/crossplane/crossplane-runtime/pkg/resource"
)

const (
Expand Down
8 changes: 4 additions & 4 deletions internal/controller/providerconfig/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
package providerconfig

import (
"github.com/crossplane/crossplane-runtime/pkg/event"
"github.com/crossplane/crossplane-runtime/pkg/reconciler/providerconfig"
"github.com/crossplane/crossplane-runtime/pkg/resource"
"github.com/crossplane/upjet-provider-template/apis/v1beta1"
"github.com/crossplane/upjet/pkg/controller"
ctrl "sigs.k8s.io/controller-runtime"

"github.com/crossplane/upjet-provider-template/apis/v1beta1"
"github.com/crossplane/crossplane-runtime/pkg/event"
"github.com/crossplane/crossplane-runtime/pkg/reconciler/providerconfig"
"github.com/crossplane/crossplane-runtime/pkg/resource"
)

// Setup adds a controller that reconciles ProviderConfigs by accounting for
Expand Down
6 changes: 2 additions & 4 deletions internal/controller/zz_setup.go
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,10 @@
package controller

import (
ctrl "sigs.k8s.io/controller-runtime"

"github.com/crossplane/upjet/pkg/controller"

resource "github.com/crossplane/upjet-provider-template/internal/controller/null/resource"
providerconfig "github.com/crossplane/upjet-provider-template/internal/controller/providerconfig"
"github.com/crossplane/upjet/pkg/controller"
ctrl "sigs.k8s.io/controller-runtime"
)

// Setup creates all controllers with the supplied logger and adds them to
Expand Down
2 changes: 1 addition & 1 deletion package/crds/null.template.crossplane.io_resources.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.13.0
name: resources.null.template.upbound.io
name: resources.null.template.crossplane.io
spec:
group: null.template.crossplane.io
names:
Expand Down
2 changes: 1 addition & 1 deletion package/crds/template.crossplane.io_providerconfigs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.13.0
name: providerconfigs.template.upbound.io
name: providerconfigs.template.crossplane.io
spec:
group: template.crossplane.io
names:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.13.0
name: providerconfigusages.template.upbound.io
name: providerconfigusages.template.crossplane.io
spec:
group: template.crossplane.io
names:
Expand Down
2 changes: 1 addition & 1 deletion package/crds/template.crossplane.io_storeconfigs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.13.0
name: storeconfigs.template.upbound.io
name: storeconfigs.template.crossplane.io
spec:
group: template.crossplane.io
names:
Expand Down

0 comments on commit 6b56b8d

Please sign in to comment.