Skip to content

Installing loki fails because of ingress value seemingly incorrect #135

@applike-ss

Description

@applike-ss

I have tried to let teks create loki via the the terraform-kubernetes-addons repo.

However i do get this error:

╷
│ Error: failed to create resource: Ingress.extensions "loki" is invalid: spec.rules[0].host: Invalid value: "map[host:logz.my.domain.tld paths:[/]]": a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')
│ 
│   with helm_release.loki-stack[0],
│   on loki-stack.tf line 136, in resource "helm_release" "loki-stack":
│  136: resource "helm_release" "loki-stack" {
│ 
╵

The hostname can properly be matched against the given regex, so i don't see why it should fail.
What i noticed however was that it seemed to render a go object as the hostname (which doesn't make sense to me when looking at the manifests that are templated).
Or do i interpret this incorrectly?
I am a little confused anyway about this, as when i am rendering the loki-stack chart in the given version (2.8.2) with the values given it would not create an ingress resource.
That is due to the helm chart loki-stack having the loki helm chart as a dependency and thus expecting its configuration in loki.*.
When i do change that in the extra_values it doesn't create an ingress resource at all though, so it seems that terraforms helm vs. my local one (v3.10.0) is behaving differently?

I only removed the annotations, from the terragrunt.hcl for the loki stack, as i don't want to use the nginx ingress class.
So my extra_values look like this:

    extra_values         = <<-VALUES
      resources:
        requests:
          cpu: 1
          memory: 2Gi
        limits:
          cpu: 2
          memory: 4Gi
      config:
        limits_config:
          ingestion_rate_mb: 320
          ingestion_burst_size_mb: 512
          max_streams_per_user: 100000
        chunk_store_config:
          max_look_back_period: 2160h
        table_manager:
          retention_deletes_enabled: true
          retention_period: 2160h
      ingress:
        enabled: true
        hosts:
          - host: logz.${include.root.locals.merged.default_domain_name}
            paths: ["/"]
        tls:
          - secretName: logz.${include.root.locals.merged.default_domain_name}
            hosts:
              - logz.${include.root.locals.merged.default_domain_name}
        VALUES

I'd be really glad for some hints on where to look at.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions