Skip to content

Commit

Permalink
Output valid kubernetes.io/tls secret
Browse files Browse the repository at this point in the history
  • Loading branch information
tomdoherty committed Oct 28, 2020
1 parent 1b5e8ee commit 31c235d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion adssl.go
Original file line number Diff line number Diff line change
Expand Up @@ -235,11 +235,13 @@ func GenerateCertFromCsr(s Server, c Certificate) (Certificate, error) {
func PrintKubeSecret(w io.Writer, c Certificate) error {
secret := `apiVersion: v1
kind: Secret
name: tls-secret
metadata:
name: tls-secret
data:
ca.crt: {{.Cacrt}}
tls.key: {{.Tlskey}}
tls.crt: {{.Tlscrt}}
type: kubernetes.io/tls
`
t := template.Must(template.New("secret").Parse(secret))
r := struct {
Expand Down

0 comments on commit 31c235d

Please sign in to comment.