Logo von Module Migrate

Module Migrate

Organisation
opendatahub-io
module-migrate

Read existing in-tree ODH operator component code and produce a step-by-step extraction checklist for migrating it to a standalone module. Analyzes controller logic, webhooks, RBAC, embedded manifests, and DSC field mappings. Use when extracting a component from the monolithic operator into its own module repo.

Übersicht

Herausgeberopendatahub-io
Repositoryai-helpers
Skill-Namemodule-migrate
Sterne
39
Forks
76
Mitgelieferte Dateien
2
LizenzApache-2.0
Links
  • Anweisungen in Markdown

    Eine SKILL.md-Datei, die das Modell bei Bedarf lädt. So werden nur dann Token verbraucht, wenn eine Anfrage tatsächlich dazu passt.

  • Funktioniert mit jedem LLM

    KI-Skills bestehen aus reinem Markdown, nicht aus anbieterspezifischem Code. Daher funktionieren sie mit GPT, Claude, Gemini, Grok oder einem lokalen Modell.

  • 2 mitgelieferte Dateien

    Skripte, Vorlagen und Referenzmaterial, die das Modell bei der Arbeit lesen kann. Die Dateien sind schreibgeschützt und werden niemals ausgeführt.

  • Open Source

    Von opendatahub-io auf GitHub veröffentlicht. Prüfen Sie den Quellinhalt vor der Installation.

Installation

Installieren Sie den KI-Skill Module Migrate in TypingMind, um ihn mit jedem LLM zu nutzen, oder fügen Sie ihn einem anderen Agenten hinzu, der SKILL.md lesen kann.

1

In TypingMind installieren

TypingMind installiert einen Skill direkt aus seinem GitHub-Ordner — liest SKILL.md, bündelt die Ressourcendateien und speichert das Ergebnis lokal.

  1. Öffnen Sie die App und gehen Sie zu Plugins → Skills.
  2. Wählen Sie „Von GitHub installieren“.
  3. Fügen Sie die unten angegebene URL des Skill-Ordners ein und bestätigen Sie.
    https://github.com/opendatahub-io/ai-helpers/tree/main/plugins/odh-modules/skills/module-migrate
  4. Aktivieren Sie den Skill in jedem Chat, in dem er verfügbar sein soll.
Plugins → Skills → Skill anlegen → Über GitHub-URL. Fügen Sie dann die Ordner-URL ein und klicken Sie auf „Weiter“.
2

In einem anderen Agenten installieren

Jeder Agent, der das Agent-Skills-Format lesen kann, kann diesen Skill nutzen — kopieren Sie den Ordner in das Skill-Verzeichnis des jeweiligen Agenten.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/opendatahub-io/ai-helpers.git /tmp/ai-helpers
mkdir -p .claude/skills
cp -r /tmp/ai-helpers/plugins/odh-modules/skills/module-migrate .claude/skills/module-migrate
Starten Sie Claude Code nach dem Kopieren neu, damit der neue Skill erkannt wird.

In TypingMind verwenden

Aktivieren Sie Module Migrate in einem beliebigen Chat in TypingMind. Den Rest übernimmt das Modell. Name und Beschreibung des Skills stehen im System-Prompt. Sobald eine Anfrage passt, lädt das Modell selbstständig die vollständigen Anweisungen — Sie müssen den Skill nie manuell aufrufen, und er verbraucht erst Token, wenn er tatsächlich genutzt wird.

Das Modell lädt Module Migrate automatisch, sobald eine passende Anfrage gestellt wird.

Funktioniert mit jedem KI-Modell

KI-Skills bestehen aus reinen Markdown-Anweisungen statt aus anbieterspezifischem Code. Daher ist Module Migrate nicht an das Modell gebunden, für das der Skill geschrieben wurde. Installieren Sie ihn einmal in TypingMind und nutzen Sie ihn mit GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder einem selbst betriebenen lokalen Modell — alles mit Ihren eigenen API-Keys.

  • Wird nur bei Bedarf geladen

    Der System-Prompt enthält nur den Namen und die Beschreibung. Die Anweisungen werden bei der ersten passenden Anfrage geladen. Ein ungenutzter Skill verursacht daher keine Kosten.

  • Modell im laufenden Chat wechseln

    Da der Skill aus Anweisungen statt aus Code besteht, funktioniert er auch nach einem Modellwechsel — das nächste Modell liest dieselbe SKILL.md-Datei.

Skill-Anweisungen

Dies ist der Inhalt von SKILL.md, den das Modell lädt. Lesen Sie ihn vor der Installation — ein Skill besteht aus Anweisungen, denen Ihr Modell folgt.

ODH Module Migration

Analyze an in-tree ODH operator component and generate a migration checklist for extracting it into a standalone module operator.

Prerequisites

The user must have the opendatahub-io/opendatahub-operator repository (or a fork) checked out locally. This skill reads that codebase to analyze the component.

Step 1: Identify the component

Extract the component name from $ARGUMENTS. If not provided, ask the user.

Search for the component in these locations within the operator repo:

  • internal/controller/components/<name>/ (component controllers)
  • internal/controller/services/<name>/ (service controllers)
  • api/components/v1alpha1/<name>_types.go (component CRD types)
  • api/services/v1alpha1/<name>_types.go (service CRD types)

If the component is found under components/, the target API group is components.platform.opendatahub.io. If under services/, use services.platform.opendatahub.io.

Step 2: Analyze controller logic

Read all files in the component's controller directory. Document:

  1. Handler implementation -- the file implementing the handler interface (ComponentHandler or ServiceHandler). Note which interface methods are implemented.
  2. Controller setup -- how the reconciler is registered. Note if it uses the builder pattern or a legacy pattern.
  3. Action functions -- list each action (render, deploy, gc, custom) and what it does.
  4. Resources managed -- grep for resource kinds the controller creates/updates (Deployments, Services, ConfigMaps, Routes, etc.).
  5. Embedded manifests -- look for go:embed directives, template files, or inline YAML strings. Note their locations.
  6. Platform dependencies -- grep for references to DSCI, DSC, or other platform CRs within the controller logic.

Step 3: Analyze CRD types

Read the component's CRD types file. Document:

  1. Spec fields -- list all spec fields. Identify which are user-facing (belong in CommonSpec) vs operator-written (stay in Spec only).
  2. Status fields -- check if it already implements PlatformObject or uses a different status pattern.
  3. Platform-managed fields -- fields populated by the orchestrator (auth, certs, monitoring config).
  4. Validation -- CEL rules, webhook validations, enum constraints.

Step 4: Analyze webhooks

Search for webhook registrations related to the component using the Grep tool:

  • Search for "webhook" in internal/controller/components/<name>/
  • Search for "webhook" in internal/controller/services/<name>/
  • Search for "<ComponentKind>" in internal/webhook/

Document each webhook: type (validating/mutating), what it validates, where the handler code lives.

Step 5: Analyze RBAC

Find RBAC requirements for the component:

  1. Check for +kubebuilder:rbac: markers in the controller files.
  2. Check top-level controller RBAC files that may cover this component's operations (e.g., internal/controller/datasciencecluster/kubebuilder_rbac.go).
  3. List each RBAC rule: apiGroup, resource, verbs.
  4. Separate rules into:
    • Module-side -- rules the standalone module controller needs
    • Orchestrator-side -- rules the orchestrator needs to manage the module

Step 6: Analyze DSC/DSCI field mappings

Find how the component's configuration flows from DSC to the component:

  1. Grep for spec.components.<name> or the component's stanza name in the DSC types.
  2. Read the DSC-to-component mapping code. Note which DSC fields map to which component spec fields.
  3. Identify platform-wide settings from DSCI (auth, certs, monitoring) that are injected into the component.

Step 7: Map import paths

Using ${CLAUDE_SKILL_DIR}/references/import-mappings.md, identify all imports from the operator's internal packages and map them to their odh-platform-utilities equivalents.

Use the Grep tool to find imports that need remapping:

  • Search for "opendatahub-operator" in internal/ and api/
  • Search for "openshift/api" in internal/ and api/

For each import, note the old path, the new path, and any API changes (e.g., WithReleases is now part of PlatformObject).

Step 8: Generate migration checklist

Write the checklist to migration-checklist-<component>.md in the current directory. Use this structure:

markdown
# Migration Checklist: <Component> Module

Generated from opendatahub-operator analysis on <YYYY-MM-DD>.

## 1. Create Module Repository

- [ ] Create repo: `opendatahub-io/<component>-operator`
- [ ] Run `/module-scaffold <component>` to generate the skeleton
- [ ] Initialize go.mod with `github.com/opendatahub-io/<component>-operator`

## 2. Migrate CRD Types

- [ ] Move types from `api/<area>/v1alpha1/<component>_types.go`
- [ ] Create CommonSpec with user-facing fields: <list fields>
- [ ] Move operator-written fields to Spec only: <list fields>
- [ ] Implement PlatformObject interface (including WithReleases)
- [ ] Replace `operatorv1.ManagementState` with `common.ManagementState`
- [ ] Add CEL singleton validation for name `default-<component>`
- [ ] Replace status type with common.Status + ComponentReleaseStatus embeds

## 3. Migrate Controller Logic

- [ ] Move handler from `internal/controller/<area>/<component>/`
- [ ] Adapt to standalone reconciler builder pattern
- [ ] Replace operator-internal imports with odh-platform-utilities:
      <list each import mapping>
- [ ] Extract render action (embed manifests in module binary)
- [ ] Extract deploy action (use pkg/deploy Deployer)
- [ ] Add gc action as LAST action in builder chain
- [ ] Set up condition Manager (Ready + ProvisioningSucceeded + Degraded)
- [ ] Add observedGeneration update on every reconcile

## 4. Migrate Manifests

- [ ] Move embedded manifests from `opt/manifests/<component>/` to module
- [ ] Package application manifests inside the controller binary
- [ ] Create Helm chart with controller-only manifests (Deployment, RBAC, CRD)

## 5. Migrate Webhooks

- [ ] Move webhook handlers: <list each webhook>
- [ ] Add singleton webhook using pkg/webhook
- [ ] Configure cert-manager for webhook TLS (not OpenShift serving-cert)

## 6. Migrate RBAC

- [ ] Module RBAC rules: <list rules>
- [ ] Remove component-specific RBAC from orchestrator's ClusterRole

## 7. Handle Dependencies

- [ ] <list each dependency and handling strategy>

## 8. Platform Integration

- [ ] Document DSC field mappings for orchestrator integration:
      <list DSC field → module spec field mappings>
- [ ] Document DSCI platform config injection points:
      <list DSCI fields that get projected into module CR>
- [ ] Create ConfigMap template for internal flags

## 9. Testing

- [ ] Move/adapt unit tests from operator repo
- [ ] Create E2E tests for standalone deployment
- [ ] Verify Helm chart deploys correctly
- [ ] Run `/module-compliance` to validate contract

## 10. Cleanup

- [ ] Remove component code from operator repo
- [ ] Remove component RBAC from operator ClusterRole
- [ ] Add module registration in operator's module registry
- [ ] Update operator's DSC reconciler to use ModuleHandler

Customize each section with the specific details discovered in Steps 2-7. Replace placeholder <list ...> items with actual file paths, field names, import paths, and RBAC rules found during analysis.

Gotchas

  • The operator's PlatformObject interface did not include WithReleases. The shared library version does. Every migrated CR must implement GetReleaseStatus() and SetReleaseStatus().
  • GetSingleton error handling changed: use errors.Is(err, cluster.ErrNoInstance) instead of k8serr.IsNotFound(err).
  • DenyCountGtZero signature changed: now takes (count, gvk) instead of (ctx, cli, gvk, msg). Counting is done separately via CountObjects.
  • Embedded manifests in the operator are shared across components via go:embed in components.go. The migration must extract only the manifests for the target component.
  • Some RBAC rules in the operator cover multiple components. Split them carefully -- the module only needs rules for its own resources.
  • The operator uses operatorv1.ManagementState from openshift/api. The shared library uses a plain string type. The JSON values are identical so CRDs do not need regeneration for this field.

Step 9: Summary

Present a brief summary to the user:

  • Number of files to migrate
  • Key architectural changes needed
  • Risks or areas needing manual review
  • Suggest running /module-scaffold <component> first, then applying the checklist to fill in the component-specific logic

Mitgelieferte Dateien

Das Modell liest diese Dateien bei Bedarf, während der Skill geladen ist. Sie werden als lesbare Dateien bereitgestellt und niemals ausgeführt.

Häufig gestellte Fragen

Was macht der KI-Skill Module Migrate?

Read existing in-tree ODH operator component code and produce a step-by-step extraction checklist for migrating it to a standalone module. Analyzes controller logic, webhooks, RBAC, embedded manifests, and DSC field mappings. Use when extracting a component from the monolithic operator into its own module repo.

Warum Module Migrate in TypingMind nutzen?

Weil Sie den Skill einmal installieren und mit jedem Modell verwenden können. Module Migrate besteht aus reinem Markdown statt aus anbieterspezifischem Code. So funktioniert derselbe Skill mit GPT-5, Claude, Gemini, Grok oder einem lokalen Modell – und Sie können das Modell mitten im Chat wechseln, ohne dass der Skill seine Funktion verliert. TypingMind verwendet Ihre eigenen API-Schlüssel. Sie bezahlen die Anbieter daher direkt statt über ein Abonnement pro Nutzerplatz, und Ihre Skills und Chats bleiben in Ihrem eigenen Speicher.

Wie installiere ich Module Migrate in TypingMind?

Öffnen Sie in TypingMind Plugins → Skills → Von GitHub installieren und fügen Sie https://github.com/opendatahub-io/ai-helpers/tree/main/plugins/odh-modules/skills/module-migrate ein. TypingMind liest die Datei SKILL.md, bündelt die zugehörigen Dateien und installiert alles als Skill, den Sie für jeden Chat einzeln aktivieren können.

Welche KI-Modelle können Module Migrate nutzen?

Jedes Modell, das Sie in TypingMind verbinden. KI-Skills bestehen aus reinen Markdown-Anweisungen statt aus anbieterspezifischem Code. Daher können GPT, Claude, Gemini, Grok und lokale Modelle diesen Skill laden, wenn eine Anfrage dazu passt.

Wie viele KI-Modelle kann ich mit Module Migrate verwenden?

So viele Sie möchten. Solange ein Modell Skills unterstützt, können Sie Module Migrate damit verwenden – GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama und weitere – alles in TypingMind mit Ihren eigenen API-Schlüsseln.

Ist der KI-Skill Module Migrate kostenlos?

Ja. Der Skill wird von opendatahub-io auf GitHub unter der Lizenz Apache-2.0 veröffentlicht. Sie bezahlen nur Ihren eigenen KI-Anbieter für die verwendeten Token.

Was sind KI-Skills?

Ein KI-Skill ist ein wiederverwendbares Anweisungspaket, das einem KI-Modell vermittelt, wie es eine bestimmte Aufgabe erledigt. Es folgt dem offenen Format Agent Skills: eine Datei namens SKILL.md mit einem Namen und einer Beschreibung sowie allen Skripten, Vorlagen oder Referenzdateien, die das Modell möglicherweise benötigt. Das Modell liest die Anweisungen nur, wenn Ihre Anfrage zum Skill passt. Ein installierter Skill verursacht daher erst Kosten, wenn er verwendet wird.

Wie unterscheiden sich KI-Skills von Plugins oder MCP-Servern?

Ein Plugin oder MCP-Server stellt einem Modell neue aufrufbare Tools bereit – Code, der auf einem System ausgeführt wird und ein Ergebnis zurückgibt. Ein KI-Skill vermittelt dem Modell stattdessen Wissen und Vorgehensweisen: wie es eine Aufgabe angeht, welche Schritte es befolgt und wie eine gute Ausgabe aussieht. Skills bestehen aus reinem Markdown und benötigen daher weder Server noch API-Schlüssel oder Laufzeitumgebung. Sie funktionieren mit jedem Modell.

Alle

Jetzt eigenen KI-Arbeitsbereich einrichten

Abonnieren Sie unseren Newsletter und erfahren Sie mehr über neue Funktionen und kommende Gewinnspiele 👇