Waseem Hassan (waseem-h) has left the organization. Remove him from the
reloader chart OWNERS (approvers and reviewers) and from the Helm chart
maintainers list as part of offboarding.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The alert send functions (Slack/Teams/GChat/raw) return `[]error`, but
`SendWebhookAlert` discarded them, so a failing webhook — e.g. a Teams
alert returning a non-2xx status — produced no output at all, even at
trace level (#949).
Capture the returned errors and log each with `logrus.Errorf`, as
suggested by the maintainer on the issue. Adds a regression test that
drives a failing (500) webhook and asserts the error is logged.
Closes#949
Assisted-by: Claude Code (Anthropic, Opus 4.x)
The CSI e2e tests wait for the SPCPS version change before calling
WaitReloaded/WaitEnvVar, but Reloader reacts to that same SPCPS update.
When Reloader won the race, WaitReloaded captured the already-reloaded
annotation as its baseline and then timed out waiting for a further
change (seen in CI: "Init container with CSI volume should reload...").
Add WaitReloadedFrom/WaitEnvVarFrom adapter variants that take a
caller-supplied baseline, and have the CSI tests capture that baseline
before updating the Vault secret. Negative tests also benefit: an
erroneous reload that lands during the CSI sync wait is now detected
instead of silently absorbed into the baseline.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
When KUBERNETES_NAMESPACE is unset, startReloader logged
"will detect changes in all namespaces." unconditionally, even when
--namespaces-to-ignore was set, which is misleading.
Extract the scope message into namespaceWatchScopeMessage(), move the log
after ignoredNamespacesList is resolved, and include the excluded
namespaces in the message when filtering is active.
Closes#1131
Assisted-by: Claude Code (Anthropic, Opus 4.x)
Add a third RBAC posture between watch-globally (ClusterRole) and single
namespace: give Reloader an explicit list of namespaces to watch. The chart
creates a namespace-scoped Role + RoleBinding in each listed namespace (no
ClusterRole), and one install covers them all.
Go:
- new --namespaces flag / options.Namespaces
- resolveWatchNamespaces() picks list -> KUBERNETES_NAMESPACE -> all
- controller creation loops over the watched namespaces
- namespaces-to-ignore is now only honored in global mode (watchGlobally=true);
in single-namespace and scoped modes the watched set is already explicit
Helm:
- new reloader.namespaces value (active when watchGlobally=false); accepts either
a YAML list or a comma-separated string for consistency with the sibling
namespace options
- reloader-watchNamespaces helper (release ns always auto-included, deduped)
- shared reloader-namespaced-rules template reused per namespace
- role.yaml/rolebinding.yaml range over the list; deployment passes --namespaces
- --namespaces-to-ignore only rendered when watchGlobally=true
- fail guard for watchGlobally=true + namespaces set
Tests: unit test for resolveWatchNamespaces; scoped-namespaces e2e case.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Use strings.ToLower so any casing (configMaps, ConfigMaps, sEcrets)
normalizes to the canonical lowercase ResourceMap key, and simplify the
flag help text. Addresses PR review feedback.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Allow users to customise the annotation key used to mark ConfigMaps and
Secrets as ignored by Reloader, consistent with how every other annotation
key is already overridable via a dedicated CLI flag.
Changes:
- internal/pkg/util/util.go: register --ignore-annotation persistent flag
backed by options.IgnoreResourceAnnotation
- deployments/kubernetes/chart/reloader/templates/deployment.yaml: pass
--ignore-annotation when custom_annotations.ignore is set in Helm values
- deployments/kubernetes/chart/reloader/values.yaml: document the new
custom_annotations.ignore key in the example comment
- README.md: add --ignore-annotation to the Annotation Key Overrides table
and mention the flag alongside the Resource-Level Ignore Annotation section
Co-authored-by: Cursor <cursoragent@cursor.com>
PR #1061 renamed the configmap key in kube.ResourceMap from "configMaps"
(camelCase) to "configmaps" (lowercase) to fix controllers not being
able to mark themselves as initialized. However, two callers were not
updated to match the new canonical key:
1. The Helm chart's deployment template still emits
`--resources-to-ignore=configMaps` (camelCase) when
`reloader.ignoreConfigMaps: true` is set.
2. The validation in `GetIgnoredResourcesList` only accepts the legacy
camelCase spelling.
Because `ignoredResourcesList.Contains(k)` uses case-sensitive string
equality, the lookup against the new lowercase ResourceMap key never
matches. The configmaps controller is created and starts watching
ConfigMaps cluster-wide, even though the chart's ClusterRole template
(also gated on `ignoreConfigMaps`) does not grant permission for it.
The resulting pod logs are full of:
configmaps is forbidden: User "system:serviceaccount:reloader:reloader-reloader"
cannot list resource "configmaps" in API group "" at the cluster scope
This change:
- Updates the chart deployment template to emit the canonical lowercase
`configmaps` value.
- Normalizes the input in `GetIgnoredResourcesList`, accepting both
`configMaps` (legacy, for backward compatibility with users who pass
the flag directly) and `configmaps` (canonical), and emitting the
canonical form to the caller.
- Updates the flag help text and adds tests covering both spellings.