diff --git a/api/v1/keycloakrealmrole_types.go b/api/v1/keycloakrealmrole_types.go index 53c72b49..ff2c9a54 100644 --- a/api/v1/keycloakrealmrole_types.go +++ b/api/v1/keycloakrealmrole_types.go @@ -6,8 +6,6 @@ import ( "github.com/epam/edp-keycloak-operator/api/common" ) -const StatusDuplicated = "duplicated" - // KeycloakRealmRoleSpec defines the desired state of KeycloakRealmRole. type KeycloakRealmRoleSpec struct { // Name of keycloak role. diff --git a/api/v1alpha1/keycloakrealmrole_types.go b/api/v1alpha1/keycloakrealmrole_types.go index 82ea1800..321fccec 100644 --- a/api/v1alpha1/keycloakrealmrole_types.go +++ b/api/v1alpha1/keycloakrealmrole_types.go @@ -2,8 +2,6 @@ package v1alpha1 import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -const StatusDuplicated = "duplicated" - type KeycloakRealmRoleSpec struct { Name string `json:"name"` Realm string `json:"realm"` diff --git a/controllers/keycloakrealmrole/keycloakrealmrole_controller.go b/controllers/keycloakrealmrole/keycloakrealmrole_controller.go index 13049279..de8c95c0 100644 --- a/controllers/keycloakrealmrole/keycloakrealmrole_controller.go +++ b/controllers/keycloakrealmrole/keycloakrealmrole_controller.go @@ -106,11 +106,6 @@ func (r *ReconcileKeycloakRealmRole) Reconcile(ctx context.Context, request reco return } - if instance.Status.Value == keycloakApi.StatusDuplicated { - log.Info("Role is duplicated, exit.") - return - } - defer func() { if err := r.client.Status().Update(ctx, &instance); err != nil { resultErr = err