Skip to content

Commit 5a0edb6

Browse files
committed
Minor issue found during testing
1 parent f40f740 commit 5a0edb6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

deployment/scripts/deploy-openshift.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -249,9 +249,9 @@ echo "7️⃣ Applying OpenShift-specific configurations..."
249249
# Patch Kuadrant for OpenShift Gateway Controller
250250
echo " Patching Kuadrant operator..."
251251
if ! kubectl -n kuadrant-system get deployment kuadrant-operator-controller-manager -o jsonpath='{.spec.template.spec.containers[0].env[?(@.name=="ISTIO_GATEWAY_CONTROLLER_NAMES")]}' | grep -q "ISTIO_GATEWAY_CONTROLLER_NAMES"; then
252-
kubectl patch csv kuadrant-operator.v1.3.0-rc2 -n kuadrant-system \
253-
--type=json -p='[{"op":"add","path":"/spec/install/spec/deployments/0/spec/template/spec/containers/0/env/-","value":{"name":"ISTIO_GATEWAY_CONTROLLER_NAMES",\
254-
"value":"istio.io/gateway-controller,openshift.io/gateway-controller/v1"}}]'
252+
kubectl get csv kuadrant-operator.v1.3.0-rc2 -n kuadrant-system -o json | \
253+
jq '.spec.install.spec.deployments[0].spec.template.spec.containers[0].env |= map(if .name == "ISTIO_GATEWAY_CONTROLLER_NAMES" then . + {"value": "istio.io/gateway-controller,openshift.io/gateway-controller/v1"} else . end)' | \
254+
kubectl apply -f -
255255
echo " ✅ Kuadrant operator patched"
256256
else
257257
echo " ✅ Kuadrant operator already configured"

0 commit comments

Comments
 (0)