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

Update loki-stack and set health_check_targets: false. #386

Merged
merged 1 commit into from
Dec 22, 2023

Conversation

reitermarkus
Copy link
Contributor

Description

Motivation and Context

Fixes openebs/mayastor#1560.

Regression

No.

How Has This Been Tested?

Running with current helm chart and this configuration:

loki-stack:
  promtail:
    config:
      # TODO: Remove once Mayastor chart is updated.
      file: |
        server:
          log_level: {{ .Values.config.logLevel }}
          http_listen_port: {{ .Values.config.serverPort }}
          {{- tpl .Values.config.snippets.extraServerConfigs . | nindent 2 }}

        clients:
          - url: {{ tpl .Values.config.lokiAddress . }}
          {{- with .Values.config.snippets.extraClientConfigs }}
          {{- toYaml . | nindent 2 }}
          {{- end }}

        positions:
          filename: /run/promtail/positions.yaml

        scrape_configs:
          {{- tpl .Values.config.snippets.scrapeConfigs . | nindent 2 }}
          {{- tpl .Values.config.snippets.extraScrapeConfigs . | nindent 2 }}

      snippets:
        extraServerConfigs: |-
          health_check_target: false

The {{- tpl .Values.config.snippets.extraServerConfigs . | nindent 2 }} part is included by default in newer versions of the loki-stack chart.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added unit tests to cover my changes.

Copy link
Member

@Abhinandan-Purkait Abhinandan-Purkait left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@reitermarkus You need to remove the . from your commit message for the commit lint.

@tiagolobocastro
Copy link
Contributor

@reitermarkus You need to remove the . from your commit message for the commit lint.

Also lowercase update

@tiagolobocastro
Copy link
Contributor

@reitermarkus, also please regenerate the docs:

./scripts/helm/generate-readme.sh

We need to add this to GHA too I guess, I'll fix this on another PR.

bors-openebs-mayastor bot pushed a commit that referenced this pull request Dec 11, 2023
387: Cherry-pick #386 r=tiagolobocastro a=tiagolobocastro

Cherry-pick PR386

## Description
Fixes issue where promtail is never ready when no related Mayastor pod is running on a given node.

## Motivation and Context
<!

Co-authored-by: Markus Reiter <me@reitermark.us>
@reitermarkus
Copy link
Contributor Author

Given #387 is merged, should I still update this PR?

@tiagolobocastro
Copy link
Contributor

Given #387 is merged, should I still update this PR?

Yes please, 387 was merged to the release branch, this is targetting develop

Signed-off-by: Markus Reiter <me@reitermark.us>
@tiagolobocastro
Copy link
Contributor

@niladrih PTAL and sequence merge whichever way you think is better for the upgrade changes

@niladrih
Copy link
Member

bors merge

@bors-openebs-mayastor
Copy link
Contributor

Build succeeded:

@bors-openebs-mayastor bors-openebs-mayastor bot merged commit 2a93380 into openebs:develop Dec 22, 2023
5 checks passed
bors-openebs-mayastor bot pushed a commit that referenced this pull request Jan 9, 2024
396: feat(upgrade-job): add support for loki-stack helm chart upgrade r=niladrih a=niladrih

Requires #386.

Overview:
- adds new yq commands to delete objects, append to objects, and append to arrays.
- adds special upgrade values.yaml update for loki-stack changes from #386. Introduces migrations and set_literal_value updates to alter the existing yaml till it resembles the new one.
- replaces all `&Path` is the `helm::yaml::yq` module with `AsRef<Path>`.

Changes:
- removes .loki-stack.loki.config.ingester.lifecycler.ring.kvstore as it
does not exist in loki-stack v2.9.11
- adds set value for the grafana/loki container image tag
- removes .loki-stack.promtail.config.snippets.extraClientConfigs as it
does not exist in loki-stack v2.9.11
- removes .loki-stack.promtail.initContainer as it does not exist in loki-stack
v2.9.11
- migrates .loki-stack.promtail.config.lokiAddress to .loki-stack.promtail.config.clients
- adds yq command_output helper function
- add set value for .loki-stack.promtail.readinessProbe.httpGet.path
- migrate .loki-stack.promtail.config.snippets.extraClientConfigs to
.loki-stack.promtail.config.clients

Co-authored-by: Niladri Halder <niladri.halder26@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

promtail is never ready when no related Mayastor pod is running on a given node.
4 participants