Skip to content

Conversation

@meinenec
Copy link
Contributor

What this PR does / why we need it:

Ingester statefulsets do not support any sort of custom labels. Services like rollout-operator require a label to allow the service to be notified when it will be scaled down. This PR adds an option for users to specify any labels they may require with no impact to users who do not require them.

Which issue(s) this PR fixes:

none which I could find

Special notes for your reviewer:

None, thank you!

Checklist

  • Reviewed the CONTRIBUTING.md guide (required)
  • Documentation added
  • Tests updated
  • Title matches the required conventional commits format, see here
    • Note that Promtail is considered to be feature complete, and future development for logs collection will be in Grafana Alloy. As such, feat PRs are unlikely to be accepted unless a case can be made for the feature actually being a bug fix to existing behavior.
  • Changes that require user attention or interaction to upgrade are documented in docs/sources/setup/upgrade/_index.md
  • 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

@meinenec meinenec requested a review from a team as a code owner July 22, 2025 23:06
@meinenec meinenec force-pushed the main branch 2 times, most recently from 7b56c6e to 854427d Compare July 23, 2025 14:06
Copy link
Contributor

@jkroepke jkroepke left a comment

Choose a reason for hiding this comment

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

Hi, thanks for your PR. Please use lowercase feat as PR title prefix.

Also take note, that ingest may have rollout-group: {{ include "loki.prefixRolloutGroup" . }}ingester label that feel ready for the rollout operatior.

Please add the new value to the values.yaml as mention below.

app.kubernetes.io/part-of: memberlist
name: {{ include "loki.prefixIngesterName" . }}ingester-zone-a
rollout-group: {{ include "loki.prefixRolloutGroup" . }}ingester
{{- with .Values.ingester.labels }}
Copy link
Contributor

Choose a reason for hiding this comment

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

Please add labels: {} to the values.yaml and run make helm-docs

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Apologies and added! Thanks for looking

@JStickler JStickler changed the title Feat(helm): allow setting labels for ingesters feat(helm): allow setting labels for ingesters Jul 23, 2025
@meinenec meinenec force-pushed the main branch 2 times, most recently from 7051581 to deb963e Compare July 23, 2025 20:58
- [BUGFIX] Move loki-sc-rules container from first location in `containers` to second to avoid it being selected as the default for `kubectl logs` or `kubectl exec`. [#17937](https://github.com/grafana/loki/pull/17937)

- [BUGFIX] Move loki-sc-rules container from first location in `containers` to second to avoid it being selected as the default for `kubectl logs` or `kubectl exec`
- [FEATURE] Allow setting custom labels for ingester statefulsets [#18536](https://github.com/grafana/loki/pull/18536)
Copy link
Contributor

Choose a reason for hiding this comment

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

Hi, it seems you have doublicate the lines here, which seems not correct. ensure that your changes are on top, over the lastest release.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

Copy link
Contributor

@jkroepke jkroepke left a comment

Choose a reason for hiding this comment

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

LGTM

- [BUGFIX] Add release namespace metadata to HorizontalPodAutoscaling that lack it. [#18453](https://github.com/grafana/loki/pull/18453)
- [BUGFIX] Move loki-sc-rules container from first location in `containers` to second to avoid it being selected as the default for `kubectl logs` or `kubectl exec`. [#17937](https://github.com/grafana/loki/pull/17937)
- [FEATURE] Added support for chunk-cache-l2 [#17556](https://github.com/grafana/loki/pull/17556)
- [ENHANCEMENT] Add FOLDER_ANNOTATATION logic for sidecar container. [#13289](https://github.com/grafana/loki/pull/13289)
Copy link
Contributor

Choose a reason for hiding this comment

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

this is fine, (dup of line 20)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I seem to have caused some hiccups rebasing my fork. Let me know and I can revert this - otherwise I'll leave as-is to keep the review moving.

@Jayclifford345 Jayclifford345 enabled auto-merge (squash) July 29, 2025 09:41
@Jayclifford345 Jayclifford345 merged commit ab426be into grafana:main Jul 29, 2025
75 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants