Skip to content

Commit e75a094

Browse files
refactor: improve display names for components and dependencies
Use proper display names in user-facing messages: - ModelMesh -> ModelMesh Serving - CertManager -> cert-manager with full display name - RHBOK -> Red Hat build of Kueue - Fix cert-manager Kind to use hyphenated form consistently Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 8bc81e5 commit e75a094

File tree

13 files changed

+59
-57
lines changed

13 files changed

+59
-57
lines changed

docs/migrate/implementation-plan.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Overview
44

5-
Implement a `migrate` subcommand for odh-cli that performs cluster migrations, specifically migrating from OpenShift AI's built-in Kueue to the Red Hat Build of Kueue (RHBOK) operator. The command will mirror the `lint` command architecture but add capabilities for cluster modification, dry-run mode, preparation, and user confirmations.
5+
Implement a `migrate` subcommand for odh-cli that performs cluster migrations, specifically migrating from OpenShift AI's built-in Kueue to the Red Hat build of Kueue operator. The command will mirror the `lint` command architecture but add capabilities for cluster modification, dry-run mode, preparation, and user confirmations.
66

77
## Requirements Summary
88

@@ -12,7 +12,7 @@ Implement a `migrate` subcommand for odh-cli that performs cluster migrations, s
1212
- `-y` / `--yes`: Skip confirmation prompts (default: ask for each step)
1313
- Standard flags: `--output`, `--timeout`, `--verbose` (reuse from lint)
1414

15-
### RHBOK Migration Steps
15+
### Red Hat build of Kueue Migration Steps
1616
1. Install Red Hat Build of Kueue Operator from OperatorHub
1717
2. Update DataScienceCluster: set `spec.components.kueue.managementState` to `Unmanaged`
1818
3. Verify ClusterQueue and LocalQueue resources are preserved
@@ -181,7 +181,7 @@ if !target.SkipConfirm {
181181
}
182182
```
183183

184-
### Phase 4: RHBOK Migration Action
184+
### Phase 4: Red Hat build of Kueue Migration Action
185185

186186
#### 4.1 Main Action Implementation
187187
**File:** `pkg/migrate/actions/kueue/rhbok/rhbok.go`
@@ -203,15 +203,15 @@ func (a *RHBOKMigrationAction) CanApply(currentVersion, targetVersion *semver.Ve
203203
func (a *RHBOKMigrationAction) Validate(ctx, target) (*result.ActionResult, error) {
204204
// Pre-flight checks:
205205
// 1. Verify current Kueue state
206-
// 2. Check for RHBOK conflicts
206+
// 2. Check for Red Hat build of Kueue conflicts
207207
// 3. Verify Kueue resources exist
208208
// 4. Verify RBAC permissions
209209
}
210210

211211
func (a *RHBOKMigrationAction) Execute(ctx, target) (*result.ActionResult, error) {
212-
result := result.New("migration", "rhbok", "execute", "Execute RHBOK migration")
212+
result := result.New("migration", "rhbok", "execute", "Execute Red Hat build of Kueue migration")
213213

214-
// Step 1: Install RHBOK Operator
214+
// Step 1: Install Red Hat build of Kueue Operator
215215
step1 := a.installRHBOKOperator(ctx, target)
216216
result.Status.Steps = append(result.Status.Steps, step1)
217217
if step1.Status == result.StepFailed {
@@ -234,7 +234,7 @@ func (a *RHBOKMigrationAction) Execute(ctx, target) (*result.ActionResult, error
234234
}
235235
```
236236

237-
#### 4.2 Install RHBOK Operator
237+
#### 4.2 Install Red Hat build of Kueue Operator
238238
**Method:** `installRHBOKOperator(ctx, target) ActionStep`
239239

240240
1. Check if dry-run: return skipped step with message
@@ -409,7 +409,7 @@ import (
409409
$ kubectl odh migrate list --target-version 3.0.0
410410

411411
ID NAME APPLICABLE DESCRIPTION
412-
kueue.rhbok.migrate Migrate Kueue to RHBOK Yes Migrates from OpenShift AI built-in Kueue...
412+
kueue.rhbok.migrate Migrate Kueue to Red Hat build of Kueue Yes Migrates from OpenShift AI built-in Kueue...
413413
```
414414

415415
### Default (with confirmations)
@@ -425,10 +425,10 @@ Migration Steps:
425425
2. Update DataScienceCluster Kueue managementState to Unmanaged
426426
3. Verify ClusterQueue and LocalQueue resources preserved
427427

428-
[Step 1/3] Installing RHBOK Operator...
429-
About to install Red Hat Build of Kueue Operator
428+
[Step 1/3] Installing Red Hat build of Kueue Operator...
429+
About to install Red Hat build of Kueue Operator
430430
Proceed with operator installation? [y/N]: y
431-
RHBOK operator installed successfully
431+
Red Hat build of Kueue operator installed successfully
432432

433433
[Step 2/3] Updating DataScienceCluster...
434434
About to update DataScienceCluster Kueue managementState to Unmanaged
@@ -450,8 +450,8 @@ Current OpenShift AI version: 2.25.0
450450
Target OpenShift AI version: 3.0.0
451451
Running migration: kueue.rhbok.migrate (confirmations skipped)
452452

453-
[Step 1/3] Installing RHBOK Operator...
454-
RHBOK operator installed successfully
453+
[Step 1/3] Installing Red Hat build of Kueue Operator...
454+
Red Hat build of Kueue operator installed successfully
455455

456456
[Step 2/3] Updating DataScienceCluster...
457457
✓ DataScienceCluster updated successfully
@@ -468,7 +468,7 @@ $ kubectl odh migrate run --migration kueue.rhbok.migrate --target-version 3.0.0
468468

469469
DRY RUN MODE: No changes will be made to the cluster
470470

471-
[Step 1/3] Install RHBOK Operator
471+
[Step 1/3] Install Red Hat build of Kueue Operator
472472
→ Would create Subscription kueue-operator in openshift-kueue-operator
473473
→ Would wait for CSV kueue-operator.v1.x.x to be ready
474474

@@ -490,7 +490,7 @@ Running pre-flight checks for migration: kueue.rhbok.migrate
490490

491491
Pre-flight Validation:
492492
✓ Current Kueue state verified
493-
✓ No RHBOK conflicts detected
493+
✓ No Red Hat build of Kueue conflicts detected
494494
✓ Kueue resources found: 3 ClusterQueues, 5 LocalQueues
495495
✓ Sufficient permissions verified
496496

@@ -512,8 +512,8 @@ Target OpenShift AI version: 3.0.0
512512
=== Migration 1/2: kueue.rhbok.migrate ===
513513
Running migration: kueue.rhbok.migrate (confirmations skipped)
514514

515-
[Step 1/3] Installing RHBOK Operator...
516-
RHBOK operator installed successfully
515+
[Step 1/3] Installing Red Hat build of Kueue Operator...
516+
Red Hat build of Kueue operator installed successfully
517517

518518
[Step 2/3] Updating DataScienceCluster...
519519
✓ DataScienceCluster updated successfully
@@ -545,7 +545,7 @@ All migrations completed successfully!
545545
6. `pkg/migrate/action/global.go` - Global registry
546546
7. `pkg/migrate/action/executor.go` - Sequential executor
547547
8. `pkg/migrate/action/result/result.go` - Result types
548-
9. `pkg/migrate/actions/kueue/rhbok/rhbok.go` - RHBOK action
548+
9. `pkg/migrate/actions/kueue/rhbok/rhbok.go` - Red Hat build of Kueue action
549549
10. `pkg/migrate/actions/kueue/rhbok/backup.go` - Backup logic
550550
11. `pkg/migrate/actions/kueue/rhbok/preflight.go` - Pre-flight checks
551551
12. `pkg/util/confirmation/confirmation.go` - User confirmation
@@ -585,4 +585,4 @@ All migrations completed successfully!
585585
- Lint command: `cmd/lint/lint.go`, `pkg/cmd/lint/lint.go`
586586
- Check executor: `pkg/lint/check/executor.go`
587587
- Existing Kueue checks: `pkg/lint/checks/components/kueue/kueue.go`
588-
- RHBOK migration docs: Red Hat OpenShift AI 2.25 documentation
588+
- Red Hat build of Kueue migration docs: Red Hat OpenShift AI 2.25 documentation

pkg/lint/check/validate/validate_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ func newTestOperatorCheck() *testCheck {
394394
return &testCheck{
395395
BaseCheck: check.BaseCheck{
396396
CheckGroup: check.GroupDependency,
397-
Kind: "certmanager",
397+
Kind: "cert-manager",
398398
Type: check.CheckTypeInstalled,
399399
CheckID: "test.operator.check",
400400
CheckName: "Test Operator Check",
@@ -454,7 +454,7 @@ func TestOperatorBuilder(t *testing.T) {
454454
g.Expect(err).ToNot(HaveOccurred())
455455
g.Expect(dr).ToNot(BeNil())
456456
g.Expect(dr.Group).To(Equal("dependency"))
457-
g.Expect(dr.Kind).To(Equal("certmanager"))
457+
g.Expect(dr.Kind).To(Equal("cert-manager"))
458458
g.Expect(dr.Name).To(Equal(string(check.CheckTypeInstalled)))
459459
g.Expect(dr.Status.Conditions).To(HaveLen(1))
460460
g.Expect(dr.Status.Conditions[0].Condition).To(MatchFields(IgnoreExtras, Fields{
@@ -468,7 +468,7 @@ func TestOperatorBuilder(t *testing.T) {
468468
t.Run("should return found when operator is installed", func(t *testing.T) {
469469
sub := &operatorsv1alpha1.Subscription{
470470
ObjectMeta: metav1.ObjectMeta{
471-
Name: "certmanager",
471+
Name: "cert-manager",
472472
Namespace: "cert-manager",
473473
},
474474
Status: operatorsv1alpha1.SubscriptionStatus{

pkg/lint/check/verbose_formatter_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ func TestDefaultVerboseFormatter_NamespacedObjects(t *testing.T) {
5252
func TestDefaultVerboseFormatter_ClusterScopedObjects(t *testing.T) {
5353
g := NewWithT(t)
5454

55-
dr := result.New("dependency", "certmanager", "installed", "test description")
55+
dr := result.New("dependency", "cert-manager", "installed", "test description")
5656
dr.ImpactedObjects = []metav1.PartialObjectMetadata{
5757
{
5858
TypeMeta: metav1.TypeMeta{Kind: "ClusterRole"},

pkg/lint/checks/components/kueue/kueue.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ import (
1818
const (
1919
kind = "kueue"
2020
checkTypeManagementState = "management-state"
21-
managementStateRemediation = "Migrate to the RHBoK operator following https://docs.redhat.com/en/documentation/red_hat_openshift_ai_self-managed/2.25/html/managing_openshift_ai/managing-workloads-with-kueue#migrating-to-the-rhbok-operator_kueue before upgrading"
21+
managementStateRemediation = "Migrate to the Red Hat build of Kueue operator following https://docs.redhat.com/en/documentation/red_hat_openshift_ai_self-managed/2.25/html/managing_openshift_ai/managing-workloads-with-kueue#migrating-to-the-rhbok-operator_kueue before upgrading"
2222
)
2323

2424
// ManagementStateCheck validates that Kueue managed option is not used before upgrading to 3.x.
2525
// In RHOAI 3.x, the Managed option for Kueue is removed — users must migrate to the standalone
26-
// Kueue operator (RHBOK) and set managementState to Removed or Unmanaged.
26+
// Red Hat build of Kueue operator and set managementState to Removed or Unmanaged.
2727
type ManagementStateCheck struct {
2828
check.BaseCheck
2929
}

pkg/lint/checks/components/kueue/kueue_operator_installed.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ const (
2121
annotationInstalledVersion = "operator.opendatahub.io/installed-version"
2222
)
2323

24-
// OperatorInstalledCheck validates the RHBoK operator installation status against the Kueue
24+
// OperatorInstalledCheck validates the Red Hat build of Kueue operator installation status against the Kueue
2525
// component management state:
2626
// - Managed + operator present: blocking — the two cannot coexist
27-
// - Unmanaged + operator absent: blocking — Unmanaged requires the RHBoK operator
27+
// - Unmanaged + operator absent: blocking — Unmanaged requires the Red Hat build of Kueue operator
2828
type OperatorInstalledCheck struct {
2929
check.BaseCheck
3030
}
@@ -37,7 +37,7 @@ func NewOperatorInstalledCheck() *OperatorInstalledCheck {
3737
Type: checkTypeOperatorInstalled,
3838
CheckID: "components.kueue.operator-installed",
3939
CheckName: "Components :: Kueue :: Operator Installed",
40-
CheckDescription: "Validates RHBoK operator installation is consistent with Kueue management state",
40+
CheckDescription: "Validates Red Hat build of Kueue operator installation is consistent with Kueue management state",
4141
},
4242
}
4343
}
@@ -61,7 +61,7 @@ func (c *OperatorInstalledCheck) Validate(ctx context.Context, target check.Targ
6161
return sub.Name == subscriptionName
6262
})
6363
if err != nil {
64-
return fmt.Errorf("checking RHBoK operator presence: %w", err)
64+
return fmt.Errorf("checking Red Hat build of Kueue operator presence: %w", err)
6565
}
6666

6767
if info.GetVersion() != "" {
@@ -79,7 +79,7 @@ func (c *OperatorInstalledCheck) Validate(ctx context.Context, target check.Targ
7979
})
8080
}
8181

82-
// validateManaged checks that the RHBoK operator is NOT installed when Kueue is Managed.
82+
// validateManaged checks that the Red Hat build of Kueue operator is NOT installed when Kueue is Managed.
8383
func (c *OperatorInstalledCheck) validateManaged(
8484
req *validate.ComponentRequest,
8585
info *olm.SubscriptionInfo,
@@ -90,20 +90,20 @@ func (c *OperatorInstalledCheck) validateManaged(
9090
check.ConditionTypeCompatible,
9191
metav1.ConditionFalse,
9292
check.WithReason(check.ReasonVersionIncompatible),
93-
check.WithMessage("RHBoK operator (%s) is installed but Kueue managementState is Managed — the two cannot coexist", info.GetVersion()),
93+
check.WithMessage("Red Hat build of Kueue operator (%s) is installed but Kueue managementState is Managed — the two cannot coexist", info.GetVersion()),
9494
check.WithImpact(result.ImpactBlocking),
9595
))
9696
default:
9797
req.Result.SetCondition(check.NewCondition(
9898
check.ConditionTypeCompatible,
9999
metav1.ConditionTrue,
100100
check.WithReason(check.ReasonVersionCompatible),
101-
check.WithMessage("RHBoK operator is not installed — consistent with Managed state"),
101+
check.WithMessage("Red Hat build of Kueue operator is not installed — consistent with Managed state"),
102102
))
103103
}
104104
}
105105

106-
// validateUnmanaged checks that the RHBoK operator IS installed when Kueue is Unmanaged.
106+
// validateUnmanaged checks that the Red Hat build of Kueue operator IS installed when Kueue is Unmanaged.
107107
func (c *OperatorInstalledCheck) validateUnmanaged(
108108
req *validate.ComponentRequest,
109109
info *olm.SubscriptionInfo,
@@ -114,15 +114,15 @@ func (c *OperatorInstalledCheck) validateUnmanaged(
114114
check.ConditionTypeCompatible,
115115
metav1.ConditionFalse,
116116
check.WithReason(check.ReasonVersionIncompatible),
117-
check.WithMessage("RHBoK operator is not installed but Kueue managementState is Unmanaged — RHBoK operator is required"),
117+
check.WithMessage("Red Hat build of Kueue operator is not installed but Kueue managementState is Unmanaged — Red Hat build of Kueue operator is required"),
118118
check.WithImpact(result.ImpactBlocking),
119119
))
120120
default:
121121
req.Result.SetCondition(check.NewCondition(
122122
check.ConditionTypeCompatible,
123123
metav1.ConditionTrue,
124124
check.WithReason(check.ReasonVersionCompatible),
125-
check.WithMessage("RHBoK operator installed: %s", info.GetVersion()),
125+
check.WithMessage("Red Hat build of Kueue operator installed: %s", info.GetVersion()),
126126
))
127127
}
128128
}

pkg/lint/checks/components/kueue/kueue_operator_installed_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ func TestOperatorInstalledCheck_ManagedInstalled(t *testing.T) {
128128
"Type": Equal(check.ConditionTypeCompatible),
129129
"Status": Equal(metav1.ConditionFalse),
130130
"Reason": Equal(check.ReasonVersionIncompatible),
131-
"Message": And(ContainSubstring("RHBoK operator"), ContainSubstring("cannot coexist")),
131+
"Message": And(ContainSubstring("Red Hat build of Kueue operator"), ContainSubstring("cannot coexist")),
132132
}))
133133
g.Expect(result.Status.Conditions[0].Impact).To(Equal(resultpkg.ImpactBlocking))
134134
g.Expect(result.Annotations).To(HaveKeyWithValue("operator.opendatahub.io/installed-version", "kueue-operator.v0.6.0"))

pkg/lint/checks/components/modelmesh/modelmesh.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import (
1515

1616
const kind = "modelmeshserving"
1717

18-
// RemovalCheck validates that ModelMesh is disabled before upgrading to 3.x.
18+
// RemovalCheck validates that ModelMesh Serving is disabled before upgrading to 3.x.
1919
type RemovalCheck struct {
2020
check.BaseCheck
2121
}
@@ -27,15 +27,15 @@ func NewRemovalCheck() *RemovalCheck {
2727
Kind: kind,
2828
Type: check.CheckTypeRemoval,
2929
CheckID: "components.modelmesh.removal",
30-
CheckName: "Components :: ModelMesh :: Removal (3.x)",
31-
CheckDescription: "Validates that ModelMesh is disabled before upgrading from RHOAI 2.x to 3.x (component will be removed)",
32-
CheckRemediation: "Disable ModelMesh by setting managementState to 'Removed' in DataScienceCluster before upgrading",
30+
CheckName: "Components :: ModelMesh Serving :: Removal (3.x)",
31+
CheckDescription: "Validates that ModelMesh Serving is disabled before upgrading from RHOAI 2.x to 3.x (component will be removed)",
32+
CheckRemediation: "Disable ModelMesh Serving by setting managementState to 'Removed' in DataScienceCluster before upgrading",
3333
},
3434
}
3535
}
3636

3737
// CanApply returns whether this check should run for the given target.
38-
// This check only applies when upgrading FROM 2.x TO 3.x and ModelMesh is Managed.
38+
// This check only applies when upgrading FROM 2.x TO 3.x and ModelMesh Serving is Managed.
3939
func (c *RemovalCheck) CanApply(ctx context.Context, target check.Target) (bool, error) {
4040
if !version.IsUpgradeFrom2xTo3x(target.CurrentVersion, target.TargetVersion) {
4141
return false, nil
@@ -51,7 +51,7 @@ func (c *RemovalCheck) CanApply(ctx context.Context, target check.Target) (bool,
5151

5252
func (c *RemovalCheck) Validate(ctx context.Context, target check.Target) (*result.DiagnosticResult, error) {
5353
return validate.Component(c, target).
54-
Run(ctx, validate.Removal("ModelMesh is enabled (state: %s) but will be removed in RHOAI %s",
54+
Run(ctx, validate.Removal("ModelMesh Serving is enabled (state: %s) but will be removed in RHOAI %s",
5555
check.WithImpact(result.ImpactBlocking),
5656
check.WithRemediation(c.CheckRemediation)))
5757
}

pkg/lint/checks/components/modelmesh/modelmesh_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ func TestModelmeshRemovalCheck_Metadata(t *testing.T) {
159159
modelmeshCheck := modelmesh.NewRemovalCheck()
160160

161161
g.Expect(modelmeshCheck.ID()).To(Equal("components.modelmesh.removal"))
162-
g.Expect(modelmeshCheck.Name()).To(Equal("Components :: ModelMesh :: Removal (3.x)"))
162+
g.Expect(modelmeshCheck.Name()).To(Equal("Components :: ModelMesh Serving :: Removal (3.x)"))
163163
g.Expect(modelmeshCheck.Group()).To(Equal(check.GroupComponent))
164164
g.Expect(modelmeshCheck.Description()).ToNot(BeEmpty())
165165
}

pkg/lint/checks/dependencies/certmanager/certmanager.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ import (
1010
"github.com/opendatahub-io/odh-cli/pkg/lint/check/validate"
1111
)
1212

13-
const kind = "certmanager"
13+
const kind = "cert-manager"
14+
15+
const displayName = "cert-manager Operator for Red Hat OpenShift"
1416

1517
// Check validates cert-manager operator installation.
1618
type Check struct {
@@ -24,7 +26,7 @@ func NewCheck() *Check {
2426
Kind: kind,
2527
Type: check.CheckTypeInstalled,
2628
CheckID: "dependencies.certmanager.installed",
27-
CheckName: "Dependencies :: CertManager :: Installed",
29+
CheckName: "Dependencies :: cert-manager :: Installed",
2830
CheckDescription: "Reports the cert-manager operator installation status and version",
2931
},
3032
}
@@ -43,7 +45,7 @@ func (c *Check) Validate(ctx context.Context, target check.Target) (*result.Diag
4345
check.ConditionTypeAvailable,
4446
metav1.ConditionFalse,
4547
check.WithReason(check.ReasonResourceNotFound),
46-
check.WithMessage("%s operator is not installed", kind),
48+
check.WithMessage("%s is not installed", displayName),
4749
check.WithImpact(result.ImpactBlocking),
4850
)
4951
}
@@ -52,7 +54,7 @@ func (c *Check) Validate(ctx context.Context, target check.Target) (*result.Diag
5254
check.ConditionTypeAvailable,
5355
metav1.ConditionTrue,
5456
check.WithReason(check.ReasonResourceFound),
55-
check.WithMessage("%s operator installed: %s", kind, version),
57+
check.WithMessage("%s installed: %s", displayName, version),
5658
)
5759
}).
5860
Run(ctx)

pkg/lint/checks/dependencies/certmanager/certmanager_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ func TestCertManagerCheck_Metadata(t *testing.T) {
112112
certManagerCheck := certmanager.NewCheck()
113113

114114
g.Expect(certManagerCheck.ID()).To(Equal("dependencies.certmanager.installed"))
115-
g.Expect(certManagerCheck.Name()).To(Equal("Dependencies :: CertManager :: Installed"))
115+
g.Expect(certManagerCheck.Name()).To(Equal("Dependencies :: cert-manager :: Installed"))
116116
g.Expect(certManagerCheck.Group()).To(Equal(check.GroupDependency))
117117
g.Expect(certManagerCheck.Description()).ToNot(BeEmpty())
118118
}

0 commit comments

Comments
 (0)