generate ssh secrets

This commit is contained in:
Mikaël Cluseau
2019-12-03 11:03:20 +01:00
parent 6ef93489bd
commit f43f4fcec4
8 changed files with 230 additions and 5 deletions

View File

@ -26,6 +26,7 @@ import (
var (
secretData *SecretData
DontSave = false
)
type SecretData struct {
@ -37,9 +38,10 @@ type SecretData struct {
}
type ClusterSecrets struct {
CAs map[string]*CA
Tokens map[string]string
Passwords map[string]string
CAs map[string]*CA
Tokens map[string]string
Passwords map[string]string
SSHKeyPairs map[string][]SSHKeyPair
}
type CA struct {
@ -92,6 +94,10 @@ func (sd *SecretData) Changed() bool {
}
func (sd *SecretData) Save() error {
if DontSave {
return nil
}
sd.l.Lock()
defer sd.l.Unlock()