Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions cdrage-atomicapp-ci/functional-tests/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
PROVIDER := "docker"
ACTION := "run"

# Env variables
export USER := root
export SUDO_USER := root

install:
# Fixups depending on what system we are on
./prepare.sh install
Expand Down
51 changes: 28 additions & 23 deletions cdrage-atomicapp-ci/functional-tests/providers/kubernetes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,34 +14,39 @@ start_k8s() {
fi

# Use alpha for now since this contains the new hyperkube format going forward
K8S_VERSION=1.2.2
K8S_VERSION=1.2.3
docker run \
--volume=/:/rootfs:ro \
--volume=/sys:/sys:ro \
--volume=/var/lib/docker/:/var/lib/docker:rw \
--volume=/var/lib/kubelet/:/var/lib/kubelet:rw \
--volume=/var/run:/var/run:rw \
--net=host \
--pid=host \
--privileged=true \
-d \
gcr.io/google_containers/hyperkube-amd64:v${K8S_VERSION} \
/hyperkube kubelet \
--containerized \
--hostname-override="127.0.0.1" \
--address="0.0.0.0" \
--api-servers=http://localhost:8080 \
--config=/etc/kubernetes/manifests \
--cluster-dns=10.0.0.10 \
--cluster-domain=cluster.local \
--allow-privileged=true --v=2

--volume=/:/rootfs:ro \
--volume=/sys:/sys:ro \
--volume=/var/lib/docker/:/var/lib/docker:rw \
--volume=/var/lib/kubelet/:/var/lib/kubelet:rw \
--volume=/var/run:/var/run:rw \
--net=host \
--pid=host \
--privileged=true \
--name=kubelet \
-d \
gcr.io/google_containers/hyperkube-amd64:v${K8S_VERSION} \
/hyperkube kubelet \
--containerized \
--hostname-override="127.0.0.1" \
--address="0.0.0.0" \
--api-servers=http://localhost:8080 \
--config=/etc/kubernetes/manifests \
--cluster-dns=10.0.0.10 \
--cluster-domain=cluster.local \
--allow-privileged=true --v=2

until curl 127.0.0.1:8080 &>/dev/null;
do
echo ...
sleep 1
echo ...
sleep 1
done

kubectl config set-cluster dev --server=http://localhost:8080
kubectl config set-context dev --cluster=dev --user=default
kubectl config use-context dev
kubectl config set-credentials default --token=foobar
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These things are set because of your new API PR right? I think we should still be able to contact a local unauthenticated kube instance without having a .kube/config at all. We probably shouldn't need these statements.

}


Expand Down