Skip to content

Instantly share code, notes, and snippets.

@jpeach
Last active January 23, 2022 21:33
Show Gist options
  • Save jpeach/07c066bca292154ad280902816d3a649 to your computer and use it in GitHub Desktop.
Save jpeach/07c066bca292154ad280902816d3a649 to your computer and use it in GitHub Desktop.
Gateway API With Kuma
VERSION=0.4.1
# Install the CRDs
kubectl kustomize "github.com/kubernetes-sigs/gateway-api/config/crd?ref=v$VERSION" | kubectl apply -f -
# Install the validating webhook
kubectl apply -f https://raw.githubusercontent.com/kubernetes-sigs/gateway-api/v$VERSION/deploy/certificate_config.yaml
kubectl apply -f https://raw.githubusercontent.com/kubernetes-sigs/gateway-api/v$VERSION/deploy/admission_webhook.yaml
unset VERSION
# At this point you should be in your working copy of the Kuma repository.
# Build Kuma docker images locally.
make images
# This tag will be different depending on the version you checked out.
TAG=1.4.0-rc1-196-g12afcb6a2
kind load docker-image kumahq/kuma-prometheus-sd:$TAG
kind load docker-image kumahq/kuma-init:$TAG
kind load docker-image kumahq/kumactl:$TAG
kind load docker-image kumahq/kuma-dp:$TAG
kind load docker-image kumahq/kuma-cp:$TAG
unset TAG
kumactl install control-plane --mode=standalone | kubectl apply -f -
kubectl apply -f <(
cat <<EOF
apiVersion: gateway.networking.k8s.io/v1alpha2
kind: GatewayClass
metadata:
name: kuma
spec:
controllerName: gateways.kuma.io/controller
EOF
)
# Now switch to the working copy of the gateway-api respository.
# Checkout the in-progress gateway-api PR.
gh pr checkout 969
# In the working copy of the gateway-api respository.
# Run the conformance tests. You might have to set KUBECONFIG to point to the right test cluster.
go test -v ./conformance --gateway-class kuma
@michaelbeaumont
Copy link

The sidecar-injection annotation has to be added to the namespaces in conformance/base/manifests.yaml!

Copy link

ghost commented Jan 23, 2022

Regarding section 01, kubernetes-sigs/gateway-api@ec41fd7 updates certificate_config.yaml and admission_webhook.yaml. The versions in this gist wouldn't work for me, but the updated versions worked fine. There hasn't been a release with these fixes yet but as a workaround this works for me:

kubectl apply -f https://raw.githubusercontent.com/kubernetes-sigs/gateway-api/master/deploy/certificate_config.yaml
kubectl apply -f https://raw.githubusercontent.com/kubernetes-sigs/gateway-api/master/deploy/admission_webhook.yaml

Copy link

ghost commented Jan 23, 2022

Oh BTW, thank you for this gist!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment