Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(marketplace): also annotate nodes on upgrade to support shim upgrade #35

Merged
merged 2 commits into from
Nov 7, 2024

Conversation

vdice
Copy link
Collaborator

@vdice vdice commented Nov 7, 2024

  • Updates the kwasm-annotate-nodes Job to also run on helm upgrades, to support upgrading shim version

We could also try to make this logic smarter, for instance if there was a way to know if we are executing via the 'helm-upgrade' hook, we could inspect which nodes are already labeled with kwasm.sh/kwasm-node=true and do the re-labeling just on this subset, rather than re-labeling all nodes. Thoughts?

@vdice vdice requested a review from Mossaka November 7, 2024 02:02
@@ -3,7 +3,7 @@ kind: Job
metadata:
name: "{{ .Release.Name }}-kwasm-annotate-nodes"
annotations:
"helm.sh/hook": post-install
"helm.sh/hook": post-install,post-upgrade
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems fine to re-labeling nodes for both the post-install and post-upgrade scenarios. Have you tested this? I am asking because I am concerend about if we need to have buffer time of labeling kwasm-node from false to true.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have tested locally, though only on KinD. Maybe worth checking on AKS?

Oh, I could also add test coverage for this in our helm chart smoke test (or create a new workflow with scenarios like this)...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the idea of adding more tests

@vdice vdice force-pushed the feat/annotate-on-upgrade branch 3 times, most recently from e27817e to f3178cb Compare November 7, 2024 15:01
Copy link
Member

@Mossaka Mossaka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Mossaka Mossaka merged commit 3f864e2 into spinkube:main Nov 7, 2024
3 checks passed
@vdice vdice deleted the feat/annotate-on-upgrade branch November 7, 2024 16:58
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.

2 participants