Skip to content

Commit da5702d

Browse files
zmotsoSergK
authored andcommitted
fix: Boolean parameters with default values are always 'true' (#56)
1 parent 6fe6e92 commit da5702d

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

api/common/realm.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ type TokenSettings struct {
1515
// Otherwise, refresh tokens are not revoked when used and can be used multiple times.
1616
// +optional
1717
// +kubebuilder:default=false
18-
RevokeRefreshToken bool `json:"revokeRefreshToken,omitempty"`
18+
RevokeRefreshToken bool `json:"revokeRefreshToken"`
1919

2020
// RefreshTokenMaxReuse specifies maximum number of times a refresh token can be reused.
2121
// When a different token is used, revocation is immediate.

api/v1/keycloakclient_types.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,12 +149,12 @@ type KeycloakClientSpec struct {
149149
// Enabled is a flag to enable client.
150150
// +optional
151151
// +kubebuilder:default=true
152-
Enabled bool `json:"enabled,omitempty"`
152+
Enabled bool `json:"enabled"`
153153

154154
// FullScopeAllowed is a flag to enable full scope.
155155
// +optional
156156
// +kubebuilder:default=true
157-
FullScopeAllowed bool `json:"fullScopeAllowed,omitempty"`
157+
FullScopeAllowed bool `json:"fullScopeAllowed"`
158158

159159
// Name is a client name.
160160
// +optional
@@ -163,7 +163,7 @@ type KeycloakClientSpec struct {
163163
// StandardFlowEnabled is a flag to enable standard flow.
164164
// +optional
165165
// +kubebuilder:default=true
166-
StandardFlowEnabled bool `json:"standardFlowEnabled,omitempty"`
166+
StandardFlowEnabled bool `json:"standardFlowEnabled"`
167167

168168
// SurrogateAuthRequired is a flag to enable surrogate auth.
169169
SurrogateAuthRequired bool `json:"surrogateAuthRequired,omitempty"`

api/v1/keycloakrealmuser_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ type KeycloakRealmUserSpec struct {
7575
// When set to true, the CR will not be deleted after processing.
7676
// +optional
7777
// +kubebuilder:default=true
78-
KeepResource bool `json:"keepResource,omitempty"`
78+
KeepResource bool `json:"keepResource"`
7979

8080
// PasswordSecret defines Kubernetes secret Name and Key, which holds User secret.
8181
// +nullable

0 commit comments

Comments
 (0)