Merge c44be09fc1
into 74512c1276
This commit is contained in:
commit
035f989eae
3 changed files with 4 additions and 1 deletions
|
@ -132,6 +132,8 @@ func NewIngressController(backend ingress.Controller) *GenericController {
|
|||
}
|
||||
|
||||
os.MkdirAll(ingress.DefaultSSLDirectory, 0655)
|
||||
// Creates a temp directory for Certificates, as 'rename' functions need to be in the same mount point as the Certificates
|
||||
os.MkdirAll(ingress.TempSSLDirectory, 0655)
|
||||
|
||||
config := &Configuration{
|
||||
UpdateStatus: *updateStatus,
|
||||
|
|
|
@ -36,6 +36,7 @@ var (
|
|||
// The name of each file is <namespace>-<secret name>.pem. The content is the concatenated
|
||||
// certificate and key.
|
||||
DefaultSSLDirectory = "/ingress-controller/ssl"
|
||||
TempSSLDirectory = "/ingress-controller/ssl/temp"
|
||||
)
|
||||
|
||||
// Controller holds the methods to handle an Ingress backend
|
||||
|
|
|
@ -36,7 +36,7 @@ func AddOrUpdateCertAndKey(name string, cert, key, ca []byte) (*ingress.SSLCert,
|
|||
pemName := fmt.Sprintf("%v.pem", name)
|
||||
pemFileName := fmt.Sprintf("%v/%v", ingress.DefaultSSLDirectory, pemName)
|
||||
|
||||
tempPemFile, err := ioutil.TempFile("", pemName)
|
||||
tempPemFile, err := ioutil.TempFile(ingress.TempSSLDirectory, pemName)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("could not create temp pem file %v: %v", tempPemFile.Name(), err)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue