deploy
This commit is contained in:
@@ -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}')
|
||||
|
||||
export HOST=${HOST:-"http://localhost:8000"}
|
||||
docker network create oc | true
|
||||
@@ -37,7 +37,7 @@ do
|
||||
docker rm $i | true
|
||||
cd ./$i
|
||||
cat > ./env.env <<EOF
|
||||
KUBERNETES_SERVICE_HOST=$host
|
||||
KUBERNETES_SERVICE_HOST=$hostdocker
|
||||
KUBERNETES_SERVICE_PORT=$port
|
||||
KUBE_CA="$ca"
|
||||
KUBE_CERT="$cert"
|
||||
@@ -47,4 +47,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
|
||||
Reference in New Issue
Block a user