From 6407a521b92cc70e0d7f0bd64eb31394c9c21708 Mon Sep 17 00:00:00 2001 From: Charlie Wang Date: Mon, 12 Jun 2023 08:02:04 +0000 Subject: [PATCH] use networking.k8s.io/v1 as v1beta is removed on GKE --- getting-started/golang-deployment.yaml | 10 ++++++---- getting-started/grpc-deployment.yaml | 10 ++++++---- getting-started/java-deployment.yaml | 10 ++++++---- getting-started/nodejs-deployment.yaml | 10 ++++++---- getting-started/php-deployment.yaml | 10 ++++++---- getting-started/python-deployment.yaml | 10 ++++++---- getting-started/ruby-deployment.yaml | 10 ++++++---- gke/grpc-bookstore.yaml | 10 ++++++---- k8s/esp_echo_gke_ingress.yaml | 8 +++++--- 9 files changed, 53 insertions(+), 35 deletions(-) diff --git a/getting-started/golang-deployment.yaml b/getting-started/golang-deployment.yaml index 03d30a0..982bc50 100644 --- a/getting-started/golang-deployment.yaml +++ b/getting-started/golang-deployment.yaml @@ -12,14 +12,16 @@ # See the License for the specific language governing permissions and # limitations under the License. -apiVersion: networking.k8s.io/v1beta1 +apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: esp-echo spec: - backend: - serviceName: esp-echo # Name of the Service targeted by the Ingress - servicePort: 80 # Should match the port used by the Service + defaultBackend: + service: + name: esp-echo # Name of the Service targeted by the Ingress + port: + number: 80 # Should match the port used by the Service --- apiVersion: v1 kind: Service diff --git a/getting-started/grpc-deployment.yaml b/getting-started/grpc-deployment.yaml index 7c7c016..c36d674 100644 --- a/getting-started/grpc-deployment.yaml +++ b/getting-started/grpc-deployment.yaml @@ -12,14 +12,16 @@ # See the License for the specific language governing permissions and # limitations under the License. -apiVersion: networking.k8s.io/v1beta1 +apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: grpc-hello spec: - backend: - serviceName: grpc-hello # Name of the Service targeted by the Ingress - servicePort: 80 # Should match the port used by the Service + defaultBackend: + service: + name: grpc-hello # Name of the Service targeted by the Ingress + port: + number: 80 # Should match the port used by the Service --- apiVersion: v1 kind: Service diff --git a/getting-started/java-deployment.yaml b/getting-started/java-deployment.yaml index 4597974..b259790 100644 --- a/getting-started/java-deployment.yaml +++ b/getting-started/java-deployment.yaml @@ -12,14 +12,16 @@ # See the License for the specific language governing permissions and # limitations under the License. -apiVersion: networking.k8s.io/v1beta1 +apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: esp-echo spec: - backend: - serviceName: esp-echo # Name of the Service targeted by the Ingress - servicePort: 80 # Should match the port used by the Service + defaultBackend: + service: + name: esp-echo # Name of the Service targeted by the Ingress + port: + number: 80 # Should match the port used by the Service --- apiVersion: v1 kind: Service diff --git a/getting-started/nodejs-deployment.yaml b/getting-started/nodejs-deployment.yaml index cfddee8..92377b2 100644 --- a/getting-started/nodejs-deployment.yaml +++ b/getting-started/nodejs-deployment.yaml @@ -11,14 +11,16 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -apiVersion: networking.k8s.io/v1beta1 +apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: esp-echo spec: - backend: - serviceName: esp-echo # Name of the Service targeted by the Ingress - servicePort: 80 # Should match the port used by the Service + defaultBackend: + service: + name: esp-echo # Name of the Service targeted by the Ingress + port: + number: 80 # Should match the port used by the Service --- apiVersion: v1 kind: Service diff --git a/getting-started/php-deployment.yaml b/getting-started/php-deployment.yaml index d96f05e..56ecdce 100644 --- a/getting-started/php-deployment.yaml +++ b/getting-started/php-deployment.yaml @@ -12,14 +12,16 @@ # See the License for the specific language governing permissions and # limitations under the License. -apiVersion: networking.k8s.io/v1beta1 +apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: esp-echo spec: - backend: - serviceName: esp-echo # Name of the Service targeted by the Ingress - servicePort: 80 # Should match the port used by the Service + defaultBackend: + service: + name: esp-echo # Name of the Service targeted by the Ingress + port: + number: 80 # Should match the port used by the Service --- apiVersion: v1 kind: Service diff --git a/getting-started/python-deployment.yaml b/getting-started/python-deployment.yaml index c90a2a5..fa7a1a1 100644 --- a/getting-started/python-deployment.yaml +++ b/getting-started/python-deployment.yaml @@ -12,14 +12,16 @@ # See the License for the specific language governing permissions and # limitations under the License. -apiVersion: networking.k8s.io/v1beta1 +apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: esp-echo spec: - backend: - serviceName: esp-echo # Name of the Service targeted by the Ingress - servicePort: 80 # Should match the port used by the Service + defaultBackend: + service: + name: esp-echo # Name of the Service targeted by the Ingress + port: + number: 80 # Should match the port used by the Service --- apiVersion: v1 kind: Service diff --git a/getting-started/ruby-deployment.yaml b/getting-started/ruby-deployment.yaml index 97d6e2d..b029180 100644 --- a/getting-started/ruby-deployment.yaml +++ b/getting-started/ruby-deployment.yaml @@ -12,14 +12,16 @@ # See the License for the specific language governing permissions and # limitations under the License. -apiVersion: networking.k8s.io/v1beta1 +apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: esp-echo spec: - backend: - serviceName: esp-echo # Name of the Service targeted by the Ingress - servicePort: 80 # Should match the port used by the Service + defaultBackend: + service: + name: esp-echo # Name of the Service targeted by the Ingress + port: + number: 80 # Should match the port used by the Service --- apiVersion: v1 kind: Service diff --git a/gke/grpc-bookstore.yaml b/gke/grpc-bookstore.yaml index 57b9f63..c03fca0 100644 --- a/gke/grpc-bookstore.yaml +++ b/gke/grpc-bookstore.yaml @@ -16,7 +16,7 @@ # and the container for the Extensible Service Proxy (ESP) to # Google Kubernetes Engine (GKE). -apiVersion: networking.k8s.io/v1beta1 +apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: esp-grpc-bookstore @@ -28,9 +28,11 @@ spec: - hosts: - SERVICE_NAME secretName: esp-ssl - backend: - serviceName: esp-grpc-bookstore - servicePort: 443 + defaultBackend: + service: + name: esp-grpc-bookstore + port: + number: 443 --- apiVersion: cloud.google.com/v1 kind: BackendConfig diff --git a/k8s/esp_echo_gke_ingress.yaml b/k8s/esp_echo_gke_ingress.yaml index f0174af..d22516c 100644 --- a/k8s/esp_echo_gke_ingress.yaml +++ b/k8s/esp_echo_gke_ingress.yaml @@ -62,7 +62,7 @@ spec: ports: - containerPort: 8081 --- -apiVersion: networking.k8s.io/v1beta1 +apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: example @@ -74,5 +74,7 @@ spec: # Note that the service will receive the entire URL with the prefix - path: /* backend: - serviceName: esp-echo - servicePort: 80 + service: + name: esp-echo + port: + number: 80