Browse Source
Merge pull request #2037 from tiewei/contiv-etcd-split
Merge pull request #2037 from tiewei/contiv-etcd-split
Split contiv etcd and etcd-proxy into two daemonsetspull/2225/merge
Brad Beam
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 75 additions and 90 deletions
Split View
Diff Options
-
14roles/network_plugin/contiv/defaults/main.yml
-
6roles/network_plugin/contiv/tasks/main.yml
-
31roles/network_plugin/contiv/templates/contiv-etcd-proxy.yml.j2
-
22roles/network_plugin/contiv/templates/contiv-etcd.env.j2
-
50roles/network_plugin/contiv/templates/contiv-etcd.yml.j2
-
30roles/network_plugin/contiv/templates/contiv-netmaster.yml.j2
-
12roles/network_plugin/contiv/templates/contiv-netplugin.yml.j2
@ -0,0 +1,31 @@ |
|||
--- |
|||
kind: DaemonSet |
|||
apiVersion: extensions/v1beta1 |
|||
metadata: |
|||
name: contiv-etcd-proxy |
|||
namespace: {{ system_namespace }} |
|||
labels: |
|||
k8s-app: contiv-etcd-proxy |
|||
spec: |
|||
selector: |
|||
matchLabels: |
|||
k8s-app: contiv-etcd-proxy |
|||
template: |
|||
metadata: |
|||
labels: |
|||
k8s-app: contiv-etcd-proxy |
|||
annotations: |
|||
scheduler.alpha.kubernetes.io/critical-pod: '' |
|||
spec: |
|||
hostNetwork: true |
|||
hostPID: true |
|||
containers: |
|||
- name: contiv-etcd-proxy |
|||
image: {{ contiv_etcd_image_repo }}:{{ contiv_etcd_image_tag }} |
|||
env: |
|||
- name: ETCD_LISTEN_CLIENT_URLS |
|||
value: 'http://127.0.0.1:{{ contiv_etcd_listen_port }}' |
|||
- name: ETCD_PROXY |
|||
value: "on" |
|||
- name: ETCD_INITIAL_CLUSTER |
|||
value: '{{ contiv_etcd_endpoints }}' |
@ -1,22 +0,0 @@ |
|||
# contiv etcd config |
|||
{% if inventory_hostname in groups['kube-master'] %} |
|||
export ETCD_DATA_DIR=/var/lib/etcd/contiv-data |
|||
export ETCD_ADVERTISE_CLIENT_URLS={{ contiv_etcd_ad_urls }} |
|||
export ETCD_INITIAL_ADVERTISE_PEER_URLS={{ contiv_etcd_peer_urls }} |
|||
export ETCD_LISTEN_PEER_URLS={{ contiv_etcd_peer_urls }} |
|||
export ETCD_LISTEN_CLIENT_URLS={{ contiv_etcd_listen_urls | join(",") }} |
|||
export ETCD_NAME= |
|||
{%- for host in groups['kube-master'] -%} |
|||
{%- if host == inventory_hostname -%} |
|||
contiv_etcd{{ loop.index }} |
|||
{%- endif %} |
|||
{%- endfor %} |
|||
|
|||
{% else %} |
|||
export ETCD_LISTEN_CLIENT_URLS=http://127.0.0.1:{{ contiv_etcd_listen_port }} |
|||
export ETCD_PROXY=on |
|||
{% endif %} |
|||
export ETCD_INITIAL_CLUSTER= |
|||
{%- for host in groups['kube-master'] -%} |
|||
contiv_etcd{{ loop.index }}=http://{{ hostvars[host]['ip'] | default(hostvars[host].ansible_default_ipv4['address']) }}:{{ contiv_etcd_peer_port }}, |
|||
{%- endfor -%} |
Write
Preview
Loading…
Cancel
Save