mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-03-09 19:58:07 +03:00
Optimize CA cert hash calculation with community.crypto (#11758)
Signed-off-by: bo.jiang <bo.jiang@daocloud.io>
This commit is contained in:
@@ -13,9 +13,9 @@ discovery:
|
||||
apiServerEndpoint: {{ kubeadm_discovery_address }}
|
||||
{% endif %}
|
||||
token: {{ kubeadm_token }}
|
||||
{% if kubeadm_ca_hash.stdout is defined %}
|
||||
{% if ca_cert_content is defined %}
|
||||
caCertHashes:
|
||||
- sha256:{{ kubeadm_ca_hash.stdout }}
|
||||
- sha256:{{ (ca_cert_content.content | b64decode | community.crypto.x509_certificate_info).public_key_fingerprints.sha256.replace(':', '') }}
|
||||
{% else %}
|
||||
unsafeSkipCAVerification: true
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user