Merge pull request #2250 from woopstar/weave-mtu-patch

Added option to set MTU on Weave
This commit is contained in:
Antoine Legrand 2018-02-06 12:13:54 +01:00 committed by GitHub
commit 138e0c2301
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 41 additions and 3 deletions

View file

@ -83,6 +83,9 @@ weave_mode_seed: false
weave_seed: uninitialized weave_seed: uninitialized
weave_peers: uninitialized weave_peers: uninitialized
# Set the MTU of Weave (default 1376, Jumbo Frames: 8916)
weave_mtu: 1376
# Enable kubernetes network policies # Enable kubernetes network policies
enable_network_policy: false enable_network_policy: false

View file

@ -38,7 +38,7 @@ flannel_version: "v0.9.1"
flannel_cni_version: "v0.3.0" flannel_cni_version: "v0.3.0"
istio_version: "0.2.6" istio_version: "0.2.6"
vault_version: 0.8.1 vault_version: 0.8.1
weave_version: 2.1.3 weave_version: 2.2.0
pod_infra_version: 3.0 pod_infra_version: 3.0
contiv_version: 1.1.7 contiv_version: 1.1.7

View file

@ -12,5 +12,8 @@ weave_cpu_requests: 10m
weave_seed: uninitialized weave_seed: uninitialized
weave_peers: uninitialized weave_peers: uninitialized
# Set the MTU of Weave (default 1376, Jumbo Frames: 8916)
weave_mtu: 1376
# this variable is use in seed mode # this variable is use in seed mode
weave_ip_current_cluster: "{% for host in groups['k8s-cluster'] %}{{ hostvars[host]['ip'] | default(hostvars[host]['ansible_default_ipv4']['address']) }}{% if not loop.last %} {% endif %}{% endfor %}" weave_ip_current_cluster: "{% for host in groups['k8s-cluster'] %}{{ hostvars[host]['ip'] | default(hostvars[host]['ansible_default_ipv4']['address']) }}{% if not loop.last %} {% endif %}{% endfor %}"

View file

@ -34,6 +34,37 @@ items:
- get - get
- list - list
- watch - watch
- apiGroups:
- 'networking.k8s.io'
resources:
- networkpolicies
verbs:
- get
- list
- watch
- apiVersion: rbac.authorization.k8s.io/v1beta1
kind: Role
metadata:
name: weave-net
namespace: kube-system
labels:
name: weave-net
rules:
- apiGroups:
- ''
resources:
- configmaps
resourceNames:
- weave-net
verbs:
- get
- update
- apiGroups:
- ''
resources:
- configmaps
verbs:
- create
- apiVersion: rbac.authorization.k8s.io/v1 - apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding kind: ClusterRoleBinding
metadata: metadata:
@ -78,6 +109,8 @@ items:
fieldRef: fieldRef:
apiVersion: v1 apiVersion: v1
fieldPath: spec.nodeName fieldPath: spec.nodeName
- name: WEAVE_MTU
value: "{{ weave_mtu }}"
- name: IPALLOC_RANGE - name: IPALLOC_RANGE
value: {{ kube_pods_subnet }} value: {{ kube_pods_subnet }}
{% if weave_mode_seed == true %} {% if weave_mode_seed == true %}
@ -164,4 +197,3 @@ items:
rollingUpdate: rollingUpdate:
maxUnavailable: {{ serial | default('20%') }} maxUnavailable: {{ serial | default('20%') }}
type: RollingUpdate type: RollingUpdate