Add signoz
This commit is contained in:
@@ -228,6 +228,12 @@ setup() {
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
print_success "Colima started successfully"
|
||||
|
||||
# Increase inotify limits for Colima to prevent "too many open files" errors
|
||||
print_status "Increasing inotify limits in Colima VM..."
|
||||
colima ssh --profile k8s-local "sudo sysctl -w fs.inotify.max_user_watches=524288"
|
||||
colima ssh --profile k8s-local "sudo sysctl -w fs.inotify.max_user_instances=512"
|
||||
print_success "Inotify limits increased"
|
||||
else
|
||||
print_error "Failed to start Colima"
|
||||
exit 1
|
||||
@@ -261,23 +267,23 @@ setup() {
|
||||
|
||||
# 4. Connect registry to Kind network
|
||||
connect_registry_to_kind
|
||||
|
||||
# 3. Install NGINX Ingress Controller
|
||||
|
||||
# 5. Install NGINX Ingress Controller
|
||||
print_status "Installing NGINX Ingress Controller..."
|
||||
|
||||
|
||||
# Apply the ingress-nginx manifest
|
||||
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/main/deploy/static/provider/kind/deploy.yaml
|
||||
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
print_success "NGINX Ingress Controller manifest applied"
|
||||
else
|
||||
print_error "Failed to apply NGINX Ingress Controller manifest"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
# Wait for ingress-nginx pods to be ready with retry logic
|
||||
wait_for_pods "ingress-nginx" "app.kubernetes.io/component=controller" 300
|
||||
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
print_error "NGINX Ingress Controller failed to become ready"
|
||||
print_status "Checking pod status for debugging..."
|
||||
@@ -285,30 +291,10 @@ setup() {
|
||||
kubectl describe pods -n ingress-nginx
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# 4. Configure permanent localhost access
|
||||
print_status "Configuring localhost access via NodePort..."
|
||||
|
||||
# Check if service exists
|
||||
if kubectl get svc ingress-nginx-controller -n ingress-nginx &>/dev/null; then
|
||||
# Patch the service to expose NodePorts
|
||||
kubectl patch svc ingress-nginx-controller \
|
||||
-n ingress-nginx \
|
||||
--type merge \
|
||||
-p '{"spec":{"type":"NodePort","ports":[{"name":"http","port":80,"targetPort":"http","nodePort":30080},{"name":"https","port":443,"targetPort":"https","nodePort":30443}]}}'
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
print_success "NodePort configuration applied"
|
||||
else
|
||||
print_error "Failed to patch Ingress service"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
print_error "Ingress NGINX controller service not found"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# 5. Verify port mappings from kind-config.yaml
|
||||
|
||||
print_success "NGINX Ingress Controller ready (using Kind's built-in NodePort configuration)"
|
||||
|
||||
# 6. Verify port mappings from kind-config.yaml
|
||||
print_status "Verifying port mappings from configuration..."
|
||||
|
||||
# Extract ports from kind-config.yaml
|
||||
@@ -323,24 +309,24 @@ setup() {
|
||||
echo " - Colima profile: k8s-local"
|
||||
echo " - Kind cluster: $CLUSTER_NAME"
|
||||
echo " - Local registry: localhost:5001"
|
||||
echo " - Direct port mappings (from kind-config.yaml):"
|
||||
echo " Frontend: localhost:3000 -> container:30300"
|
||||
echo " Gateway: localhost:8000 -> container:30800"
|
||||
echo " - Ingress access:"
|
||||
echo " HTTP: localhost:${HTTP_HOST_PORT} -> ingress:30080"
|
||||
echo " HTTPS: localhost:${HTTPS_HOST_PORT} -> ingress:30443"
|
||||
echo " - NodePort access:"
|
||||
echo " HTTP: localhost:30080"
|
||||
echo " HTTPS: localhost:30443"
|
||||
echo "----------------------------------------"
|
||||
print_status "To access your applications:"
|
||||
echo " - Use Ingress via: http://localhost:${HTTP_HOST_PORT}"
|
||||
echo " - Direct NodePort: http://localhost:30080"
|
||||
echo ""
|
||||
print_status "Port Mappings (configured in kind-config.yaml):"
|
||||
echo " - HTTP Ingress: localhost:${HTTP_HOST_PORT} -> Kind NodePort 30080"
|
||||
echo " - HTTPS Ingress: localhost:${HTTPS_HOST_PORT} -> Kind NodePort 30443"
|
||||
echo " - Frontend Direct: localhost:3000 -> container:30300"
|
||||
echo " - Gateway Direct: localhost:8000 -> container:30800"
|
||||
echo ""
|
||||
print_status "How to access your application:"
|
||||
echo " 1. Start Tilt: tilt up"
|
||||
echo " 2. Access via:"
|
||||
echo " - Ingress: http://localhost (or https://localhost)"
|
||||
echo " - Direct: http://localhost:3000 (frontend), http://localhost:8000 (gateway)"
|
||||
echo " - Tilt UI: http://localhost:10350"
|
||||
echo "----------------------------------------"
|
||||
print_status "Local Registry Information:"
|
||||
echo " - Registry URL: localhost:5001"
|
||||
echo " - Images will be pushed to: localhost:5001/bakery/<service>"
|
||||
echo " - Update your Tiltfile with: default_registry('localhost:5001')"
|
||||
echo " - Images pushed to: localhost:5001/bakery/<service>"
|
||||
echo " - Tiltfile already configured: default_registry('localhost:5001')"
|
||||
echo "----------------------------------------"
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user