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)