This commit is contained in:
mr
2025-11-07 10:37:11 +01:00
parent 9e1686a78d
commit 934f00d749
5 changed files with 26 additions and 22 deletions

View File

@@ -1,11 +1,11 @@
#!/bin/bash
server=$(grep 'server:' ~/.kube/config | awk '{print $2}')
host=$(echo "$server" | sed -E 's#https://([^:]+):([0-9]+)#\1#')
port=$(echo "$server" | sed -E 's#https://([^:]+):([0-9]+)#\2#')
ca=$(grep 'certificate-authority-data:' ~/.kube/config | awk '{print $2}')
cert=$(grep 'client-certificate-data:' ~/.kube/config | awk '{print $2}')
key=$(grep 'client-key-data:' ~/.kube/config | awk '{print $2}')
host=$(ip -4 addr show $(ip route | awk '/default/ {print $5}') | awk '/inet / {print $2}' | cut -d/ -f1)
port=6443
ca=$(kubectl config view --raw --minify -o jsonpath='{.clusters[0].cluster.certificate-authority-data}')
cert=$(kubectl config view --raw --minify -o jsonpath='{.users[0].user.client-certificate-data}')
key=$(kubectl config view --raw --minify -o jsonpath='{.users[0].user.client-key-data}')
HOST=${2:-"http://localhost:8000"}
docker network create oc | true
@@ -50,4 +50,4 @@ EOF
cd ..
done
docker compose up hydra-client -d
cd ./oc-deploy/docker/tools && docker compose -f ./docker-compose.dev.yml up hydra-client --force-recreate -d