Skip to content

Commit 5cdf123

Browse files
committed
Merge remote-tracking branch 'upstream/main'
2 parents b61a1d9 + 19fc085 commit 5cdf123

21 files changed

Lines changed: 286 additions & 303 deletions

charts/rhai-on-xks-chart/templates/hooks/_crs-definitions.tpl

Lines changed: 24 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -170,12 +170,34 @@ Do NOT range over this and access fields with .field syntax — use crApplyComma
170170
{{- end -}}
171171

172172
{{/*
173-
Emit kubectl apply commands for all enabled component CRs and provider KE CRs.
173+
Emit kubectl apply commands for provider KE CR, Platform CR, then component CRs.
174+
Provider KE CR is applied first to trigger dependency deployment (cert-manager, istio, etc.).
175+
Platform CR is applied next to trigger module operators (e.g. ai-gateway-operator).
176+
Component CRs are applied last, after their CRDs are registered by the operators.
174177
Include with: {{- include "rhai-on-xks-chart.crApplyCommands" . | nindent 14 }}
175-
Component CRs are applied before provider KE CRs.
176178
*/}}
177179
{{- define "rhai-on-xks-chart.crApplyCommands" -}}
178180
{{- $root := . }}
181+
{{- $provider := include "rhai-on-xks-chart.activeProvider" . | fromYaml }}
182+
{{- if and $provider (index $provider "keEnabled") }}
183+
echo "Creating {{ index $provider "keKind" }} CR..."
184+
kubectl apply -f - <<'EOF'
185+
apiVersion: infrastructure.opendatahub.io/v1alpha1
186+
kind: {{ index $provider "keKind" }}
187+
metadata:
188+
name: {{ index $provider "keName" }}
189+
labels:
190+
{{- include "rhai-on-xks-chart.labels" $root | nindent 4 }}
191+
{{- $spec := index $provider "keSpec" }}
192+
{{- if $spec }}
193+
spec:
194+
{{- $spec | toYaml | nindent 2 }}
195+
{{- else }}
196+
spec: {}
197+
{{- end }}
198+
EOF
199+
{{- end }}
200+
{{- include "rhai-on-xks-chart.moduleApplyCommands" $root }}
179201
{{- $compRegistry := include "rhai-on-xks-chart.componentCRRegistry" . | fromYaml }}
180202
{{- range $name := keys $compRegistry | sortAlpha }}
181203
{{- $meta := index $compRegistry $name }}
@@ -200,25 +222,6 @@ spec: {}
200222
EOF
201223
{{- end }}
202224
{{- end }}
203-
{{- $provider := include "rhai-on-xks-chart.activeProvider" . | fromYaml }}
204-
{{- if and $provider (index $provider "keEnabled") }}
205-
echo "Creating {{ index $provider "keKind" }} CR..."
206-
kubectl apply -f - <<'EOF'
207-
apiVersion: infrastructure.opendatahub.io/v1alpha1
208-
kind: {{ index $provider "keKind" }}
209-
metadata:
210-
name: {{ index $provider "keName" }}
211-
labels:
212-
{{- include "rhai-on-xks-chart.labels" $root | nindent 4 }}
213-
{{- $spec := index $provider "keSpec" }}
214-
{{- if $spec }}
215-
spec:
216-
{{- $spec | toYaml | nindent 2 }}
217-
{{- else }}
218-
spec: {}
219-
{{- end }}
220-
EOF
221-
{{- end }}
222225
{{- end -}}
223226

224227
{{/*

charts/rhai-on-xks-chart/templates/hooks/post-install-crs-job.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ spec:
4343
- |
4444
set -euo pipefail
4545
{{- include "rhai-on-xks-chart.crApplyCommands" . | trimPrefix "\n" | nindent 14 }}
46-
{{- include "rhai-on-xks-chart.moduleApplyCommands" . | nindent 14 }}
4746
echo "Done."
4847
{{- end }}
4948
{{- end }}

charts/rhai-on-xks-chart/test/snapshots/aws-with-all-deps-managed.snap.yaml

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3387,19 +3387,6 @@ spec:
33873387
- -c
33883388
- |
33893389
set -euo pipefail
3390-
echo "Waiting for CRD kserves.components.platform.opendatahub.io to be established..."
3391-
kubectl wait --for condition=established --timeout=300s crd/kserves.components.platform.opendatahub.io
3392-
echo "Creating Kserve CR..."
3393-
kubectl apply -f - <<'EOF'
3394-
apiVersion: components.platform.opendatahub.io/v1alpha1
3395-
kind: Kserve
3396-
metadata:
3397-
name: default-kserve
3398-
labels:
3399-
helm.sh/chart: HELM_CHART_VERSION_REDACTED
3400-
app.kubernetes.io/managed-by: Helm
3401-
spec: {}
3402-
EOF
34033390
echo "Creating AWSKubernetesEngine CR..."
34043391
kubectl apply -f - <<'EOF'
34053392
apiVersion: infrastructure.opendatahub.io/v1alpha1
@@ -3426,7 +3413,6 @@ spec:
34263413
namespace: istio-system
34273414
managementPolicy: Managed
34283415
EOF
3429-
34303416
echo "Waiting for CRD platforms.config.opendatahub.io to be established..."
34313417
kubectl wait --for condition=established --timeout=300s crd/platforms.config.opendatahub.io
34323418
echo "Creating Platform CR..."
@@ -3440,6 +3426,19 @@ spec:
34403426
app.kubernetes.io/managed-by: Helm
34413427
spec: {}
34423428
EOF
3429+
echo "Waiting for CRD kserves.components.platform.opendatahub.io to be established..."
3430+
kubectl wait --for condition=established --timeout=300s crd/kserves.components.platform.opendatahub.io
3431+
echo "Creating Kserve CR..."
3432+
kubectl apply -f - <<'EOF'
3433+
apiVersion: components.platform.opendatahub.io/v1alpha1
3434+
kind: Kserve
3435+
metadata:
3436+
name: default-kserve
3437+
labels:
3438+
helm.sh/chart: HELM_CHART_VERSION_REDACTED
3439+
app.kubernetes.io/managed-by: Helm
3440+
spec: {}
3441+
EOF
34433442
echo "Done."
34443443
34453444
---

charts/rhai-on-xks-chart/test/snapshots/aws-with-allowed-routes-all.snap.yaml

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3212,19 +3212,6 @@ spec:
32123212
- -c
32133213
- |
32143214
set -euo pipefail
3215-
echo "Waiting for CRD kserves.components.platform.opendatahub.io to be established..."
3216-
kubectl wait --for condition=established --timeout=300s crd/kserves.components.platform.opendatahub.io
3217-
echo "Creating Kserve CR..."
3218-
kubectl apply -f - <<'EOF'
3219-
apiVersion: components.platform.opendatahub.io/v1alpha1
3220-
kind: Kserve
3221-
metadata:
3222-
name: default-kserve
3223-
labels:
3224-
helm.sh/chart: HELM_CHART_VERSION_REDACTED
3225-
app.kubernetes.io/managed-by: Helm
3226-
spec: {}
3227-
EOF
32283215
echo "Creating AWSKubernetesEngine CR..."
32293216
kubectl apply -f - <<'EOF'
32303217
apiVersion: infrastructure.opendatahub.io/v1alpha1
@@ -3251,7 +3238,6 @@ spec:
32513238
namespace: istio-system
32523239
managementPolicy: Managed
32533240
EOF
3254-
32553241
echo "Waiting for CRD platforms.config.opendatahub.io to be established..."
32563242
kubectl wait --for condition=established --timeout=300s crd/platforms.config.opendatahub.io
32573243
echo "Creating Platform CR..."
@@ -3265,6 +3251,19 @@ spec:
32653251
app.kubernetes.io/managed-by: Helm
32663252
spec: {}
32673253
EOF
3254+
echo "Waiting for CRD kserves.components.platform.opendatahub.io to be established..."
3255+
kubectl wait --for condition=established --timeout=300s crd/kserves.components.platform.opendatahub.io
3256+
echo "Creating Kserve CR..."
3257+
kubectl apply -f - <<'EOF'
3258+
apiVersion: components.platform.opendatahub.io/v1alpha1
3259+
kind: Kserve
3260+
metadata:
3261+
name: default-kserve
3262+
labels:
3263+
helm.sh/chart: HELM_CHART_VERSION_REDACTED
3264+
app.kubernetes.io/managed-by: Helm
3265+
spec: {}
3266+
EOF
32683267
echo "Done."
32693268
32703269
---

charts/rhai-on-xks-chart/test/snapshots/aws-with-allowed-routes-same.snap.yaml

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3212,19 +3212,6 @@ spec:
32123212
- -c
32133213
- |
32143214
set -euo pipefail
3215-
echo "Waiting for CRD kserves.components.platform.opendatahub.io to be established..."
3216-
kubectl wait --for condition=established --timeout=300s crd/kserves.components.platform.opendatahub.io
3217-
echo "Creating Kserve CR..."
3218-
kubectl apply -f - <<'EOF'
3219-
apiVersion: components.platform.opendatahub.io/v1alpha1
3220-
kind: Kserve
3221-
metadata:
3222-
name: default-kserve
3223-
labels:
3224-
helm.sh/chart: HELM_CHART_VERSION_REDACTED
3225-
app.kubernetes.io/managed-by: Helm
3226-
spec: {}
3227-
EOF
32283215
echo "Creating AWSKubernetesEngine CR..."
32293216
kubectl apply -f - <<'EOF'
32303217
apiVersion: infrastructure.opendatahub.io/v1alpha1
@@ -3251,7 +3238,6 @@ spec:
32513238
namespace: istio-system
32523239
managementPolicy: Managed
32533240
EOF
3254-
32553241
echo "Waiting for CRD platforms.config.opendatahub.io to be established..."
32563242
kubectl wait --for condition=established --timeout=300s crd/platforms.config.opendatahub.io
32573243
echo "Creating Platform CR..."
@@ -3265,6 +3251,19 @@ spec:
32653251
app.kubernetes.io/managed-by: Helm
32663252
spec: {}
32673253
EOF
3254+
echo "Waiting for CRD kserves.components.platform.opendatahub.io to be established..."
3255+
kubectl wait --for condition=established --timeout=300s crd/kserves.components.platform.opendatahub.io
3256+
echo "Creating Kserve CR..."
3257+
kubectl apply -f - <<'EOF'
3258+
apiVersion: components.platform.opendatahub.io/v1alpha1
3259+
kind: Kserve
3260+
metadata:
3261+
name: default-kserve
3262+
labels:
3263+
helm.sh/chart: HELM_CHART_VERSION_REDACTED
3264+
app.kubernetes.io/managed-by: Helm
3265+
spec: {}
3266+
EOF
32683267
echo "Done."
32693268
32703269
---

charts/rhai-on-xks-chart/test/snapshots/aws-with-pull-secret.snap.yaml

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3363,19 +3363,6 @@ spec:
33633363
- -c
33643364
- |
33653365
set -euo pipefail
3366-
echo "Waiting for CRD kserves.components.platform.opendatahub.io to be established..."
3367-
kubectl wait --for condition=established --timeout=300s crd/kserves.components.platform.opendatahub.io
3368-
echo "Creating Kserve CR..."
3369-
kubectl apply -f - <<'EOF'
3370-
apiVersion: components.platform.opendatahub.io/v1alpha1
3371-
kind: Kserve
3372-
metadata:
3373-
name: default-kserve
3374-
labels:
3375-
helm.sh/chart: HELM_CHART_VERSION_REDACTED
3376-
app.kubernetes.io/managed-by: Helm
3377-
spec: {}
3378-
EOF
33793366
echo "Creating AWSKubernetesEngine CR..."
33803367
kubectl apply -f - <<'EOF'
33813368
apiVersion: infrastructure.opendatahub.io/v1alpha1
@@ -3402,7 +3389,6 @@ spec:
34023389
namespace: istio-system
34033390
managementPolicy: Managed
34043391
EOF
3405-
34063392
echo "Waiting for CRD platforms.config.opendatahub.io to be established..."
34073393
kubectl wait --for condition=established --timeout=300s crd/platforms.config.opendatahub.io
34083394
echo "Creating Platform CR..."
@@ -3416,6 +3402,19 @@ spec:
34163402
app.kubernetes.io/managed-by: Helm
34173403
spec: {}
34183404
EOF
3405+
echo "Waiting for CRD kserves.components.platform.opendatahub.io to be established..."
3406+
kubectl wait --for condition=established --timeout=300s crd/kserves.components.platform.opendatahub.io
3407+
echo "Creating Kserve CR..."
3408+
kubectl apply -f - <<'EOF'
3409+
apiVersion: components.platform.opendatahub.io/v1alpha1
3410+
kind: Kserve
3411+
metadata:
3412+
name: default-kserve
3413+
labels:
3414+
helm.sh/chart: HELM_CHART_VERSION_REDACTED
3415+
app.kubernetes.io/managed-by: Helm
3416+
spec: {}
3417+
EOF
34193418
echo "Done."
34203419
34213420
---

charts/rhai-on-xks-chart/test/snapshots/aws.snap.yaml

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3212,19 +3212,6 @@ spec:
32123212
- -c
32133213
- |
32143214
set -euo pipefail
3215-
echo "Waiting for CRD kserves.components.platform.opendatahub.io to be established..."
3216-
kubectl wait --for condition=established --timeout=300s crd/kserves.components.platform.opendatahub.io
3217-
echo "Creating Kserve CR..."
3218-
kubectl apply -f - <<'EOF'
3219-
apiVersion: components.platform.opendatahub.io/v1alpha1
3220-
kind: Kserve
3221-
metadata:
3222-
name: default-kserve
3223-
labels:
3224-
helm.sh/chart: HELM_CHART_VERSION_REDACTED
3225-
app.kubernetes.io/managed-by: Helm
3226-
spec: {}
3227-
EOF
32283215
echo "Creating AWSKubernetesEngine CR..."
32293216
kubectl apply -f - <<'EOF'
32303217
apiVersion: infrastructure.opendatahub.io/v1alpha1
@@ -3251,7 +3238,6 @@ spec:
32513238
namespace: istio-system
32523239
managementPolicy: Managed
32533240
EOF
3254-
32553241
echo "Waiting for CRD platforms.config.opendatahub.io to be established..."
32563242
kubectl wait --for condition=established --timeout=300s crd/platforms.config.opendatahub.io
32573243
echo "Creating Platform CR..."
@@ -3265,6 +3251,19 @@ spec:
32653251
app.kubernetes.io/managed-by: Helm
32663252
spec: {}
32673253
EOF
3254+
echo "Waiting for CRD kserves.components.platform.opendatahub.io to be established..."
3255+
kubectl wait --for condition=established --timeout=300s crd/kserves.components.platform.opendatahub.io
3256+
echo "Creating Kserve CR..."
3257+
kubectl apply -f - <<'EOF'
3258+
apiVersion: components.platform.opendatahub.io/v1alpha1
3259+
kind: Kserve
3260+
metadata:
3261+
name: default-kserve
3262+
labels:
3263+
helm.sh/chart: HELM_CHART_VERSION_REDACTED
3264+
app.kubernetes.io/managed-by: Helm
3265+
spec: {}
3266+
EOF
32683267
echo "Done."
32693268
32703269
---

charts/rhai-on-xks-chart/test/snapshots/azure-with-all-deps-managed.snap.yaml

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3387,19 +3387,6 @@ spec:
33873387
- -c
33883388
- |
33893389
set -euo pipefail
3390-
echo "Waiting for CRD kserves.components.platform.opendatahub.io to be established..."
3391-
kubectl wait --for condition=established --timeout=300s crd/kserves.components.platform.opendatahub.io
3392-
echo "Creating Kserve CR..."
3393-
kubectl apply -f - <<'EOF'
3394-
apiVersion: components.platform.opendatahub.io/v1alpha1
3395-
kind: Kserve
3396-
metadata:
3397-
name: default-kserve
3398-
labels:
3399-
helm.sh/chart: HELM_CHART_VERSION_REDACTED
3400-
app.kubernetes.io/managed-by: Helm
3401-
spec: {}
3402-
EOF
34033390
echo "Creating AzureKubernetesEngine CR..."
34043391
kubectl apply -f - <<'EOF'
34053392
apiVersion: infrastructure.opendatahub.io/v1alpha1
@@ -3426,7 +3413,6 @@ spec:
34263413
namespace: istio-system
34273414
managementPolicy: Managed
34283415
EOF
3429-
34303416
echo "Waiting for CRD platforms.config.opendatahub.io to be established..."
34313417
kubectl wait --for condition=established --timeout=300s crd/platforms.config.opendatahub.io
34323418
echo "Creating Platform CR..."
@@ -3440,6 +3426,19 @@ spec:
34403426
app.kubernetes.io/managed-by: Helm
34413427
spec: {}
34423428
EOF
3429+
echo "Waiting for CRD kserves.components.platform.opendatahub.io to be established..."
3430+
kubectl wait --for condition=established --timeout=300s crd/kserves.components.platform.opendatahub.io
3431+
echo "Creating Kserve CR..."
3432+
kubectl apply -f - <<'EOF'
3433+
apiVersion: components.platform.opendatahub.io/v1alpha1
3434+
kind: Kserve
3435+
metadata:
3436+
name: default-kserve
3437+
labels:
3438+
helm.sh/chart: HELM_CHART_VERSION_REDACTED
3439+
app.kubernetes.io/managed-by: Helm
3440+
spec: {}
3441+
EOF
34433442
echo "Done."
34443443
34453444
---

0 commit comments

Comments
 (0)