Skip to content

Commit

Permalink
[IMP]add ipaddr('net') filter
Browse files Browse the repository at this point in the history
  • Loading branch information
TimeBye authored and gjmzj committed Aug 7, 2019
1 parent 35eca89 commit 3986cba
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion roles/cluster-addon/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
dns_install: "yes"
dns_backend: "coredns"
# 设置 dns svc ip (这里选用 SERVICE_CIDR 中第2个IP)
CLUSTER_DNS_SVC_IP: "{{ SERVICE_CIDR | ipaddr(2) | ipaddr('address') }}"
CLUSTER_DNS_SVC_IP: "{{ SERVICE_CIDR | ipaddr('net') | ipaddr(2) | ipaddr('address') }}"
kubednsVer: "1.14.13"
corednsVer: "1.5.0"
kubedns_offline: "kubedns_{{ kubednsVer }}.tar"
Expand Down
2 changes: 1 addition & 1 deletion roles/kube-master/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
TMP_ENDPOINTS: "{% for h in groups['etcd'] %}https://{{ h }}:2379,{% endfor %}"
ETCD_ENDPOINTS: "{{ TMP_ENDPOINTS.rstrip(',') }}"
# 设置 dns svc ip (这里选用 SERVICE_CIDR 中第1个IP)
CLUSTER_KUBERNETES_SVC_IP: "{{ SERVICE_CIDR | ipaddr(1) | ipaddr('address') }}"
CLUSTER_KUBERNETES_SVC_IP: "{{ SERVICE_CIDR | ipaddr('net') | ipaddr(1) | ipaddr('address') }}"
# k8s 集群 master 节点证书配置,可以添加多个ip和域名(比如增加公网ip和域名)
MASTER_CERT_HOSTS:
- "10.1.1.1"
Expand Down
2 changes: 1 addition & 1 deletion roles/kube-node/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
PROXY_MODE: "ipvs"

# 设置 dns svc ip (这里选用 SERVICE_CIDR 中第2个IP)
CLUSTER_DNS_SVC_IP: "{{ SERVICE_CIDR | ipaddr(2) | ipaddr('address') }}"
CLUSTER_DNS_SVC_IP: "{{ SERVICE_CIDR | ipaddr('net') | ipaddr(2) | ipaddr('address') }}"

# 基础容器镜像
SANDBOX_IMAGE: "mirrorgooglecontainers/pause-amd64:3.1"
Expand Down
2 changes: 1 addition & 1 deletion roles/kube-ovn/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
OVN_DB_NODE: "{{ groups['kube-master'][0] }}"

kube_ovn_default_cidr: "{{ CLUSTER_CIDR }}"
kube_ovn_default_gateway: "{{ CLUSTER_CIDR | ipaddr(1) | ipaddr('address') }}"
kube_ovn_default_gateway: "{{ CLUSTER_CIDR | ipaddr('net') | ipaddr(1) | ipaddr('address') }}"
kube_ovn_node_switch_cidr: 100.64.0.0/16
kube_ovn_enable_mirror: false

Expand Down

0 comments on commit 3986cba

Please sign in to comment.