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

ILM Policy variable conflicts with ILM Policies #84

Open
valencetech opened this issue Jul 2, 2021 · 3 comments
Open

ILM Policy variable conflicts with ILM Policies #84

valencetech opened this issue Jul 2, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@valencetech
Copy link

Describe the bug
When ILM is enabled, the fluentd pod goes into a crash loop because both ILM_POLICY and ILM_POLICIES are enabled even though the ILM_POLICIES is an empty map. Only one of the variables should actually be defined.

Version of Helm and Kubernetes:

Helm Version: 3.5.2

$ helm version
please put the output of it here

Kubernetes Version: 1.18.7

$ kubectl version
please put the output of it here

Which version of the chart: 11.13.0

What happened: Deployment fails due to Pod in crash loop. Two conflicting variables are defined instead of one.

What you expected to happen: I should be able to enable ILM and chose either to provide a policy definition or an existing policy name

How to reproduce it (as minimally and precisely as possible): Set ilm.enabled to true

<~--
This could be something like:

values.yaml (only put values which differ from the defaults)

key: value
helm install my-release {{ .GitHubOrg }}/name-of-chart --version version --values values.yaml

-->

Anything else we need to know:

@valencetech valencetech added the bug Something isn't working label Jul 2, 2021
@monotek
Copy link
Member

monotek commented Jul 18, 2021

Would you mind to create an PR with a fix?

@Truper4
Copy link

Truper4 commented Sep 29, 2021

I am also having troubles with ILM enabled policy fluentd-elastisearch tag: 3.2.0 image and version: 11.7.2 of helm chart.
Configuration like this doesnt work:

logstash:
    enabled: true
    prefix: "logstash"
    prefixSeparator: "-"
    dateformat: "%Y.%m.%d"
  ilm:
    enabled: false
    policy_id: logstash-policy-by-fluentd
    policy:
      phases:
        hot:
          min_age: 0ms
          actions:
            rollover:
              max_age: 30d
              max_size: 100gb
            set_priority:
                priority: 100
        delete:
          min_age: 60d
          actions:
            delete:
    policies: {}
      # example for ilm policies config
      # ilm_policy_id1: {}
      # ilm_policy_id2: {}
    policy_overwrite: false
  template:
    enabled: false
    overwrite: false
    name: fluentd-template
    file: fluentd-template.json
    content: |-
      {
        "index_patterns": [
            "logstash-*"
        ],
        "settings": {
            "index": {
                "number_of_replicas": "1"
            }
        }
      }

  path: "/"

Error what I am getting after enabling ILM:
[error]: config error file="/etc/fluent/fluent.conf" error_class=Fluent::ConfigError error="xpack endpoint does not work"

I have checked if the xpack is installed and after i search for gem of xpack i can see it in the fluentd-elasticsearch container.

Also when I check if elasticsearch has working xpack all seems good.

@CoverID
Copy link

CoverID commented Mar 14, 2022

We can enable ILM with template like this

template:
    enabled: true
    overwrite: true
    useLegacy: true
    name: fluentd-template
    file: fluentd-template.json
    content: |-
      {
        "index_patterns": [
            "logstash-*"
        ],
        "settings": {
            "index": {
                "number_of_replicas": "1",
                "lifecycle": {
                  "name": "7-days-default",
                  "rollover_alias": "logstash-history"
                }
            }
        }
      }

*Note: you need to edit your Policy and disable Rollover at Hot phase, why? by default fluentd index pattern start with logstash-%Y.%m.%d and rollover_alias cannot use pattern like that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

4 participants