From 2c714c0362c437710465bef9123656bb77b1b908 Mon Sep 17 00:00:00 2001 From: Sjur Millidahl <sjur.millidahl@statnett.no> Date: Wed, 20 Nov 2024 10:30:42 +0100 Subject: [PATCH] chore: steps make submodules and make provider Cloudian --- Makefile | 14 +- PROVIDER_CHECKLIST.md | 24 +- README.md | 8 +- apis/{template.go => cloudian.go} | 8 +- apis/sample/sample.go | 18 -- apis/sample/v1alpha1/doc.go | 17 -- apis/sample/v1alpha1/groupversion_info.go | 40 ---- apis/sample/v1alpha1/mytype_types.go | 87 -------- apis/sample/v1alpha1/zz_generated.deepcopy.go | 148 ------------- apis/sample/v1alpha1/zz_generated.managed.go | 80 ------- .../v1alpha1/zz_generated.managedlist.go | 29 --- apis/v1alpha1/groupversion_info.go | 6 +- apis/v1alpha1/providerconfig_types.go | 2 +- apis/v1alpha1/providerconfigusage_types.go | 2 +- .../Dockerfile | 4 +- .../Makefile | 0 cluster/local/integration_tests.sh | 2 +- cmd/provider/main.go | 18 +- examples/provider/config.yaml | 2 +- examples/sample/mytype.yaml | 2 +- examples/storeconfig/vault.yaml | 2 +- go.mod | 2 +- .../controller/{template.go => cloudian.go} | 6 +- internal/controller/config/config.go | 2 +- internal/controller/mytype/mytype.go | 205 ------------------ internal/controller/mytype/mytype_test.go | 75 ------- ...sample.template.crossplane.io_mytypes.yaml | 6 +- ...emplate.crossplane.io_providerconfigs.yaml | 6 +- ...te.crossplane.io_providerconfigusages.yaml | 6 +- .../template.crossplane.io_storeconfigs.yaml | 4 +- package/crossplane.yaml | 6 +- 31 files changed, 66 insertions(+), 765 deletions(-) rename apis/{template.go => cloudian.go} (82%) delete mode 100644 apis/sample/sample.go delete mode 100644 apis/sample/v1alpha1/doc.go delete mode 100644 apis/sample/v1alpha1/groupversion_info.go delete mode 100644 apis/sample/v1alpha1/mytype_types.go delete mode 100644 apis/sample/v1alpha1/zz_generated.deepcopy.go delete mode 100644 apis/sample/v1alpha1/zz_generated.managed.go delete mode 100644 apis/sample/v1alpha1/zz_generated.managedlist.go rename cluster/images/{provider-template => provider-cloudian}/Dockerfile (76%) rename cluster/images/{provider-template => provider-cloudian}/Makefile (100%) rename internal/controller/{template.go => cloudian.go} (83%) delete mode 100644 internal/controller/mytype/mytype.go delete mode 100644 internal/controller/mytype/mytype_test.go diff --git a/Makefile b/Makefile index 4de642ea..a64c0414 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ # ==================================================================================== # Setup Project -PROJECT_NAME := provider-template +PROJECT_NAME := provider-cloudian PROJECT_REPO := github.com/crossplane/$(PROJECT_NAME) PLATFORMS ?= linux_amd64 linux_arm64 @@ -30,7 +30,7 @@ GO111MODULE = on # ==================================================================================== # Setup Images -IMAGES = provider-template +IMAGES = provider-cloudian -include build/makelib/imagelight.mk # ==================================================================================== @@ -40,12 +40,12 @@ XPKG_REG_ORGS ?= xpkg.upbound.io/crossplane # NOTE(hasheddan): skip promoting on xpkg.upbound.io as channel tags are # inferred. XPKG_REG_ORGS_NO_PROMOTE ?= xpkg.upbound.io/crossplane -XPKGS = provider-template +XPKGS = provider-cloudian -include build/makelib/xpkg.mk # NOTE(hasheddan): we force image building to happen prior to xpkg build so that # we ensure image is present in daemon. -xpkg.build.provider-template: do.build.images +xpkg.build.provider-cloudian: do.build.images fallthrough: submodules @echo Initial setup complete. Running make again . . . @@ -93,9 +93,9 @@ dev: $(KIND) $(KUBECTL) @$(KUBECTL) cluster-info --context kind-$(PROJECT_NAME)-dev @$(INFO) Installing Crossplane CRDs @$(KUBECTL) apply --server-side -k https://github.com/crossplane/crossplane//cluster?ref=master - @$(INFO) Installing Provider Template CRDs + @$(INFO) Installing Provider Cloudian CRDs @$(KUBECTL) apply -R -f package/crds - @$(INFO) Starting Provider Template controllers + @$(INFO) Starting Provider Cloudian controllers @$(GO) run cmd/provider/main.go --debug dev-clean: $(KIND) $(KUBECTL) @@ -120,7 +120,7 @@ $(GOMPLATE): export GOMPLATE -# This target prepares repo for your provider by replacing all "template" +# This target prepares repo for your provider by replacing all "cloudian" # occurrences with your provider name. # This target can only be run once, if you want to rerun for some reason, # consider stashing/resetting your git state. diff --git a/PROVIDER_CHECKLIST.md b/PROVIDER_CHECKLIST.md index 116848d2..499b9370 100644 --- a/PROVIDER_CHECKLIST.md +++ b/PROVIDER_CHECKLIST.md @@ -30,9 +30,9 @@ Generally projects are named `provider-<name>`, with `name` being the API being managed. Example project names are `provider-aws`, `provider-kubernetes`, and `provider-github`. -The [provider-template](https://github.com/crossplane/provider-template) repository can be +The [provider-cloudian](https://github.com/crossplane/provider-cloudian) repository can be used as a starting point for new providers. For [terrajet](https://github.com/crossplane/terrajet)-based providers, the -[provider-jet-template](https://github.com/crossplane-contrib/provider-jet-template) is +[provider-jet-cloudian](https://github.com/crossplane-contrib/provider-jet-cloudian) is available. ## Files @@ -43,17 +43,17 @@ Most Crossplane providers include the following files: [provider-gcp/README.md](https://github.com/crossplane/provider-gcp/blob/master/README.md) as an example) - [ ] Code is licensed under the [Apache 2.0 - License](https://github.com/crossplane/provider-template/blob/main/LICENSE) + License](https://github.com/crossplane/provider-cloudian/blob/main/LICENSE) - [ ] Include a “Developer Certificate of Origin”. Example: [DCO](https://github.com/upbound/build/blob/master/DCO) - [ ] Include the CNCF [Code of Conduct](https://github.com/crossplane/crossplane/blob/master/CODE_OF_CONDUCT.md) - [ ] Update - [OWNERS.md](https://github.com/crossplane/provider-template/blob/main/OWNERS.md) + [OWNERS.md](https://github.com/crossplane/provider-cloudian/blob/main/OWNERS.md) with contacts for project Owners - [ ] Ensure `hack/boilerplate.go.txt` (used in Code generation) includes Crossplane Authors, Apache license and any other Copyright statements: - [https://github.com/crossplane/provider-template/blob/main/hack/boilerplate.go.txt](https://github.com/crossplane/provider-template/blob/main/hack/boilerplate.go.txt) + [https://github.com/crossplane/provider-cloudian/blob/main/hack/boilerplate.go.txt](https://github.com/crossplane/provider-cloudian/blob/main/hack/boilerplate.go.txt) - [ ] Include Documentation on how to: - [ ] Install Provider - [ ] Contribute to Development @@ -68,7 +68,7 @@ There are a number of build tools and processes that are common across the Crossplane ecosystem. Using these ensures a consistent development environment across projects. -The [provider-template](https://github.com/crossplane/provider-template) +The [provider-cloudian](https://github.com/crossplane/provider-cloudian) repository contains most of these settings. - [ ] Use the [Upbound build](https://github.com/upbound/build) submodule. (see @@ -81,7 +81,7 @@ repository contains most of these settings. - [ ] Create a [Crossplane Package](https://crossplane.io/docs/master/concepts/packages.html) configuration (see - [package/crossplane.yaml)](https://github.com/crossplane/provider-template/blob/main/package/crossplane.yaml) + [package/crossplane.yaml)](https://github.com/crossplane/provider-cloudian/blob/main/package/crossplane.yaml) ## Deployment of Artifacts @@ -96,7 +96,7 @@ the publish and promotion workflows. In general, providers should: - [ ] Utilize GitHub workflows from - <https://github.com/crossplane/provider-template/tree/main/.github/workflows> + <https://github.com/crossplane/provider-cloudian/tree/main/.github/workflows> - [ ] Create OCI image repos to push Package and Controller images. - [ ] Automatically push Provider images and packages via CI - [ ] Add GitHub Secrets to push to Docker repository. (To be performed by @@ -112,7 +112,7 @@ to grant your project access to the GitHub org scoped secrets. - [ ] Follow recommendations at [https://github.com/crossplane/crossplane/blob/master/GOVERNANCE.md#repository-governance](https://github.com/crossplane/crossplane/blob/master/GOVERNANCE.md#repository-governance) -- [ ] Enable Issues on your project and configure Issue templates (examples at: - [.github/ISSUE_TEMPLATE](https://github.com/crossplane/provider-template/tree/master/.github/ISSUE_TEMPLATE)) -- [ ] Create Pull Request Templates: (example: - [PULL_REQUEST_TEMPLATE.md](https://github.com/crossplane/provider-template/blob/master/.github/PULL_REQUEST_TEMPLATE.md)) +- [ ] Enable Issues on your project and configure Issue cloudians (examples at: + [.github/ISSUE_TEMPLATE](https://github.com/crossplane/provider-cloudian/tree/master/.github/ISSUE_TEMPLATE)) +- [ ] Create Pull Request Cloudians: (example: + [PULL_REQUEST_TEMPLATE.md](https://github.com/crossplane/provider-cloudian/blob/master/.github/PULL_REQUEST_TEMPLATE.md)) diff --git a/README.md b/README.md index f06a7afa..323788f4 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ -# provider-template +# provider-cloudian -`provider-template` is a minimal [Crossplane](https://crossplane.io/) Provider -that is meant to be used as a template for implementing new Providers. It comes +`provider-cloudian` is a minimal [Crossplane](https://crossplane.io/) Provider +that is meant to be used as a cloudian for implementing new Providers. It comes with the following features that are meant to be refactored: - A `ProviderConfig` type that only points to a credentials `Secret`. @@ -11,7 +11,7 @@ with the following features that are meant to be refactored: ## Developing -1. Use this repository as a template to create a new one. +1. Use this repository as a cloudian to create a new one. 1. Run `make submodules` to initialize the "build" Make submodule we use for CI/CD. 1. Rename the provider by running the following command: ```shell diff --git a/apis/template.go b/apis/cloudian.go similarity index 82% rename from apis/template.go rename to apis/cloudian.go index b848fb47..6820e3d7 100644 --- a/apis/template.go +++ b/apis/cloudian.go @@ -14,20 +14,20 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Package apis contains Kubernetes API for the Template provider. +// Package apis contains Kubernetes API for the Cloudian provider. package apis import ( "k8s.io/apimachinery/pkg/runtime" - samplev1alpha1 "github.com/crossplane/provider-template/apis/sample/v1alpha1" - templatev1alpha1 "github.com/crossplane/provider-template/apis/v1alpha1" + samplev1alpha1 "github.com/crossplane/provider-cloudian/apis/sample/v1alpha1" + cloudianv1alpha1 "github.com/crossplane/provider-cloudian/apis/v1alpha1" ) func init() { // Register the types with the Scheme so the components can map objects to GroupVersionKinds and back AddToSchemes = append(AddToSchemes, - templatev1alpha1.SchemeBuilder.AddToScheme, + cloudianv1alpha1.SchemeBuilder.AddToScheme, samplev1alpha1.SchemeBuilder.AddToScheme, ) } diff --git a/apis/sample/sample.go b/apis/sample/sample.go deleted file mode 100644 index 4772f5f7..00000000 --- a/apis/sample/sample.go +++ /dev/null @@ -1,18 +0,0 @@ -/* -Copyright 2020 The Crossplane Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Package sample contains group Sample API versions -package sample diff --git a/apis/sample/v1alpha1/doc.go b/apis/sample/v1alpha1/doc.go deleted file mode 100644 index 9c30a179..00000000 --- a/apis/sample/v1alpha1/doc.go +++ /dev/null @@ -1,17 +0,0 @@ -/* -Copyright 2020 The Crossplane Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1alpha1 diff --git a/apis/sample/v1alpha1/groupversion_info.go b/apis/sample/v1alpha1/groupversion_info.go deleted file mode 100644 index dfb12a16..00000000 --- a/apis/sample/v1alpha1/groupversion_info.go +++ /dev/null @@ -1,40 +0,0 @@ -/* -Copyright 2020 The Crossplane Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Package v1alpha1 contains the v1alpha1 group Sample resources of the Template provider. -// +kubebuilder:object:generate=true -// +groupName=sample.template.crossplane.io -// +versionName=v1alpha1 -package v1alpha1 - -import ( - "k8s.io/apimachinery/pkg/runtime/schema" - "sigs.k8s.io/controller-runtime/pkg/scheme" -) - -// Package type metadata. -const ( - Group = "sample.template.crossplane.io" - Version = "v1alpha1" -) - -var ( - // SchemeGroupVersion is group version used to register these objects - SchemeGroupVersion = schema.GroupVersion{Group: Group, Version: Version} - - // SchemeBuilder is used to add go types to the GroupVersionKind scheme - SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion} -) diff --git a/apis/sample/v1alpha1/mytype_types.go b/apis/sample/v1alpha1/mytype_types.go deleted file mode 100644 index d66b6b78..00000000 --- a/apis/sample/v1alpha1/mytype_types.go +++ /dev/null @@ -1,87 +0,0 @@ -/* -Copyright 2020 The Crossplane Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1alpha1 - -import ( - "reflect" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime/schema" - - xpv1 "github.com/crossplane/crossplane-runtime/apis/common/v1" -) - -// MyTypeParameters are the configurable fields of a MyType. -type MyTypeParameters struct { - ConfigurableField string `json:"configurableField"` -} - -// MyTypeObservation are the observable fields of a MyType. -type MyTypeObservation struct { - ConfigurableField string `json:"configurableField"` - ObservableField string `json:"observableField,omitempty"` -} - -// A MyTypeSpec defines the desired state of a MyType. -type MyTypeSpec struct { - xpv1.ResourceSpec `json:",inline"` - ForProvider MyTypeParameters `json:"forProvider"` -} - -// A MyTypeStatus represents the observed state of a MyType. -type MyTypeStatus struct { - xpv1.ResourceStatus `json:",inline"` - AtProvider MyTypeObservation `json:"atProvider,omitempty"` -} - -// +kubebuilder:object:root=true - -// A MyType is an example API type. -// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" -// +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" -// +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name" -// +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" -// +kubebuilder:subresource:status -// +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,template} -type MyType struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - Spec MyTypeSpec `json:"spec"` - Status MyTypeStatus `json:"status,omitempty"` -} - -// +kubebuilder:object:root=true - -// MyTypeList contains a list of MyType -type MyTypeList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []MyType `json:"items"` -} - -// MyType type metadata. -var ( - MyTypeKind = reflect.TypeOf(MyType{}).Name() - MyTypeGroupKind = schema.GroupKind{Group: Group, Kind: MyTypeKind}.String() - MyTypeKindAPIVersion = MyTypeKind + "." + SchemeGroupVersion.String() - MyTypeGroupVersionKind = SchemeGroupVersion.WithKind(MyTypeKind) -) - -func init() { - SchemeBuilder.Register(&MyType{}, &MyTypeList{}) -} diff --git a/apis/sample/v1alpha1/zz_generated.deepcopy.go b/apis/sample/v1alpha1/zz_generated.deepcopy.go deleted file mode 100644 index 8f369c14..00000000 --- a/apis/sample/v1alpha1/zz_generated.deepcopy.go +++ /dev/null @@ -1,148 +0,0 @@ -//go:build !ignore_autogenerated - -/* -Copyright 2020 The Crossplane Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by controller-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *MyType) DeepCopyInto(out *MyType) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MyType. -func (in *MyType) DeepCopy() *MyType { - if in == nil { - return nil - } - out := new(MyType) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *MyType) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *MyTypeList) DeepCopyInto(out *MyTypeList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]MyType, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MyTypeList. -func (in *MyTypeList) DeepCopy() *MyTypeList { - if in == nil { - return nil - } - out := new(MyTypeList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *MyTypeList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *MyTypeObservation) DeepCopyInto(out *MyTypeObservation) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MyTypeObservation. -func (in *MyTypeObservation) DeepCopy() *MyTypeObservation { - if in == nil { - return nil - } - out := new(MyTypeObservation) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *MyTypeParameters) DeepCopyInto(out *MyTypeParameters) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MyTypeParameters. -func (in *MyTypeParameters) DeepCopy() *MyTypeParameters { - if in == nil { - return nil - } - out := new(MyTypeParameters) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *MyTypeSpec) DeepCopyInto(out *MyTypeSpec) { - *out = *in - in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) - out.ForProvider = in.ForProvider -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MyTypeSpec. -func (in *MyTypeSpec) DeepCopy() *MyTypeSpec { - if in == nil { - return nil - } - out := new(MyTypeSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *MyTypeStatus) DeepCopyInto(out *MyTypeStatus) { - *out = *in - in.ResourceStatus.DeepCopyInto(&out.ResourceStatus) - out.AtProvider = in.AtProvider -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MyTypeStatus. -func (in *MyTypeStatus) DeepCopy() *MyTypeStatus { - if in == nil { - return nil - } - out := new(MyTypeStatus) - in.DeepCopyInto(out) - return out -} diff --git a/apis/sample/v1alpha1/zz_generated.managed.go b/apis/sample/v1alpha1/zz_generated.managed.go deleted file mode 100644 index b1dba71b..00000000 --- a/apis/sample/v1alpha1/zz_generated.managed.go +++ /dev/null @@ -1,80 +0,0 @@ -/* -Copyright 2020 The Crossplane Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -// Code generated by angryjet. DO NOT EDIT. - -package v1alpha1 - -import xpv1 "github.com/crossplane/crossplane-runtime/apis/common/v1" - -// GetCondition of this MyType. -func (mg *MyType) GetCondition(ct xpv1.ConditionType) xpv1.Condition { - return mg.Status.GetCondition(ct) -} - -// GetDeletionPolicy of this MyType. -func (mg *MyType) GetDeletionPolicy() xpv1.DeletionPolicy { - return mg.Spec.DeletionPolicy -} - -// GetManagementPolicies of this MyType. -func (mg *MyType) GetManagementPolicies() xpv1.ManagementPolicies { - return mg.Spec.ManagementPolicies -} - -// GetProviderConfigReference of this MyType. -func (mg *MyType) GetProviderConfigReference() *xpv1.Reference { - return mg.Spec.ProviderConfigReference -} - -// GetPublishConnectionDetailsTo of this MyType. -func (mg *MyType) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { - return mg.Spec.PublishConnectionDetailsTo -} - -// GetWriteConnectionSecretToReference of this MyType. -func (mg *MyType) GetWriteConnectionSecretToReference() *xpv1.SecretReference { - return mg.Spec.WriteConnectionSecretToReference -} - -// SetConditions of this MyType. -func (mg *MyType) SetConditions(c ...xpv1.Condition) { - mg.Status.SetConditions(c...) -} - -// SetDeletionPolicy of this MyType. -func (mg *MyType) SetDeletionPolicy(r xpv1.DeletionPolicy) { - mg.Spec.DeletionPolicy = r -} - -// SetManagementPolicies of this MyType. -func (mg *MyType) SetManagementPolicies(r xpv1.ManagementPolicies) { - mg.Spec.ManagementPolicies = r -} - -// SetProviderConfigReference of this MyType. -func (mg *MyType) SetProviderConfigReference(r *xpv1.Reference) { - mg.Spec.ProviderConfigReference = r -} - -// SetPublishConnectionDetailsTo of this MyType. -func (mg *MyType) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { - mg.Spec.PublishConnectionDetailsTo = r -} - -// SetWriteConnectionSecretToReference of this MyType. -func (mg *MyType) SetWriteConnectionSecretToReference(r *xpv1.SecretReference) { - mg.Spec.WriteConnectionSecretToReference = r -} diff --git a/apis/sample/v1alpha1/zz_generated.managedlist.go b/apis/sample/v1alpha1/zz_generated.managedlist.go deleted file mode 100644 index 2b6ee905..00000000 --- a/apis/sample/v1alpha1/zz_generated.managedlist.go +++ /dev/null @@ -1,29 +0,0 @@ -/* -Copyright 2020 The Crossplane Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -// Code generated by angryjet. DO NOT EDIT. - -package v1alpha1 - -import resource "github.com/crossplane/crossplane-runtime/pkg/resource" - -// GetItems of this MyTypeList. -func (l *MyTypeList) GetItems() []resource.Managed { - items := make([]resource.Managed, len(l.Items)) - for i := range l.Items { - items[i] = &l.Items[i] - } - return items -} diff --git a/apis/v1alpha1/groupversion_info.go b/apis/v1alpha1/groupversion_info.go index 2ced458c..5fcae48a 100644 --- a/apis/v1alpha1/groupversion_info.go +++ b/apis/v1alpha1/groupversion_info.go @@ -14,9 +14,9 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Package v1alpha1 contains the core resources of the Template provider. +// Package v1alpha1 contains the core resources of the Cloudian provider. // +kubebuilder:object:generate=true -// +groupName=template.crossplane.io +// +groupName=cloudian.crossplane.io // +versionName=v1alpha1 package v1alpha1 @@ -27,7 +27,7 @@ import ( // Package type metadata. const ( - Group = "template.crossplane.io" + Group = "cloudian.crossplane.io" Version = "v1alpha1" ) diff --git a/apis/v1alpha1/providerconfig_types.go b/apis/v1alpha1/providerconfig_types.go index d3bd7966..b7250812 100644 --- a/apis/v1alpha1/providerconfig_types.go +++ b/apis/v1alpha1/providerconfig_types.go @@ -47,7 +47,7 @@ type ProviderConfigStatus struct { // +kubebuilder:object:root=true -// A ProviderConfig configures a Template provider. +// A ProviderConfig configures a Cloudian provider. // +kubebuilder:subresource:status // +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" // +kubebuilder:printcolumn:name="SECRET-NAME",type="string",JSONPath=".spec.credentials.secretRef.name",priority=1 diff --git a/apis/v1alpha1/providerconfigusage_types.go b/apis/v1alpha1/providerconfigusage_types.go index a751a42f..91006844 100644 --- a/apis/v1alpha1/providerconfigusage_types.go +++ b/apis/v1alpha1/providerconfigusage_types.go @@ -32,7 +32,7 @@ import ( // +kubebuilder:printcolumn:name="CONFIG-NAME",type="string",JSONPath=".providerConfigRef.name" // +kubebuilder:printcolumn:name="RESOURCE-KIND",type="string",JSONPath=".resourceRef.kind" // +kubebuilder:printcolumn:name="RESOURCE-NAME",type="string",JSONPath=".resourceRef.name" -// +kubebuilder:resource:scope=Cluster,categories={crossplane,provider,template} +// +kubebuilder:resource:scope=Cluster,categories={crossplane,provider,cloudian} type ProviderConfigUsage struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` diff --git a/cluster/images/provider-template/Dockerfile b/cluster/images/provider-cloudian/Dockerfile similarity index 76% rename from cluster/images/provider-template/Dockerfile rename to cluster/images/provider-cloudian/Dockerfile index 9535a9e1..a11c736d 100644 --- a/cluster/images/provider-template/Dockerfile +++ b/cluster/images/provider-cloudian/Dockerfile @@ -3,7 +3,7 @@ FROM gcr.io/distroless/static@sha256:41972110a1c1a5c0b6adb283e8aa092c43c31f7c5d7 ARG TARGETOS ARG TARGETARCH -ADD bin/$TARGETOS\_$TARGETARCH/provider /usr/local/bin/crossplane-template-provider +ADD bin/$TARGETOS\_$TARGETARCH/provider /usr/local/bin/crossplane-cloudian-provider USER 65532 -ENTRYPOINT ["crossplane-template-provider"] +ENTRYPOINT ["crossplane-cloudian-provider"] diff --git a/cluster/images/provider-template/Makefile b/cluster/images/provider-cloudian/Makefile similarity index 100% rename from cluster/images/provider-template/Makefile rename to cluster/images/provider-cloudian/Makefile diff --git a/cluster/local/integration_tests.sh b/cluster/local/integration_tests.sh index 831731f9..508c178a 100755 --- a/cluster/local/integration_tests.sh +++ b/cluster/local/integration_tests.sh @@ -34,7 +34,7 @@ echo_error(){ # The name of your provider. Many provider Makefiles override this value. -PACKAGE_NAME="provider-template" +PACKAGE_NAME="provider-cloudian" # ------------------------------ diff --git a/cmd/provider/main.go b/cmd/provider/main.go index 2cf89776..acf9ec13 100644 --- a/cmd/provider/main.go +++ b/cmd/provider/main.go @@ -37,15 +37,15 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" - "github.com/crossplane/provider-template/apis" - "github.com/crossplane/provider-template/apis/v1alpha1" - template "github.com/crossplane/provider-template/internal/controller" - "github.com/crossplane/provider-template/internal/features" + "github.com/crossplane/provider-cloudian/apis" + "github.com/crossplane/provider-cloudian/apis/v1alpha1" + cloudian "github.com/crossplane/provider-cloudian/internal/controller" + "github.com/crossplane/provider-cloudian/internal/features" ) func main() { var ( - app = kingpin.New(filepath.Base(os.Args[0]), "Template support for Crossplane.").DefaultEnvars() + app = kingpin.New(filepath.Base(os.Args[0]), "Cloudian support for Crossplane.").DefaultEnvars() debug = app.Flag("debug", "Run with debug logging.").Short('d').Bool() leaderElection = app.Flag("leader-election", "Use leader election for the controller manager.").Short('l').Default("false").OverrideDefaultFromEnvar("LEADER_ELECTION").Bool() @@ -60,7 +60,7 @@ func main() { kingpin.MustParse(app.Parse(os.Args[1:])) zl := zap.New(zap.UseDevMode(*debug)) - log := logging.NewLogrLogger(zl.WithName("provider-template")) + log := logging.NewLogrLogger(zl.WithName("provider-cloudian")) 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 @@ -86,13 +86,13 @@ func main() { // server. Switching to Leases only and longer leases appears to // alleviate this. LeaderElection: *leaderElection, - LeaderElectionID: "crossplane-leader-election-provider-template", + LeaderElectionID: "crossplane-leader-election-provider-cloudian", LeaderElectionResourceLock: resourcelock.LeasesResourceLock, LeaseDuration: func() *time.Duration { d := 60 * time.Second; return &d }(), RenewDeadline: func() *time.Duration { d := 50 * time.Second; return &d }(), }) kingpin.FatalIfError(err, "Cannot create controller manager") - kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add Template APIs to scheme") + kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add Cloudian APIs to scheme") o := controller.Options{ Logger: log, @@ -126,6 +126,6 @@ func main() { log.Info("Alpha feature enabled", "flag", features.EnableAlphaManagementPolicies) } - kingpin.FatalIfError(template.Setup(mgr, o), "Cannot setup Template controllers") + kingpin.FatalIfError(cloudian.Setup(mgr, o), "Cannot setup Cloudian controllers") kingpin.FatalIfError(mgr.Start(ctrl.SetupSignalHandler()), "Cannot start controller manager") } diff --git a/examples/provider/config.yaml b/examples/provider/config.yaml index 6a536457..577ce4cd 100644 --- a/examples/provider/config.yaml +++ b/examples/provider/config.yaml @@ -12,7 +12,7 @@ type: Opaque data: # credentials: BASE64ENCODED_PROVIDER_CREDS --- -apiVersion: template.crossplane.io/v1alpha1 +apiVersion: cloudian.crossplane.io/v1alpha1 kind: ProviderConfig metadata: name: example diff --git a/examples/sample/mytype.yaml b/examples/sample/mytype.yaml index a73ff5c2..f14569dd 100644 --- a/examples/sample/mytype.yaml +++ b/examples/sample/mytype.yaml @@ -1,4 +1,4 @@ -apiVersion: sample.template.crossplane.io/v1alpha1 +apiVersion: sample.cloudian.crossplane.io/v1alpha1 kind: MyType metadata: name: example diff --git a/examples/storeconfig/vault.yaml b/examples/storeconfig/vault.yaml index 1f2d881a..d27757f3 100644 --- a/examples/storeconfig/vault.yaml +++ b/examples/storeconfig/vault.yaml @@ -1,4 +1,4 @@ -apiVersion: template.crossplane.io/v1alpha1 +apiVersion: cloudian.crossplane.io/v1alpha1 kind: StoreConfig metadata: name: vault diff --git a/go.mod b/go.mod index 88bfe275..a9adb4db 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/crossplane/provider-template +module github.com/crossplane/provider-cloudian go 1.21 diff --git a/internal/controller/template.go b/internal/controller/cloudian.go similarity index 83% rename from internal/controller/template.go rename to internal/controller/cloudian.go index e4bc5186..b3189234 100644 --- a/internal/controller/template.go +++ b/internal/controller/cloudian.go @@ -20,11 +20,11 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/controller" ctrl "sigs.k8s.io/controller-runtime" - "github.com/crossplane/provider-template/internal/controller/config" - "github.com/crossplane/provider-template/internal/controller/mytype" + "github.com/crossplane/provider-cloudian/internal/controller/config" + "github.com/crossplane/provider-cloudian/internal/controller/mytype" ) -// Setup creates all Template controllers with the supplied logger and adds them to +// Setup creates all Cloudian controllers with the supplied logger and adds them to // the supplied manager. func Setup(mgr ctrl.Manager, o controller.Options) error { for _, setup := range []func(ctrl.Manager, controller.Options) error{ diff --git a/internal/controller/config/config.go b/internal/controller/config/config.go index 7ff60e02..1122b9de 100644 --- a/internal/controller/config/config.go +++ b/internal/controller/config/config.go @@ -24,7 +24,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/resource" ctrl "sigs.k8s.io/controller-runtime" - "github.com/crossplane/provider-template/apis/v1alpha1" + "github.com/crossplane/provider-cloudian/apis/v1alpha1" ) // Setup adds a controller that reconciles ProviderConfigs by accounting for diff --git a/internal/controller/mytype/mytype.go b/internal/controller/mytype/mytype.go deleted file mode 100644 index 58be0642..00000000 --- a/internal/controller/mytype/mytype.go +++ /dev/null @@ -1,205 +0,0 @@ -/* -Copyright 2020 The Crossplane Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package mytype - -import ( - "context" - "fmt" - - "github.com/pkg/errors" - "k8s.io/apimachinery/pkg/types" - ctrl "sigs.k8s.io/controller-runtime" - "sigs.k8s.io/controller-runtime/pkg/client" - - "github.com/crossplane/crossplane-runtime/pkg/connection" - "github.com/crossplane/crossplane-runtime/pkg/controller" - "github.com/crossplane/crossplane-runtime/pkg/event" - "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" - "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" - "github.com/crossplane/crossplane-runtime/pkg/resource" - - "github.com/crossplane/provider-template/apis/sample/v1alpha1" - apisv1alpha1 "github.com/crossplane/provider-template/apis/v1alpha1" - "github.com/crossplane/provider-template/internal/features" -) - -const ( - errNotMyType = "managed resource is not a MyType custom resource" - errTrackPCUsage = "cannot track ProviderConfig usage" - errGetPC = "cannot get ProviderConfig" - errGetCreds = "cannot get credentials" - - errNewClient = "cannot create new Service" -) - -// A NoOpService does nothing. -type NoOpService struct{} - -var ( - newNoOpService = func(_ []byte) (interface{}, error) { return &NoOpService{}, nil } -) - -// Setup adds a controller that reconciles MyType managed resources. -func Setup(mgr ctrl.Manager, o controller.Options) error { - name := managed.ControllerName(v1alpha1.MyTypeGroupKind) - - cps := []managed.ConnectionPublisher{managed.NewAPISecretPublisher(mgr.GetClient(), mgr.GetScheme())} - if o.Features.Enabled(features.EnableAlphaExternalSecretStores) { - cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), apisv1alpha1.StoreConfigGroupVersionKind)) - } - - opts := []managed.ReconcilerOption{ - managed.WithExternalConnecter(&connector{ - kube: mgr.GetClient(), - usage: resource.NewProviderConfigUsageTracker(mgr.GetClient(), &apisv1alpha1.ProviderConfigUsage{}), - newServiceFn: newNoOpService}), - managed.WithLogger(o.Logger.WithValues("controller", name)), - managed.WithPollInterval(o.PollInterval), - managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), - managed.WithConnectionPublishers(cps...), - } - - if o.Features.Enabled(features.EnableAlphaManagementPolicies) { - opts = append(opts, managed.WithManagementPolicies()) - } - - r := managed.NewReconciler(mgr, resource.ManagedKind(v1alpha1.MyTypeGroupVersionKind), opts...) - - return ctrl.NewControllerManagedBy(mgr). - Named(name). - WithOptions(o.ForControllerRuntime()). - WithEventFilter(resource.DesiredStateChanged()). - For(&v1alpha1.MyType{}). - Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) -} - -// A connector is expected to produce an ExternalClient when its Connect method -// is called. -type connector struct { - kube client.Client - usage resource.Tracker - newServiceFn func(creds []byte) (interface{}, error) -} - -// Connect typically produces an ExternalClient by: -// 1. Tracking that the managed resource is using a ProviderConfig. -// 2. Getting the managed resource's ProviderConfig. -// 3. Getting the credentials specified by the ProviderConfig. -// 4. Using the credentials to form a client. -func (c *connector) Connect(ctx context.Context, mg resource.Managed) (managed.ExternalClient, error) { - cr, ok := mg.(*v1alpha1.MyType) - if !ok { - return nil, errors.New(errNotMyType) - } - - if err := c.usage.Track(ctx, mg); err != nil { - return nil, errors.Wrap(err, errTrackPCUsage) - } - - pc := &apisv1alpha1.ProviderConfig{} - if err := c.kube.Get(ctx, types.NamespacedName{Name: cr.GetProviderConfigReference().Name}, pc); err != nil { - return nil, errors.Wrap(err, errGetPC) - } - - cd := pc.Spec.Credentials - data, err := resource.CommonCredentialExtractor(ctx, cd.Source, c.kube, cd.CommonCredentialSelectors) - if err != nil { - return nil, errors.Wrap(err, errGetCreds) - } - - svc, err := c.newServiceFn(data) - if err != nil { - return nil, errors.Wrap(err, errNewClient) - } - - return &external{service: svc}, nil -} - -// An ExternalClient observes, then either creates, updates, or deletes an -// external resource to ensure it reflects the managed resource's desired state. -type external struct { - // A 'client' used to connect to the external resource API. In practice this - // would be something like an AWS SDK client. - service interface{} -} - -func (c *external) Observe(ctx context.Context, mg resource.Managed) (managed.ExternalObservation, error) { - cr, ok := mg.(*v1alpha1.MyType) - if !ok { - return managed.ExternalObservation{}, errors.New(errNotMyType) - } - - // These fmt statements should be removed in the real implementation. - fmt.Printf("Observing: %+v", cr) - - return managed.ExternalObservation{ - // Return false when the external resource does not exist. This lets - // the managed resource reconciler know that it needs to call Create to - // (re)create the resource, or that it has successfully been deleted. - ResourceExists: true, - - // Return false when the external resource exists, but it not up to date - // with the desired managed resource state. This lets the managed - // resource reconciler know that it needs to call Update. - ResourceUpToDate: true, - - // Return any details that may be required to connect to the external - // resource. These will be stored as the connection secret. - ConnectionDetails: managed.ConnectionDetails{}, - }, nil -} - -func (c *external) Create(ctx context.Context, mg resource.Managed) (managed.ExternalCreation, error) { - cr, ok := mg.(*v1alpha1.MyType) - if !ok { - return managed.ExternalCreation{}, errors.New(errNotMyType) - } - - fmt.Printf("Creating: %+v", cr) - - return managed.ExternalCreation{ - // Optionally return any details that may be required to connect to the - // external resource. These will be stored as the connection secret. - ConnectionDetails: managed.ConnectionDetails{}, - }, nil -} - -func (c *external) Update(ctx context.Context, mg resource.Managed) (managed.ExternalUpdate, error) { - cr, ok := mg.(*v1alpha1.MyType) - if !ok { - return managed.ExternalUpdate{}, errors.New(errNotMyType) - } - - fmt.Printf("Updating: %+v", cr) - - return managed.ExternalUpdate{ - // Optionally return any details that may be required to connect to the - // external resource. These will be stored as the connection secret. - ConnectionDetails: managed.ConnectionDetails{}, - }, nil -} - -func (c *external) Delete(ctx context.Context, mg resource.Managed) error { - cr, ok := mg.(*v1alpha1.MyType) - if !ok { - return errors.New(errNotMyType) - } - - fmt.Printf("Deleting: %+v", cr) - - return nil -} diff --git a/internal/controller/mytype/mytype_test.go b/internal/controller/mytype/mytype_test.go deleted file mode 100644 index a49acc9f..00000000 --- a/internal/controller/mytype/mytype_test.go +++ /dev/null @@ -1,75 +0,0 @@ -/* -Copyright 2020 The Crossplane Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package mytype - -import ( - "context" - "testing" - - "github.com/google/go-cmp/cmp" - - "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" - "github.com/crossplane/crossplane-runtime/pkg/resource" - "github.com/crossplane/crossplane-runtime/pkg/test" -) - -// Unlike many Kubernetes projects Crossplane does not use third party testing -// libraries, per the common Go test review comments. Crossplane encourages the -// use of table driven unit tests. The tests of the crossplane-runtime project -// are representative of the testing style Crossplane encourages. -// -// https://github.com/golang/go/wiki/TestComments -// https://github.com/crossplane/crossplane/blob/master/CONTRIBUTING.md#contributing-code - -func TestObserve(t *testing.T) { - type fields struct { - service interface{} - } - - type args struct { - ctx context.Context - mg resource.Managed - } - - type want struct { - o managed.ExternalObservation - err error - } - - cases := map[string]struct { - reason string - fields fields - args args - want want - }{ - // TODO: Add test cases. - } - - for name, tc := range cases { - tc := tc - t.Run(name, func(t *testing.T) { - e := external{service: tc.fields.service} - got, err := e.Observe(tc.args.ctx, tc.args.mg) - if diff := cmp.Diff(tc.want.err, err, test.EquateErrors()); diff != "" { - t.Errorf("\n%s\ne.Observe(...): -want error, +got error:\n%s\n", tc.reason, diff) - } - if diff := cmp.Diff(tc.want.o, got); diff != "" { - t.Errorf("\n%s\ne.Observe(...): -want, +got:\n%s\n", tc.reason, diff) - } - }) - } -} diff --git a/package/crds/sample.template.crossplane.io_mytypes.yaml b/package/crds/sample.template.crossplane.io_mytypes.yaml index 34106763..457ebe4d 100644 --- a/package/crds/sample.template.crossplane.io_mytypes.yaml +++ b/package/crds/sample.template.crossplane.io_mytypes.yaml @@ -4,14 +4,14 @@ kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.14.0 - name: mytypes.sample.template.crossplane.io + name: mytypes.sample.cloudian.crossplane.io spec: - group: sample.template.crossplane.io + group: sample.cloudian.crossplane.io names: categories: - crossplane - managed - - template + - cloudian kind: MyType listKind: MyTypeList plural: mytypes diff --git a/package/crds/template.crossplane.io_providerconfigs.yaml b/package/crds/template.crossplane.io_providerconfigs.yaml index c176358f..aa822645 100644 --- a/package/crds/template.crossplane.io_providerconfigs.yaml +++ b/package/crds/template.crossplane.io_providerconfigs.yaml @@ -4,9 +4,9 @@ kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.14.0 - name: providerconfigs.template.crossplane.io + name: providerconfigs.cloudian.crossplane.io spec: - group: template.crossplane.io + group: cloudian.crossplane.io names: kind: ProviderConfig listKind: ProviderConfigList @@ -25,7 +25,7 @@ spec: name: v1alpha1 schema: openAPIV3Schema: - description: A ProviderConfig configures a Template provider. + description: A ProviderConfig configures a Cloudian provider. properties: apiVersion: description: |- diff --git a/package/crds/template.crossplane.io_providerconfigusages.yaml b/package/crds/template.crossplane.io_providerconfigusages.yaml index b1b7b3d4..126cd969 100644 --- a/package/crds/template.crossplane.io_providerconfigusages.yaml +++ b/package/crds/template.crossplane.io_providerconfigusages.yaml @@ -4,14 +4,14 @@ kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.14.0 - name: providerconfigusages.template.crossplane.io + name: providerconfigusages.cloudian.crossplane.io spec: - group: template.crossplane.io + group: cloudian.crossplane.io names: categories: - crossplane - provider - - template + - cloudian kind: ProviderConfigUsage listKind: ProviderConfigUsageList plural: providerconfigusages diff --git a/package/crds/template.crossplane.io_storeconfigs.yaml b/package/crds/template.crossplane.io_storeconfigs.yaml index f2dd54b4..97a91788 100644 --- a/package/crds/template.crossplane.io_storeconfigs.yaml +++ b/package/crds/template.crossplane.io_storeconfigs.yaml @@ -4,9 +4,9 @@ kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.14.0 - name: storeconfigs.template.crossplane.io + name: storeconfigs.cloudian.crossplane.io spec: - group: template.crossplane.io + group: cloudian.crossplane.io names: categories: - crossplane diff --git a/package/crossplane.yaml b/package/crossplane.yaml index e14f9f78..2eae1f4c 100644 --- a/package/crossplane.yaml +++ b/package/crossplane.yaml @@ -1,10 +1,10 @@ apiVersion: meta.pkg.crossplane.io/v1alpha1 kind: Provider metadata: - name: provider-template + name: provider-cloudian annotations: meta.crossplane.io/maintainer: Crossplane Maintainers <info@crossplane.io> - meta.crossplane.io/source: github.com/crossplane/provider-template + meta.crossplane.io/source: github.com/crossplane/provider-cloudian meta.crossplane.io/license: Apache-2.0 meta.crossplane.io/description: | - A template that can be used to create Crossplane providers. + A cloudian that can be used to create Crossplane providers.