Skip to content

Commit

Permalink
Remove deprecated kubernetes.io/ingress.class from examples and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lucacome committed Sep 16, 2022
1 parent f0d99d5 commit 9e50467
Show file tree
Hide file tree
Showing 44 changed files with 69 additions and 87 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,8 @@ Consider the following two resources:
kind: Ingress
metadata:
name: cafe-ingress
annotations:
kubernetes.io/ingress.class: "nginx"
spec:
ingressClassName: nginx
rules:
- host: cafe.example.com
. . .
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,14 +91,6 @@ The table below summarizes the available annotations.
**Note**: The annotations that start with `nginx.com` are only supported with NGINX Plus.
### Ingress Controller (Not Related to NGINX Configuration)
{{% table %}}
|Annotation | ConfigMap Key | Description | Default | Example |
| ---| ---| ---| ---| --- |
|``kubernetes.io/ingress.class`` | N/A | Specifies which Ingress Controller must handle the Ingress resource. Set to ``nginx`` to make NGINX Ingress Controller handle it. | N/A | [Multiple Ingress Controllers](/nginx-ingress-controller/installation/running-multiple-ingress-controllers). |
{{% /table %}}
### General Customization
{{% table %}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ kind: Ingress
metadata:
name: cafe-ingress
annotations:
kubernetes.io/ingress.class: "nginx"
appprotect.f5.com/app-protect-policy: "default/dataguard-alarm"
appprotect.f5.com/app-protect-enable: "True"
appprotect.f5.com/app-protect-security-log-enable: "True"
appprotect.f5.com/app-protect-security-log: "default/logconf"
appprotect.f5.com/app-protect-security-log-destination: "syslog:server=syslog-svc.default:514"
spec:
ingressClassName: nginx
tls:
- hosts:
- cafe.example.com
Expand Down
2 changes: 1 addition & 1 deletion examples/ingress-resources/basic-auth/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ In the following example we enable Basic Auth validation for the [mergeable Ingr
metadata:
name: cafe-ingress-master
annotations:
kubernetes.io/ingress.class: "nginx"
nginx.org/mergeable-ingress-type: "master"
spec:
ingressClassName: nginx
tls:
- hosts:
- cafe.example.com
Expand Down
2 changes: 1 addition & 1 deletion examples/ingress-resources/custom-annotations/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,11 @@ Customize the template for Ingress resources to include the logic to handle and
metadata:
name: cafe-ingress
annotations:
kubernetes.io/ingress.class: "nginx"
custom.nginx.org/rate-limiting: "on"
custom.nginx.org/rate-limiting-rate: "5r/s"
custom.nginx.org/rate-limiting-burst: "1"
spec:
ingressClassName: nginx
rules:
- host: "cafe.example.com"
http:
Expand Down
3 changes: 1 addition & 2 deletions examples/ingress-resources/externalname-services/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,8 @@ apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: example-ingress
annotations:
kubernetes.io/ingress.class: "nginx"
spec:
ingressClassName: nginx
rules:
- host: example.com
http:
Expand Down
2 changes: 1 addition & 1 deletion examples/ingress-resources/grpc-services/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ metadata:
name: grpc-ingress
annotations:
nginx.org/grpc-services: "grpc-svc"
kubernetes.io/ingress.class: "nginx"
spec:
ingressClassName: nginx
tls:
- hosts:
- grpc.example.com
Expand Down
2 changes: 1 addition & 1 deletion examples/ingress-resources/health-checks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ kind: Ingress
metadata:
name: cafe-ingress
annotations:
kubernetes.io/ingress.class: "nginx"
nginx.com/health-checks: "true"
spec:
ingressClassName: nginx
rules:
- host: "cafe.example.com"
http:
Expand Down
6 changes: 3 additions & 3 deletions examples/ingress-resources/jwt/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ In the following example we enable JWT validation for the [mergeable Ingresses](
metadata:
name: cafe-ingress-master
annotations:
kubernetes.io/ingress.class: "nginx"
nginx.org/mergeable-ingress-type: "master"
spec:
ingressClassName: nginx
tls:
- hosts:
- cafe.example.com
Expand All @@ -74,13 +74,13 @@ In the following example we enable JWT validation for the [mergeable Ingresses](
metadata:
name: cafe-ingress-tea-minion
annotations:
kubernetes.io/ingress.class: "nginx"
nginx.org/mergeable-ingress-type: "minion"
nginx.com/jwt-key: "tea-jwk"
nginx.com/jwt-realm: "Tea"
nginx.com/jwt-token: "$cookie_auth_token"
nginx.com/jwt-login-url: "https://login-tea.cafe.example.com"
spec:
ingressClassName: nginx
rules:
- host: cafe.example.com
http:
Expand All @@ -101,13 +101,13 @@ In the following example we enable JWT validation for the [mergeable Ingresses](
metadata:
name: cafe-ingress-coffee-minion
annotations:
kubernetes.io/ingress.class: "nginx"
nginx.org/mergeable-ingress-type: "minion"
nginx.com/jwt-key: "coffee-jwk"
nginx.com/jwt-realm: "Coffee"
nginx.com/jwt-token: "$cookie_auth_token"
nginx.com/jwt-login-url: "https://login-coffee.cafe.example.com"
spec:
ingressClassName: nginx
rules:
- host: cafe.example.com
http:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ kind: Ingress
metadata:
name: cafe-ingress-master
annotations:
kubernetes.io/ingress.class: "nginx"
nginx.org/mergeable-ingress-type: "master"
spec:
ingressClassName: nginx
tls:
- hosts:
- cafe.example.com
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ kind: Ingress
metadata:
name: cafe-ingress-coffee-minion
annotations:
kubernetes.io/ingress.class: "nginx"
nginx.org/mergeable-ingress-type: "minion"
spec:
ingressClassName: nginx
rules:
- host: cafe.example.com
http:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ kind: Ingress
metadata:
name: cafe-ingress-tea-minion
annotations:
kubernetes.io/ingress.class: "nginx"
nginx.org/mergeable-ingress-type: "minion"
spec:
ingressClassName: nginx
rules:
- host: cafe.example.com
http:
Expand Down
7 changes: 3 additions & 4 deletions examples/shared-examples/wildcard-tls-certificate/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,8 @@ kind: Ingress
metadata:
name: foo
namespace: foo
annotations:
kubernetes.io/ingress.class: "nginx"
spec:
ingressClassName: nginx
tls:
- hosts:
- foo.example.com
Expand Down Expand Up @@ -56,9 +55,9 @@ metadata:
spec:
host: bar.example.com
tls:
secret: ""
secret: ""
upstreams:
- name: bar
- name: bar
service: bar-service
port: 80
routes:
Expand Down
2 changes: 1 addition & 1 deletion tests/data/annotations/grpc/annotations-ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ metadata:
name: grpc-ingress
annotations:
nginx.org/grpc-services: "grpc-svc"
kubernetes.io/ingress.class: "nginx"
spec:
ingressClassName: nginx
tls:
- hosts:
- grpc.example.com
Expand Down
6 changes: 3 additions & 3 deletions tests/data/annotations/mergeable/annotations-ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ kind: Ingress
metadata:
name: annotations-ingress-master
annotations:
kubernetes.io/ingress.class: "nginx"
nginx.org/mergeable-ingress-type: "master"
spec:
ingressClassName: nginx
rules:
- host: annotations.example.com
---
Expand All @@ -14,9 +14,9 @@ kind: Ingress
metadata:
name: annotations-ingress-backend1-minion
annotations:
kubernetes.io/ingress.class: "nginx"
nginx.org/mergeable-ingress-type: "minion"
spec:
ingressClassName: nginx
rules:
- host: annotations.example.com
http:
Expand All @@ -34,9 +34,9 @@ kind: Ingress
metadata:
name: annotations-ingress-backend2-minion
annotations:
kubernetes.io/ingress.class: "nginx"
nginx.org/mergeable-ingress-type: "minion"
spec:
ingressClassName: nginx
rules:
- host: annotations.example.com
http:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ kind: Ingress
metadata:
name: annotations-ingress-master
annotations:
kubernetes.io/ingress.class: "nginx"
nginx.org/mergeable-ingress-type: "master"
nginx.org/proxy-send-timeout: "10s"
nginx.org/max-conns: "108"
spec:
ingressClassName: nginx
rules:
- host: annotations.example.com
---
Expand All @@ -16,11 +16,11 @@ kind: Ingress
metadata:
name: annotations-ingress-backend1-minion
annotations:
kubernetes.io/ingress.class: "nginx"
nginx.org/mergeable-ingress-type: "minion"
nginx.org/proxy-send-timeout: "25s"
nginx.org/max-conns: "1048"
spec:
ingressClassName: nginx
rules:
- host: annotations.example.com
http:
Expand All @@ -38,11 +38,11 @@ kind: Ingress
metadata:
name: annotations-ingress-backend2-minion
annotations:
kubernetes.io/ingress.class: "nginx"
nginx.org/mergeable-ingress-type: "minion"
nginx.org/proxy-send-timeout: "33s"
nginx.org/max-conns: "1024"
spec:
ingressClassName: nginx
rules:
- host: annotations.example.com
http:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
annotations:
kubernetes.io/ingress.class: "nginx"
nginx.org/server-snippets: "tcp_nodelay on;"
name: annotations-ingress
spec:
ingressClassName: nginx
rules:
- host: annotations.example.com
http:
Expand All @@ -17,4 +17,3 @@ spec:
name: backend2-svc
port:
number: 80

2 changes: 1 addition & 1 deletion tests/data/annotations/standard/annotations-ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
annotations:
kubernetes.io/ingress.class: "nginx"
name: annotations-ingress
spec:
ingressClassName: nginx
rules:
- host: annotations.example.com
http:
Expand Down
2 changes: 1 addition & 1 deletion tests/data/appprotect/grpc/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ metadata:
name: appprotect-ingress
annotations:
nginx.org/grpc-services: "grpc-svc"
kubernetes.io/ingress.class: "nginx"
appprotect.f5.com/app-protect-policy: "default/grpc"
appprotect.f5.com/app-protect-enable: "True"
appprotect.f5.com/app-protect-security-log-enable: "True"
appprotect.f5.com/app-protect-security-log: "default/logconf"
appprotect.f5.com/app-protect-security-log-destination: "syslog:server=172.17.0.10:514"
spec:
ingressClassName: nginx
tls:
- hosts:
- appprotect.example.com
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ kind: Ingress
metadata:
name: auth-basic-auth-ingress-master
annotations:
kubernetes.io/ingress.class: "nginx"
nginx.org/mergeable-ingress-type: "master"
nginx.org/basic-auth-secret: "auth-basic-master-htpasswd"
nginx.org/basic-auth-realm: "AuthBasic Auth Mergeable App"
spec:
ingressClassName: nginx
rules:
- host: auth-basic-auth-mergeable.example.com
---
Expand All @@ -17,11 +17,11 @@ kind: Ingress
metadata:
name: auth-basic-auth-ingress-backend1-minion
annotations:
kubernetes.io/ingress.class: "nginx"
nginx.org/mergeable-ingress-type: "minion"
nginx.org/basic-auth-secret: "auth-basic-minion-htpasswd"
nginx.org/basic-auth-realm: "Backend1"
spec:
ingressClassName: nginx
rules:
- host: auth-basic-auth-mergeable.example.com
http:
Expand All @@ -39,9 +39,9 @@ kind: Ingress
metadata:
name: auth-basic-auth-ingress-backend2-minion
annotations:
kubernetes.io/ingress.class: "nginx"
nginx.org/mergeable-ingress-type: "minion"
spec:
ingressClassName: nginx
rules:
- host: auth-basic-auth-mergeable.example.com
http:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ kind: Ingress
metadata:
name: auth-basic-secrets-ingress-master
annotations:
kubernetes.io/ingress.class: "nginx"
nginx.org/mergeable-ingress-type: "master"
spec:
ingressClassName: nginx
rules:
- host: auth-basic-secrets.example.com
---
Expand All @@ -14,9 +14,9 @@ kind: Ingress
metadata:
name: auth-basic-secrets-ingress-backend1-minion
annotations:
kubernetes.io/ingress.class: "nginx"
nginx.org/mergeable-ingress-type: "minion"
spec:
ingressClassName: nginx
rules:
- host: auth-basic-secrets.example.com
http:
Expand All @@ -34,11 +34,11 @@ kind: Ingress
metadata:
name: auth-basic-secrets-ingress-backend2-minion
annotations:
kubernetes.io/ingress.class: "nginx"
nginx.org/mergeable-ingress-type: "minion"
nginx.org/basic-auth-secret: "auth-basic-secrets-key"
nginx.org/basic-auth-realm: "AuthBasic Secrets App"
spec:
ingressClassName: nginx
rules:
- host: auth-basic-secrets.example.com
http:
Expand Down
Loading

0 comments on commit 9e50467

Please sign in to comment.