case interactive - cert verify

pull/584/head
Sujith Abdul Rahim 2020-04-28 13:36:52 +05:30
parent 4900dd558f
commit d34d9075d8
1 changed files with 48 additions and 27 deletions

75
vagrant/cert_verify.sh Normal file → Executable file
View File

@ -704,39 +704,60 @@ check_cert_worker_1_kp()
# END OF Function - Worker-1 node # # END OF Function - Worker-1 node #
echo -e "This script will validate the certificates in master as well as worker-1 nodes. Before proceeding, make sure you ssh into the respective node for certificate validation\n"
echo -e "1. Verify certification in Master Node\n"
echo -e "2. Verify certification in Worker-1 Node\n"
echo -e "Please select either the option 1 or 2\n"
read value
### MASTER NODES ### case $value in
# CRT & KEY verification 1)
check_cert_ca echo -e "The selected option is $value, proceeding the certificate verification of Master node"
check_cert_admin
check_cert_kcm
check_cert_kp
check_cert_ks
check_cert_api
check_cert_sa
check_cert_etcd
# Kubeconfig verification ### MASTER NODES ###
check_cert_kpkubeconfig
check_cert_kcmkubeconfig
check_cert_kskubeconfig
check_cert_adminkubeconfig
# Systemd verification # CRT & KEY verification
check_systemd_etcd check_cert_ca
check_systemd_api check_cert_admin
check_systemd_kcm check_cert_kcm
check_systemd_ks check_cert_kp
check_cert_ks
check_cert_api
check_cert_sa
check_cert_etcd
### END OF MASTER NODES ### # Kubeconfig verification
check_cert_kpkubeconfig
check_cert_kcmkubeconfig
check_cert_kskubeconfig
check_cert_adminkubeconfig
# Systemd verification
check_systemd_etcd
check_systemd_api
check_systemd_kcm
check_systemd_ks
### WORKER-1 NODE ### ### END OF MASTER NODES ###
check_cert_worker_1 ;;
check_cert_worker_1_kubeconfig
check_cert_worker_1_kubelet
check_cert_worker_1_kp
### END OF WORKER-1 NODE ### 2)
echo -e "The selected option is $value, proceeding the certificate verification of Worker-1 node"
### WORKER-1 NODE ###
check_cert_worker_1
check_cert_worker_1_kubeconfig
check_cert_worker_1_kubelet
check_cert_worker_1_kp
### END OF WORKER-1 NODE ###
;;
*)
echo -e "Exiting.... Please select the valid option either 1 or 2\n"
exit 1
;;
esac