Skip to content

Commit 84949a5

Browse files
zdtswdavidebianchi
andauthored
update: rename rhods to rhaii for chart/rhaii-helm-chart (opendatahub-io#55)
* update: rename rhods to rhaii for chart/rhaii-helm-chart - we should prep for this since we do not use OLM and less dependent on old name and will be easier for later rebrand - update: rename to rhaii-gitops as namespace - fix: upstream container is called rhods-operator not rhaii-operator - set env for odh|rhods to use charts/odh-rhoai - update: change script to do the rename - set to use RHDS rhods-operator repo but on rhoai-3.4 branch since rhoai-3.4ea2 is out of date - do the name replacement for OCP under rhaii-helm-chart rhods-operator to rhaii-operator keep cloudmanager as-is Signed-off-by: Wen Zhou <wenzhou@redhat.com> * update: rename again - from rhaii-operator / rhaii-XXX to rhai-operator /rhai-XXX for rhaii-helm-chart - fix missing webhook names - revert change in Makefile back to opendatahub-gitops as namespace Signed-off-by: Wen Zhou <wenzhou@redhat.com> * update: change chart name from rhaii-helm-chart to rhai-on-xks-helm-chart - regenerate snapshot Signed-off-by: Wen Zhou <wenzhou@redhat.com> * Revert "update: change chart name from rhaii-helm-chart to" This reverts commit 548a9c6. we will open another PR to handle this * Apply suggestions from code review Co-authored-by: Davide Bianchi <10374360+davidebianchi@users.noreply.github.com> --------- Signed-off-by: Wen Zhou <wenzhou@redhat.com> Co-authored-by: Davide Bianchi <10374360+davidebianchi@users.noreply.github.com>
1 parent f71354f commit 84949a5

25 files changed

+445
-228
lines changed

Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,6 @@ HELM_INSTALL_ARGS := -f $(HELM_INSTALL_VALUES_FILE) --set components.llamastacko
245245
helm-install-verify: ## Install helm chart and verify installation
246246
@echo "=== Step 1: Install operators ==="
247247
helm upgrade --install odh ./$(CHART_PATH) -n opendatahub-gitops --create-namespace $(HELM_INSTALL_ARGS) $(HELM_EXTRA_ARGS)
248-
@echo ""
249248
@echo "=== Step 2: Wait for CRDs (dependency) ==="
250249
@./scripts/wait-for-crds.sh
251250
@bash ./scripts/verify-dependencies.sh

charts/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -253,18 +253,18 @@ make chart-snapshots
253253

254254
The `rhaii-helm-chart` generates its templates from the [opendatahub-operator](https://github.com/opendatahub-io/opendatahub-operator) repository using kustomize and [helmtemplate-generator](https://github.com/davidebianchi/helmtemplate-generator). It also generates cloud-specific (Azure, CoreWeave) cloudmanager templates.
255255

256-
**Prerequisites:** `go`, `kustomize`, and SSH access to the opendatahub-operator repo.
256+
**Prerequisites:** `go`, `kustomize`, and access to the rhods-operator repo.
257257

258-
**Update from the default branch (main):**
258+
**Update from the default branch (rhoai-3.4):**
259259

260260
```bash
261-
./charts/rhaii-helm-chart/scripts/update-bundle.sh v2.19.0
261+
./charts/rhaii-helm-chart/scripts/update-bundle.sh 3.4.0-ea.2
262262
```
263263

264264
**Update from a specific branch:**
265265

266266
```bash
267-
./charts/rhaii-helm-chart/scripts/update-bundle.sh v2.19.0 --branch feat/my-branch
267+
./charts/rhaii-helm-chart/scripts/update-bundle.sh 3.5.0 --branch rhoai-3.5
268268
```
269269

270270
**Update from a local opendatahub-operator checkout** (skips cloning):

charts/rhaii-helm-chart/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ name: rhaii-helm-chart
33
description: Red Hat OpenShift AI Operator Helm chart (non-OLM installation)
44
type: application
55
version: 0.1.0
6-
appVersion: "3.4.0-ea.2"
6+
appVersion: 3.4.0-ea.2

charts/rhaii-helm-chart/README.md

Lines changed: 54 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# RHAII Helm Chart
22

3-
Red Hat OpenShift AI Operator Helm chart for non-OLM installation.
3+
Red Hat AI Inference Helm chart for non-OLM installation.
44

55
This chart installs the RHAI operator and its cloud manager components. Exactly one cloud provider (Azure or CoreWeave) must be enabled.
66

@@ -9,10 +9,10 @@ This chart installs the RHAI operator and its cloud manager components. Exactly
99
- [RHAII Helm Chart](#rhaii-helm-chart)
1010
- [Table of Contents](#table-of-contents)
1111
- [Prerequisites](#prerequisites)
12+
- [Pull Secrets](#pull-secrets)
1213
- [Installation](#installation)
1314
- [Azure](#azure)
1415
- [CoreWeave](#coreweave)
15-
- [Pull Secrets](#pull-secrets)
1616
- [How It Works](#how-it-works)
1717
- [Managed Dependencies](#managed-dependencies)
1818
- [Configuration Reference](#configuration-reference)
@@ -21,36 +21,40 @@ This chart installs the RHAI operator and its cloud manager components. Exactly
2121

2222
## Prerequisites
2323

24-
- Kubernetes cluster (or OpenShift)
24+
- Kubernetes cluster
2525
- Helm 4.x
2626
- Cluster-admin privileges (the chart creates CRDs, ClusterRoles, and namespaces)
27+
- Pull secret for `registry.redhat.io` (see [Pull Secrets](#pull-secrets) below)
2728

28-
## Installation
29+
## Pull Secrets
2930

30-
### Azure
31+
> [!IMPORTANT]
32+
> A pull secret is **required** to install this chart. The chart pulls images from `registry.redhat.io`, including the `ose-cli-rhel9:v4.21.0` image used by the post-install hook Job.
33+
34+
### Obtaining credentials
3135

3236
```bash
33-
helm upgrade rhaii ./charts/rhaii-helm-chart/ \
34-
--install --create-namespace \
35-
--namespace rhaii \
36-
--set azure.enabled=true
37+
podman login registry.redhat.io --authfile /path/to/auth.json
3738
```
3839

39-
### CoreWeave
40+
### What the pull secret does
4041

41-
```bash
42-
helm upgrade rhaii ./charts/rhaii-helm-chart/ \
43-
--install --create-namespace \
44-
--namespace rhaii \
45-
--set coreweave.enabled=true
46-
```
42+
The `imagePullSecret.dockerConfigJson` parameter:
4743

48-
> [!WARNING]
49-
> `helm install --wait` is **not supported**. The chart uses post-install hook Jobs to create Custom Resources after the operators are deployed. These hooks require CRDs to be registered first, and the rhods-operator depends on cert-manager to start correctly. Using `--wait` may cause the installation to time out or fail.
44+
1. Creates a `kubernetes.io/dockerconfigjson` Secret named `rhaii-pull-secret` in all chart-managed namespaces (operator, applications, release, cloud manager and all dependency namespaces)
45+
2. Adds `imagePullSecrets` to all chart-managed ServiceAccounts (RHAI operator, cloud manager, llmisvc-controller-manager, and the post-install hook)
5046

51-
## Pull Secrets
47+
The secret name defaults to `rhaii-pull-secret` and **should not** be changed.
48+
49+
> [!NOTE]
50+
> Pull secrets for dependency namespaces (`cert-manager-operator`, `cert-manager`, `istio-system`, `openshift-lws-operator`) are managed by this chart by default. To customize which dependency namespaces receive pull secrets, set `imagePullSecret.dependencyNamespaces`.
51+
52+
## Installation
5253

53-
To pull images from private registries, pass your docker config JSON file during install:
54+
> [!NOTE]
55+
> All commands below assume you are in the repository root directory.
56+
57+
### Azure
5458

5559
```bash
5660
helm upgrade rhaii ./charts/rhaii-helm-chart/ \
@@ -60,15 +64,18 @@ helm upgrade rhaii ./charts/rhaii-helm-chart/ \
6064
--set-file imagePullSecret.dockerConfigJson=/path/to/auth.json
6165
```
6266

63-
This will:
64-
65-
1. Create a `kubernetes.io/dockerconfigjson` Secret named `rhaii-pull-secret` in all chart-managed namespaces (operator, applications, release, cloud manager and all dependency namespaces)
66-
2. Add `imagePullSecrets` to all chart-managed ServiceAccounts (RHAI operator, cloud manager and llmisvc-controller-manager in the applications namespace)
67+
### CoreWeave
6768

68-
The secret name defaults to `rhaii-pull-secret` and **must not** be changed.
69+
```bash
70+
helm upgrade rhaii ./charts/rhaii-helm-chart/ \
71+
--install --create-namespace \
72+
--namespace rhaii \
73+
--set coreweave.enabled=true \
74+
--set-file imagePullSecret.dockerConfigJson=/path/to/auth.json
75+
```
6976

70-
> [!NOTE]
71-
> Pull secrets for dependency namespaces (`cert-manager-operator`, `cert-manager`, `istio-system`, `openshift-lws-operator`) are managed by this chart by default. To customize which dependency namespaces receive pull secrets, set `imagePullSecret.dependencyNamespaces`.
77+
> [!WARNING]
78+
> `helm install --wait` is **not supported**. The chart uses post-install hook Jobs to create Custom Resources after the operators are deployed. These hooks require CRDs to be registered first, and the rhai-operator depends on cert-manager to start correctly. Using `--wait` may cause the installation to time out or fail.
7279
7380
## How It Works
7481

@@ -128,10 +135,30 @@ helm upgrade rhaii ./charts/rhaii-helm-chart/ \
128135
helm uninstall rhaii -n rhaii
129136
```
130137

138+
### Clean up CRDs
139+
131140
CRDs are **not** removed on uninstall (`helm.sh/resource-policy: keep`). To remove them manually:
132141

142+
**Chart-managed CRDs:**
133143
```bash
134144
kubectl delete crd kserves.components.platform.opendatahub.io
145+
```
146+
**Operator-created CRDs (created by rhai-operator during KServe deployment):**
147+
```bash
148+
kubectl delete crd llminferenceservices.serving.kserve.io
149+
kubectl delete crd llminferenceserviceconfigs.serving.kserve.io
150+
```
151+
152+
**Azure:**
153+
```bash
135154
kubectl delete crd azurekubernetesengines.infrastructure.opendatahub.io
155+
```
156+
157+
**CoreWeave:**
158+
```bash
136159
kubectl delete crd coreweavekubernetesengines.infrastructure.opendatahub.io
137160
```
161+
162+
### Clean up namespaces
163+
164+
The namespaces created by the chart are not automatically removed. Clean up the namespaces as needed based on your configuration.

charts/rhaii-helm-chart/scripts/helmtemplate-config-cloudmanager.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ rules:
3333
- path: .subjects[0].namespace
3434
value: '{{ .Values.CLOUD_NAME.cloudManager.namespace }}'
3535

36-
# Replace container image with Helm value
36+
# Replace container image with Helm value and update webhook references
3737
- match:
3838
kinds:
3939
- Deployment
@@ -44,6 +44,12 @@ rules:
4444
value: '{{ .Values.CLOUD_NAME.cloudManager.imagePullPolicy }}'
4545
- path: .spec.template.spec.containers[name=manager].env[name=RHAI_OPERATOR_NAMESPACE].value
4646
value: '{{ .Values.rhaiOperator.namespace }}'
47+
# Update webhook cert secret name (rhods-operator to rhai-operator) TODO: we should change in opendatahub-operator instead
48+
- path: .spec.template.spec.containers[name=manager].env[name=RHAI_WEBHOOK_CERT_SECRET_NAME].value
49+
value: rhai-operator-controller-webhook-cert
50+
# Update webhook service name (rhods-operator to rhai-operator) TODO: we should change in opendatahub-operator instead
51+
- path: .spec.template.spec.containers[name=manager].env[name=RHAI_WEBHOOK_SERVICE_NAME].value
52+
value: rhai-operator-webhook-service
4753

4854
- match:
4955
kinds:

charts/rhaii-helm-chart/scripts/helmtemplate-config.yaml

Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,10 @@ rules:
7878
kinds:
7979
- Deployment
8080
changes:
81+
# Replace RHAI_APPLICATIONS_NAMESPACE with templated value
8182
- path: .spec.template.spec.containers[name=rhods-operator].env[name=RHAI_APPLICATIONS_NAMESPACE].value
8283
value: '{{ .Values.rhaiOperator.applicationsNamespace }}'
84+
# Add related images env vars
8385
- path: .spec.template.spec.containers[name=rhods-operator].env
8486
appendWith: |
8587
{{- range $name, $value := .Values.rhaiOperator.relatedImages }}
@@ -91,7 +93,148 @@ rules:
9193
value: '{{ .Values.rhaiOperator.image }}'
9294
- path: .spec.template.spec.containers[name=rhods-operator].imagePullPolicy
9395
value: '{{ .Values.rhaiOperator.imagePullPolicy }}'
96+
# Update OPERATOR_NAME env var value
97+
- path: .spec.template.spec.containers[name=rhods-operator].env[name=OPERATOR_NAME].value
98+
value: rhai-operator
99+
# Rename container from rhods-operator to rhai-operator (must be last)
100+
- path: .spec.template.spec.containers[name=rhods-operator].name
101+
value: rhai-operator
102+
# Rename deployment metadata and labels
103+
- path: .metadata.name
104+
value: rhai-operator
105+
- path: .metadata.labels.name
106+
value: rhai-operator
107+
- path: .spec.selector.matchLabels.name
108+
value: rhai-operator
109+
- path: .spec.template.metadata.labels.name
110+
value: rhai-operator
111+
- path: .spec.template.metadata.annotations["kubectl.kubernetes.io/default-container"]
112+
value: rhai-operator
113+
# Update podAntiAffinity label selector
114+
- path: .spec.template.spec.affinity.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution[0].podAffinityTerm.labelSelector.matchExpressions[0].values[0]
115+
value: rhai-operator
116+
# Update serviceAccountName reference
117+
- path: .spec.template.spec.serviceAccountName
118+
value: rhai-operator-controller-manager
119+
120+
# Rename ServiceAccount
121+
- match:
122+
kinds:
123+
- ServiceAccount
124+
names:
125+
- "redhat-ods-operator-controller-manager"
126+
changes:
127+
- path: .metadata.name
128+
value: rhai-operator-controller-manager
129+
130+
# Rename ClusterRoles
131+
- match:
132+
kinds:
133+
- ClusterRole
134+
names:
135+
- "rhods-operator-role"
136+
changes:
137+
- path: .metadata.name
138+
value: rhai-operator-role
139+
140+
- match:
141+
kinds:
142+
- ClusterRole
143+
names:
144+
- "redhat-ods-operator-metrics-reader"
145+
changes:
146+
- path: .metadata.name
147+
value: rhai-operator-metrics-reader
148+
149+
# Rename ClusterRoleBinding and update references
150+
- match:
151+
kinds:
152+
- ClusterRoleBinding
153+
names:
154+
- "rhods-operator-rolebinding"
155+
changes:
156+
- path: .metadata.name
157+
value: rhai-operator-rolebinding
158+
- path: .subjects[0].name
159+
value: rhai-operator-controller-manager
160+
- path: .roleRef.name
161+
value: rhai-operator-role
162+
163+
# Rename Service and update selector
164+
- match:
165+
kinds:
166+
- Service
167+
names:
168+
- "redhat-ods-operator-controller-manager-metrics-service"
169+
changes:
170+
- path: .metadata.name
171+
value: rhai-operator-controller-manager-metrics-service
172+
- path: .spec.selector.name
173+
value: rhai-operator
174+
175+
# Rename Webhook Service and update labels and selector
176+
- match:
177+
kinds:
178+
- Service
179+
names:
180+
- "rhods-operator-webhook-service"
181+
changes:
182+
- path: .metadata.name
183+
value: rhai-operator-webhook-service
184+
- path: .metadata.labels["app.kubernetes.io/created-by"]
185+
value: rhai-operator
186+
- path: .metadata.labels["app.kubernetes.io/instance"]
187+
value: rhai-operator
188+
- path: .metadata.labels["app.kubernetes.io/name"]
189+
value: rhai-operator-webhook-service
190+
- path: .metadata.labels["app.kubernetes.io/part-of"]
191+
value: rhai-operator
192+
- path: .spec.selector.name
193+
value: rhai-operator
194+
195+
# Rename ValidatingWebhookConfiguration and update labels
196+
- match:
197+
kinds:
198+
- ValidatingWebhookConfiguration
199+
names:
200+
- "rhods-operator-validating-webhook-configuration"
201+
changes:
202+
- path: .metadata.name
203+
value: rhai-operator-validating-webhook-configuration
204+
- path: .webhooks[*].clientConfig.service.name
205+
value: rhai-operator-webhook-service
206+
- path: .metadata.labels["app.kubernetes.io/created-by"]
207+
value: rhai-operator
208+
- path: .metadata.labels["app.kubernetes.io/instance"]
209+
value: rhai-operator
210+
- path: .metadata.labels["app.kubernetes.io/name"]
211+
value: rhai-operator-validating-webhook-configuration
212+
- path: .metadata.labels["app.kubernetes.io/part-of"]
213+
value: rhai-operator
214+
215+
# Rename MutatingWebhookConfiguration and update labels
216+
- match:
217+
kinds:
218+
- MutatingWebhookConfiguration
219+
names:
220+
- "rhods-operator-mutating-webhook-configuration"
221+
changes:
222+
- path: .metadata.name
223+
value: rhai-operator-mutating-webhook-configuration
224+
- path: .metadata.annotations["cert-manager.io/inject-ca-from"]
225+
value: '{{ .Values.rhaiOperator.namespace }}/rhai-operator-webhook-cert'
226+
- path: .webhooks[*].clientConfig.service.name
227+
value: rhai-operator-webhook-service
228+
- path: .metadata.labels["app.kubernetes.io/created-by"]
229+
value: rhai-operator
230+
- path: .metadata.labels["app.kubernetes.io/instance"]
231+
value: rhai-operator
232+
- path: .metadata.labels["app.kubernetes.io/name"]
233+
value: rhai-operator-mutating-webhook-configuration
234+
- path: .metadata.labels["app.kubernetes.io/part-of"]
235+
value: rhai-operator
94236

237+
# Add image pull secrets to ServiceAccount
95238
- match:
96239
kinds:
97240
- ServiceAccount

0 commit comments

Comments
 (0)