Update main.go to make proxy-ssl-secret annotation optional regarding usage of other proxy-ssl-* annotations
This commit is contained in:
parent
5784be2784
commit
fcae7d283b
1 changed files with 18 additions and 18 deletions
|
@ -190,10 +190,9 @@ func (p proxySSL) Parse(ing *networking.Ingress) (interface{}, error) {
|
|||
config := &Config{}
|
||||
|
||||
proxysslsecret, err := parser.GetStringAnnotation(proxySSLSecretAnnotation, ing, p.annotationConfig.Annotations)
|
||||
if err != nil {
|
||||
if err != nil && err != ing_errors.ErrMissingAnnotations {
|
||||
return &Config{}, err
|
||||
}
|
||||
|
||||
} else {
|
||||
ns, _, err := k8s.ParseNameNS(proxysslsecret)
|
||||
if err != nil {
|
||||
return &Config{}, ing_errors.NewLocationDenied(err.Error())
|
||||
|
@ -211,6 +210,7 @@ func (p proxySSL) Parse(ing *networking.Ingress) (interface{}, error) {
|
|||
return &Config{}, ing_errors.LocationDeniedError{Reason: e}
|
||||
}
|
||||
config.AuthSSLCert = *proxyCert
|
||||
}
|
||||
|
||||
config.Ciphers, err = parser.GetStringAnnotation(proxySSLCiphersAnnotation, ing, p.annotationConfig.Annotations)
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in a new issue