Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove dead code #864

Merged
merged 2 commits into from
Jun 15, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions core/pkg/ingress/annotations/sessionaffinity/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,7 @@ type affinity struct {
// ParseAnnotations parses the annotations contained in the ingress
// rule used to configure the affinity directives
func (a affinity) Parse(ing *extensions.Ingress) (interface{}, error) {

var cookieAffinityConfig *CookieConfig
cookieAffinityConfig = &CookieConfig{}

cookieAffinityConfig := &CookieConfig{}
// Check the type of affinity that will be used
at, err := parser.GetStringAnnotation(annotationAffinityType, ing)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion core/pkg/ingress/controller/annotations.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ func newAnnotationExtractor(cfg extractorConfig) annotationExtractor {
}

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 {
val, err := annotationParser.Parse(ing)
glog.V(5).Infof("annotation %v in Ingress %v/%v: %v", name, ing.GetNamespace(), ing.GetName(), val)
Expand Down
1 change: 0 additions & 1 deletion core/pkg/ingress/controller/annotations_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ const (
annotationAffinityType = "ingress.kubernetes.io/affinity"
annotationAffinityCookieName = "ingress.kubernetes.io/session-cookie-name"
annotationAffinityCookieHash = "ingress.kubernetes.io/session-cookie-hash"
annotationAuthTlsSecret = "ingress.kubernetes.io/auth-tls-secret"
)

type mockCfg struct {
Expand Down
9 changes: 4 additions & 5 deletions core/pkg/ingress/controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,9 @@ import (
)

const (
defUpstreamName = "upstream-default-backend"
defServerName = "_"
podStoreSyncedPollPeriod = 1 * time.Second
rootLocation = "/"
defUpstreamName = "upstream-default-backend"
defServerName = "_"
rootLocation = "/"
)

var (
Expand Down Expand Up @@ -1043,7 +1042,7 @@ func (ic *GenericController) getEndpoints(
// avoid duplicated upstream servers when the service
// contains multiple port definitions sharing the same
// targetport.
adus := make(map[string]bool, 0)
adus := make(map[string]bool)

// ExternalName services
if s.Spec.Type == api.ServiceTypeExternalName {
Expand Down
47 changes: 0 additions & 47 deletions core/pkg/ingress/controller/named_port.go

This file was deleted.

93 changes: 0 additions & 93 deletions core/pkg/ingress/controller/named_port_test.go

This file was deleted.