From f763c40c10b36df88410bf2615b362668ed14016 Mon Sep 17 00:00:00 2001 From: Bryan Boreham Date: Tue, 28 Jan 2020 12:53:14 +0000 Subject: [PATCH 1/3] Update connection limit in docs --- site/kubernetes/kube-addon.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/kubernetes/kube-addon.md b/site/kubernetes/kube-addon.md index bbf3b58e..5c6a5dd5 100644 --- a/site/kubernetes/kube-addon.md +++ b/site/kubernetes/kube-addon.md @@ -378,7 +378,7 @@ The list of variables you can set is: * `CHECKPOINT_DISABLE` - if set to 1, disable checking for new Weave Net versions (default is blank, i.e. check is enabled) * `CONN_LIMIT` - soft limit on the number of connections between - peers. Defaults to 100. + peers. Defaults to 200. * `HAIRPIN_MODE` - Weave Net defaults to enabling hairpin on the bridge side of the `veth` pair for containers attached. If you need to disable hairpin, e.g. your kernel is one of those that can panic if hairpin is enabled, then you can disable it From 6e7a469a6271e9aac69a1236ba0d8c95349a63cb Mon Sep 17 00:00:00 2001 From: Bryan Boreham Date: Wed, 5 Feb 2020 09:57:12 +0000 Subject: [PATCH 2/3] Note different ways to ask for static IPs --- site/tasks/ipam/manual-ip-address.md | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/site/tasks/ipam/manual-ip-address.md b/site/tasks/ipam/manual-ip-address.md index 78287e1b..2230e72f 100644 --- a/site/tasks/ipam/manual-ip-address.md +++ b/site/tasks/ipam/manual-ip-address.md @@ -13,7 +13,22 @@ Weave Net detects when a container has exited and releases its allocated address See the [Automatic IP Address Management](/site/tasks/ipam/ipam.md) and also an explanation of [the basics of IP addressing](/site/concepts/ip-addresses.md) for further details. -Instead of allowing Weave Net to allocate IP addresses automatically (using IPAM), there may be instances where you need to control a particular container or a cluster by setting an IP address for it. +Instead of allowing Weave Net to allocate IP addresses automatically (using IPAM), there may be instances where you need to control a particular container or a cluster by setting an IP address for it. The way to do this varies according to how containers are attached to Weave Net. + +## Manually specifying an IP address when using CNI + +The software making a call to CNI has to specify an allocator that allows static IPs. +For instance the [static allocator](https://github.com/containernetworking/plugins/tree/master/plugins/ipam/static) + +(At the time of writing there is no straightforward way to ask Kubernetes to do this.) + +## Manually specifying an IP address when using the Weave Net Docker Plugin + +Docker has a flag `--ip` to specify an address, e.g.: + + $ docker run --network=mynetwork --ip=172.18.0.22 ... + +## Manually specifying an IP address when using the Weave Net Docker Proxy You can specify an IP address and a network explicitly, using Classless Inter-Domain Routing or [CIDR notation](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing). From 5d0e44bb6f3305d0f478eb8f09e43a8815a5a691 Mon Sep 17 00:00:00 2001 From: Murali Reddy Date: Tue, 11 Feb 2020 13:15:33 +0530 Subject: [PATCH 3/3] add missing dnsPolicy: ClusterFirstWithHostNet in weave-daemonset-k8s-1.11.yaml update apiVersion from rbac.authorization.k8s.io/v1beta1 to rbac.authorization.k8s.io/v1 --- prog/weave-kube/weave-daemonset-k8s-1.11.yaml | 9 +++++---- prog/weave-kube/weave-daemonset-k8s-1.8.yaml | 8 ++++---- prog/weave-kube/weave-daemonset-k8s-1.9.yaml | 8 ++++---- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/prog/weave-kube/weave-daemonset-k8s-1.11.yaml b/prog/weave-kube/weave-daemonset-k8s-1.11.yaml index 07f4d4f3..03deabd3 100644 --- a/prog/weave-kube/weave-daemonset-k8s-1.11.yaml +++ b/prog/weave-kube/weave-daemonset-k8s-1.11.yaml @@ -8,7 +8,7 @@ items: labels: name: weave-net namespace: kube-system - - apiVersion: rbac.authorization.k8s.io/v1beta1 + - apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: name: weave-net @@ -48,7 +48,7 @@ items: verbs: - patch - update - - apiVersion: rbac.authorization.k8s.io/v1beta1 + - apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: name: weave-net @@ -62,7 +62,7 @@ items: - kind: ServiceAccount name: weave-net namespace: kube-system - - apiVersion: rbac.authorization.k8s.io/v1beta1 + - apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: name: weave-net @@ -85,7 +85,7 @@ items: - configmaps verbs: - create - - apiVersion: rbac.authorization.k8s.io/v1beta1 + - apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: name: weave-net @@ -176,6 +176,7 @@ items: mountPath: /run/xtables.lock readOnly: false hostNetwork: true + dnsPolicy: ClusterFirstWithHostNet hostPID: true restartPolicy: Always securityContext: diff --git a/prog/weave-kube/weave-daemonset-k8s-1.8.yaml b/prog/weave-kube/weave-daemonset-k8s-1.8.yaml index 66c1d86b..40fc4a73 100644 --- a/prog/weave-kube/weave-daemonset-k8s-1.8.yaml +++ b/prog/weave-kube/weave-daemonset-k8s-1.8.yaml @@ -8,7 +8,7 @@ items: labels: name: weave-net namespace: kube-system - - apiVersion: rbac.authorization.k8s.io/v1beta1 + - apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: name: weave-net @@ -48,7 +48,7 @@ items: verbs: - patch - update - - apiVersion: rbac.authorization.k8s.io/v1beta1 + - apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: name: weave-net @@ -62,7 +62,7 @@ items: - kind: ServiceAccount name: weave-net namespace: kube-system - - apiVersion: rbac.authorization.k8s.io/v1beta1 + - apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: name: weave-net @@ -85,7 +85,7 @@ items: - configmaps verbs: - create - - apiVersion: rbac.authorization.k8s.io/v1beta1 + - apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: name: weave-net diff --git a/prog/weave-kube/weave-daemonset-k8s-1.9.yaml b/prog/weave-kube/weave-daemonset-k8s-1.9.yaml index 46f9af24..019995c2 100644 --- a/prog/weave-kube/weave-daemonset-k8s-1.9.yaml +++ b/prog/weave-kube/weave-daemonset-k8s-1.9.yaml @@ -8,7 +8,7 @@ items: labels: name: weave-net namespace: kube-system - - apiVersion: rbac.authorization.k8s.io/v1beta1 + - apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: name: weave-net @@ -48,7 +48,7 @@ items: verbs: - patch - update - - apiVersion: rbac.authorization.k8s.io/v1beta1 + - apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: name: weave-net @@ -62,7 +62,7 @@ items: - kind: ServiceAccount name: weave-net namespace: kube-system - - apiVersion: rbac.authorization.k8s.io/v1beta1 + - apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: name: weave-net @@ -85,7 +85,7 @@ items: - configmaps verbs: - create - - apiVersion: rbac.authorization.k8s.io/v1beta1 + - apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: name: weave-net