Fix error getting class information from Ingress annotations

This commit is contained in:
Manuel de Brito Fontes 2017-02-14 11:02:23 -03:00
parent aa02b7e085
commit 5c9bf12648
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 {