modify `flux create secret tls` to create secrets of type TLS

Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
pull/4147/head
Sanskar Jaiswal 1 year ago
parent 6464d6c7b4
commit 8df27d8c3a
No known key found for this signature in database
GPG Key ID: 5982D0279C227FFD

@ -102,3 +102,4 @@ stringData:
XBQO4ig7vY8+1+L3w2xpTN95/rXAvB4BbO/DLea9ArikePoSJ+bVTj0YwrKBghep
kOvbvVANrpsunlSAcpXm1qkV+G+xPnyJ
-----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 {
secret.Type = corev1.SecretTypeTLS
secret.StringData[TLSCrtSecretKey] = string(options.TLSCrt)
secret.StringData[TLSKeySecretKey] = string(options.TLSKey)
} else if len(options.CertFile) != 0 && len(options.KeyFile) != 0 {

Loading…
Cancel
Save