mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-02-28 09:39:12 +03:00
support asymmetric encryption algorithms in ClusterConfigration (#11757)
Signed-off-by: bo.jiang <bo.jiang@daocloud.io>
This commit is contained in:
@@ -30,7 +30,10 @@
|
||||
run_once: true
|
||||
|
||||
- name: Calculate kubeadm CA cert hash
|
||||
shell: set -o pipefail && openssl x509 -pubkey -in {{ kube_cert_dir }}/ca.crt | openssl rsa -pubin -outform der 2>/dev/null | openssl dgst -sha256 -hex | sed 's/^.* //'
|
||||
shell: |
|
||||
set -o pipefail && openssl x509 -pubkey -in {{ kube_cert_dir }}/ca.crt | \
|
||||
openssl {% if 'RSA' in kube_asymmetric_encryption_algorithm %}rsa{% elif 'ECDSA' in kube_asymmetric_encryption_algorithm %}ec{% else %}rsa{% endif %} -pubin -outform der 2>/dev/null | \
|
||||
openssl dgst -sha256 -hex | sed 's/^.* //'
|
||||
args:
|
||||
executable: /bin/bash
|
||||
register: kubeadm_ca_hash
|
||||
|
||||
Reference in New Issue
Block a user