Before this change, we simply did a search/replace on the stringified kubeconfig blob. Now we're parsing it into a kubeconfig struct and modify the fields directly in a more controlled manner. Here's what we change: - server URL: based on the chosen APIHost and APIPort - cluster name: default -> k3d-CLUSTERNAME - user name: default -> admin@k3d-CLUSTERNAME - context name: default -> admin@k3d-CLUSTERNAME
13 lines
381 B
Bash
13 lines
381 B
Bash
#!/bin/bash
|
|
set -e
|
|
set -x
|
|
|
|
if [ ! -d /tmp/build-golang/src/github.com/json-iterator ]; then
|
|
mkdir -p /tmp/build-golang/src/github.com/json-iterator
|
|
ln -s $PWD /tmp/build-golang/src/github.com/json-iterator/go
|
|
fi
|
|
export GOPATH=/tmp/build-golang
|
|
go get -u github.com/golang/dep/cmd/dep
|
|
cd /tmp/build-golang/src/github.com/json-iterator/go
|
|
exec $GOPATH/bin/dep ensure -update
|