Skip to content
Open
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
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ on:

env:
# Common versions
GO_VERSION: '1.23'
GOLANGCI_VERSION: 'v2.1.2'
GO_VERSION: '1.25.11'
GOLANGCI_VERSION: 'v2.12.2'
DOCKER_BUILDX_VERSION: 'v0.23.0'

# Common users. We can't run a step 'if secrets.XXX != ""' but we can run a
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ GO_STATIC_PACKAGES = $(GO_PROJECT)/cmd/provider
GO_LDFLAGS += -X $(GO_PROJECT)/internal/version.Version=$(VERSION)
GO_SUBDIRS += cmd internal apis
GO111MODULE = on
GOLANGCILINT_VERSION = 2.1.2
GOLANGCILINT_VERSION = 2.12.2
-include build/makelib/golang.mk

# ====================================================================================
Expand Down
27 changes: 27 additions & 0 deletions apis/sample/v1alpha1/interfaces_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*
Copyright 2026 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 (
resource "github.com/crossplane/crossplane-runtime/v2/pkg/resource"
)

// interface checks to ensure our types conform to the crossplane-runtime interfaces
var (
_ resource.ModernManaged = &MyType{}
_ resource.ManagedList = &MyTypeList{}
)
7 changes: 3 additions & 4 deletions apis/sample/v1alpha1/mytype_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime/schema"

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

// MyTypeParameters are the configurable fields of a MyType.
Expand All @@ -45,8 +44,8 @@ type MyTypeSpec struct {

// A MyTypeStatus represents the observed state of a MyType.
type MyTypeStatus struct {
xpv1.ResourceStatus `json:",inline"`
AtProvider MyTypeObservation `json:"atProvider,omitempty"`
xpv2.ManagedResourceStatus `json:",inline"`
AtProvider MyTypeObservation `json:"atProvider,omitempty"`
}

// +kubebuilder:object:root=true
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.

18 changes: 9 additions & 9 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.

31 changes: 31 additions & 0 deletions apis/v1alpha1/interfaces_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/*
Copyright 2026 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 (
resource "github.com/crossplane/crossplane-runtime/v2/pkg/resource"
)

// interface checks to ensure our types conform to the crossplane-runtime interfaces
var (
_ resource.ProviderConfig = &ProviderConfig{}
_ resource.ProviderConfig = &ClusterProviderConfig{}
_ resource.TypedProviderConfigUsage = &ProviderConfigUsage{}
_ resource.TypedProviderConfigUsage = &ClusterProviderConfigUsage{}
_ resource.ProviderConfigUsageList = &ProviderConfigUsageList{}
_ resource.ProviderConfigUsageList = &ClusterProviderConfigUsageList{}
)
9 changes: 4 additions & 5 deletions apis/v1alpha1/types.go
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
package v1alpha1

import (
xpv1 "github.com/crossplane/crossplane-runtime/v2/apis/common/v1"
xpv2 "github.com/crossplane/crossplane-runtime/v2/apis/common/v2"
xpv2 "github.com/crossplane/crossplane/apis/v2/core/v2"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

// A ProviderConfigStatus defines the status of a Provider.
type ProviderConfigStatus struct {
xpv1.ProviderConfigStatus `json:",inline"`
xpv2.ProviderConfigStatus `json:",inline"`
}

// ProviderCredentials required to authenticate.
type ProviderCredentials struct {
// Source of the provider credentials.
// +kubebuilder:validation:Enum=None;Secret;InjectedIdentity;Environment;Filesystem
Source xpv1.CredentialsSource `json:"source"`
Source xpv2.CredentialsSource `json:"source"`

xpv1.CommonCredentialSelectors `json:",inline"`
xpv2.CommonCredentialSelectors `json:",inline"`
}

type ProviderConfigSpec struct {
Expand Down
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.

10 changes: 5 additions & 5 deletions apis/v1alpha1/zz_generated.pc.go

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

18 changes: 9 additions & 9 deletions apis/v1alpha1/zz_generated.pcu.go

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

Loading
Loading