Add automatic TLS configuration to routes

- Fix oc expose service not configuring TLS by default
- Add oc patch command to configure TLS after route creation
- Ensures routes work properly with HTTPS in all clusters
- Applied to both deploy-complete.sh and deploy-s2i.sh
This commit is contained in:
2025-10-04 11:35:39 -03:00
parent 018bdc0cc5
commit 4301023a66
2 changed files with 9 additions and 1 deletions

View File

@@ -211,7 +211,11 @@ print_success "Service applied successfully"
# Step 10: Create Route (let OpenShift generate host automatically)
print_status "Step 10: Creating Route..."
oc expose service resource-governance-service -n "$NAMESPACE" --name=resource-governance-route --path=/
print_success "Route created successfully"
# Configure TLS for the route
print_status "Step 10a: Configuring TLS for Route..."
oc patch route resource-governance-route -n "$NAMESPACE" -p '{"spec":{"tls":{"termination":"edge","insecureEdgeTerminationPolicy":"Redirect"}}}'
print_success "Route created and configured successfully"
# Step 11: Get application URL
print_status "Step 11: Getting application URL..."