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

fix(operator): Add validation on empty per-tenant limits config #12199

Closed
wants to merge 29 commits into from

Conversation

btaani
Copy link
Contributor

@btaani btaani commented Mar 13, 2024

What this PR does / why we need it:
Prior to this PR, the following Lokistack spec used to be valid:

spec:
  limits:
    tenants:
      invalid: {} 

However, having an empty per-tenant limits config generates an empty map into the loki config, which may cause some problems in some components.

The goal of this PR is to validate the per-tenant limits config to check on empty configurations, which reflects on the status of the Lokistack as a degraded condition.

Which issue(s) this PR fixes:
Fixes LOG-5050

Special notes for your reviewer:

Checklist

  • Reviewed the CONTRIBUTING.md guide (required)
  • Documentation added
  • Tests updated
  • CHANGELOG.md updated
    • If the change is worth mentioning in the release notes, add add-to-release-notes label
  • Changes that require user attention or interaction to upgrade are documented in docs/sources/setup/upgrade/_index.md
  • For Helm chart changes bump the Helm chart version in production/helm/loki/Chart.yaml and update production/helm/loki/CHANGELOG.md and production/helm/loki/README.md. Example PR
  • If the change is deprecating or removing a configuration option, update the deprecated-config.yaml and deleted-config.yaml files respectively in the tools/deprecated-config-checker directory. Example PR

@pull-request-size pull-request-size bot added size/L and removed size/M labels Mar 13, 2024
btaani and others added 2 commits March 14, 2024 18:39
Co-authored-by: Joao Marcal <joao.marcal12@gmail.com>
Co-authored-by: Joao Marcal <joao.marcal12@gmail.com>
@pull-request-size pull-request-size bot added size/M and removed size/L labels Mar 14, 2024
@pull-request-size pull-request-size bot added size/L and removed size/M labels Mar 27, 2024
operator/internal/manifests/options.go Outdated Show resolved Hide resolved
operator/internal/manifests/options.go Outdated Show resolved Hide resolved
operator/internal/manifests/options.go Outdated Show resolved Hide resolved
btaani and others added 4 commits April 2, 2024 12:13
Co-authored-by: Joao Marcal <joao.marcal12@gmail.com>
Co-authored-by: Joao Marcal <joao.marcal12@gmail.com>
Co-authored-by: Joao Marcal <joao.marcal12@gmail.com>
Copy link
Contributor

@JoaoBraveCoding JoaoBraveCoding left a comment

Choose a reason for hiding this comment

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

apart from the linting error lgtm

Copy link
Contributor

@JoaoBraveCoding JoaoBraveCoding left a comment

Choose a reason for hiding this comment

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

lgtm

@btaani
Copy link
Contributor Author

btaani commented Apr 9, 2024

Closing this one since we do not need it anymore. A warning is already generated for empty limits config in Loki: 0f2f42d

@btaani btaani closed this Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants