rewrite of static pod json zipper

- add busybox static pod to mesos-docker cluster
- customize static pods with binding annotations
- code cleanup
- removed hacky podtask.And func; support minimal resources for static pods when resource accounting is disabled
- removed zip archive of static pods, changed to gzip of PodList json
- pod utilities moved to package podutil
- added e2e test
- merge watched mirror pods into the mesos pod config stream
This commit is contained in:
James DeFelice
2015-09-14 17:17:08 +02:00
parent 20a99af00e
commit 3d3577b9f3
23 changed files with 909 additions and 459 deletions

View File

@@ -52,8 +52,9 @@ function deploy_ui {
"${kubectl}" create -f "${KUBE_ROOT}/cluster/addons/kube-ui/kube-ui-svc.yaml"
}
# create the kube-system namespace
# create the kube-system and static-pods namespaces
"${kubectl}" create -f "${KUBE_ROOT}/cluster/mesos/docker/kube-system-ns.yaml"
"${kubectl}" create -f "${KUBE_ROOT}/cluster/mesos/docker/static-pods-ns.yaml"
if [ "${ENABLE_CLUSTER_DNS}" == true ]; then
cluster::mesos::docker::run_in_temp_dir 'k8sm-dns' 'deploy_dns'

View File

@@ -141,6 +141,7 @@ scheduler:
--cluster-domain=cluster.local
--mesos-executor-cpus=1.0
--mesos-sandbox-overlay=/opt/sandbox-overlay.tar.gz
--static-pods-config=/opt/static-pods
--v=4
--executor-logv=4
--profiling=true
@@ -148,6 +149,8 @@ scheduler:
- etcd
- mesosmaster1
- apiserver
volumes:
- ./static-pod.json:/opt/static-pods/static-pod.json
keygen:
image: mesosphere/kubernetes-mesos-keygen
command:

View File

@@ -0,0 +1,23 @@
{
"apiVersion": "v1",
"kind": "Pod",
"metadata": {
"name": "busybox",
"namespace": "static-pods"
},
"spec": {
"containers": [
{
"image": "busybox",
"command": [
"sh",
"-c",
"exec tail -f /dev/null"
],
"imagePullPolicy": "IfNotPresent",
"name": "busybox"
}
],
"restartPolicy": "Always"
}
}

View File

@@ -0,0 +1,7 @@
---
apiVersion: v1
kind: Namespace
metadata:
name: static-pods
labels:
name: static-pods