Skip to content

Commit 345792c

Browse files
committed
Merge remote-tracking branch 'upstream/main'
2 parents d3bd59e + 60dd6c6 commit 345792c

25 files changed

Lines changed: 447 additions & 313 deletions

.github/workflows/helm.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
1313
with:
1414
fetch-depth: 0
15-
- uses: azure/setup-helm@1a275c3b69536ee54be43f2070a358922e12c8d4 # v4.3.1
15+
- uses: azure/setup-helm@dda3372f752e03dde6b3237bc9431cdc2f7a02a2 # v5.0.0
1616
- name: Linting Charts
1717
run: |
1818
set -euo pipefail

.github/workflows/rhai-on-xks-chart-test.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ jobs:
3131
ref: ${{ github.event.pull_request.head.sha || github.sha }}
3232

3333
- name: Setup Helm
34-
uses: azure/setup-helm@1a275c3b69536ee54be43f2070a358922e12c8d4 # v4.3.1
34+
uses: azure/setup-helm@dda3372f752e03dde6b3237bc9431cdc2f7a02a2 # v5.0.0
3535

3636
- name: Create kind cluster
37-
uses: helm/kind-action@a1b0e391336a6ee6713a0583f8c6240d70863de3 # v1.12.0
37+
uses: helm/kind-action@ef37e7f390d99f746eb8b610417061a60e82a6cc # v1.14.0
3838

3939
- name: Install and verify chart
4040
timeout-minutes: 30

.github/workflows/update-rhai-xks-bundle.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,15 @@ jobs:
3030
- name: Checkout Repository
3131
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
3232

33+
- name: Setup Helm
34+
uses: azure/setup-helm@dda3372f752e03dde6b3237bc9431cdc2f7a02a2 # v5.0.0
35+
3336
- name: Install Dependencies
3437
run: |
3538
echo "Installing required tools via make..."
3639
make tools
3740
echo "Dependencies installed successfully"
3841
39-
4042
- name: Configure Version and Branch
4143
id: version-detection
4244
env:

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,8 @@ helm-verify-xks: ## Verify rhai-on-xks-chart installation
304304
.PHONY: helm-install-verify-xks
305305
helm-install-verify-xks: ## Install and verify rhai-on-xks-chart
306306
@echo "=== Step 1: Install rhai-on-xks-chart ==="
307-
helm upgrade --install $(XKS_RELEASE_NAME) ./$(XKS_CHART_PATH) -n $(XKS_NAMESPACE) --create-namespace --set $(XKS_CLOUD_PROVIDER).enabled=true $(HELM_EXTRA_ARGS)
307+
# TODO(RHOAIENG-63729): remove -f values-e2e.yaml once a runner with sufficient resources is available
308+
helm upgrade --install $(XKS_RELEASE_NAME) ./$(XKS_CHART_PATH) -n $(XKS_NAMESPACE) --create-namespace --set $(XKS_CLOUD_PROVIDER).enabled=true -f $(XKS_CHART_PATH)/test/values-e2e.yaml $(HELM_EXTRA_ARGS)
308309
@echo ""
309310
@echo "=== Step 2: Verify installation ==="
310311
$(MAKE) helm-verify-xks

charts/rhai-on-xks-chart/api-docs.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ RHAI on XKS Helm chart for non-OLM installation on non-OpenShift Kubernetes serv
1111
| aws.cloudManager.image | string | `"quay.io/opendatahub/opendatahub-operator:latest"` | |
1212
| aws.cloudManager.imagePullPolicy | string | `"Always"` | |
1313
| aws.cloudManager.namespace | string | `"rhai-cloudmanager-system"` | |
14+
| aws.cloudManager.replicas | int | `1` | |
15+
| aws.cloudManager.resources.limits.cpu | string | `"500m"` | |
16+
| aws.cloudManager.resources.limits.memory | string | `"1Gi"` | |
17+
| aws.cloudManager.resources.requests.cpu | string | `"100m"` | |
18+
| aws.cloudManager.resources.requests.memory | string | `"512Mi"` | |
1419
| aws.enabled | bool | `false` | |
1520
| aws.kubernetesEngine.enabled | bool | `true` | |
1621
| aws.kubernetesEngine.spec.dependencies.certManager.configuration | object | `{}` | |
@@ -24,6 +29,11 @@ RHAI on XKS Helm chart for non-OLM installation on non-OpenShift Kubernetes serv
2429
| azure.cloudManager.image | string | `"quay.io/opendatahub/opendatahub-operator:latest"` | |
2530
| azure.cloudManager.imagePullPolicy | string | `"Always"` | |
2631
| azure.cloudManager.namespace | string | `"rhai-cloudmanager-system"` | |
32+
| azure.cloudManager.replicas | int | `1` | |
33+
| azure.cloudManager.resources.limits.cpu | string | `"500m"` | |
34+
| azure.cloudManager.resources.limits.memory | string | `"1Gi"` | |
35+
| azure.cloudManager.resources.requests.cpu | string | `"100m"` | |
36+
| azure.cloudManager.resources.requests.memory | string | `"256Mi"` | |
2737
| azure.enabled | bool | `false` | |
2838
| azure.kubernetesEngine.enabled | bool | `true` | |
2939
| azure.kubernetesEngine.spec.dependencies.certManager.configuration | object | `{}` | |
@@ -40,6 +50,11 @@ RHAI on XKS Helm chart for non-OLM installation on non-OpenShift Kubernetes serv
4050
| coreweave.cloudManager.image | string | `"quay.io/opendatahub/opendatahub-operator:latest"` | |
4151
| coreweave.cloudManager.imagePullPolicy | string | `"Always"` | |
4252
| coreweave.cloudManager.namespace | string | `"rhai-cloudmanager-system"` | |
53+
| coreweave.cloudManager.replicas | int | `1` | |
54+
| coreweave.cloudManager.resources.limits.cpu | string | `"500m"` | |
55+
| coreweave.cloudManager.resources.limits.memory | string | `"1Gi"` | |
56+
| coreweave.cloudManager.resources.requests.cpu | string | `"100m"` | |
57+
| coreweave.cloudManager.resources.requests.memory | string | `"256Mi"` | |
4358
| coreweave.enabled | bool | `false` | |
4459
| coreweave.kubernetesEngine.enabled | bool | `true` | |
4560
| coreweave.kubernetesEngine.spec.dependencies.certManager.configuration | object | `{}` | |
@@ -53,6 +68,10 @@ RHAI on XKS Helm chart for non-OLM installation on non-OpenShift Kubernetes serv
5368
| enabled | bool | `true` | |
5469
| hooks.cliImage | string | `"registry.redhat.io/openshift4/ose-cli-rhel9:v4.20@sha256:d876c1d98b39d65c00c4261431bb84b90284699f3aef84d8701a25c786fb79a1"` | |
5570
| hooks.postInstallCrs.enabled | bool | `true` | |
71+
| hooks.resources.limits.cpu | string | `"200m"` | |
72+
| hooks.resources.limits.memory | string | `"512Mi"` | |
73+
| hooks.resources.requests.cpu | string | `"50m"` | |
74+
| hooks.resources.requests.memory | string | `"64Mi"` | |
5675
| imagePullSecret.dependencyNamespaces[0] | string | `"cert-manager-operator"` | |
5776
| imagePullSecret.dependencyNamespaces[1] | string | `"cert-manager"` | |
5877
| imagePullSecret.dockerConfigJson | string | `""` | |
@@ -62,6 +81,15 @@ RHAI on XKS Helm chart for non-OLM installation on non-OpenShift Kubernetes serv
6281
| rhaiOperator.applicationsNamespace | string | `"redhat-ods-applications"` | |
6382
| rhaiOperator.image | string | `"quay.io/opendatahub/opendatahub-operator:latest"` | |
6483
| rhaiOperator.imagePullPolicy | string | `"Always"` | |
84+
| rhaiOperator.initResources.limits.cpu | string | `"100m"` | |
85+
| rhaiOperator.initResources.limits.memory | string | `"512Mi"` | |
86+
| rhaiOperator.initResources.requests.cpu | string | `"10m"` | |
87+
| rhaiOperator.initResources.requests.memory | string | `"64Mi"` | |
6588
| rhaiOperator.namespace | string | `"redhat-ods-operator"` | |
6689
| rhaiOperator.relatedImages | list | `[]` | |
90+
| rhaiOperator.replicas | int | `1` | |
91+
| rhaiOperator.resources.limits.cpu | string | `"500m"` | |
92+
| rhaiOperator.resources.limits.memory | string | `"1Gi"` | |
93+
| rhaiOperator.resources.requests.cpu | string | `"300m"` | |
94+
| rhaiOperator.resources.requests.memory | string | `"256Mi"` | |
6795

charts/rhai-on-xks-chart/scripts/helmtemplate-config-cloudmanager.yaml

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

36-
# Replace container image with Helm value and update webhook references
36+
# Replace container image, resources, replicas with Helm values
3737
- match:
3838
kinds:
3939
- Deployment
4040
changes:
41+
# Replace replicas with Helm value
42+
- path: .spec.replicas
43+
value: '{{ .Values.CLOUD_NAME.cloudManager.replicas }}'
44+
# Replace container resources with Helm value
45+
- path: .spec.template.spec.containers[name=manager].resources
46+
replaceWith: |
47+
resources:
48+
{{- toYaml .Values.CLOUD_NAME.cloudManager.resources | nindent 12 }}
4149
- path: .spec.template.spec.containers[name=manager].image
4250
value: '{{ .Values.CLOUD_NAME.cloudManager.image }}'
4351
- path: .spec.template.spec.containers[name=manager].imagePullPolicy

charts/rhai-on-xks-chart/scripts/helmtemplate-config.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,19 @@ rules:
9090
- name: {{ $item.name | quote }}
9191
value: {{ $item.value | quote }}
9292
{{- end }}
93+
# Replace replicas with Helm value
94+
- path: .spec.replicas
95+
value: '{{ .Values.rhaiOperator.replicas }}'
96+
# Replace main container resources with Helm value
97+
- path: .spec.template.spec.containers[name=rhods-operator].resources
98+
replaceWith: |
99+
resources:
100+
{{- toYaml .Values.rhaiOperator.resources | nindent 12 }}
101+
# Replace init container resources with Helm value
102+
- path: .spec.template.spec.initContainers[name=copy-manifests].resources
103+
replaceWith: |
104+
resources:
105+
{{- toYaml .Values.rhaiOperator.initResources | nindent 12 }}
93106
# Replace manager container image with Helm template value
94107
- path: .spec.template.spec.containers[name=rhods-operator].image
95108
value: '{{ .Values.rhaiOperator.image }}'

charts/rhai-on-xks-chart/scripts/update-bundle.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@ CLOUD_TARGETS=(
4040

4141
# Defaults
4242
ODH_REPO_URL="https://github.com/red-hat-data-services/rhods-operator.git"
43-
ODH_BRANCH="rhoai-3.4"
43+
VERSION_NO_V="${VERSION#v}"
44+
# Strip patch from major.minor.patch (e.g. 3.4.0-ea.2 → 3.4-ea.2, 3.4.0 → 3.4)
45+
ODH_BRANCH="rhoai-$(echo "${VERSION_NO_V}" | sed 's/^\([0-9]*\.[0-9]*\)\.[0-9]*/\1/')"
4446
ODH_OPERATOR_DIR=""
4547
LOCAL_MODE=false
4648

charts/rhai-on-xks-chart/scripts/verify.sh

Lines changed: 72 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# Environment variables:
55
# RELEASE_NAME - Helm release name (default: rhai-on-xks)
66
# NAMESPACE - Helm release namespace (default: rhai-on-xks)
7-
# CLOUD_PROVIDER - Cloud provider: azure or coreweave (default: azure)
7+
# CLOUD_PROVIDER - Cloud provider: azure, coreweave, or aws (default: azure)
88
# TIMEOUT - Max wait time in seconds per check (default: 300)
99

1010
set -euo pipefail
@@ -19,12 +19,51 @@ if ! [[ "$TIMEOUT" =~ ^[0-9]+$ ]]; then
1919
fi
2020
INTERVAL=10
2121

22+
declare -A PROVIDER_CRDS=(
23+
[azure]="azurekubernetesengines.infrastructure.opendatahub.io"
24+
[coreweave]="coreweavekubernetesengines.infrastructure.opendatahub.io"
25+
[aws]="awskubernetesengines.infrastructure.opendatahub.io"
26+
)
27+
28+
declare -A PROVIDER_CR_DISPLAY=(
29+
[azure]="AzureKubernetesEngine"
30+
[coreweave]="CoreWeaveKubernetesEngine"
31+
[aws]="AWSKubernetesEngine"
32+
)
33+
34+
if [[ -z "${PROVIDER_CRDS[$CLOUD_PROVIDER]+_}" ]]; then
35+
echo "ERROR: unsupported CLOUD_PROVIDER '${CLOUD_PROVIDER}'. Valid values: ${!PROVIDER_CRDS[*]}" >&2
36+
exit 1
37+
fi
38+
2239
ERRORS=0
2340
ERROR_MESSAGES=()
2441

2542
log_ok() { echo " OK: $1"; }
2643
log_fail() { echo " FAIL: $1"; ERRORS=$((ERRORS + 1)); ERROR_MESSAGES+=("$1"); }
2744

45+
debug_namespace() {
46+
local ns="$1"
47+
local filter="${2:-}"
48+
local filter_args=()
49+
if [ -n "${filter}" ]; then
50+
filter_args=(-l "${filter}")
51+
fi
52+
echo " DEBUG: pods in '${ns}'${filter:+ (filter: ${filter})}:"
53+
kubectl get pods -n "${ns}" "${filter_args[@]}" -o wide 2>/dev/null || true
54+
for pod in $(kubectl get pods -n "${ns}" "${filter_args[@]}" -o jsonpath='{.items[*].metadata.name}' 2>/dev/null); do
55+
local phase
56+
phase=$(kubectl get pod "${pod}" -n "${ns}" -o jsonpath='{.status.phase}' 2>/dev/null)
57+
echo " --- pod: ${pod} (${phase}) ---"
58+
if [ "${phase}" != "Running" ] && [ "${phase}" != "Succeeded" ]; then
59+
echo " DEBUG: describe pod ${pod}:"
60+
kubectl describe pod "${pod}" -n "${ns}" 2>/dev/null || true
61+
else
62+
kubectl logs "${pod}" -n "${ns}" --tail=50 --all-containers 2>/dev/null || true
63+
fi
64+
done
65+
}
66+
2867
wait_for() {
2968
local description="$1"
3069
shift
@@ -129,10 +168,7 @@ fi
129168

130169
# --- Namespaces ---
131170
echo "--- Namespaces ---"
132-
EXPECTED_NAMESPACES=("redhat-ods-operator" "redhat-ods-applications" "${NAMESPACE}")
133-
if [ "${CLOUD_PROVIDER}" = "azure" ] || [ "${CLOUD_PROVIDER}" = "coreweave" ]; then
134-
EXPECTED_NAMESPACES+=("rhai-cloudmanager-system")
135-
fi
171+
EXPECTED_NAMESPACES=("redhat-ods-operator" "redhat-ods-applications" "${NAMESPACE}" "rhai-cloudmanager-system")
136172

137173
for ns in "${EXPECTED_NAMESPACES[@]}"; do
138174
if kubectl get namespace "${ns}" >/dev/null 2>&1; then
@@ -150,55 +186,44 @@ else
150186
log_fail "CRD 'kserves.components.platform.opendatahub.io' not found"
151187
fi
152188

153-
if [ "${CLOUD_PROVIDER}" = "azure" ]; then
154-
if kubectl get crd azurekubernetesengines.infrastructure.opendatahub.io >/dev/null 2>&1; then
155-
log_ok "CRD 'azurekubernetesengines.infrastructure.opendatahub.io' exists"
156-
else
157-
log_fail "CRD 'azurekubernetesengines.infrastructure.opendatahub.io' not found"
158-
fi
159-
if kubectl get crd coreweavekubernetesengines.infrastructure.opendatahub.io >/dev/null 2>&1; then
160-
log_fail "CRD 'coreweavekubernetesengines.infrastructure.opendatahub.io' should NOT exist for azure provider"
161-
else
162-
log_ok "CRD 'coreweavekubernetesengines.infrastructure.opendatahub.io' correctly absent"
163-
fi
164-
elif [ "${CLOUD_PROVIDER}" = "coreweave" ]; then
165-
if kubectl get crd coreweavekubernetesengines.infrastructure.opendatahub.io >/dev/null 2>&1; then
166-
log_ok "CRD 'coreweavekubernetesengines.infrastructure.opendatahub.io' exists"
167-
else
168-
log_fail "CRD 'coreweavekubernetesengines.infrastructure.opendatahub.io' not found"
169-
fi
170-
if kubectl get crd azurekubernetesengines.infrastructure.opendatahub.io >/dev/null 2>&1; then
171-
log_fail "CRD 'azurekubernetesengines.infrastructure.opendatahub.io' should NOT exist for coreweave provider"
189+
for provider in "${!PROVIDER_CRDS[@]}"; do
190+
crd="${PROVIDER_CRDS[$provider]}"
191+
if [ "${CLOUD_PROVIDER}" = "${provider}" ]; then
192+
if kubectl get crd "${crd}" >/dev/null 2>&1; then
193+
log_ok "CRD '${crd}' exists"
194+
else
195+
log_fail "CRD '${crd}' not found"
196+
fi
172197
else
173-
log_ok "CRD 'azurekubernetesengines.infrastructure.opendatahub.io' correctly absent"
198+
if kubectl get crd "${crd}" >/dev/null 2>&1; then
199+
log_fail "CRD '${crd}' should NOT exist for ${CLOUD_PROVIDER} provider"
200+
else
201+
log_ok "CRD '${crd}' correctly absent"
202+
fi
174203
fi
175-
fi
204+
done
176205

177206
# --- Step 1: Cloud manager deployment ---
178207
echo "--- Cloud Manager ---"
179208
CM_NS="rhai-cloudmanager-system"
180-
if [ "${CLOUD_PROVIDER}" = "azure" ]; then
181-
wait_for_deployment "azure-cloud-manager-operator" "${CM_NS}" 1
182-
if kubectl get deployment coreweave-cloud-manager-operator -n "${CM_NS}" >/dev/null 2>&1; then
183-
log_fail "Deployment 'coreweave-cloud-manager-operator' should NOT exist for azure provider"
184-
else
185-
log_ok "Deployment 'coreweave-cloud-manager-operator' correctly absent"
186-
fi
187-
elif [ "${CLOUD_PROVIDER}" = "coreweave" ]; then
188-
wait_for_deployment "coreweave-cloud-manager-operator" "${CM_NS}" 1
189-
if kubectl get deployment azure-cloud-manager-operator -n "${CM_NS}" >/dev/null 2>&1; then
190-
log_fail "Deployment 'azure-cloud-manager-operator' should NOT exist for coreweave provider"
209+
for provider in "${!PROVIDER_CRDS[@]}"; do
210+
deploy="${provider}-cloud-manager-operator"
211+
if [ "${CLOUD_PROVIDER}" = "${provider}" ]; then
212+
wait_for_deployment "${deploy}" "${CM_NS}" 1
191213
else
192-
log_ok "Deployment 'azure-cloud-manager-operator' correctly absent"
214+
if kubectl get deployment "${deploy}" -n "${CM_NS}" >/dev/null 2>&1; then
215+
log_fail "Deployment '${deploy}' should NOT exist for ${CLOUD_PROVIDER} provider"
216+
else
217+
log_ok "Deployment '${deploy}' correctly absent"
218+
fi
193219
fi
194-
fi
220+
done
195221

196222
# --- Step 2: Cloud provider CR status ---
197223
echo "--- Cloud Provider CR ---"
198-
if [ "${CLOUD_PROVIDER}" = "azure" ]; then
199-
wait_for_cr_ready "azurekubernetesengines.infrastructure.opendatahub.io" "default-azurekubernetesengine" "AzureKubernetesEngine 'default-azurekubernetesengine'"
200-
elif [ "${CLOUD_PROVIDER}" = "coreweave" ]; then
201-
wait_for_cr_ready "coreweavekubernetesengines.infrastructure.opendatahub.io" "default-coreweavekubernetesengine" "CoreWeaveKubernetesEngine 'default-coreweavekubernetesengine'"
224+
cr_name="default-${CLOUD_PROVIDER}kubernetesengine"
225+
if ! wait_for_cr_ready "${PROVIDER_CRDS[$CLOUD_PROVIDER]}" "${cr_name}" "${PROVIDER_CR_DISPLAY[$CLOUD_PROVIDER]} '${cr_name}'"; then
226+
debug_namespace "${CM_NS}"
202227
fi
203228

204229
# --- Step 3: cert-manager deployments ---
@@ -211,7 +236,10 @@ wait_for_deployment "rhai-operator" "redhat-ods-operator" 3
211236

212237
# --- Step 5: KServe component CR status ---
213238
echo "--- KServe Component ---"
214-
wait_for_cr_ready "kserves.components.platform.opendatahub.io" "default-kserve" "Kserve 'default-kserve'"
239+
if ! wait_for_cr_ready "kserves.components.platform.opendatahub.io" "default-kserve" "Kserve 'default-kserve'"; then
240+
debug_namespace "redhat-ods-operator"
241+
debug_namespace "redhat-ods-applications" "app.kubernetes.io/part-of=kserve"
242+
fi
215243

216244
# --- Step 6: Inference Gateway Istio ---
217245
echo "--- Inference Gateway Istio ---"

charts/rhai-on-xks-chart/templates/cloudmanager/aws/manager/deployment-aws-cloud-manager-operator.yaml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ metadata:
88
name: aws-cloud-manager-operator
99
namespace: {{ .Values.aws.cloudManager.namespace }}
1010
spec:
11-
replicas: 1
11+
replicas: {{ .Values.aws.cloudManager.replicas }}
1212
selector:
1313
matchLabels:
1414
control-plane: controller-manager
@@ -90,12 +90,7 @@ spec:
9090
initialDelaySeconds: 5
9191
periodSeconds: 10
9292
resources:
93-
limits:
94-
cpu: 1000m
95-
memory: 4Gi
96-
requests:
97-
cpu: 100m
98-
memory: 780Mi
93+
{{- toYaml .Values.aws.cloudManager.resources | nindent 12 }}
9994
securityContext:
10095
allowPrivilegeEscalation: false
10196
capabilities:

0 commit comments

Comments
 (0)