fix: ensure run-id is added to resources in skaffold apply #6674
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.
Fixes: #6657
Description
This change ensures that we add the
skaffold.dev/run-id
labels to all resources created inskaffold apply
. This was not happening before this change, as the--add-skaffold-labels
flag was not defined on theapply
subcommand, causing the value to default tofalse
.The
--add-skaffold-labels
flag was deprecated in #5653 on May 5, 2021, putting us at just over 5 months since deprecation. Our deprecation policy would mandate a 6 month period, but I would propose an exception to this rule as this is the correct way to address this issue, and is a scenario that does not "fit neatly into this policy": https://skaffold.dev/docs/references/deprecation/#exceptionsAs a result of this change, we will now always apply and skaffold-specific labels in Skaffold, with the exception of during
skaffold render
in which we will never apply them.