Merge pull request #272 from aledbf/refactor-annotation-parsers

Fix error getting class information from Ingress annotations
This commit is contained in:
Manuel Alejandro de Brito Fontes 2017-02-16 07:35:34 -03:00 committed by GitHub
commit 111f338fa3
7 changed files with 46 additions and 5 deletions

View file

@ -30,6 +30,7 @@ import (
"github.com/golang/glog"
"github.com/mitchellh/mapstructure"
"github.com/spf13/pflag"
"k8s.io/kubernetes/pkg/api"
@ -251,6 +252,11 @@ func (n NGINXController) Info() *ingress.BackendInfo {
}
}
// OverrideFlags customize NGINX controller flags
func (n NGINXController) OverrideFlags(flags *pflag.FlagSet) {
flags.Set("ingress-class", "nginx")
}
// testTemplate checks if the NGINX configuration inside the byte array is valid
// running the command "nginx -t" using a temporal file.
func (n NGINXController) testTemplate(cfg []byte) error {