Skip to content

Commit 46668f1

Browse files
authored
Update Ingress APIVersion to networking.k8s.io/v1 (kubernetes-sigs#2433)
1 parent 316f6c0 commit 46668f1

File tree

61 files changed

+797
-409
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+797
-409
lines changed

apis/elbv2/v1alpha1/zz_generated.deepcopy.go

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apis/elbv2/v1beta1/zz_generated.deepcopy.go

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/webhook/manifests.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,15 +76,15 @@ webhooks:
7676
service:
7777
name: webhook-service
7878
namespace: system
79-
path: /validate-networking-v1beta1-ingress
79+
path: /validate-networking-v1-ingress
8080
failurePolicy: Fail
8181
matchPolicy: Equivalent
8282
name: vingress.elbv2.k8s.aws
8383
rules:
8484
- apiGroups:
8585
- networking.k8s.io
8686
apiVersions:
87-
- v1beta1
87+
- v1
8888
operations:
8989
- CREATE
9090
- UPDATE

controllers/ingress/eventhandlers/ingress_class_events.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package eventhandlers
33
import (
44
"context"
55
"github.com/go-logr/logr"
6-
networking "k8s.io/api/networking/v1beta1"
6+
networking "k8s.io/api/networking/v1"
77
"k8s.io/apimachinery/pkg/api/equality"
88
"k8s.io/client-go/tools/record"
99
"k8s.io/client-go/util/workqueue"

controllers/ingress/eventhandlers/ingress_class_params_events.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package eventhandlers
33
import (
44
"context"
55
"github.com/go-logr/logr"
6-
networking "k8s.io/api/networking/v1beta1"
6+
networking "k8s.io/api/networking/v1"
77
"k8s.io/apimachinery/pkg/api/equality"
88
"k8s.io/client-go/tools/record"
99
"k8s.io/client-go/util/workqueue"

controllers/ingress/eventhandlers/ingress_events.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"fmt"
66
"github.com/go-logr/logr"
77
corev1 "k8s.io/api/core/v1"
8-
networking "k8s.io/api/networking/v1beta1"
8+
networking "k8s.io/api/networking/v1"
99
"k8s.io/apimachinery/pkg/api/equality"
1010
"k8s.io/client-go/tools/record"
1111
"k8s.io/client-go/util/workqueue"

controllers/ingress/eventhandlers/secret_events.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"context"
55
"github.com/go-logr/logr"
66
corev1 "k8s.io/api/core/v1"
7-
networking "k8s.io/api/networking/v1beta1"
7+
networking "k8s.io/api/networking/v1"
88
"k8s.io/apimachinery/pkg/api/equality"
99
"k8s.io/client-go/tools/record"
1010
"k8s.io/client-go/util/workqueue"

controllers/ingress/eventhandlers/service_events.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"context"
55
"github.com/go-logr/logr"
66
corev1 "k8s.io/api/core/v1"
7-
networking "k8s.io/api/networking/v1beta1"
7+
networking "k8s.io/api/networking/v1"
88
"k8s.io/apimachinery/pkg/api/equality"
99
"k8s.io/client-go/tools/record"
1010
"k8s.io/client-go/util/workqueue"

controllers/ingress/group_controller.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"github.com/go-logr/logr"
77
"github.com/pkg/errors"
88
corev1 "k8s.io/api/core/v1"
9-
networking "k8s.io/api/networking/v1beta1"
9+
networking "k8s.io/api/networking/v1"
1010
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
1111
"k8s.io/client-go/kubernetes"
1212
"k8s.io/client-go/tools/record"
@@ -36,7 +36,7 @@ const (
3636
controllerName = "ingress"
3737

3838
// the groupVersion of used Ingress & IngressClass resource.
39-
ingressResourcesGroupVersion = "networking.k8s.io/v1beta1"
39+
ingressResourcesGroupVersion = "networking.k8s.io/v1"
4040
ingressClassKind = "IngressClass"
4141
)
4242

docs/deploy/configurations.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Refer to the [installation guide](installation.md) for installing the controller
1818
You can limit the ingresses ALB ingress controller controls by combining following two approaches:
1919

2020
### Limiting ingress class
21-
Setting the `--ingress-class` argument constrains the controller's scope to ingresses with matching `kubernetes.io/ingress.class` annotation.
21+
Setting the `--ingress-class` argument constrains the controller's scope to ingresses with matching `ingressClassName` field.
2222

2323
An example of the container spec portion of the controller, only listening for resources with the class "alb", would be as follows.
2424

@@ -29,18 +29,17 @@ spec:
2929
- --ingress-class=alb
3030
```
3131
32-
Now, only ingress resources with the appropriate annotation are picked up, as seen below.
32+
Now, only ingress resources with the appropriate class are picked up, as seen below.
3333
3434
```yaml
35-
apiVersion: extensions/v1beta1
35+
apiVersion: networking.k8s.io/v1
3636
kind: Ingress
3737
metadata:
3838
name: echoserver
3939
namespace: echoserver
40-
annotations:
41-
kubernetes.io/ingress.class: "alb"
4240
spec:
43-
...
41+
ingressClassName: alb
42+
...
4443
```
4544

4645
If the ingress class is not specified, the controller will reconcile Ingress objects without the ingress class specified or ingress class `alb`.

0 commit comments

Comments
 (0)