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
6 changes: 3 additions & 3 deletions apis/cluster/mssql/v1alpha1/database_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@ package v1alpha1
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

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

// A DatabaseSpec defines the desired state of a Database.
type DatabaseSpec struct {
xpv1.ResourceSpec `json:",inline"`
xpv2.ClusterManagedResourceSpec `json:",inline"`
}

// A DatabaseStatus represents the observed state of a Database.
type DatabaseStatus struct {
xpv1.ResourceStatus `json:",inline"`
xpv2.ManagedResourceStatus `json:",inline"`
}

// +kubebuilder:object:root=true
Expand Down
16 changes: 8 additions & 8 deletions apis/cluster/mssql/v1alpha1/grant_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ limitations under the License.
package v1alpha1

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

// A GrantSpec defines the desired state of a Grant.
type GrantSpec struct {
xpv1.ResourceSpec `json:",inline"`
ForProvider GrantParameters `json:"forProvider"`
xpv2.ClusterManagedResourceSpec `json:",inline"`
ForProvider GrantParameters `json:"forProvider"`
}

// GrantPermission represents a permission to be granted
Expand Down Expand Up @@ -68,12 +68,12 @@ type GrantParameters struct {
// UserRef references the user object this grant is for.
// +immutable
// +optional
UserRef *xpv1.Reference `json:"userRef,omitempty"`
UserRef *xpv2.Reference `json:"userRef,omitempty"`

// UserSelector selects a reference to a User this grant is for.
// +immutable
// +optional
UserSelector *xpv1.Selector `json:"userSelector,omitempty"`
UserSelector *xpv2.Selector `json:"userSelector,omitempty"`

// Database this grant is for.
// +optional
Expand All @@ -83,17 +83,17 @@ type GrantParameters struct {
// DatabaseRef references the database object this grant it for.
// +immutable
// +optional
DatabaseRef *xpv1.Reference `json:"databaseRef,omitempty"`
DatabaseRef *xpv2.Reference `json:"databaseRef,omitempty"`

// DatabaseSelector selects a reference to a Database this grant is for.
// +immutable
// +optional
DatabaseSelector *xpv1.Selector `json:"databaseSelector,omitempty"`
DatabaseSelector *xpv2.Selector `json:"databaseSelector,omitempty"`
}

// A GrantStatus represents the observed state of a Grant.
type GrantStatus struct {
xpv1.ResourceStatus `json:",inline"`
xpv2.ManagedResourceStatus `json:",inline"`
}

// +kubebuilder:object:root=true
Expand Down
12 changes: 6 additions & 6 deletions apis/cluster/mssql/v1alpha1/provider_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package v1alpha1
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

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

// A ProviderConfigSpec defines the desired state of a ProviderConfig.
Expand All @@ -32,20 +32,20 @@ const (
// CredentialsSourceMSSQLConnectionSecret indicates that a provider
// should acquire credentials from a connection secret written by a managed
// resource that represents a MSSQL server.
CredentialsSourceMSSQLConnectionSecret xpv1.CredentialsSource = "MSSQLConnectionSecret"
CredentialsSourceMSSQLConnectionSecret xpv2.CredentialsSource = "MSSQLConnectionSecret"
)

// ProviderCredentials required to authenticate.
type ProviderCredentials struct {
// Source of the provider credentials.
// +kubebuilder:validation:Enum=MSSQLConnectionSecret
Source xpv1.CredentialsSource `json:"source"`
Source xpv2.CredentialsSource `json:"source"`

// A CredentialsSecretRef is a reference to a MSSQL connection secret
// that contains the credentials that must be used to connect to the
// provider.
// +optional
ConnectionSecretRef *xpv1.SecretReference `json:"connectionSecretRef,omitempty"`
ConnectionSecretRef *xpv2.SecretReference `json:"connectionSecretRef,omitempty"`

// SecretKeyMapping allows overriding the default secret key names used
// to read credentials from the connection secret. When not specified,
Expand Down Expand Up @@ -95,7 +95,7 @@ func (m *SecretKeyMapping) ToMap() map[string]string {

// A ProviderConfigStatus reflects the observed state of a ProviderConfig.
type ProviderConfigStatus struct {
xpv1.ProviderConfigStatus `json:",inline"`
xpv2.ProviderConfigStatus `json:",inline"`
}

// +kubebuilder:object:root=true
Expand Down Expand Up @@ -134,7 +134,7 @@ type ProviderConfigUsage struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`

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

// +kubebuilder:object:root=true
Expand Down
20 changes: 10 additions & 10 deletions apis/cluster/mssql/v1alpha1/user_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,19 @@ package v1alpha1
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

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

// A UserSpec defines the desired state of a Database.
type UserSpec struct {
xpv1.ResourceSpec `json:",inline"`
ForProvider UserParameters `json:"forProvider"`
xpv2.ClusterManagedResourceSpec `json:",inline"`
ForProvider UserParameters `json:"forProvider"`
}

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

// UserParameters define the desired state of a MSSQL user instance.
Expand All @@ -43,21 +43,21 @@ type UserParameters struct {
Database *string `json:"database,omitempty"`
// DatabaseRef allows you to specify custom resource name of the Database the USER is created for.
// to fill Database field.
DatabaseRef *xpv1.Reference `json:"databaseRef,omitempty"`
DatabaseRef *xpv2.Reference `json:"databaseRef,omitempty"`
// DatabaseSelector allows you to use selector constraints to select a Database the USER is created for.
DatabaseSelector *xpv1.Selector `json:"databaseSelector,omitempty"`
DatabaseSelector *xpv2.Selector `json:"databaseSelector,omitempty"`
// PasswordSecretRef references the secret that contains the password used
// for this user. If no reference is given, a password will be auto-generated.
// +optional
PasswordSecretRef *xpv1.SecretKeySelector `json:"passwordSecretRef,omitempty"`
PasswordSecretRef *xpv2.SecretKeySelector `json:"passwordSecretRef,omitempty"`
// LoginDatabase allows you to specify the name of the Database to be used to create the user LOGIN in (normally master).
// +crossplane:generate:reference:type=Database
LoginDatabase *string `json:"loginDatabase,omitempty"`
// DatabaseRef allows you to specify custom resource name of the Database to be used to create the user LOGIN in (normally master).
// to fill Database field.
LoginDatabaseRef *xpv1.Reference `json:"loginDatabaseRef,omitempty"`
LoginDatabaseRef *xpv2.Reference `json:"loginDatabaseRef,omitempty"`
// DatabaseSelector allows you to use selector constraints to select a Database to be used to create the user LOGIN in (normally master).
LoginDatabaseSelector *xpv1.Selector `json:"loginDatabaseSelector,omitempty"`
LoginDatabaseSelector *xpv2.Selector `json:"loginDatabaseSelector,omitempty"`
// Contained specifies whether to create a contained database user (without server-level login).
// When true, the user will be created directly in the specified database using CREATE USER WITH PASSWORD.
// When false (default), a server-level LOGIN will be created first, then a database user mapped to that login.
Expand Down
34 changes: 17 additions & 17 deletions apis/cluster/mssql/v1alpha1/zz_generated.deepcopy.go

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

Loading