modify flux create secret tls to create secrets of type TLS
Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
This commit is contained in:
@@ -102,3 +102,4 @@ stringData:
|
|||||||
XBQO4ig7vY8+1+L3w2xpTN95/rXAvB4BbO/DLea9ArikePoSJ+bVTj0YwrKBghep
|
XBQO4ig7vY8+1+L3w2xpTN95/rXAvB4BbO/DLea9ArikePoSJ+bVTj0YwrKBghep
|
||||||
kOvbvVANrpsunlSAcpXm1qkV+G+xPnyJ
|
kOvbvVANrpsunlSAcpXm1qkV+G+xPnyJ
|
||||||
-----END PRIVATE KEY-----
|
-----END PRIVATE KEY-----
|
||||||
|
type: kubernetes.io/tls
|
||||||
|
|||||||
@@ -163,6 +163,7 @@ func buildSecret(keypair *ssh.KeyPair, hostKey, dockerCfg []byte, options Option
|
|||||||
}
|
}
|
||||||
|
|
||||||
if len(options.TLSCrt) != 0 && len(options.TLSKey) != 0 {
|
if len(options.TLSCrt) != 0 && len(options.TLSKey) != 0 {
|
||||||
|
secret.Type = corev1.SecretTypeTLS
|
||||||
secret.StringData[TLSCrtSecretKey] = string(options.TLSCrt)
|
secret.StringData[TLSCrtSecretKey] = string(options.TLSCrt)
|
||||||
secret.StringData[TLSKeySecretKey] = string(options.TLSKey)
|
secret.StringData[TLSKeySecretKey] = string(options.TLSKey)
|
||||||
} else if len(options.CertFile) != 0 && len(options.KeyFile) != 0 {
|
} else if len(options.CertFile) != 0 && len(options.KeyFile) != 0 {
|
||||||
|
|||||||
Reference in New Issue
Block a user