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

fix(multicluster)!: Link's probeSpec.period should be formatted as duration #13586

Merged
merged 1 commit into from
Jan 23, 2025

Conversation

alpeb
Copy link
Member

@alpeb alpeb commented Jan 22, 2025

Before the refactoring from #13420, link mc link would generate a Link resource with probeSpec.period formatted as duration. After that change, it was generated as an integer and the service mirror was refactored as well to consume that integer and convert it into a duration. If a Link with the old semantics is consumed by a service mirror controller containing that change (or vice-versa) it will error out with "could not parse probe period". This could happen for example when re-linking as part of a multicluster upgrade, when pending the rollout the old controller would consume the upgraded Link. Or for folks upgrading just by bumping the controller image tag and not re-linking (unwise as that may be).

This fix consists on:

  • Updating the Link CRD, constraining period to be formatted as duration
  • Having the linkerd mc link command produce a duration value for that period, being lenient to the gateway service annotation mirror.linkerd.io/probe-period either using an integer (which it does by default) or a duration
  • Having the probe worker consume that value as a duration

BREAKING CHANGE: this realigns behavior with edge-24.11.8, but Links generated with edge-25.1.1 would be rejected.

@alpeb alpeb requested a review from a team as a code owner January 22, 2025 22:05
…ration

Before the refactoring from #13420, `link mc link` would generate a Link resource with `probeSpec.period` formatted as duration. After that change, it was generated as an integer and the service mirror was refactored as well to consume that integer and convert it into a duration. If a Link with the old semantics is consumed by a service mirror controller containing that change (or vice-versa) it will error out with "could not parse probe period". This could happen for example when re-linking as part of a multicluster upgrade, when pending the rollout the old controller would consume the upgraded Link. Or for folks upgrading just by bumping the controller image tag and not re-linking (unwise as that may be).

This fix consists on:
- Updating the Link CRD, constraining `period` to be formatted as duration
- Having the `linkerd mc link` command produce a duration value for that period, being lenient to the gateway service annotation `mirror.linkerd.io/probe-period` either using an integer (which it does by default) or a duration
- Having the probe worker consume that value as a duration

BREAKING CHANGE: this realigns behavior with edge-24.11.8, but Links generated with edge-25.1.1 would be rejected.
@alpeb alpeb force-pushed the alpeb/probe-period-time branch from 791bcef to 078f0a6 Compare January 22, 2025 23:19
@alpeb alpeb merged commit 23e02c7 into main Jan 23, 2025
38 checks passed
@alpeb alpeb deleted the alpeb/probe-period-time branch January 23, 2025 12:18
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