Skip to content

Commit 0ca2493

Browse files
zmotsoMykolaMarusenko
authored andcommitted
chore: Remove deprecated properties from CRs (#154)
1 parent 118842e commit 0ca2493

File tree

52 files changed

+468
-878
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+468
-878
lines changed

Dockerfile.localdev

Lines changed: 0 additions & 28 deletions
This file was deleted.

api/common/ref.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,12 @@ import (
1010
type RealmRef struct {
1111
// Kind specifies the kind of the Keycloak resource.
1212
// +kubebuilder:validation:Enum=KeycloakRealm;ClusterKeycloakRealm
13+
// +kubebuilder:default=KeycloakRealm
1314
// +optional
1415
Kind string `json:"kind,omitempty"`
1516

1617
// Name specifies the name of the Keycloak resource.
17-
// +optional
18+
// +required
1819
Name string `json:"name,omitempty"`
1920
}
2021

@@ -34,11 +35,12 @@ type HasKeycloakRef interface {
3435
type KeycloakRef struct {
3536
// Kind specifies the kind of the Keycloak resource.
3637
// +kubebuilder:validation:Enum=Keycloak;ClusterKeycloak
38+
// +kubebuilder:default=Keycloak
3739
// +optional
3840
Kind string `json:"kind,omitempty"`
3941

4042
// Name specifies the name of the Keycloak resource.
41-
// +optional
43+
// +required
4244
Name string `json:"name,omitempty"`
4345
}
4446

api/v1/keycloakauthflow_types.go

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,8 @@ import (
88

99
// KeycloakAuthFlowSpec defines the desired state of KeycloakAuthFlow.
1010
type KeycloakAuthFlowSpec struct {
11-
// Deprecated: use RealmRef instead.
12-
// Realm is name of KeycloakRealm custom resource.
13-
// +optional
14-
Realm string `json:"realm,omitempty"`
15-
1611
// RealmRef is reference to Realm custom resource.
17-
// +optional
12+
// +required
1813
RealmRef common.RealmRef `json:"realmRef"`
1914

2015
// Alias is display name for authentication flow.

api/v1/keycloakclient_types.go

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,8 @@ type KeycloakClientSpec struct {
1818
// ClientId is a unique keycloak client ID referenced in URI and tokens.
1919
ClientId string `json:"clientId"`
2020

21-
// Deprecated: use RealmRef instead.
22-
// TargetRealm is a realm name where client will be created.
23-
// It has higher priority than RealmRef for backward compatibility.
24-
// If both TargetRealm and RealmRef are specified, TargetRealm will be used for client creation.
25-
// +optional
26-
TargetRealm string `json:"targetRealm,omitempty"`
27-
2821
// RealmRef is reference to Realm custom resource.
29-
// +optional
22+
// +required
3023
RealmRef common.RealmRef `json:"realmRef"`
3124

3225
// Secret is kubernetes secret name where the client's secret will be stored.

api/v1/keycloakclientscope_types.go

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,8 @@ type KeycloakClientScopeSpec struct {
1111
// Name of keycloak client scope.
1212
Name string `json:"name"`
1313

14-
// Deprecated: use RealmRef instead.
15-
// Realm is name of KeycloakRealm custom resource.
16-
// +optional
17-
Realm string `json:"realm"`
18-
1914
// RealmRef is reference to Realm custom resource.
20-
// +optional
15+
// +required
2116
RealmRef common.RealmRef `json:"realmRef"`
2217

2318
// Protocol is SSO protocol configuration which is being supplied by this client scope.

api/v1/keycloakcomponent_types.go

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,8 @@ type KeycloakComponentSpec struct {
1111
// Name of keycloak component.
1212
Name string `json:"name"`
1313

14-
// Deprecated: use RealmRef instead.
15-
// Realm is name of KeycloakRealm custom resource.
16-
// +optional
17-
Realm string `json:"realm"`
18-
1914
// RealmRef is reference to Realm custom resource.
20-
// +optional
15+
// +required
2116
RealmRef common.RealmRef `json:"realmRef"`
2217

2318
// ProviderID is a provider ID of component.

api/v1/keycloakrealm_types.go

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,8 @@ type KeycloakRealmSpec struct {
1111
// RealmName specifies the name of the realm.
1212
RealmName string `json:"realmName"`
1313

14-
// Deprecated: use KeycloakRef instead.
15-
// KeycloakOwner specifies the name of the Keycloak instance that owns the realm.
16-
// +nullable
17-
// +optional
18-
KeycloakOwner string `json:"keycloakOwner,omitempty"`
19-
2014
// KeycloakRef is reference to Keycloak custom resource.
21-
// +optional
15+
// +required
2216
KeycloakRef common.KeycloakRef `json:"keycloakRef,omitempty"`
2317

2418
// Users is a list of users to create in the realm.

api/v1/keycloakrealmgroup_types.go

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,8 @@ type KeycloakRealmGroupSpec struct {
1111
// Name of keycloak group.
1212
Name string `json:"name"`
1313

14-
// Deprecated: use RealmRef instead.
15-
// Realm is name of KeycloakRealm custom resource.
16-
// +optional
17-
Realm string `json:"realm"`
18-
1914
// RealmRef is reference to Realm custom resource.
20-
// +optional
15+
// +required
2116
RealmRef common.RealmRef `json:"realmRef"`
2217

2318
// Path is a group path.

api/v1/keycloakrealmidentityprovider_types.go

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,8 @@ import (
88

99
// KeycloakRealmIdentityProviderSpec defines the desired state of KeycloakRealmIdentityProvider.
1010
type KeycloakRealmIdentityProviderSpec struct {
11-
// Deprecated: use RealmRef instead.
12-
// Realm is name of KeycloakRealm custom resource.
13-
// +optional
14-
Realm string `json:"realm"`
15-
1611
// RealmRef is reference to Realm custom resource.
17-
// +optional
12+
// +required
1813
RealmRef common.RealmRef `json:"realmRef"`
1914

2015
// ProviderID is a provider ID of identity provider.

api/v1/keycloakrealmrole_types.go

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,8 @@ type KeycloakRealmRoleSpec struct {
1111
// Name of keycloak role.
1212
Name string `json:"name"`
1313

14-
// Deprecated: use RealmRef instead.
15-
// Realm is name of KeycloakRealm custom resource.
16-
// +optional
17-
Realm string `json:"realm"`
18-
1914
// RealmRef is reference to Realm custom resource.
20-
// +optional
15+
// +required
2116
RealmRef common.RealmRef `json:"realmRef"`
2217

2318
// Description is a role description.

0 commit comments

Comments
 (0)