mirror of
https://git.vectorsigma.ru/public/k3s.git
synced 2026-08-05 00:29:52 +00:00
Fix panic when secret-encrypt status is checked before runtime core is ready
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
This commit is contained in:
committed by
Brad Davidson
parent
f940368747
commit
e7b52cd63d
@@ -79,6 +79,10 @@ func EncryptionStatus(control *config.Control) http.Handler {
|
||||
|
||||
func encryptionStatus(control *config.Control) (EncryptionState, error) {
|
||||
state := EncryptionState{}
|
||||
if control.Runtime.Core == nil {
|
||||
return state, util.ErrCoreNotReady
|
||||
}
|
||||
|
||||
providers, err := secretsencrypt.GetEncryptionProviders(control.Runtime)
|
||||
if os.IsNotExist(err) {
|
||||
return state, nil
|
||||
|
||||
Reference in New Issue
Block a user