Skip to content

Redeploy sveltos-agent when --registry or NATS watcher change - #537

Merged
gianlucam76 merged 2 commits into
projectsveltos:mainfrom
gianlucam76:fix-agent-hash-registry-nats
Nov 15, 2026
Merged

gianlucam76 merged 2 commits into
projectsveltos:mainfrom
gianlucam76:fix-agent-hash-registry-nats

Conversation

@gianlucam76

Copy link
Copy Markdown
Member

The hash that decides whether sveltos-agent/sveltos-applier must be redeployed covered the version, the Classifier spec, patches, watch namespaces and kubeconfig, but not the classifier-manager flags that shape the agent YAML. After a restart with a different --registry the hash was unchanged, so processClassifier skipped the deploy and agents kept pulling from the previous registry.

Add the registry and the NATS watcher flag to the hash. Both are always hashed so that going back to the default value is detected as well.

Fixes #536

The hash that decides whether sveltos-agent/sveltos-applier must be
redeployed covered the version, the Classifier spec, patches, watch
namespaces and kubeconfig, but not the classifier-manager flags that
shape the agent YAML. After a restart with a different --registry the
hash was unchanged, so processClassifier skipped the deploy and agents
kept pulling from the previous registry.

Add the registry and the NATS watcher flag to the hash. Both are always
hashed so that going back to the default value is detected as well.

Fixes projectsveltos#536
The test stored classifierHash alone in the ClassifierReport, but
getCurrentHash now also folds in the registry and NATS watcher settings,
so processClassifier saw a changed configuration and reported
Provisioning instead of Provisioned.
@gianlucam76
gianlucam76 merged commit 3eb0bf7 into projectsveltos:main Nov 15, 2026
10 checks passed
@gianlucam76
gianlucam76 deleted the fix-agent-hash-registry-nats branch November 15, 2026 13:53
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.

BUG: sveltos-agent is not re-deployed when the classifier's --registry changes

1 participant