Skip to content

Commit

Permalink
modify flux create secret tls to create secrets of type TLS
Browse files Browse the repository at this point in the history
Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
  • Loading branch information
aryan9600 committed Aug 18, 2023
1 parent 2319350 commit 37aa19f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions cmd/flux/testdata/create_secret/tls/secret-tls.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,4 @@ stringData:
XBQO4ig7vY8+1+L3w2xpTN95/rXAvB4BbO/DLea9ArikePoSJ+bVTj0YwrKBghep
kOvbvVANrpsunlSAcpXm1qkV+G+xPnyJ
-----END PRIVATE KEY-----
type: kubernetes.io/tls
1 change: 1 addition & 0 deletions pkg/manifestgen/sourcesecret/sourcesecret.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 37aa19f

Please sign in to comment.