Skip to content

Commit

Permalink
Fix SAN check on newer versions versions of openssl (kubernetes-sigs#…
Browse files Browse the repository at this point in the history
  • Loading branch information
mhamzahkhan authored Sep 9, 2024
1 parent 533dbc6 commit d54cfba
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions roles/kubernetes/control-plane/tasks/kubeadm-setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,12 +145,14 @@
loop: "{{ apiserver_ips }}"
register: apiserver_sans_ip_check
changed_when: apiserver_sans_ip_check.stdout is not search('does match certificate')
failed_when: apiserver_sans_ip_check.rc != 0 and apiserver_sans_ip_check.stdout is not search('does NOT match certificate')
- name: Kubeadm | Check apiserver.crt SAN hosts
command:
cmd: "openssl x509 -noout -in {{ kube_cert_dir }}/apiserver.crt -checkhost {{ item }}"
loop: "{{ apiserver_hosts }}"
register: apiserver_sans_host_check
changed_when: apiserver_sans_host_check.stdout is not search('does match certificate')
failed_when: apiserver_sans_host_check.rc != 0 and apiserver_sans_host_check.stdout is not search('does NOT match certificate')

- name: Kubeadm | regenerate apiserver cert 1/2
file:
Expand Down

0 comments on commit d54cfba

Please sign in to comment.