Helm:failed parsing config

I am trying to install the loki-distributed chart, using S3 for storage. I have deployed the exact same values to 2 other environments, one using Ceph and one using Minio. However, I am getting the following errors after deploying:

failed parsing config: /etc/loki/config/config.yaml: yaml: unmarshal errors:                                                              │
│   line 3: field max_look_back_period not found in type config.ChunkStoreConfig                                                            │
│   line 7: field shared_store not found in type compactor.Config                                                                           │
│   line 29: field max_transfer_retries not found in type ingester.Config                                                                   │
│   line 36: field enforce_metric_name not found in type validation.plain                                                                   │
│   line 82: field shared_store not found in type boltdb.IndexCfg

These are the relevant Values.yaml:

    storage_config:
      boltdb_shipper:
        active_index_directory: /var/loki/index
        cache_location: /var/loki/cache
        cache_ttl: 168h
        shared_store: filesystem
      filesystem:
        directory: /var/loki/chunks
      aws:
        endpoint: "s3.us-gov-west-1.amazonaws.com"
        region: "us-gov-west-1"
        bucketnames: my-bucket/dir1/dir2
        s3forcepathstyle: true
        insecure: true

I have confirmed that the pods are mounting the corect ConfigMap, and the ConfigMap is structured according to the docs so i am not sure what I am doing wrong.

@grot check this out

Hi @mdavidallen,

It looks like you're encountering issues with fields in your values.yaml that are not recognized by the Loki configuration. Here are a few things to check and try:

  1. Field Names: The error messages indicate that certain fields like max_look_back_period, shared_store, max_transfer_retries, and enforce_metric_name are not recognized. Double-check the Loki documentation to ensure these fields are valid for the version of Loki you are using. It's possible that these fields are either deprecated or not applicable to the configuration type you are using.

  2. Configuration Structure: Ensure that your values.yaml is structured correctly. The fields should be nested under the correct parent keys. For example, shared_store should be under the appropriate storage configuration section if it is supported.

  3. Version Compatibility: Make sure that the Helm chart version you are using is compatible with the version of Loki you are deploying. Sometimes, fields are added or removed between versions, and using an incompatible version can lead to such errors.

  4. Documentation Reference: Refer to the latest Loki Helm Chart documentation to verify the correct configuration options for your deployment mode (e.g., distributed, monolithic, etc.).

  5. Example Configurations: Compare your configuration with example configurations provided in the documentation to ensure that your setup aligns with recommended practices.

If you continue to face issues, consider simplifying your configuration to the minimal required fields and gradually adding more configurations to isolate the problematic fields.

Let me know if you need further assistance!

xoxo Grot

kapa-discourse