Skip to content

feat: add namespace filtering and rewrite README#322

Merged
dntosas merged 3 commits intomainfrom
feat/namespaces
Feb 7, 2026
Merged

feat: add namespace filtering and rewrite README#322
dntosas merged 3 commits intomainfrom
feat/namespaces

Conversation

@dntosas
Copy link
Owner

@dntosas dntosas commented Feb 7, 2026

Add support for restricting the controller to watch only specific
namespaces via a comma-separated list. Secrets in namespaces outside
the list are filtered at the watch predicate level and never trigger
reconciliation.

Configuration:

  • ALLOWED_NAMESPACES env var (e.g. "team-a,team-b,production")
  • allowedNamespaces Helm value (already existed, now wired to env var)
  • Empty value means all namespaces (backward compatible)

Implementation:

  • AllowedNamespaces field on Config struct
  • parseNamespaceList() handles trimming, empty entries, edge cases
  • IsNamespaceAllowed() method for clean predicate checks
  • Watch predicate extended to filter by namespace alongside naming
  • Helm deployment template passes ALLOWED_NAMESPACES env var
  • 13 test cases covering parsing and namespace allow/deny logic

README rewrite:

  • Clear problem/solution narrative
  • Full configuration reference tables (env vars, Helm values, CLI flags)
  • Document all features: namespace filtering, GC, ignore labels,
    take-along labels, auto label copy, namespaced names, Rancher
    support, Prometheus metrics
  • Updated development section and roadmap

Add support for restricting the controller to watch only specific
namespaces via a comma-separated list. Secrets in namespaces outside
the list are filtered at the watch predicate level and never trigger
reconciliation.

Configuration:
- ALLOWED_NAMESPACES env var (e.g. "team-a,team-b,production")
- allowedNamespaces Helm value (already existed, now wired to env var)
- Empty value means all namespaces (backward compatible)

Implementation:
- AllowedNamespaces field on Config struct
- parseNamespaceList() handles trimming, empty entries, edge cases
- IsNamespaceAllowed() method for clean predicate checks
- Watch predicate extended to filter by namespace alongside naming
- Helm deployment template passes ALLOWED_NAMESPACES env var
- 13 test cases covering parsing and namespace allow/deny logic

README rewrite:
- Clear problem/solution narrative
- Full configuration reference tables (env vars, Helm values, CLI flags)
- Document all features: namespace filtering, GC, ignore labels,
  take-along labels, auto label copy, namespaced names, Rancher
  support, Prometheus metrics
- Updated development section and roadmap

Signed-off-by: dntosas <ntosas@gmail.com>
Update Go toolchain across go.mod, Makefile, CI workflows,
release workflow, and README.
… duplicate PR runs

- Pin golangci-lint to v2.8.0 (built with Go 1.25 support; v2.1.6
  was built with Go 1.24 and rejected Go 1.25 targets).
- Bump goreleaser-action from v5 to v6 (latest).
- Restrict push trigger to main branch only so PRs don't run CI
  twice (once from push, once from pull_request).
- chart-releaser-action v1.7.0 already at latest.
@dntosas dntosas merged commit b35d46e into main Feb 7, 2026
3 checks passed
@dntosas dntosas deleted the feat/namespaces branch February 7, 2026 18:59
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.

1 participant