Skip to content

Commit

Permalink
fix: KeycloakRealmRole CR duplicated status (#68)
Browse files Browse the repository at this point in the history
  • Loading branch information
zmotso authored and MykolaMarusenko committed Jun 25, 2024
1 parent ae76bc9 commit a79c781
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 9 deletions.
2 changes: 0 additions & 2 deletions api/v1/keycloakrealmrole_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 0 additions & 2 deletions api/v1alpha1/keycloakrealmrole_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down
5 changes: 0 additions & 5 deletions controllers/keycloakrealmrole/keycloakrealmrole_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a79c781

Please sign in to comment.