Skip to content

Commit 4992e95

Browse files
committed
fix: use NodePort for uni-resolver-web and uni-resolver-frontend
1 parent 414bc97 commit 4992e95

2 files changed

Lines changed: 23 additions & 0 deletions

File tree

ci/deploy-k8s-aws/scripts/deploy-ingress.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,28 @@ echo "===================================================================="
3737
echo "Checking Ingress: $INGRESS_NAME"
3838
echo "===================================================================="
3939

40+
# First, ensure required services exist and are of type NodePort
41+
echo "Checking required services..."
42+
echo ""
43+
44+
for service in uni-resolver-web uni-resolver-frontend; do
45+
if kubectl get service "$service" -n "$NAMESPACE" &>/dev/null; then
46+
service_type=$(kubectl get service "$service" -n "$NAMESPACE" -o jsonpath='{.spec.type}')
47+
echo " Service '$service' exists (type: $service_type)"
48+
49+
if [ "$service_type" != "NodePort" ] && [ "$service_type" != "LoadBalancer" ]; then
50+
echo " ⚠ Service type is '$service_type', patching to 'NodePort'..."
51+
kubectl patch service "$service" -n "$NAMESPACE" -p '{"spec":{"type":"NodePort"}}'
52+
echo " ✓ Service patched to NodePort"
53+
fi
54+
else
55+
echo " ⚠ Warning: Service '$service' does not exist"
56+
echo " The Ingress will be created but may not work until the service is deployed"
57+
fi
58+
done
59+
60+
echo ""
61+
4062
# Check if ingress exists
4163
if kubectl get ingress "$INGRESS_NAME" -n "$NAMESPACE" &>/dev/null; then
4264
echo "✓ Ingress '$INGRESS_NAME' already exists"

ci/deploy-k8s-aws/scripts/deploy-services.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,7 @@ metadata:
214214
app: ${service_name}
215215
managed-by: github-action
216216
spec:
217+
type: NodePort
217218
selector:
218219
app: ${service_name}
219220
ports:

0 commit comments

Comments
 (0)