Skip to content

chore: cleanup values and templates after v11 upgrade#498

Merged
QuentinBisson merged 11 commits intomainfrom
chore/cleanup-v11-values-and-templates
Apr 9, 2026
Merged

chore: cleanup values and templates after v11 upgrade#498
QuentinBisson merged 11 commits intomainfrom
chore/cleanup-v11-values-and-templates

Conversation

@QuentinBisson
Copy link
Copy Markdown
Contributor

Summary

  • Delete custom ScaledObject wrapper templates (backend, gateway, read, write) — upstream v11 now ships native so.yaml for all four components; keeping both would render duplicate ScaledObjects
  • Remove kedaAutoscaling value blocks that were only consumed by the deleted templates
  • Remove selfMonitoring dead code (removed from upstream before v11)
  • Remove loki/gateway pod/container security context overrides — identical to upstream v11 defaults (upstream additionally gains fsGroupChangePolicy: OnRootMismatch)
  • Remove values that are upstream defaults: chunksCache.enabled, resultsCache.enabled, monitoring.dashboards.enabled, monitoring.rules.enabled, serviceAccount.* (except name), lokiCanary.updateStrategy
  • Remove monitoring.alerts.enabled — dead code, upstream v11 controls alerts via monitoring.rules.alerting
  • Rename sample_configs/examples/
  • Update schema and README accordingly

Template diff (before / after)

The rendered helm template output is identical before and after — all removed values were either matching upstream defaults or dead code with no templates consuming them.

$ diff <(helm template loki . -f values.yaml @ main) \
       <(helm template loki . -f values.yaml @ this branch)
(empty)

- Delete custom ScaledObject wrapper templates (backend, gateway, read, write):
  upstream v11 now ships native so.yaml for all four components; keeping both
  would render duplicate ScaledObjects in the cluster
- Remove kedaAutoscaling value blocks (gateway, backend, read, write): consumed
  only by the deleted wrapper templates
- Remove selfMonitoring block: dead code, removed from upstream prior to v11
- Remove loki.loki.{pod,container}SecurityContext overrides: identical to
  upstream v11 defaults; upstream additionally sets fsGroupChangePolicy which
  our override was suppressing
- Remove loki.gateway.{pod,container}SecurityContext overrides: identical to
  upstream v11 defaults

Kept intentional differences:
- loki.sidecar.securityContext: adds seccompProfile absent in upstream
- gateway.metrics.enabled: false: access-log-exporter image not in gsoci mirror
- gateway.route.*: GiantSwarm-specific HTTPRoute wrapper (no upstream equivalent)
- Remove stale schema entries: kedaAutoscaling (gateway, read),
  selfMonitoring, and security context overrides now matching upstream
- Remove selfMonitoring from example values files
- Rename sample_configs/ to examples/
- Update README links accordinglyMSGEOF
git commit -F /tmp/commit_msg.txt
- chunksCache.enabled, resultsCache.enabled: upstream defaults to true
- monitoring.dashboards.enabled, monitoring.rules.enabled: upstream defaults to false
- monitoring.alerts.enabled: dead code, upstream v11 controls alerts via
  monitoring.rules.alerting, no template reads this value
- serviceAccount.create/imagePullSecrets/annotations/labels/automountServiceAccountToken:
  all upstream defaults; keep only name: loki which differs
- lokiCanary.updateStrategy: identical to upstream default
@QuentinBisson QuentinBisson requested a review from a team as a code owner April 9, 2026 14:52
Strip all values that are identical to the wrapper or upstream defaults,
leaving only intentional overrides in each example file.
- Remove loki.lokiCanary.image.registry — global.image.registry already
  takes priority in the loki.image helper (coalesce precedence)
- Remove loki.serviceAccount.name: loki — loki.fullname resolves to "loki"
  when Release.Name contains "loki", which is always the case for
  GiantSwarm managed apps
@QuentinBisson QuentinBisson self-assigned this Apr 9, 2026
Copy link
Copy Markdown
Contributor

@hervenicol hervenicol left a comment

Choose a reason for hiding this comment

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

Works for me if it works for you.
I see you're still pushing lots of changes, so I assume you're in the process of testing it.

Inside {{- with $route.hostnames }}, . is scoped to the list, so passing
. as the tpl context caused "wrong type for value; expected chartutil.Values"
when hostnames was non-empty. Use $ (the root context) instead.
Removing this caused the SA name to become release-name-loki when the
Helm release name differs from "loki". Pinning it ensures a stable name
regardless of release name, which is required for IRSA/workload identity
annotations referencing the SA by name.
@QuentinBisson
Copy link
Copy Markdown
Contributor Author

I'm mostly diffing and fixing small nitpicks :D

@QuentinBisson
Copy link
Copy Markdown
Contributor Author

Running on graveler

@QuentinBisson QuentinBisson merged commit fc2cba3 into main Apr 9, 2026
7 checks passed
@QuentinBisson QuentinBisson deleted the chore/cleanup-v11-values-and-templates branch April 9, 2026 15:42
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.

2 participants