l7mp / stunner

A Kubernetes media gateway for WebRTC. Contact: info@l7mp.io
https://l7mp.io
MIT License
752 stars 58 forks source link

Cannot apply GatewayClass from README.md on K8s v1.27 #101

Closed Schille closed 10 months ago

Schille commented 1 year ago

Applying this GatewayClass from your README.md

kubectl apply -f - <<EOF
apiVersion: gateway.networking.k8s.io/v1alpha2
kind: GatewayClass
metadata:
  name: stunner-gatewayclass
spec:
  controllerName: "stunner.l7mp.io/gateway-operator"
  parametersRef:
    group: "stunner.l7mp.io"
    kind: GatewayConfig
    name: stunner-gatewayconfig
    namespace: stunner
  description: "STUNner is a WebRTC media gateway for Kubernetes"
EOF

raises a webhook error on GKE Autopilot 1.27

Error from server (InternalError): error when creating "STDIN": Internal error occurred: failed calling webhook "gateway-api-alpha-deprecated-use-beta-version.gke.io": failed to call webhook: Post "https://gateway-api-alpha-deprecated-use-beta-version.kube-system.svc:443/?timeout=1s": service "gateway-api-alpha-deprecated-use-beta-version" not found

Using apiVersion: gateway.networking.k8s.io/v1beta1 works.

The same is with Gateway. However, UDPRoute only works with v1alpha2.

kubectl version --short

Client Version: v1.26.3
Kustomize Version: v4.5.7
Server Version: v1.27.3-gke.100
rg0now commented 1 year ago

Thanks for the report. We are aware of the situation: GKE seems be advancing the supported Gateway API versions fairly rapidly (too rapidly, if you ask me).

Anyway, we have upgraded STUNner to the new version of the Kubernetes Gateway API. Let me quickly summarize the new rules in the hope that people hitting the same issue will find it useful:

This subtlety will stay with us until the Gateway API goes GA (hopefully this year), but then we'll have to make another API version upgrade (from v1beta1 to v1). This is the price we pay for STUNner tracking a beta Kubernetes API: once things settle upstream we'll release STUNner v1 and then that should settle API versioning troubles for the foreseeable time. Please report any breakage you encounter meanwhile.

rg0now commented 10 months ago

Closing this since this is not a STUNner issue. Let's hope Google will update GKE to the Gateway API v1 soon.