Add attributes to realm

This commit is contained in:
paul 2021-01-10 17:23:04 +01:00
parent 720a47fd86
commit a979640096
2 changed files with 69 additions and 10 deletions

View file

@ -20,22 +20,31 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
) )
// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN!
// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized.
// KeycloakRealmSpec defines the desired state of KeycloakRealm // KeycloakRealmSpec defines the desired state of KeycloakRealm
type KeycloakRealmSpec struct { type KeycloakRealmSpec struct {
// INSERT ADDITIONAL SPEC FIELDS - desired state of cluster // Name is the name of the Realm
// Important: Run "make" to regenerate code after modifying this file Name string `json:"realmName"`
// Foo is an example field of KeycloakRealm. Edit KeycloakRealm_types.go to remove/update // User readable names
Foo string `json:"foo,omitempty"` DisplayName *string `json:"displayName,omitempty"`
DisplayNameHTML *string `json:"displayHTML,omitempty"`
LoginTheme *string `json:"loginTheme,omitempty"`
// Basic realm choices
LoginWithEmailAllowed *bool `json:"loginWithEmailAllowed,omitempty"`
RegistrationAllowed *bool `json:"registrationAllowed,omitempty"`
RegistrationEmailAsUsername *bool `json:"registrationEmailAsUsername,omitempty"`
ResetPasswordAllowed *bool `json:"resetPasswordAllowed,omitempty"`
DuplicateEmailsAllowed *bool `json:"duplicateEmailsAllowed,omitempty"`
VerifyEmail *bool `json:"verifyEmail,omitempty"`
RememberMe *bool `json:"rememberMe,omitempty"`
} }
// KeycloakRealmStatus defines the observed state of KeycloakRealm // KeycloakRealmStatus defines the observed state of KeycloakRealm
type KeycloakRealmStatus struct { type KeycloakRealmStatus struct {
// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster Available bool `json:"available"`
// Important: Run "make" to regenerate code after modifying this file ID string `json:"id"`
} }
// +kubebuilder:object:root=true // +kubebuilder:object:root=true

View file

@ -29,7 +29,7 @@ func (in *KeycloakRealm) DeepCopyInto(out *KeycloakRealm) {
*out = *in *out = *in
out.TypeMeta = in.TypeMeta out.TypeMeta = in.TypeMeta
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
out.Spec = in.Spec in.Spec.DeepCopyInto(&out.Spec)
out.Status = in.Status out.Status = in.Status
} }
@ -86,6 +86,56 @@ func (in *KeycloakRealmList) DeepCopyObject() runtime.Object {
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *KeycloakRealmSpec) DeepCopyInto(out *KeycloakRealmSpec) { func (in *KeycloakRealmSpec) DeepCopyInto(out *KeycloakRealmSpec) {
*out = *in *out = *in
if in.DisplayName != nil {
in, out := &in.DisplayName, &out.DisplayName
*out = new(string)
**out = **in
}
if in.DisplayNameHTML != nil {
in, out := &in.DisplayNameHTML, &out.DisplayNameHTML
*out = new(string)
**out = **in
}
if in.LoginTheme != nil {
in, out := &in.LoginTheme, &out.LoginTheme
*out = new(string)
**out = **in
}
if in.LoginWithEmailAllowed != nil {
in, out := &in.LoginWithEmailAllowed, &out.LoginWithEmailAllowed
*out = new(bool)
**out = **in
}
if in.RegistrationAllowed != nil {
in, out := &in.RegistrationAllowed, &out.RegistrationAllowed
*out = new(bool)
**out = **in
}
if in.RegistrationEmailAsUsername != nil {
in, out := &in.RegistrationEmailAsUsername, &out.RegistrationEmailAsUsername
*out = new(bool)
**out = **in
}
if in.ResetPasswordAllowed != nil {
in, out := &in.ResetPasswordAllowed, &out.ResetPasswordAllowed
*out = new(bool)
**out = **in
}
if in.DuplicateEmailsAllowed != nil {
in, out := &in.DuplicateEmailsAllowed, &out.DuplicateEmailsAllowed
*out = new(bool)
**out = **in
}
if in.VerifyEmail != nil {
in, out := &in.VerifyEmail, &out.VerifyEmail
*out = new(bool)
**out = **in
}
if in.RememberMe != nil {
in, out := &in.RememberMe, &out.RememberMe
*out = new(bool)
**out = **in
}
} }
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KeycloakRealmSpec. // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KeycloakRealmSpec.