Skip to content
This repository has been archived by the owner on Apr 17, 2019. It is now read-only.

Ingress GLBC: Please provide a way to enable Cloud CDN #1680

Closed
dominikschulz opened this issue Sep 2, 2016 · 20 comments
Closed

Ingress GLBC: Please provide a way to enable Cloud CDN #1680

dominikschulz opened this issue Sep 2, 2016 · 20 comments
Labels
lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.

Comments

@dominikschulz
Copy link

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.

@jeroenvisser101
Copy link

Completely agree, we need this too, this could totally be a annotation of some sort.

@dominikschulz
Copy link
Author

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.

@bes
Copy link

bes commented Dec 30, 2016

Yes this would be awesome!

@JeanMertz
Copy link

Yep, we just enabled this manually, but I too would hate to see that flag suddenly be removed by the ingress controller.

@jeroenvisser101
Copy link

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.

@sriprasannafs
Copy link

Completely agree that the CDN config should be part k8s ingress. I think the same is applicable to other features like 'session-affinity'.

@sriprasannafs
Copy link

@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

@jeroenvisser101
Copy link

@marccardinal
Copy link

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.

@bartoszhernas
Copy link

So, is there a way to enable Google CDN on whole nginx-ingress-controller?

@abevoelker
Copy link

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

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Apr 3, 2018
@abevoelker
Copy link

/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Apr 3, 2018
@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jul 2, 2018
@shinzui
Copy link

shinzui commented Jul 9, 2018

/remove-lifecycle stale

@manjotpahwa
Copy link

@rramkumar1
Copy link

@manjotpahwa1 Yes, we can close this.

@jeroenvisser101
Copy link

Thanks!

does this work:
/close

@albertkang
Copy link

Is it possible to make this work with the nginx ingress controller?

@rramkumar1
Copy link

@albertkang In order to use the CDN feature of GCP, you will need to use the ingress-gce controller.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.
Projects
None yet
Development

No branches or pull requests