Skip to content

Commit 2fff91e

Browse files
committed
Merge remote-tracking branch 'upstream/main'
2 parents 5c11eae + e75ae8c commit 2fff91e

7 files changed

Lines changed: 739 additions & 416 deletions

File tree

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

Lines changed: 62 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,8 @@ permissions:
1414
contents: read
1515

1616
jobs:
17-
e2e-test:
17+
authorize:
1818
runs-on: ubuntu-latest
19-
strategy:
20-
fail-fast: false
21-
matrix:
22-
cloud_provider: [azure, coreweave, aws]
2319
steps:
2420
- name: Check authorization
2521
env:
@@ -57,10 +53,19 @@ jobs:
5753
echo "::error::xKS e2e tests required. A maintainer must add the 'run-xks-e2e' label after reviewing the code."
5854
exit 1
5955
56+
e2e-test:
57+
needs: authorize
58+
runs-on: ubuntu-latest
59+
strategy:
60+
fail-fast: false
61+
matrix:
62+
cloud_provider: [azure, coreweave, aws]
63+
steps:
6064
- name: Checkout
6165
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
6266
with:
6367
ref: ${{ github.event.pull_request.head.sha || github.sha }}
68+
persist-credentials: false
6469

6570
- name: Setup Helm
6671
uses: azure/setup-helm@dda3372f752e03dde6b3237bc9431cdc2f7a02a2 # v5.0.0
@@ -98,3 +103,55 @@ jobs:
98103
echo "=== AWSKubernetesEngine CR ==="
99104
kubectl get awskubernetesengines.infrastructure.opendatahub.io -A -o yaml 2>/dev/null || echo "No AWSKubernetesEngine CRs found"
100105
fi
106+
107+
upgrade-test:
108+
needs: authorize
109+
runs-on: ubuntu-latest
110+
strategy:
111+
fail-fast: false
112+
matrix:
113+
cloud_provider: [azure, coreweave, aws]
114+
steps:
115+
- name: Checkout
116+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
117+
with:
118+
ref: ${{ github.event.pull_request.head.sha || github.sha }}
119+
persist-credentials: false
120+
121+
- name: Setup Helm
122+
uses: azure/setup-helm@dda3372f752e03dde6b3237bc9431cdc2f7a02a2 # v5.0.0
123+
124+
- name: Create kind cluster
125+
uses: helm/kind-action@ef37e7f390d99f746eb8b610417061a60e82a6cc # v1.14.0
126+
127+
- name: Upgrade test
128+
timeout-minutes: 30
129+
env:
130+
RHAI_PULL_SECRET: ${{ secrets.RHAI_PULL_SECRET }}
131+
run: |
132+
set -euo pipefail
133+
PULL_SECRET_FILE="$(mktemp)"
134+
trap 'rm -f "${PULL_SECRET_FILE}"' EXIT
135+
chmod 600 "${PULL_SECRET_FILE}"
136+
printf '%s' "${RHAI_PULL_SECRET}" > "${PULL_SECRET_FILE}"
137+
HELM_REGISTRY_CONFIG="${PULL_SECRET_FILE}" \
138+
make helm-upgrade-verify-xks \
139+
XKS_CLOUD_PROVIDER=${{ matrix.cloud_provider }} \
140+
XKS_PULL_SECRET="${PULL_SECRET_FILE}"
141+
142+
- name: Dump custom resources on failure
143+
if: failure()
144+
run: |
145+
echo "=== KServe CR ==="
146+
kubectl get kserves.components.platform.opendatahub.io -A -o yaml 2>/dev/null || echo "No KServe CRs found"
147+
echo ""
148+
if [ "${{ matrix.cloud_provider }}" = "azure" ]; then
149+
echo "=== AzureKubernetesEngine CR ==="
150+
kubectl get azurekubernetesengines.infrastructure.opendatahub.io -A -o yaml 2>/dev/null || echo "No AzureKubernetesEngine CRs found"
151+
elif [ "${{ matrix.cloud_provider }}" = "coreweave" ]; then
152+
echo "=== CoreWeaveKubernetesEngine CR ==="
153+
kubectl get coreweavekubernetesengines.infrastructure.opendatahub.io -A -o yaml 2>/dev/null || echo "No CoreWeaveKubernetesEngine CRs found"
154+
elif [ "${{ matrix.cloud_provider }}" = "aws" ]; then
155+
echo "=== AWSKubernetesEngine CR ==="
156+
kubectl get awskubernetesengines.infrastructure.opendatahub.io -A -o yaml 2>/dev/null || echo "No AWSKubernetesEngine CRs found"
157+
fi

Makefile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ YQ ?= $(LOCALBIN)/yq
5555

5656
## Application Versions
5757
# RHOAI version to use for bundle updates - update this when new catalog folder appears in RHOAI-Build-Config
58-
RHOAI_VERSION ?= 3.5.0-ea.2
58+
RHOAI_VERSION ?= 3.5.0
5959

6060
## Tool Versions
6161
KUSTOMIZE_VERSION ?= v5.8.0
@@ -298,6 +298,8 @@ XKS_NAMESPACE ?= rhai-on-xks
298298
XKS_CLOUD_PROVIDER ?= azure
299299
XKS_PULL_SECRET ?=
300300
XKS_VALUES_FILE ?=
301+
XKS_UPGRADE_FROM_CHART ?= oci://registry.redhat.io/rhai/rhai-on-xks-chart
302+
XKS_UPGRADE_FROM_VERSION ?= v3.4.2
301303

302304
.PHONY: helm-verify-xks
303305
helm-verify-xks: ## Verify rhai-on-xks-chart installation and lifecycle. Use XKS_TEST=<num> for specific test
@@ -308,6 +310,10 @@ helm-install-verify-xks: ## Install and verify rhai-on-xks-chart
308310
# TODO(RHOAIENG-63729): remove -f values-e2e.yaml once a runner with sufficient resources is available
309311
VALUES_FILE=$(or $(XKS_VALUES_FILE),$(XKS_CHART_PATH)/test/values-e2e.yaml) $(MAKE) helm-verify-xks
310312

313+
.PHONY: helm-upgrade-verify-xks
314+
helm-upgrade-verify-xks: ## Upgrade test: install previous version, upgrade to current, verify
315+
RELEASE_NAME="$(XKS_RELEASE_NAME)" NAMESPACE="$(XKS_NAMESPACE)" CLOUD_PROVIDER="$(XKS_CLOUD_PROVIDER)" PULL_SECRET="$(XKS_PULL_SECRET)" HELM_EXTRA_ARGS="$(HELM_EXTRA_ARGS)" UPGRADE_FROM_CHART="$(XKS_UPGRADE_FROM_CHART)" UPGRADE_FROM_VERSION="$(XKS_UPGRADE_FROM_VERSION)" VALUES_FILE="$(or $(XKS_VALUES_FILE),$(XKS_CHART_PATH)/test/values-e2e.yaml)" bash ./charts/rhai-on-xks-chart/scripts/verify-upgrade.sh
316+
311317
.PHONY: helm-uninstall
312318
helm-uninstall: ## Uninstall helm chart and all dependencies
313319
./scripts/uninstall-helm-chart.sh

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,14 @@ rules:
2323
changes:
2424
- path: .metadata.name
2525
value: '{{ .Values.CLOUD_NAME.cloudManager.namespace }}'
26+
- action: delete
27+
path: .metadata.labels
28+
- path: .metadata.labels
29+
replaceWith: |
30+
labels:
31+
{{- include "rhai-on-xks-chart.labels" . | nindent 4 }}
32+
- path: .metadata.annotations["helm.sh/resource-policy"]
33+
value: keep
2634

2735
# Replace namespace in RoleBinding/ClusterRoleBinding subjects
2836
- match:

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

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@ rules:
2424
value: '{{ .Values.rhaiOperator.namespace }}'
2525
- action: delete
2626
path: .metadata.labels
27+
- path: .metadata.labels
28+
replaceWith: |
29+
labels:
30+
{{- include "rhai-on-xks-chart.labels" . | nindent 4 }}
31+
- path: .metadata.annotations["helm.sh/resource-policy"]
32+
value: keep
2733

2834
- match:
2935
kinds:
@@ -34,6 +40,14 @@ rules:
3440
changes:
3541
- path: .metadata.name
3642
value: '{{ .Values.rhaiOperator.applicationsNamespace }}'
43+
- action: delete
44+
path: .metadata.labels
45+
- path: .metadata.labels
46+
replaceWith: |
47+
labels:
48+
{{- include "rhai-on-xks-chart.labels" . | nindent 4 }}
49+
- path: .metadata.annotations["helm.sh/resource-policy"]
50+
value: keep
3751

3852
# Replace namespace in RoleBinding/ClusterRoleBinding subjects
3953
- match:

0 commit comments

Comments
 (0)