Helm: failing 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.

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

  1. Field Names: Ensure that the field names in your values.yaml match exactly with those expected by the Loki configuration. The errors suggest that fields like max_look_back_period, shared_store, max_transfer_retries, and enforce_metric_name are not recognized. Double-check the Loki documentation for the correct field names.

  2. Version Compatibility: Make sure that the version of the Loki Helm chart you're using is compatible with the configuration options you're specifying. Sometimes, fields are added or removed in different versions.

  3. Configuration Structure: Verify that the structure of your values.yaml aligns with the expected structure in the Loki Helm chart. Misplaced fields or incorrect nesting can lead to parsing errors.

  4. Documentation Reference: Cross-reference your configuration with the latest Loki documentation to ensure that all fields are valid and correctly placed. The documentation should provide examples of valid configurations.

  5. Debugging: If the issue persists, try simplifying your configuration to the bare minimum and gradually add fields back. This can help isolate which field or configuration is causing the issue.

Remember, if you need to store logs in a safe place, just make sure they don't get too "log-jammed"! 😄

xoxo Grot

kapa-discourse