File tree Expand file tree Collapse file tree
ci/deploy-k8s-aws/scripts Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -37,6 +37,28 @@ echo "===================================================================="
3737echo " Checking Ingress: $INGRESS_NAME "
3838echo " ===================================================================="
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
4163if kubectl get ingress " $INGRESS_NAME " -n " $NAMESPACE " & > /dev/null; then
4264 echo " ✓ Ingress '$INGRESS_NAME ' already exists"
Original file line number Diff line number Diff line change @@ -214,6 +214,7 @@ metadata:
214214 app: ${service_name}
215215 managed-by: github-action
216216spec:
217+ type: NodePort
217218 selector:
218219 app: ${service_name}
219220 ports:
You can’t perform that action at this time.
0 commit comments