Remove dead code
This commit is contained in:
parent
944d36fdba
commit
d9af197e62
7 changed files with 4 additions and 26 deletions
|
@ -30,7 +30,6 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
annotationSecureVerifyCACert = parser.GetAnnotationWithPrefix("secure-verify-ca-secret")
|
|
||||||
annotationPassthrough = parser.GetAnnotationWithPrefix("ssl-passthrough")
|
annotationPassthrough = parser.GetAnnotationWithPrefix("ssl-passthrough")
|
||||||
annotationAffinityType = parser.GetAnnotationWithPrefix("affinity")
|
annotationAffinityType = parser.GetAnnotationWithPrefix("affinity")
|
||||||
annotationAffinityMode = parser.GetAnnotationWithPrefix("affinity-mode")
|
annotationAffinityMode = parser.GetAnnotationWithPrefix("affinity-mode")
|
||||||
|
@ -39,7 +38,6 @@ var (
|
||||||
annotationCorsAllowHeaders = parser.GetAnnotationWithPrefix("cors-allow-headers")
|
annotationCorsAllowHeaders = parser.GetAnnotationWithPrefix("cors-allow-headers")
|
||||||
annotationCorsExposeHeaders = parser.GetAnnotationWithPrefix("cors-expose-headers")
|
annotationCorsExposeHeaders = parser.GetAnnotationWithPrefix("cors-expose-headers")
|
||||||
annotationCorsAllowCredentials = parser.GetAnnotationWithPrefix("cors-allow-credentials")
|
annotationCorsAllowCredentials = parser.GetAnnotationWithPrefix("cors-allow-credentials")
|
||||||
backendProtocol = parser.GetAnnotationWithPrefix("backend-protocol")
|
|
||||||
defaultCorsMethods = "GET, PUT, POST, DELETE, PATCH, OPTIONS"
|
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"
|
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")
|
annotationAffinityCookieName = parser.GetAnnotationWithPrefix("session-cookie-name")
|
||||||
|
|
|
@ -56,7 +56,7 @@ func (n *NGINXController) Check(_ *http.Request) error {
|
||||||
return errors.Wrapf(err, "reading NGINX PID from file %v", nginx.PID)
|
return errors.Wrapf(err, "reading NGINX PID from file %v", nginx.PID)
|
||||||
}
|
}
|
||||||
|
|
||||||
_, err = fs.NewProc(pid)
|
_, err = fs.Proc(pid)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return errors.Wrapf(err, "checking for NGINX process with PID %v", pid)
|
return errors.Wrapf(err, "checking for NGINX process with PID %v", pid)
|
||||||
}
|
}
|
||||||
|
|
|
@ -630,9 +630,6 @@ func isCatchAllIngress(spec networkingv1beta1.IngressSpec) bool {
|
||||||
return spec.Backend != nil && len(spec.Rules) == 0
|
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
|
// syncIngress parses ingress annotations converting the value of the
|
||||||
// annotation to a go struct
|
// annotation to a go struct
|
||||||
func (s *k8sStore) syncIngress(ing *networkingv1beta1.Ingress) {
|
func (s *k8sStore) syncIngress(ing *networkingv1beta1.Ingress) {
|
||||||
|
|
|
@ -50,10 +50,9 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
slash = "/"
|
slash = "/"
|
||||||
nonIdempotent = "non_idempotent"
|
nonIdempotent = "non_idempotent"
|
||||||
defBufferSize = 65535
|
defBufferSize = 65535
|
||||||
defAuthSigninRedirectParam = "rd"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// TemplateWriter is the interface to render a template
|
// TemplateWriter is the interface to render a template
|
||||||
|
|
|
@ -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) {
|
func (f *Framework) getConfigMap(name string) (*v1.ConfigMap, error) {
|
||||||
if f.KubeClientSet == nil {
|
if f.KubeClientSet == nil {
|
||||||
return nil, fmt.Errorf("KubeClientSet not initialized")
|
return nil, fmt.Errorf("KubeClientSet not initialized")
|
||||||
|
|
|
@ -33,11 +33,8 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
logDynamicConfigSuccess = "Dynamic reconfiguration succeeded"
|
|
||||||
logDynamicConfigFailure = "Dynamic reconfiguration failed"
|
|
||||||
logRequireBackendReload = "Configuration changes detected, backend reload required"
|
logRequireBackendReload = "Configuration changes detected, backend reload required"
|
||||||
logBackendReloadSuccess = "Backend successfully reloaded"
|
logBackendReloadSuccess = "Backend successfully reloaded"
|
||||||
logInitialConfigSync = "Initial synchronization of the NGINX configuration"
|
|
||||||
|
|
||||||
waitForLuaSync = 5 * time.Second
|
waitForLuaSync = 5 * time.Second
|
||||||
)
|
)
|
||||||
|
|
|
@ -267,15 +267,6 @@ func prepareCertificates(namespace string) error {
|
||||||
return nil
|
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) {
|
func ocspserveDeployment(namespace string) (*appsv1.Deployment, *corev1.Service) {
|
||||||
name := "ocspserve"
|
name := "ocspserve"
|
||||||
return &appsv1.Deployment{
|
return &appsv1.Deployment{
|
||||||
|
|
Loading…
Reference in a new issue