Code linting
This commit is contained in:
parent
aa8c66ec01
commit
45c77a951d
4 changed files with 6 additions and 11 deletions
|
@ -92,10 +92,7 @@ type affinity struct {
|
||||||
// ParseAnnotations parses the annotations contained in the ingress
|
// ParseAnnotations parses the annotations contained in the ingress
|
||||||
// rule used to configure the affinity directives
|
// rule used to configure the affinity directives
|
||||||
func (a affinity) Parse(ing *extensions.Ingress) (interface{}, error) {
|
func (a affinity) Parse(ing *extensions.Ingress) (interface{}, error) {
|
||||||
|
cookieAffinityConfig := &CookieConfig{}
|
||||||
var cookieAffinityConfig *CookieConfig
|
|
||||||
cookieAffinityConfig = &CookieConfig{}
|
|
||||||
|
|
||||||
// Check the type of affinity that will be used
|
// Check the type of affinity that will be used
|
||||||
at, err := parser.GetStringAnnotation(annotationAffinityType, ing)
|
at, err := parser.GetStringAnnotation(annotationAffinityType, ing)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
@ -72,7 +72,7 @@ func newAnnotationExtractor(cfg extractorConfig) annotationExtractor {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (e *annotationExtractor) Extract(ing *extensions.Ingress) map[string]interface{} {
|
func (e *annotationExtractor) Extract(ing *extensions.Ingress) map[string]interface{} {
|
||||||
anns := make(map[string]interface{}, 0)
|
anns := make(map[string]interface{})
|
||||||
for name, annotationParser := range e.annotations {
|
for name, annotationParser := range e.annotations {
|
||||||
val, err := annotationParser.Parse(ing)
|
val, err := annotationParser.Parse(ing)
|
||||||
glog.V(5).Infof("annotation %v in Ingress %v/%v: %v", name, ing.GetNamespace(), ing.GetName(), val)
|
glog.V(5).Infof("annotation %v in Ingress %v/%v: %v", name, ing.GetNamespace(), ing.GetName(), val)
|
||||||
|
|
|
@ -37,7 +37,6 @@ const (
|
||||||
annotationAffinityType = "ingress.kubernetes.io/affinity"
|
annotationAffinityType = "ingress.kubernetes.io/affinity"
|
||||||
annotationAffinityCookieName = "ingress.kubernetes.io/session-cookie-name"
|
annotationAffinityCookieName = "ingress.kubernetes.io/session-cookie-name"
|
||||||
annotationAffinityCookieHash = "ingress.kubernetes.io/session-cookie-hash"
|
annotationAffinityCookieHash = "ingress.kubernetes.io/session-cookie-hash"
|
||||||
annotationAuthTlsSecret = "ingress.kubernetes.io/auth-tls-secret"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type mockCfg struct {
|
type mockCfg struct {
|
||||||
|
|
|
@ -58,10 +58,9 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
defUpstreamName = "upstream-default-backend"
|
defUpstreamName = "upstream-default-backend"
|
||||||
defServerName = "_"
|
defServerName = "_"
|
||||||
podStoreSyncedPollPeriod = 1 * time.Second
|
rootLocation = "/"
|
||||||
rootLocation = "/"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -1043,7 +1042,7 @@ func (ic *GenericController) getEndpoints(
|
||||||
// avoid duplicated upstream servers when the service
|
// avoid duplicated upstream servers when the service
|
||||||
// contains multiple port definitions sharing the same
|
// contains multiple port definitions sharing the same
|
||||||
// targetport.
|
// targetport.
|
||||||
adus := make(map[string]bool, 0)
|
adus := make(map[string]bool)
|
||||||
|
|
||||||
// ExternalName services
|
// ExternalName services
|
||||||
if s.Spec.Type == api.ServiceTypeExternalName {
|
if s.Spec.Type == api.ServiceTypeExternalName {
|
||||||
|
|
Loading…
Reference in a new issue