Ingress GLBC: Please provide a way to enable Cloud CDN #1680
Comments
Completely agree, we need this too, this could totally be a annotation of some sort. |
It seems to work fine if you just enable the CloudCDN property after the Ingress has been created by K8s, but I still fear that a future update to the Ingress Controller may disable the CloudCDN flag. It would hit my frontend servers pretty hard if the CDN were suddently gone. |
Yes this would be awesome! |
Yep, we just enabled this manually, but I too would hate to see that flag suddenly be removed by the ingress controller. |
We've just decided to move the Ingress outside of k8s because of this (and other things, such as health checks failing for services with multiple ports), but still, this is a vital part of the integration with GCP. |
Completely agree that the CDN config should be part k8s ingress. I think the same is applicable to other features like 'session-affinity'. |
@jeroenvisser101, for health checks of services with multiple ports, did you try to use the 'readinessProbe' config? Not too sure of your full requirements though |
I would also see this feature implemented as an annotation. Enabling CloudCDN after the initial provisioning works but I'd love to have it all in one place and managed by k8s. |
So, is there a way to enable Google CDN on whole nginx-ingress-controller? |
I too would like this feature; I filed a feature request with Google's issue tracker if folks would also like to star it there: https://issuetracker.google.com/issues/71536907 In the meantime this is the script I'm using to manually enable Cloud CDN on the desired service after ingress creation (I'm sure someone else could write a better one but this works for my use case): #!/bin/bash
# usage: enable-cloud-cdn.sh INGRESS-NAME SERVICE-NAME
set -e
BACKENDS=$(kubectl get ing "$1" -o json | jq -rc '.metadata.annotations."ingress.kubernetes.io/backends" | fromjson | keys | .[]')
for backend in $BACKENDS; do
SERVICE_NAME=$(gcloud compute backend-services describe --global --format=json "${backend}" | jq -r '.description | fromjson | ."kubernetes.io/service-name"')
if [[ "$SERVICE_NAME" == *"$2" ]]
then
echo "enabling Cloud CDN for backend $backend"
gcloud compute backend-services update --global "${backend}" --enable-cdn
fi
done |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
/remove-lifecycle stale |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
/remove-lifecycle stale |
@manjotpahwa1 Yes, we can close this. |
Thanks! does this work: |
Is it possible to make this work with the nginx ingress controller? |
@albertkang In order to use the CDN feature of GCP, you will need to use the ingress-gce controller. |
The GLBC Ingress Resource should provide a way to enable the Google CloudCDN property on managed L7 LBs.
The CloudCDN flag is a property of an backend that can be enabled using the gcloud command line tool afterwards but since it's not clear how the GLBC ingress interacts with that on service updates it's not really practical.
The text was updated successfully, but these errors were encountered: