Refactor annotations prefix helper
This commit is contained in:
parent
dcf4a4595e
commit
1a92159fa4
3 changed files with 0 additions and 17 deletions
|
@ -66,8 +66,6 @@ func init() {
|
|||
|
||||
// Configuration contains all the settings required by an Ingress controller
|
||||
type Configuration struct {
|
||||
AnnotationsPrefix string
|
||||
|
||||
APIServerHost string
|
||||
KubeConfigFile string
|
||||
Client clientset.Interface
|
||||
|
@ -136,11 +134,6 @@ func (n NGINXController) GetService(name string) (*apiv1.Service, error) {
|
|||
return n.listers.Service.GetByName(name)
|
||||
}
|
||||
|
||||
// GetAnnotationWithPrefix returns the prefix of ingress annotations
|
||||
func (n NGINXController) GetAnnotationWithPrefix(suffix string) string {
|
||||
return fmt.Sprintf("%v/%v", n.cfg.AnnotationsPrefix, suffix)
|
||||
}
|
||||
|
||||
// sync collects all the pieces required to assemble the configuration file and
|
||||
// then sends the content to the backend (OnUpdate) receiving the populated
|
||||
// template as response reloading the backend if is required.
|
||||
|
|
|
@ -37,9 +37,6 @@ type Resolver interface {
|
|||
|
||||
// GetService searches for services contenating the namespace and name using a the character /
|
||||
GetService(string) (*apiv1.Service, error)
|
||||
|
||||
// GetAnnotationWithPrefix returns the prefix of the Ingress annotations
|
||||
GetAnnotationWithPrefix(suffix string) string
|
||||
}
|
||||
|
||||
// AuthSSLCert contains the necessary information to do certificate based
|
||||
|
|
|
@ -17,8 +17,6 @@ limitations under the License.
|
|||
package resolver
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
apiv1 "k8s.io/api/core/v1"
|
||||
|
||||
"k8s.io/ingress-nginx/internal/ingress/defaults"
|
||||
|
@ -49,8 +47,3 @@ func (m Mock) GetAuthCertificate(string) (*AuthSSLCert, error) {
|
|||
func (m Mock) GetService(string) (*apiv1.Service, error) {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
// GetAnnotationWithPrefix returns the prefix of the Ingress annotations
|
||||
func (m Mock) GetAnnotationWithPrefix(name string) string {
|
||||
return fmt.Sprintf("nginx/%v", name)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue