Skip to content

Commit

Permalink
Fix etcd certificate to include host's FQDN
Browse files Browse the repository at this point in the history
  • Loading branch information
derselbst committed Jul 17, 2024
1 parent 5f35b66 commit 0adf426
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion roles/etcd/templates/openssl.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ authorityKeyIdentifier=keyid:always,issuer
[alt_names]
DNS.1 = localhost
{% for host in groups['etcd'] %}
DNS.{{ counter["dns"] }} = {{ host }}{{ increment(counter, 'dns') }}
DNS.{{ counter["dns"] }} = {{ hostvars[host]['ansible_hostname'] }}{{ increment(counter, 'dns') }}
DNS.{{ counter["dns"] }} = {{ hostvars[host]['ansible_fqdn'] }}{{ increment(counter, 'dns') }}
{% endfor %}
{% if apiserver_loadbalancer_domain_name is defined %}
DNS.{{ counter["dns"] }} = {{ apiserver_loadbalancer_domain_name }}{{ increment(counter, 'dns') }}
Expand Down

0 comments on commit 0adf426

Please sign in to comment.