Skip to content

feat: add --watch-namespaces to register cluster --pullmode - #451

Merged
gianlucam76 merged 1 commit into
projectsveltos:mainfrom
gianlucam76:pullmode-restrictedrbac
Sep 18, 2026
Merged

gianlucam76 merged 1 commit into
projectsveltos:mainfrom
gianlucam76:pullmode-restrictedrbac

Conversation

@gianlucam76

Copy link
Copy Markdown
Member
  • sveltosctl register cluster --pullmode generated a YAML wits --watch-namespaces= always empty and no annotation on the created SveltosCluster, so a freshly registered cluster ran with sveltos-applier unrestricted
  • Adds a --watch-namespaces= flag to register cluster, valid only with --pullmode, which sets the
    agent.projectsveltos.io/watch-namespaces annotation on the created SveltosCluster and the --watch-namespaces flag in the generated sveltos-applier manifest to the same value.
  • Also fixes a latent bug in updateSveltosClusterLabelsAndAnnotations patchSveltosCluster-adjacent code: setting the shard annotation replaced the whole Annotations map instead of merging into it, which would have silently dropped the new watch-namespaces annotation (and vice versa) on any update to an existing SveltosCluster.

- sveltosctl register cluster --pullmode generated a YAML
wits --watch-namespaces= always empty and no annotation on the
created SveltosCluster, so a freshly registered cluster ran with
sveltos-applier unrestricted
- Adds a --watch-namespaces=<value> flag to register cluster,
valid only with --pullmode, which sets the
agent.projectsveltos.io/watch-namespaces annotation on the created
SveltosCluster and the --watch-namespaces flag in the generated
sveltos-applier manifest to the same value.
- Also fixes a latent bug in updateSveltosClusterLabelsAndAnnotations
patchSveltosCluster-adjacent code: setting the shard annotation replaced
the whole Annotations map instead of merging into it, which would have
silently dropped the new watch-namespaces annotation (and vice versa)
on any update to an existing SveltosCluster.
@gianlucam76
gianlucam76 merged commit 58e330f into projectsveltos:main Sep 18, 2026
4 checks passed
@gianlucam76
gianlucam76 deleted the pullmode-restrictedrbac branch September 18, 2026 18:01
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