Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
Kubespray
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Mirror
Kubespray
Commits
6b80ac65
Unverified
Commit
6b80ac65
authored
7 years ago
by
Simon Li
Committed by
Simon Li
7 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Fix indexing of supplementary DNS in openssl.conf
parent
a40d9f3c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
roles/kubernetes/secrets/templates/openssl.conf.j2
+4
-3
4 additions, 3 deletions
roles/kubernetes/secrets/templates/openssl.conf.j2
with
4 additions
and
3 deletions
roles/kubernetes/secrets/templates/openssl.conf.j2
+
4
−
3
View file @
6b80ac65
...
@@ -15,9 +15,10 @@ DNS.5 = localhost
...
@@ -15,9 +15,10 @@ DNS.5 = localhost
{% for host in groups['kube-master'] %}
{% for host in groups['kube-master'] %}
DNS.{{ 5 + loop.index }} = {{ host }}
DNS.{{ 5 + loop.index }} = {{ host }}
{% endfor %}
{% endfor %}
{% set idns = groups['kube-master'] | length | int + 5 %}
{% if loadbalancer_apiserver is defined %}
{% if loadbalancer_apiserver is defined %}
{% set id
x = groups['kube-master'] | length | int + 5
+ 1 %}
{% set id
ns = idns
+ 1 %}
DNS.{{ id
x
| string }} = {{ apiserver_loadbalancer_domain_name }}
DNS.{{ id
ns
| string }} = {{ apiserver_loadbalancer_domain_name }}
{% endif %}
{% endif %}
{% for host in groups['kube-master'] %}
{% for host in groups['kube-master'] %}
IP.{{ 2 * loop.index - 1 }} = {{ hostvars[host]['access_ip'] | default(hostvars[host]['ansible_default_ipv4']['address']) }}
IP.{{ 2 * loop.index - 1 }} = {{ hostvars[host]['access_ip'] | default(hostvars[host]['ansible_default_ipv4']['address']) }}
...
@@ -36,7 +37,7 @@ IP.{{ idx + 1 }} = 127.0.0.1
...
@@ -36,7 +37,7 @@ IP.{{ idx + 1 }} = 127.0.0.1
{% if addr | ipaddr %}
{% if addr | ipaddr %}
IP.{{ is + loop.index }} = {{ addr }}
IP.{{ is + loop.index }} = {{ addr }}
{% else %}
{% else %}
DNS.{{ is + loop.index }} = {{ addr }}
DNS.{{ i
dn
s + loop.index }} = {{ addr }}
{% endif %}
{% endif %}
{% endfor %}
{% endfor %}
{% endif %}
{% endif %}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment