Skip to content

Commit

Permalink
Remove reconciliation for CPO ingress role setup
Browse files Browse the repository at this point in the history
Signed-off-by: Bryan Cox <brcox@redhat.com>
  • Loading branch information
bryan-cox committed Mar 5, 2024
1 parent 888db2e commit 8abc44c
Showing 1 changed file with 0 additions and 39 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2089,45 +2089,6 @@ func (r *HostedClusterReconciler) reconcileControlPlaneOperator(ctx context.Cont
return fmt.Errorf("failed to reconcile controlplane operator rolebinding: %w", err)
}

// TODO: Remove this block after initial merge of this feature. It is not needed for latest CPO version
if r.ManagementClusterCapabilities.Has(capabilities.CapabilityRoute) {
// Reconcile operator role - for ingress
controlPlaneOperatorIngressRole := controlplaneoperator.OperatorIngressRole("openshift-ingress", controlPlaneNamespace.Name)
_, err = createOrUpdate(ctx, r.Client, controlPlaneOperatorIngressRole, func() error {
return reconcileControlPlaneOperatorIngressRole(controlPlaneOperatorIngressRole)
})
if err != nil {
return fmt.Errorf("failed to reconcile controlplane operator ingress role: %w", err)
}

// Reconcile operator role binding - for ingress
controlPlaneOperatorIngressRoleBinding := controlplaneoperator.OperatorIngressRoleBinding("openshift-ingress", controlPlaneNamespace.Name)
_, err = createOrUpdate(ctx, r.Client, controlPlaneOperatorIngressRoleBinding, func() error {
return reconcileControlPlaneOperatorIngressRoleBinding(controlPlaneOperatorIngressRoleBinding, controlPlaneOperatorIngressRole, controlPlaneOperatorServiceAccount)
})
if err != nil {
return fmt.Errorf("failed to reconcile controlplane operator ingress rolebinding: %w", err)
}

// Reconcile operator role - for ingress operator
controlPlaneOperatorIngressOperatorRole := controlplaneoperator.OperatorIngressOperatorRole("openshift-ingress-operator", controlPlaneNamespace.Name)
_, err = createOrUpdate(ctx, r.Client, controlPlaneOperatorIngressOperatorRole, func() error {
return reconcilecontrolPlaneOperatorIngressOperatorRole(controlPlaneOperatorIngressOperatorRole)
})
if err != nil {
return fmt.Errorf("failed to reconcile controlplane operator ingress operator role: %w", err)
}

// Reconcile operator role binding - for ingress operator
controlPlaneOperatorIngressOperatorRoleBinding := controlplaneoperator.OperatorIngressOperatorRoleBinding("openshift-ingress-operator", controlPlaneNamespace.Name)
_, err = createOrUpdate(ctx, r.Client, controlPlaneOperatorIngressOperatorRoleBinding, func() error {
return reconcilecontrolPlaneOperatorIngressOperatorRoleBinding(controlPlaneOperatorIngressOperatorRoleBinding, controlPlaneOperatorIngressOperatorRole, controlPlaneOperatorServiceAccount)
})
if err != nil {
return fmt.Errorf("failed to reconcile controlplane operator ingress operator rolebinding: %w", err)
}
}

// Reconcile operator deployment
controlPlaneOperatorDeployment := controlplaneoperator.OperatorDeployment(controlPlaneNamespace.Name)
_, err = createOrUpdate(ctx, r.Client, controlPlaneOperatorDeployment, func() error {
Expand Down

0 comments on commit 8abc44c

Please sign in to comment.