Skip to content

Fix wrong skipped message of linkerd inject for a namespace#11179

Merged
alpeb merged 3 commits intolinkerd:mainfrom
mikutas:10231
Sep 6, 2023
Merged

Fix wrong skipped message of linkerd inject for a namespace#11179
alpeb merged 3 commits intolinkerd:mainfrom
mikutas:10231

Conversation

@mikutas
Copy link
Contributor

@mikutas mikutas commented Jul 30, 2023

Fixes #10231

@mikutas mikutas marked this pull request as ready for review July 30, 2023 14:55
@mikutas mikutas requested a review from a team as a code owner July 30, 2023 14:55

‼ "linkerd.io/inject: disabled" annotation set on deployment/web

deployment "web" skipped
Copy link
Member

Choose a reason for hiding this comment

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

This should still being reported as skipped... I think my recommendation in #10257 was off. Can you explore the UnsupportedResource field in report.go for it to properly consider namespaces? Things to keep in mind for example would be that linkerd inject --manual should still only add an annotation in this particular case (as opposed to adding the proxy yaml like it does for workloads).

@mikutas mikutas marked this pull request as draft August 1, 2023 00:34
Signed-off-by: Takumi Sue <[email protected]>
@mikutas mikutas marked this pull request as ready for review August 1, 2023 14:42
@mikutas mikutas requested a review from alpeb August 1, 2023 14:42
Copy link
Member

@alpeb alpeb left a comment

Choose a reason for hiding this comment

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

Great fix! Just one tiny nit below.

Comment on lines 183 to 184
if conf.HasPodTemplate() {
conf.AppendPodAnnotations(rt.overrideAnnotations)
report.Annotated = true
if len(rt.overrideAnnotations) > 0 {
Copy link
Member

Choose a reason for hiding this comment

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

This can be collapsed into a single if statement

@mikutas mikutas requested a review from alpeb August 9, 2023 06:32
@mikutas mikutas changed the title Fix ignoring report's field update Fix wrong skipped message of linkerd inject for a namespace Aug 9, 2023
@alpeb alpeb merged commit 4bef887 into linkerd:main Sep 6, 2023
@mikutas mikutas deleted the 10231 branch September 9, 2023 04:40
adamshawvipps pushed a commit to adamshawvipps/linkerd2 that referenced this pull request Sep 18, 2023
adamshawvipps pushed a commit to adamshawvipps/linkerd2 that referenced this pull request Sep 18, 2023
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.

[cli] linkerd inject show "skipped" for a Namespace

3 participants