Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ with the following features that are meant to be refactored:
5. Replace the *sample* group with your new group in apis/{provider}.go
5. Replace the *mytype* type with your new type in internal/controller/{provider}.go
5. Replace the default controller and ProviderConfig implementations with your own
5. Register your new type into `SetupGated` function in `internal/controller/register.go`
5. Run `make reviewable` to run code generation, linters, and tests.
5. Run `make build` to build the provider.

Expand Down
8 changes: 0 additions & 8 deletions apis/generate.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
//go:build generate

/*
Copyright 2025 The Crossplane Authors.

Expand Down Expand Up @@ -29,9 +27,3 @@ limitations under the License.
//go:generate go run -tags generate github.com/crossplane/crossplane-tools/cmd/angryjet generate-methodsets --header-file=../hack/boilerplate.go.txt ./...

package apis

import (
_ "sigs.k8s.io/controller-tools/cmd/controller-gen" //nolint:typecheck

_ "github.com/crossplane/crossplane-tools/cmd/angryjet" //nolint:typecheck
)
2 changes: 1 addition & 1 deletion apis/sample/sample.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

// Package sample contains group Sample API versions
// Package sample contains group sample API versions
package sample
2 changes: 1 addition & 1 deletion apis/sample/v1alpha1/groupversion_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ 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.
// Package v1alpha1 contains the v1alpha1 group Sample resources of the template provider.
// +kubebuilder:object:generate=true
// +groupName=sample.template.crossplane.io
// +versionName=v1alpha1
Expand Down
9 changes: 5 additions & 4 deletions apis/sample/v1alpha1/mytype_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime/schema"

xpv1 "github.com/crossplane/crossplane-runtime/apis/common/v1"
xpv1 "github.com/crossplane/crossplane-runtime/v2/apis/common/v1"
xpv2 "github.com/crossplane/crossplane-runtime/v2/apis/common/v2"
)

// MyTypeParameters are the configurable fields of a MyType.
Expand All @@ -38,8 +39,8 @@ type MyTypeObservation struct {

// A MyTypeSpec defines the desired state of a MyType.
type MyTypeSpec struct {
xpv1.ResourceSpec `json:",inline"`
ForProvider MyTypeParameters `json:"forProvider"`
xpv2.ManagedResourceSpec `json:",inline"`
ForProvider MyTypeParameters `json:"forProvider"`
}

// A MyTypeStatus represents the observed state of a MyType.
Expand All @@ -56,7 +57,7 @@ type MyTypeStatus struct {
// +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}
// +kubebuilder:resource:scope=Namespaced,categories={crossplane,managed,template}
type MyType struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Expand Down
2 changes: 1 addition & 1 deletion apis/sample/v1alpha1/zz_generated.deepcopy.go

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

30 changes: 5 additions & 25 deletions apis/sample/v1alpha1/zz_generated.managed.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/sample/v1alpha1/zz_generated.managedlist.go

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

4 changes: 4 additions & 0 deletions apis/v1alpha1/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,8 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

// Package v1alpha1 contains the core resources of the Template provider.
// +kubebuilder:object:generate=true
// +groupName=template.crossplane.io
// +versionName=v1alpha1
package v1alpha1
40 changes: 0 additions & 40 deletions apis/v1alpha1/groupversion_info.go

This file was deleted.

82 changes: 0 additions & 82 deletions apis/v1alpha1/providerconfig_types.go

This file was deleted.

67 changes: 0 additions & 67 deletions apis/v1alpha1/providerconfigusage_types.go

This file was deleted.

Loading