Skip to content
Snippets Groups Projects
Commit 046e315b authored by Matthew Mosesohn's avatar Matthew Mosesohn Committed by GitHub
Browse files

Merge pull request #595 from kubernetes-incubator/etcdtls-followup

Fix canal's calico networking config for ETCD TLS
parents 9ea9604b fe16fecd
No related branches found
No related tags found
No related merge requests found
...@@ -14,3 +14,12 @@ ...@@ -14,3 +14,12 @@
name: kube-apiserver name: kube-apiserver
state: stopped state: stopped
when: (kube_apiserver_service_file.stat.exists|default(False) or kube_apiserver_init_script.stat.exists|default(False)) when: (kube_apiserver_service_file.stat.exists|default(False) or kube_apiserver_init_script.stat.exists|default(False))
- name: "Pre-upgrade | remove kube-apiserver service definition"
file:
path: "{{ item }}"
state: absent
when: (kube_apiserver_service_file.stat.exists|default(False) or kube_apiserver_init_script.stat.exists|default(False))
with_items:
- /etc/systemd/system/kube-apiserver.service
- /etc/init.d/kube-apiserver
--- ---
- name: Canal | Write flannel configuration - name: Canal | Set Flannel etcd configuration
template: command: |-
src: network.json.j2 {{ bin_dir }}/etcdctl --peers={{ etcd_access_addresses }} \
dest: /etc/flannel-network.json set /{{ cluster_name }}/network/config \
backup: yes '{ "Network": "{{ kube_pods_subnet }}", "SubnetLen": {{ kube_network_node_prefix }}, "Backend": { "Type": "{{ flannel_backend_type }}" } }'
delegate_to: "{{groups['etcd'][0]}}"
run_once: true
- name: Canal | Write canal configmap - name: Canal | Write canal configmap
template: template:
......
...@@ -19,10 +19,6 @@ spec: ...@@ -19,10 +19,6 @@ spec:
spec: spec:
hostNetwork: true hostNetwork: true
volumes: volumes:
# Used by flannel-server-helper
- name: "networkconfig"
hostPath:
path: "/etc/flannel-network.json"
# Used by calico/node. # Used by calico/node.
- name: lib-modules - name: lib-modules
hostPath: hostPath:
...@@ -45,29 +41,6 @@ spec: ...@@ -45,29 +41,6 @@ spec:
hostPath: hostPath:
path: /etc/resolv.conf path: /etc/resolv.conf
containers: containers:
- name: "flannel-server-helper"
image: "{{ flannel_server_helper_image_repo }}:{{ flannel_server_helper_image_tag }}"
env:
# Cluster name
- name: CLUSTER_NAME
valueFrom:
configMapKeyRef:
name: canal-config
key: cluster_name
# The location of the etcd cluster.
- name: FLANNELD_ETCD_ENDPOINTS
valueFrom:
configMapKeyRef:
name: canal-config
key: etcd_endpoints
args:
- "--network-config=/etc/flannel-network.json"
- "--etcd-prefix=/$(CLUSTER_NAME)/network"
- "--etcd-server=$(FLANNELD_ETCD_ENDPOINTS)"
volumeMounts:
- name: "networkconfig"
mountPath: "/etc/flannel-network.json"
imagePullPolicy: "Always"
# Runs the flannel daemon to enable vxlan networking between # Runs the flannel daemon to enable vxlan networking between
# container hosts. # container hosts.
- name: flannel - name: flannel
......
{ "Network": "{{ kube_pods_subnet }}", "SubnetLen": {{ kube_network_node_prefix }}, "Backend": { "Type": "{{ flannel_backend_type }}" } }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment