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

Helm Chart Enterprise Gateway Fails to Start in SSD #12882

Open
bentonam opened this issue May 3, 2024 · 0 comments
Open

Helm Chart Enterprise Gateway Fails to Start in SSD #12882

bentonam opened this issue May 3, 2024 · 0 comments
Labels
area/helm type/bug Somehing is not working as expected

Comments

@bentonam
Copy link

bentonam commented May 3, 2024

Describe the bug
The enterprise gateway fails to start when using the chart default values in SSD mode.

The default value in the chart is:

enterpriseGateway:
  useDefaultProxyURLs: true

https://github.com/grafana/loki/blob/main/production/helm/loki/templates/gateway/deployment-gateway-enterprise.yaml#L72

            {{- if .Values.enterpriseGateway.useDefaultProxyURLs }}
            - -gateway.proxy.default.url=http://{{ template "loki.fullname" . }}-admin-api.{{ .Release.Namespace }}.svc:3100
            - -gateway.proxy.admin-api.url=http://{{ template "loki.fullname" . }}-admin-api.{{ .Release.Namespace }}.svc:3100
            - -gateway.proxy.distributor.url=dns:///{{ template "loki.fullname" . }}-distributor-headless.{{ .Release.Namespace }}.svc:9095
            - -gateway.proxy.ingester.url=http://{{ template "loki.fullname" . }}-ingester.{{ .Release.Namespace }}.svc:3100
            - -gateway.proxy.query-frontend.url=http://{{ template "loki.fullname" . }}-query-frontend.{{ .Release.Namespace }}.svc:3100
            - -gateway.proxy.ruler.url=http://{{ template "loki.fullname" . }}-ruler.{{ .Release.Namespace }}.svc:3100
            {{- end }}

The proxy urls are hard-coded, and they assume that the chart is being deployed in distributed mode. as the distributor service is only created if distributed mode is being deployed. https://github.com/grafana/loki/blob/main/production/helm/loki/templates/distributor/service-distributor-headless.yaml#L2

This should be conditionalized around SSD / Distributed. The only workaround for this is to disable the default proxy urls and set the extra to hard-coded values.

enterpriseGateway:
  useDefaultProxyURLs: false
  extraArgs:
    gateway.proxy.default.url: http://enterprise-logs-backend.logs.svc:3100
    gateway.proxy.admin-api.url: http://enterprise-logs-backend.logs.svc:3100
    gateway.proxy.distributor.url: dns:///enterprise-logs-write-headless.logs.svc:9095
    gateway.proxy.ingester.url: http://enterprise-logs-write.logs.svc:3100
    gateway.proxy.query-frontend.url: http://enterprise-logs-read.logs.svc:3100
    gateway.proxy.ruler.url: http://enterprise-logs-backend.logs.svc:3100

Expected behavior
The enterprise gateway should populate the correct urls depending on the mode SSD/Distributed.

Environment:

  • Infrastructure: Kubernetes
  • Deployment tool: helm
@JStickler JStickler added area/helm type/bug Somehing is not working as expected labels May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/helm type/bug Somehing is not working as expected
Projects
None yet
Development

No branches or pull requests

2 participants