Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BackendConfig timeoutSec doesn't seem to work with GCE Ingress #598

Closed
ConradIrwin opened this issue Jan 8, 2019 · 8 comments
Closed

BackendConfig timeoutSec doesn't seem to work with GCE Ingress #598

ConradIrwin opened this issue Jan 8, 2019 · 8 comments

Comments

@ConradIrwin
Copy link

I created a backendconfig object like this:

  apiVersion: cloud.google.com/v1beta1
  kind: BackendConfig
  metadata:
    name: mediaproxy-backend-config
  spec:
    timeoutSec: 120
    cdn:
      enabled: true
      cachePolicy:
        includeHost: true
        includeProtocol: true
        includeQueryString: true

and attached it to the service like this:

apiVersion: v1
kind: Service
metadata:
  name: mediaproxy
  labels:
    name: mediaproxy
  annotations:
    beta.cloud.google.com/backend-config: '{"ports": {"8080":"mediaproxy-backend-config"}}'
spec:
  type: NodePort
  ports:
    - port: 8080
  selector:
    name: mediaproxy

and created an ingress like this:

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: mediaproxy
  labels:
    name: mediaproxy
  annotations:
    kubernetes.io/tls-acme: "true"
spec:
  tls:
    - secretName: ingress-mediaproxy-lego
      hosts:
      - {{ .Domains.Mediaproxy }}
  backend:
    serviceName: mediaproxy
    servicePort: 8080

The load balancer created in my google cloud project correctly had the CDN enabled, but the timeout was still displayed as 30 seconds in the Google Cloud Console. I have since edited the timeout using the Google Cloud Console and it seems to stick with the value of 120 that I set manually.

@MrHohn
Copy link
Member

MrHohn commented Jan 8, 2019

@ConradIrwin Are you running a GKE cluster with version at or above 1.11.3-gke.18?

cc @rramkumar1

@ConradIrwin
Copy link
Author

I'm running the default for Google Cloud, which seems to currently be v1.10.9-gke.5

@MrHohn
Copy link
Member

MrHohn commented Jan 8, 2019

As per https://cloud.google.com/kubernetes-engine/docs/how-to/configure-backend-service, you will need to upgrade GKE master version to >= 1.11.3-gke.18 to be able to configure timeoutSec via BackendConfig.

@ConradIrwin
Copy link
Author

Ah, thank you, and sorry for the confusion.

@ernani
Copy link

ernani commented Sep 5, 2022

For some reason this is not working as of GKE 1.21 either.

@sandrotanner
Copy link

sandrotanner commented Sep 8, 2022

I am running GKE 1.24 and I too cannot get it to apply for some reason. I even deleted the ingress and created it again with no luck.
Are @ernani ernani and I doing something wrong or is it not working anymore?

Here is what I am doing:

Backendconfig:

apiVersion: cloud.google.com/v1
kind: BackendConfig
metadata:
  name: backendconfig-websocket-timeout
spec:
  timeoutSec: 7200

ingress:

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: REDACTED
  annotations:
    [...]
    cloud.google.com/backend-config: '{"default": "backendconfig-websocket-timeout"}'
    kubernetes.io/ingress.class: "gce"
   [...]

@sandrotanner
Copy link

I made an error, now it works. see #1803

@ernani
Copy link

ernani commented Sep 9, 2022

Just out of nowhere it started working too here, but, it takes some minutes to reflect the changes, which is an acceptable thing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants