Commit a8ea2fdc authored by Geoff Simmons's avatar Geoff Simmons

Fix formation of the PEM file for TLS offload.

parent 6e7fc630
......@@ -83,11 +83,14 @@ func (worker *NamespaceWorker) updateCertSecret(spec *haproxy.Spec) error {
return err
}
pem := string(crt)
if crt[len(crt)+1] != byte('\n') {
if crt[len(crt)-1] != byte('\n') {
pem += "\n"
}
pem += string(key)
certName := spec.CertName()
if certSecret.Data == nil {
certSecret.Data = make(map[string][]byte)
}
certSecret.Data[certName] = []byte(pem)
worker.log.Infof("Updating Secret %s/%s with %s to add contents from "+
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment