From 17aad37754daadb482bb35f347c42e0feca8de18 Mon Sep 17 00:00:00 2001 From: Luca Comellini Date: Fri, 23 Sep 2022 09:46:27 -0700 Subject: [PATCH] Remove deprecated kubernetes.io/ingress.class from examples (#3029) --- .../handling-host-and-listener-collisions.md | 3 +-- .../advanced-configuration-with-annotations.md | 8 -------- .../ingress-resources/app-protect-waf/cafe-ingress.yaml | 2 +- examples/ingress-resources/basic-auth/README.md | 2 +- examples/ingress-resources/custom-annotations/README.md | 2 +- .../ingress-resources/externalname-services/README.md | 3 +-- examples/ingress-resources/grpc-services/README.md | 2 +- examples/ingress-resources/health-checks/README.md | 2 +- examples/ingress-resources/jwt/README.md | 6 +++--- .../mergeable-ingress-types/cafe-master.yaml | 2 +- .../mergeable-ingress-types/coffee-minion.yaml | 2 +- .../mergeable-ingress-types/tea-minion.yaml | 2 +- .../shared-examples/wildcard-tls-certificate/README.md | 7 +++---- 13 files changed, 16 insertions(+), 27 deletions(-) diff --git a/docs/content/configuration/handling-host-and-listener-collisions.md b/docs/content/configuration/handling-host-and-listener-collisions.md index fe99f4ec93..dcddb95f66 100644 --- a/docs/content/configuration/handling-host-and-listener-collisions.md +++ b/docs/content/configuration/handling-host-and-listener-collisions.md @@ -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 . . . diff --git a/docs/content/configuration/ingress-resources/advanced-configuration-with-annotations.md b/docs/content/configuration/ingress-resources/advanced-configuration-with-annotations.md index 22cc24b5e9..6afac0f6c2 100644 --- a/docs/content/configuration/ingress-resources/advanced-configuration-with-annotations.md +++ b/docs/content/configuration/ingress-resources/advanced-configuration-with-annotations.md @@ -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 %}} diff --git a/examples/ingress-resources/app-protect-waf/cafe-ingress.yaml b/examples/ingress-resources/app-protect-waf/cafe-ingress.yaml index faddbcfc2c..25b23db795 100644 --- a/examples/ingress-resources/app-protect-waf/cafe-ingress.yaml +++ b/examples/ingress-resources/app-protect-waf/cafe-ingress.yaml @@ -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 diff --git a/examples/ingress-resources/basic-auth/README.md b/examples/ingress-resources/basic-auth/README.md index a235e0b844..d8872d2c42 100644 --- a/examples/ingress-resources/basic-auth/README.md +++ b/examples/ingress-resources/basic-auth/README.md @@ -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 diff --git a/examples/ingress-resources/custom-annotations/README.md b/examples/ingress-resources/custom-annotations/README.md index 395124ba8b..8872ce19fd 100644 --- a/examples/ingress-resources/custom-annotations/README.md +++ b/examples/ingress-resources/custom-annotations/README.md @@ -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: diff --git a/examples/ingress-resources/externalname-services/README.md b/examples/ingress-resources/externalname-services/README.md index 327c9847a1..b67b536f11 100644 --- a/examples/ingress-resources/externalname-services/README.md +++ b/examples/ingress-resources/externalname-services/README.md @@ -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: diff --git a/examples/ingress-resources/grpc-services/README.md b/examples/ingress-resources/grpc-services/README.md index a57a00875e..eb0d443797 100644 --- a/examples/ingress-resources/grpc-services/README.md +++ b/examples/ingress-resources/grpc-services/README.md @@ -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 diff --git a/examples/ingress-resources/health-checks/README.md b/examples/ingress-resources/health-checks/README.md index da9089da9a..b442f2b85e 100644 --- a/examples/ingress-resources/health-checks/README.md +++ b/examples/ingress-resources/health-checks/README.md @@ -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: diff --git a/examples/ingress-resources/jwt/README.md b/examples/ingress-resources/jwt/README.md index 614c603468..d9272516ea 100644 --- a/examples/ingress-resources/jwt/README.md +++ b/examples/ingress-resources/jwt/README.md @@ -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 @@ -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: @@ -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: diff --git a/examples/ingress-resources/mergeable-ingress-types/cafe-master.yaml b/examples/ingress-resources/mergeable-ingress-types/cafe-master.yaml index 99eeb19d43..62631227b8 100644 --- a/examples/ingress-resources/mergeable-ingress-types/cafe-master.yaml +++ b/examples/ingress-resources/mergeable-ingress-types/cafe-master.yaml @@ -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 diff --git a/examples/ingress-resources/mergeable-ingress-types/coffee-minion.yaml b/examples/ingress-resources/mergeable-ingress-types/coffee-minion.yaml index 9245f03cf3..b2b8817d96 100644 --- a/examples/ingress-resources/mergeable-ingress-types/coffee-minion.yaml +++ b/examples/ingress-resources/mergeable-ingress-types/coffee-minion.yaml @@ -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: diff --git a/examples/ingress-resources/mergeable-ingress-types/tea-minion.yaml b/examples/ingress-resources/mergeable-ingress-types/tea-minion.yaml index 99aa29d91e..c4a38a93fb 100644 --- a/examples/ingress-resources/mergeable-ingress-types/tea-minion.yaml +++ b/examples/ingress-resources/mergeable-ingress-types/tea-minion.yaml @@ -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: diff --git a/examples/shared-examples/wildcard-tls-certificate/README.md b/examples/shared-examples/wildcard-tls-certificate/README.md index 777b3bef17..b0f8a6a39a 100644 --- a/examples/shared-examples/wildcard-tls-certificate/README.md +++ b/examples/shared-examples/wildcard-tls-certificate/README.md @@ -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 @@ -56,9 +55,9 @@ metadata: spec: host: bar.example.com tls: - secret: "" + secret: "" upstreams: - - name: bar + - name: bar service: bar-service port: 80 routes: