@@ -35,8 +35,7 @@ import (
35
35
"github.com/spf13/pflag"
36
36
37
37
proxyproto "github.com/armon/go-proxyproto"
38
- api "k8s.io/api/core/v1"
39
- api_v1 "k8s.io/api/core/v1"
38
+ apiv1 "k8s.io/api/core/v1"
40
39
extensions "k8s.io/api/extensions/v1beta1"
41
40
42
41
"k8s.io/ingress/controllers/nginx/pkg/config"
@@ -83,7 +82,7 @@ func newNGINXController() *NGINXController {
83
82
84
83
n := & NGINXController {
85
84
binary : ngx ,
86
- configmap : & api_v1 .ConfigMap {},
85
+ configmap : & apiv1 .ConfigMap {},
87
86
isIPV6Enabled : isIPv6Enabled (),
88
87
resolver : h ,
89
88
ports : & config.ListenPorts {},
@@ -123,7 +122,7 @@ type NGINXController struct {
123
122
controller * controller.GenericController
124
123
t * ngx_template.Template
125
124
126
- configmap * api_v1 .ConfigMap
125
+ configmap * apiv1 .ConfigMap
127
126
128
127
storeLister ingress.StoreLister
129
128
@@ -309,7 +308,7 @@ func (n NGINXController) DefaultEndpoint() ingress.Endpoint {
309
308
return ingress.Endpoint {
310
309
Address : "127.0.0.1" ,
311
310
Port : fmt .Sprintf ("%v" , n .ports .Default ),
312
- Target : & api .ObjectReference {},
311
+ Target : & apiv1 .ObjectReference {},
313
312
}
314
313
}
315
314
@@ -443,7 +442,7 @@ Error: %v
443
442
}
444
443
445
444
// SetConfig sets the configured configmap
446
- func (n * NGINXController ) SetConfig (cmap * api_v1 .ConfigMap ) {
445
+ func (n * NGINXController ) SetConfig (cmap * apiv1 .ConfigMap ) {
447
446
n .configmap = cmap
448
447
n .isProxyProtocolEnabled = false
449
448
@@ -469,7 +468,7 @@ func (n *NGINXController) SetListers(lister ingress.StoreLister) {
469
468
}
470
469
471
470
// UpdateIngressStatus custom Ingress status update
472
- func (n * NGINXController ) UpdateIngressStatus (* extensions.Ingress ) []api_v1 .LoadBalancerIngress {
471
+ func (n * NGINXController ) UpdateIngressStatus (* extensions.Ingress ) []apiv1 .LoadBalancerIngress {
473
472
return nil
474
473
}
475
474
@@ -598,7 +597,7 @@ func (n *NGINXController) OnUpdate(ingressCfg ingress.Configuration) error {
598
597
}
599
598
600
599
if exists {
601
- setHeaders = cmap .(* api_v1 .ConfigMap ).Data
600
+ setHeaders = cmap .(* apiv1 .ConfigMap ).Data
602
601
}
603
602
}
604
603
@@ -610,7 +609,7 @@ func (n *NGINXController) OnUpdate(ingressCfg ingress.Configuration) error {
610
609
}
611
610
612
611
if exists {
613
- addHeaders = cmap .(* api_v1 .ConfigMap ).Data
612
+ addHeaders = cmap .(* apiv1 .ConfigMap ).Data
614
613
}
615
614
}
616
615
@@ -623,7 +622,7 @@ func (n *NGINXController) OnUpdate(ingressCfg ingress.Configuration) error {
623
622
}
624
623
625
624
if exists {
626
- secret := s .(* api_v1 .Secret )
625
+ secret := s .(* apiv1 .Secret )
627
626
nsSecName := strings .Replace (secretName , "/" , "-" , - 1 )
628
627
629
628
dh , ok := secret .Data ["dhparam.pem" ]
0 commit comments