Commit Graph
36 Commits
Author SHA1 Message Date
Muhammad Safwan KarimandGitHub 2cbb7715de Merge pull request #1141 from stakater/takeover-e2e-tests
Takeover e2e tests
2026-06-15 12:02:55 +05:00
yvjessestephensandGitHub f12425e96f Merge branch 'stakater:master' into fix/configmaps-resources-to-ignore-mismatch 2026-06-12 08:30:59 -05:00
Jesse StephensandClaude Opus 4.8 8f94e3051e refactor: case-insensitive normalization for resources-to-ignore
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>
2026-06-12 08:29:56 -05:00
faizanahmad055 6556d4dac5 Remove unused methods
Signed-off-by: faizanahmad055 <faizan.ahmad55@outlook.com>
2026-06-12 12:43:43 +02:00
Smyslov MaximandCursor b2b40da4cf feat: add --ignore-annotation flag to override reloader.stakater.com/ignore
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>
2026-05-21 11:13:31 +03:00
Jesse Stephens d527ae8d5a fix: align resources-to-ignore=configMaps with renamed ResourceMap key
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.
2026-05-20 14:19:13 -05:00
faizanahmad055 68fb1d9211 Make GINKGO_PROCS 1
Signed-off-by: faizanahmad055 <faizan.ahmad55@outlook.com>
2026-05-12 13:17:56 +02:00
faizanahmad055 b5c8705395 Refactor code
Signed-off-by: faizanahmad055 <faizan.ahmad55@outlook.com>
2026-05-11 16:18:53 +02:00
TheiLLeniumStudios f0e6d3af58 feat: A lot of refactoring and CSI test cases 2026-01-10 13:42:10 +01:00
faizanahmad055 e1db875efe Fix failing tests
Signed-off-by: faizanahmad055 <faizan.ahmad55@outlook.com>
2026-01-06 22:20:20 +01:00
faizanahmad055 c9cab4f6e0 Update chart for CSI driver
Signed-off-by: faizanahmad055 <faizan.ahmad55@outlook.com>
2026-01-03 19:32:43 +01:00
Safwan cdaed4a8af Merge branch 'master' into add-csi-support 2025-11-25 01:27:08 +05:00
Pradeep Lakshmi NarasimhaandFelix dd0807e951 fix: Controller not respecting ignore* flags 2025-08-29 12:24:02 +02:00
Muhammad Safwan KarimandGitHub 177d2756a8 Moved some functions to common package (#988)
* separate methods

* basic refactoring

* moved common code to util package to use it in gateway

* common check for argo rollouts

* made code compilable with latest changes on master

* Moved options to separate package and created CommandLineOptions instance that will be in sync with options values.

* reverted extra changes

* initialize CommandLineOptions with default options in module init

* wait for paused at annotation before checking deployment paused

* moved things around to fix things

* reverted unnecessary changes

* reverted rolling_upgrade changes

* reverted extra change

* additional checks in reloader

* refactor: ShouldReloadInternal method. It will be called by Reloader
ShouldReload has some additional resource/namespace filter checks which are not needed for Reloader

* added test cases

* moved config to sharable packae

* moved resource selector and label selctor methods

* fixed pipeline

* removed map.yaml

* removed vague comment
2025-08-15 15:51:47 +05:00
Muhammad Safwan KarimandGitHub 1e46d44c7c Added pprof flag (#980)
* added pprof flag

* updated chart

* fixed linting and spelling
2025-07-29 15:49:30 +05:00
Muhammad Safwan KarimandGitHub 49409dce54 Extracted some functions to public package to reuse them in gateway (#966)
* separate methods

* basic refactoring

* moved common code to util package to use it in gateway

* common check for argo rollouts

* made code compilable with latest changes on master

* Moved options to separate package and created CommandLineOptions instance that will be in sync with options values.

* reverted extra changes

* initialize CommandLineOptions with default options in module init

* wait for paused at annotation before checking deployment paused

* moved things around to fix things

* reverted unnecessary changes

* reverted rolling_upgrade changes

* reverted extra change
2025-07-29 11:50:02 +05:00
Safwan dcf4b0d0f6 merged deployment pause related changes 2025-07-21 15:14:30 +05:00
Safwan 1e1f094516 resolved comments and stuff 2025-07-18 19:27:26 +05:00
Safwan f69773c588 refactoring 2025-07-15 20:08:23 +05:00
Safwan 8b257a3f0c publish configmap with meta info 2025-07-15 19:16:26 +05:00
Zanis 3c39406ca9 Added capability to use OnChangeAnnotation and TypeAutoAnnotation 2025-02-05 21:51:11 +00:00
Zanis f6887b4d8a Added support for CSI secret provider
Signed-off-by: Zanis <22601571+ZanisO@users.noreply.github.com>
2025-02-05 21:51:10 +00:00
Piotr Andrzejewski bccefb1624 [#582] Allow to use auto annotation with specific resource type (configmap or secret) 2024-01-19 14:38:36 +01:00
Avi Huly 21502e2bb4 Added namespace selector functionality
Changes:
	modified:   internal/pkg/cmd/reloader.go
	modified:   internal/pkg/controller/controller.go
	modified:   internal/pkg/util/util.go
2022-11-12 23:00:56 +02:00
aenima4six2 dfe7e9b3ca 176 - Add reload strategies to support pod annotation templates 2021-10-17 19:09:50 -04:00
Clive Jevons 6a008999f5 Include data from ConfigMap.BinaryData when calculating SHA 2020-08-06 13:37:50 +02:00
Vlad Losev 17f8b81110 Simplifies annotations for searching secrets for reload. 2020-06-09 19:16:03 -07:00
Vlad Losev fda733ea5a Adds support for auto-reloading secrets and configmaps by annotation. 2020-06-09 19:14:14 -07:00
hstanley 361bea4373 move List to util.go 2019-07-03 10:32:33 +01:00
Joey Espinosa 75b00733bf feat: parameterize all annotations 2019-02-04 12:33:53 -05:00
faizanahmad055 75f67ffa6e Add support for envFrom for autoUpdate
Signed-off-by: faizanahmad055 <faizanahmad@217-212-164-26.customer.telia.com>
2019-01-31 16:03:53 +01:00
Faizan AhmadandRasheed Amir 130741480e Auto update referenced resource (#45)
* Add implementation for create event

Signed-off-by: faizanahmad055 <faizan.ahmad55@outlook.com>

* Add sleep in testcase

Signed-off-by: faizanahmad055 <faizan.ahmad55@outlook.com>

* Fix test case data

Signed-off-by: faizanahmad055 <faizan.ahmad55@outlook.com>

* Remove unnecessary dashes from chart

Signed-off-by: faizanahmad055 <faizan.ahmad55@outlook.com>

* Fix new env var creation issue

Signed-off-by: faizanahmad055 <faizan.ahmad55@outlook.com>

* Optimize upgrade code

Signed-off-by: faizanahmad055 <faizan.ahmad55@outlook.com>

* Update logs

Signed-off-by: faizanahmad055 <faizan.ahmad55@outlook.com>

* Initial implementation to perform rolling upgrades by auto referencing the resources

Signed-off-by: faizanahmad055 <faizan.ahmad55@outlook.com>

* Fix nil pointer exception

Signed-off-by: faizanahmad055 <faizan.ahmad55@outlook.com>

* Fix test cases

Signed-off-by: faizanahmad055 <faizan.ahmad55@outlook.com>

* Add test cases

Signed-off-by: faizanahmad055 <faizan.ahmad55@outlook.com>

* Update test case verify method

Signed-off-by: faizanahmad055 <faizan.ahmad55@outlook.com>

* Add missing name for envs

Signed-off-by: faizanahmad055 <faizan.ahmad55@outlook.com>

* Update annotation name

Signed-off-by: faizanahmad055 <faizan.ahmad55@outlook.com>

* Update readme

Signed-off-by: faizanahmad055 <faizan.ahmad55@outlook.com>

* Update readme

Signed-off-by: faizanahmad055 <faizan.ahmad55@outlook.com>

* Implement Golang CI comment

Signed-off-by: faizanahmad055 <faizan.ahmad55@outlook.com>

* Implement Golang CI comment

Signed-off-by: faizanahmad055 <faizan.ahmad55@outlook.com>
2019-01-25 14:00:21 +01:00
faizanahmad055 2cac0cc713 Implement PR-2 review comments 2018-07-24 21:05:50 +05:00
faizanahmad055 5b467b731c Revamp perform rolling method 2018-07-24 17:45:48 +05:00
faizanahmad055 b79f90e709 Update controller to remove unnecessary code 2018-07-09 20:23:15 +05:00
faizanahmad055 5920890fa3 Added initial implementation to detect changes 2018-07-06 20:26:29 +05:00