From be3d458a34e49181f42c92d8c095e5214453dff4 Mon Sep 17 00:00:00 2001 From: duanhongyi Date: Mon, 29 Jan 2024 17:45:55 +0800 Subject: [PATCH] chore(controller): bump gateway api v1 --- rootfs/scheduler/resources/gateway.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/rootfs/scheduler/resources/gateway.py b/rootfs/scheduler/resources/gateway.py index 9e4188de..7f4710dd 100644 --- a/rootfs/scheduler/resources/gateway.py +++ b/rootfs/scheduler/resources/gateway.py @@ -4,7 +4,7 @@ class Gateway(Resource): api_prefix = 'apis' - api_version = 'gateway.networking.k8s.io/v1beta1' + api_version = 'gateway.networking.k8s.io/v1' def manifest(self, namespace, name, **kwargs): data = { @@ -12,7 +12,10 @@ def manifest(self, namespace, name, **kwargs): "kind": "Gateway", "metadata": { "name": name, - "namespace": namespace + "namespace": namespace, + "annotations": { + "cert-manager.io/issuer": namespace + }, }, "spec": { "gatewayClassName": kwargs.get("gateway_class", "default"), @@ -72,7 +75,7 @@ def delete(self, namespace, name, ignore_exception=True): class Route(Resource): api_prefix = 'apis' - api_version = 'gateway.networking.k8s.io/v1beta1' + api_version = 'gateway.networking.k8s.io/v1' def manifest(self, namespace, name, **kwargs): data = { @@ -150,7 +153,7 @@ class UDPRoute(Route): class HTTPRoute(Route): kind = "HTTPRoute" - api_version = 'gateway.networking.k8s.io/v1beta1' + api_version = 'gateway.networking.k8s.io/v1' def manifest(self, namespace, name, **kwargs): data = super().manifest(namespace, name, **kwargs) @@ -161,7 +164,7 @@ def manifest(self, namespace, name, **kwargs): class GRPCRoute(Route): kind = "GRPCRoute" - api_version = 'gateway.networking.k8s.io/v1beta1' + api_version = 'gateway.networking.k8s.io/v1alpha2' def manifest(self, namespace, name, **kwargs): data = super().manifest(namespace, name, **kwargs) @@ -172,7 +175,7 @@ def manifest(self, namespace, name, **kwargs): class TLSRoute(Route): kind = "GRPCRoute" - api_version = 'gateway.networking.k8s.io/v1beta1' + api_version = 'gateway.networking.k8s.io/v1alpha2' def manifest(self, namespace, name, **kwargs): data = super().manifest(namespace, name, **kwargs)