From 7b1e8ac1cf1b2aada0b440bdb55f481a6b3649aa Mon Sep 17 00:00:00 2001 From: Marc CARRE Date: Fri, 17 Mar 2017 10:32:46 +0000 Subject: [PATCH 1/3] Assert no defunct process is generated as a postcondition of all tests. --- test/config.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/config.sh b/test/config.sh index 35f26f7a..ce865a0e 100644 --- a/test/config.sh +++ b/test/config.sh @@ -278,7 +278,16 @@ start_suite() { whitely echo "$@" } +# Common postconditions to assert on each host, after each test: +assert_common_postconditions() { + # Ensure we do not generate any defunct (a.k.a. zombie) process: + assert "run_on $1 ps aux | grep -c '[d]efunct'" "0" +} + end_suite() { + for host in $HOSTS; do + assert_common_postconditions "$host" + done whitely assert_end for host in $HOSTS; do stop_weave_on $host From 2e58e92d4859df5cd94602e7c65b09220a66cc03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20K=C3=A4ldstr=C3=B6m?= Date: Thu, 16 Mar 2017 21:44:07 +0200 Subject: [PATCH 2/3] Add a weave-kube manifest that works for kubeadm v1.6 --- prog/weave-kube/weave-daemonset-k8s-HEAD.yaml | 120 ++++++++++++++++++ 1 file changed, 120 insertions(+) create mode 100644 prog/weave-kube/weave-daemonset-k8s-HEAD.yaml diff --git a/prog/weave-kube/weave-daemonset-k8s-HEAD.yaml b/prog/weave-kube/weave-daemonset-k8s-HEAD.yaml new file mode 100644 index 00000000..5e2aeafc --- /dev/null +++ b/prog/weave-kube/weave-daemonset-k8s-HEAD.yaml @@ -0,0 +1,120 @@ +kind: ClusterRole +apiVersion: rbac.authorization.k8s.io/v1beta1 +metadata: + name: weave-net +rules: +- apiGroups: + - "" + resources: + - pods + - namespaces + - nodes + verbs: + - get + - list + - watch +- apiGroups: + - extensions + resources: + - networkpolicies + verbs: + - get + - list + - watch +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + name: weave-net + namespace: kube-system +--- +kind: ClusterRoleBinding +apiVersion: rbac.authorization.k8s.io/v1beta1 +metadata: + name: weave-net +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: weave-net +subjects: +- kind: ServiceAccount + name: weave-net + namespace: kube-system +--- +apiVersion: extensions/v1beta1 +kind: DaemonSet +metadata: + name: weave-net + namespace: kube-system +spec: + template: + metadata: + labels: + name: weave-net + spec: + hostNetwork: true + hostPID: true + containers: + - name: weave + image: weaveworks/weave-kube:latest + imagePullPolicy: Always + command: + - /home/weave/launch.sh + livenessProbe: + initialDelaySeconds: 30 + httpGet: + host: 127.0.0.1 + path: /status + port: 6784 + securityContext: + privileged: true + volumeMounts: + - name: weavedb + mountPath: /weavedb + - name: cni-bin + mountPath: /host/opt + - name: cni-bin2 + mountPath: /host/home + - name: cni-conf + mountPath: /host/etc + - name: dbus + mountPath: /host/var/lib/dbus + - name: lib-modules + mountPath: /lib/modules + resources: + requests: + cpu: 10m + - name: weave-npc + image: weaveworks/weave-npc:latest + imagePullPolicy: Always + resources: + requests: + cpu: 10m + securityContext: + privileged: true + restartPolicy: Always + tolerations: + - key: node-role.kubernetes.io/master + effect: NoSchedule + serviceAccountName: weave-net + securityContext: + seLinuxOptions: + type: spc_t + volumes: + - name: weavedb + emptyDir: {} + - name: cni-bin + hostPath: + path: /opt + - name: cni-bin2 + hostPath: + path: /home + - name: cni-conf + hostPath: + path: /etc + - name: dbus + hostPath: + path: /var/lib/dbus + - name: lib-modules + hostPath: + path: /lib/modules From 9da5cee8d9b5fb89a14e271652e810ab5b0455c2 Mon Sep 17 00:00:00 2001 From: Bryan Boreham Date: Fri, 17 Mar 2017 11:45:06 +0000 Subject: [PATCH 3/3] Rename Kubernetes daemonset to "1.6" To emphasise this is the version that adopters of Kubernetes 1.6 need to use. --- ...weave-daemonset-k8s-HEAD.yaml => weave-daemonset-k8s-1.6.yaml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename prog/weave-kube/{weave-daemonset-k8s-HEAD.yaml => weave-daemonset-k8s-1.6.yaml} (100%) diff --git a/prog/weave-kube/weave-daemonset-k8s-HEAD.yaml b/prog/weave-kube/weave-daemonset-k8s-1.6.yaml similarity index 100% rename from prog/weave-kube/weave-daemonset-k8s-HEAD.yaml rename to prog/weave-kube/weave-daemonset-k8s-1.6.yaml