chore/test-local-dev-builds (#2)
tested initial dev deployment to local k3d Reviewed-on: https://codeberg.org/headshed/infctl-cli/pulls/2 Co-authored-by: jon brookes <jon@headshed.dev> Co-committed-by: jon brookes <jon@headshed.dev>
This commit is contained in:
parent
506142ccd7
commit
e64666340a
35 changed files with 2625 additions and 334 deletions
|
|
@ -1,10 +1,13 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
if kubectl -n traefik get pods --no-headers 2>/dev/null | grep -q 'Running'; then
|
||||
echo "Traefik is already running in the 'traefik' namespace. Upgrading instead."
|
||||
if kubectl -n kube-system get pods --no-headers 2>/dev/null | grep -q 'traefik'; then
|
||||
echo "Traefik is already running in the 'kube-system' namespace. Upgrading instead."
|
||||
|
||||
# Create a temporary values file for more complex configuration
|
||||
cat > /tmp/traefik-values.yaml <<EOF
|
||||
ingressClass:
|
||||
enabled: true
|
||||
isDefaultClass: true
|
||||
ports:
|
||||
web:
|
||||
port: 80
|
||||
|
|
@ -58,7 +61,7 @@ service:
|
|||
targetPort: turn-udp
|
||||
EOF
|
||||
|
||||
helm upgrade traefik traefik/traefik --namespace traefik -f /tmp/traefik-values.yaml
|
||||
helm upgrade traefik traefik/traefik --namespace kube-system -f /tmp/traefik-values.yaml
|
||||
|
||||
else
|
||||
echo "Installing Traefik..."
|
||||
|
|
@ -68,6 +71,9 @@ else
|
|||
|
||||
# Create a temporary values file for more complex configuration
|
||||
cat > /tmp/traefik-values.yaml <<EOF
|
||||
ingressClass:
|
||||
enabled: true
|
||||
isDefaultClass: true
|
||||
ports:
|
||||
web:
|
||||
port: 80
|
||||
|
|
@ -121,48 +127,48 @@ service:
|
|||
targetPort: turn-udp
|
||||
EOF
|
||||
|
||||
helm install traefik traefik/traefik --namespace traefik --create-namespace -f /tmp/traefik-values.yaml
|
||||
helm install traefik traefik/traefik --namespace kube-system -f /tmp/traefik-values.yaml
|
||||
fi
|
||||
|
||||
|
||||
|
||||
cat > traefik-turn-service.yaml << EOF
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: traefik-turn
|
||||
namespace: traefik
|
||||
labels:
|
||||
app.kubernetes.io/instance: traefik-traefik
|
||||
app.kubernetes.io/name: traefik
|
||||
spec:
|
||||
type: LoadBalancer
|
||||
ports:
|
||||
- name: turn-tcp
|
||||
port: 1194
|
||||
protocol: TCP
|
||||
targetPort: turn-tcp
|
||||
- name: turn-udp
|
||||
port: 1194
|
||||
protocol: UDP
|
||||
targetPort: turn-udp
|
||||
selector:
|
||||
app.kubernetes.io/instance: traefik-traefik
|
||||
app.kubernetes.io/name: traefik
|
||||
EOF
|
||||
# cat > traefik-turn-service.yaml << EOF
|
||||
# apiVersion: v1
|
||||
# kind: Service
|
||||
# metadata:
|
||||
# name: traefik-turn
|
||||
# namespace: kube-system
|
||||
# labels:
|
||||
# app.kubernetes.io/instance: traefik-traefik
|
||||
# app.kubernetes.io/name: traefik
|
||||
# spec:
|
||||
# type: LoadBalancer
|
||||
# ports:
|
||||
# - name: turn-tcp
|
||||
# port: 1194
|
||||
# protocol: TCP
|
||||
# targetPort: turn-tcp
|
||||
# - name: turn-udp
|
||||
# port: 1194
|
||||
# protocol: UDP
|
||||
# targetPort: turn-udp
|
||||
# selector:
|
||||
# app.kubernetes.io/instance: traefik-traefik
|
||||
# app.kubernetes.io/name: traefik
|
||||
# EOF
|
||||
|
||||
kubectl apply -f traefik-turn-service.yaml
|
||||
# kubectl apply -f traefik-turn-service.yaml
|
||||
|
||||
rm -f traefik-turn-service.yaml
|
||||
# rm -f traefik-turn-service.yaml
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
echo "Don't forget to create TCP and UDP ingress routes for the TURN server with:"
|
||||
echo "kubectl apply -f k8s-manifests/galene/ingressroute-tcp.yaml"
|
||||
echo "kubectl apply -f k8s-manifests/galene/ingressroute-udp.yaml"
|
||||
echo ""
|
||||
# echo "Don't forget to create TCP and UDP ingress routes for the TURN server with:"
|
||||
# echo "kubectl apply -f k8s-manifests/galene/ingressroute-tcp.yaml"
|
||||
# echo "kubectl apply -f k8s-manifests/galene/ingressroute-udp.yaml"
|
||||
# echo ""
|
||||
echo "To access the dashboard:"
|
||||
echo "kubectl port-forward -n traefik \$(kubectl get pods -n traefik -l \"app.kubernetes.io/name=traefik\" -o name) 9000:9000"
|
||||
echo "kubectl port-forward -n kube-system \$(kubectl get pods -n kube-system -l \"app.kubernetes.io/name=traefik\" -o name) 9000:9000"
|
||||
echo "Then visit http://localhost:9000/dashboard/ in your browser"
|
||||
Loading…
Add table
Add a link
Reference in a new issue