Remove dead code

This commit is contained in:
Manuel Alejandro de Brito Fontes 2020-12-27 22:26:51 -03:00
parent 944d36fdba
commit d9af197e62
No known key found for this signature in database
GPG key ID: 786136016A8BA02A
7 changed files with 4 additions and 26 deletions

View file

@ -30,7 +30,6 @@ import (
)
var (
annotationSecureVerifyCACert = parser.GetAnnotationWithPrefix("secure-verify-ca-secret")
annotationPassthrough = parser.GetAnnotationWithPrefix("ssl-passthrough")
annotationAffinityType = parser.GetAnnotationWithPrefix("affinity")
annotationAffinityMode = parser.GetAnnotationWithPrefix("affinity-mode")
@ -39,7 +38,6 @@ var (
annotationCorsAllowHeaders = parser.GetAnnotationWithPrefix("cors-allow-headers")
annotationCorsExposeHeaders = parser.GetAnnotationWithPrefix("cors-expose-headers")
annotationCorsAllowCredentials = parser.GetAnnotationWithPrefix("cors-allow-credentials")
backendProtocol = parser.GetAnnotationWithPrefix("backend-protocol")
defaultCorsMethods = "GET, PUT, POST, DELETE, PATCH, OPTIONS"
defaultCorsHeaders = "DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization"
annotationAffinityCookieName = parser.GetAnnotationWithPrefix("session-cookie-name")

View file

@ -56,7 +56,7 @@ func (n *NGINXController) Check(_ *http.Request) error {
return errors.Wrapf(err, "reading NGINX PID from file %v", nginx.PID)
}
_, err = fs.NewProc(pid)
_, err = fs.Proc(pid)
if err != nil {
return errors.Wrapf(err, "checking for NGINX process with PID %v", pid)
}

View file

@ -630,9 +630,6 @@ func isCatchAllIngress(spec networkingv1beta1.IngressSpec) bool {
return spec.Backend != nil && len(spec.Rules) == 0
}
// Default path type is Prefix to not break existing definitions
var defaultPathType = networkingv1beta1.PathTypePrefix
// syncIngress parses ingress annotations converting the value of the
// annotation to a go struct
func (s *k8sStore) syncIngress(ing *networkingv1beta1.Ingress) {

View file

@ -50,10 +50,9 @@ import (
)
const (
slash = "/"
nonIdempotent = "non_idempotent"
defBufferSize = 65535
defAuthSigninRedirectParam = "rd"
slash = "/"
nonIdempotent = "non_idempotent"
defBufferSize = 65535
)
// TemplateWriter is the interface to render a template

View file

@ -293,10 +293,6 @@ func (f *Framework) matchNginxCustomConditions(from string, to string, matcher f
}
}
func (f *Framework) getNginxConfigMap() (*v1.ConfigMap, error) {
return f.getConfigMap("nginx-ingress-controller")
}
func (f *Framework) getConfigMap(name string) (*v1.ConfigMap, error) {
if f.KubeClientSet == nil {
return nil, fmt.Errorf("KubeClientSet not initialized")

View file

@ -33,11 +33,8 @@ import (
)
const (
logDynamicConfigSuccess = "Dynamic reconfiguration succeeded"
logDynamicConfigFailure = "Dynamic reconfiguration failed"
logRequireBackendReload = "Configuration changes detected, backend reload required"
logBackendReloadSuccess = "Backend successfully reloaded"
logInitialConfigSync = "Initial synchronization of the NGINX configuration"
waitForLuaSync = 5 * time.Second
)

View file

@ -267,15 +267,6 @@ func prepareCertificates(namespace string) error {
return nil
}
func commandExists(name string) bool {
_, err := exec.Command(name, "version").Output()
if err != nil {
return false
}
return true
}
func ocspserveDeployment(namespace string) (*appsv1.Deployment, *corev1.Service) {
name := "ocspserve"
return &appsv1.Deployment{