Changes for README.md: 23 added lines, 52 removed lines.
Original line number
Diff line number
Diff line
@@ -35,6 +35,7 @@ The converted or downloaded chart is always pushed to an internal OCI registry b
At the northbound, the Package Manager listens to Kafka topics where SONATA publishes service lifecycle requests.
Each topic maps to a dedicated handler. At the southbound, handlers interact with the Helm client, Kubernetes API, and the Registry API service.
The full message contract (payloads, validation rules, registry round trip) is in [docs/kafka-api.md](docs/kafka-api.md).
**Incoming topics:**
@@ -44,7 +45,7 @@ Each topic maps to a dedicated handler. At the southbound, handlers interact wit
| SONATA | `helm-engine-deploy` | Registry API → Helm client | Deploy a chart from the internal registry onto a K8s cluster |
| SONATA | `helm-engine-activation` | Registry API → Helm client | Activate or deactivate a deployed service |
| SONATA | `helm-engine-termination` | Registry API → Helm client | Uninstall a Helm release and clean up its namespace |
| Registry API | `get-package-registry-incoming-channel` | Internal handler routing | Deliver credentials or kubeconfig needed by the above handlers |
| Registry API | `response-package-registry-outgoing-channel` | Internal handler routing | Deliver credentials or kubeconfig needed by the above handlers |
**Outgoing topics:**
@@ -54,7 +55,8 @@ Each topic maps to a dedicated handler. At the southbound, handlers interact wit
| SONATA | `helm-engine-deploy-result` | Result of the Helm chart deployment |
| SONATA | `helm-engine-activation-result` | Result of the service activation or deactivation |
| SONATA | `helm-engine-termination-result` | Result of the Helm release termination |
| Registry API | `response-package-registry-outgoing-channel` | Request credentials or kubeconfig from Registry API |
| Registry API | `get-package-registry-incoming-channel` | Request credentials or kubeconfig from Registry API |
| Registry API | `registry-store-kubernetes-config` | Store the namespace-scoped ServiceAccount kubeconfig |
---
@@ -85,16 +87,16 @@ The incoming message is a Kogito-wrapped `ServiceOrder`:
}
```
The `servicePackageManager` field drives chart acquisition:
The source type is detected from the shape of `serviceRepositoryURL` and `serviceArtifactIdentifier`. The `servicePackageManager` field is required by validation but not used:
If the source repository is private, the handler routes to the Registry API (via `get-package-registry-incoming-channel`) to retrieve credentials before fetching the chart. For OCM-based multi-cluster deployments, it also routes through Registry API so the scheduler namespace can be resolved and embedded into the chart annotations.
If the source repository is private, the handler routes to the Registry API (via `get-package-registry-incoming-channel`) to retrieve credentials before fetching the chart. For OCM-based multi-cluster deployments (`clusterManager: "ocm"`), it also routes through Registry API, passing the scheduler namespace read from `clusterMetadata`, and the chart is rewritten into a P2Code `ManifestWork` before it is stored.
Upon success, the handler publishes a response to `helm-engine-parse-result`:
@@ -102,17 +104,17 @@ Upon success, the handler publishes a response to `helm-engine-parse-result`:
@@ -148,7 +150,7 @@ The incoming message is a Kogito-wrapped `HelmDeployRequest`:
The `activateService` flag controls the initial state of the deployment. When `false`, the release is installed and then immediately uninstalled with history kept (`helm uninstall --keep-history`), leaving the namespace intact but the service inactive and restorable.
The deployment namespace defaults to the `serviceId`. For OCM-based deployments, the namespace is overridden with the scheduler namespace extracted from the chart annotations during the parse phase.
The deployment namespace defaults to the `serviceId`. For OCM-based deployments, the Registry API returns the scheduler namespace in its kubeconfig reply (`schedulerNamespace`), and that namespace is used instead.
Upon success, the handler publishes to `helm-engine-deploy-result`:
@@ -156,13 +158,13 @@ Upon success, the handler publishes to `helm-engine-deploy-result`:
"helmEngineOrderMessage":"Helm charts were deployed successfully",
"state":"ACTIVE",
"releaseName":"release-790daa4d",
@@ -228,7 +230,7 @@ The incoming message is a Kogito-wrapped `TerminationRequest`:
}
```
For standard deployments, the namespace is deleted along with the release. For OCM-based deployments (where the scheduler namespace is set in chart annotations), the namespace is preserved because it is managed by the OCM scheduler, not by the Package Manager.
For standard deployments, the namespace is deleted along with the release. For OCM-based deployments (where the Registry API returns a scheduler namespace), the namespace is preserved because it is managed by the OCM scheduler, not by the Package Manager.
The response is published to `helm-engine-termination-result`:
@@ -236,13 +238,13 @@ The response is published to `helm-engine-termination-result`:
| `clusterMetadata` | optional, base64 `P2CodeSchedulingManifest` YAML; its `metadata.namespace` becomes the `schedulerNamespace` sent to the registry |
Repo kind (`detectRepoKind`, `ops/operator.go`), from the URL and identifier alone:
| `serviceOrderId` | not validated; echoed in the result |
| `serviceId` | at least 4 characters; selects the stored chart and the release name |
| `activateService` | `false`: install, then `helm uninstall --keep-history`, so the release can be activated later |
| `k8sServiceId` | at least 4 characters; the registry key for the cluster kubeconfig |
| `servicePackageValuesYml` | optional, base64 |
| `requestedCompletionDate` | not validated here, but **required by the registry reply's**`Validate()`: a deploy without it fails after the round trip |
Before contacting the registry, the handler reads the stored chart for image-pull-secret names