Skip to content

Commit

Permalink
Merge pull request #37 from varad-ahirwadkar/rename-sa
Browse files Browse the repository at this point in the history
Renaming powervm-rmc to rsct
  • Loading branch information
Power Cloud Robot authored Aug 29, 2024
2 parents 9613070 + bb20f04 commit b414108
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions internal/controller/daemonset.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const (
masterNodeRoleLabel = "node-role.kubernetes.io/master"
osID = "rhcos"
rmcPort = 657
rmcAppName = "powervm-rmc"
rmcAppName = "rsct"
)

type DaemonSetConfig struct {
Expand Down Expand Up @@ -103,7 +103,7 @@ func (r *RSCTReconciler) currentRSCTDaemonSet(ctx context.Context) (bool, *appsv
// desiredRSCTDaemonSet returns the desired daemon set resource.
func desiredRSCTDaemonSet(config *DaemonSetConfig) (*appsv1.DaemonSet, error) {
matchLabels := map[string]string{
"app": "powervm-rmc",
"app": "rsct",
}

nodeSelectorLabels := map[string]string{
Expand Down
6 changes: 3 additions & 3 deletions internal/controller/rsct_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,14 @@ func (r *RSCTReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.

haveServiceAccount, sa, err := r.ensureRSCTServiceAccount(ctx, rsct)
if err != nil {
return reconcile.Result{}, fmt.Errorf("failed to ensure powervm-rmc service account: %w", err)
return reconcile.Result{}, fmt.Errorf("failed to ensure rsct service account: %w", err)
} else if !haveServiceAccount {
return reconcile.Result{}, fmt.Errorf("failed to get powervm-rmc service account: %w", err)
return reconcile.Result{}, fmt.Errorf("failed to get rsct service account: %w", err)
}

_, currentDaemonSet, err := r.ensureRSCTDaemonSet(ctx, sa, rsct)
if err != nil {
return reconcile.Result{}, fmt.Errorf("failed to ensure powervm-rmc daemonSet: %w", err)
return reconcile.Result{}, fmt.Errorf("failed to ensure rsct daemonSet: %w", err)
}
if err := r.updateRSCTStatus(ctx, rsct, currentDaemonSet); err != nil {
return reconcile.Result{}, fmt.Errorf("failed to update RSCT custom resource %s: %w", rsct.Name, err)
Expand Down

0 comments on commit b414108

Please sign in to comment.