Make linkerd mc link's output compatible with pre-edge-24.9.3 clusters
#13161
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Followup to #13061
Problem
if we run
linkerd mc linkusing the latest CLI and attempted to apply the resulting manifests into a cluster with linkerd-multicluster on version edge-24.9.2 and earlier we would get the following error:Solution
This changes the
linkerd mc linkcommand so that it doesn't generate default entries for the new (optional) fieldsfailureThresholdandtimeout, so that the output remains compatible with previous versions of the Link CRD.linkerd mc linkwill however still generate those fields for clusters that have an up-to-date multicluster extension. Those fields values continue to be retrieved from the gateway service'smirror.linkerd.io/probe-failure-thresholdandmirror.linkerd.io/probe-timeoutannotations.We're also removing those fields from the linkerd-multicluster values.yaml file, and we're removing the corresponding annotations on the gateway workload. These values and annotations were added in edge-24.9.3.
This means that (at least for now)
linkerd mc linkwill never generate those fields, and the way for users to tweak them is directly in the Link CR (once the user upgrades the linkerd-multicluster extension, the existing Link CRs will automatically receive the default values, as they are declared in the Link CRD definition).