Skip to content

[#289] feat(operator): Support annotations #1817

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

Merged
merged 12 commits into from
Jun 25, 2024
Merged

[#289] feat(operator): Support annotations #1817

merged 12 commits into from
Jun 25, 2024

Conversation

jerqi
Copy link
Contributor

@jerqi jerqi commented Jun 21, 2024

What changes were proposed in this pull request?

Previous pull request is #467

I address the comments and add the uts.

Why are the changes needed?

Fix: #289

Does this PR introduce any user-facing change?

No.

How was this patch tested?

UT and run the operator in the GKE.

@jerqi jerqi requested a review from advancedxy June 21, 2024 08:20
Copy link

Test Results

 2 641 files  ±0   2 641 suites  ±0   5h 27m 7s ⏱️ -31s
   944 tests ±0     943 ✅ ±0   1 💤 ±0  0 ❌ ±0 
11 773 runs  ±0  11 758 ✅ ±0  15 💤 ±0  0 ❌ ±0 

Results for commit 4466811. ± Comparison against base commit ceae615.

@jerqi
Copy link
Contributor Author

jerqi commented Jun 25, 2024

@advancedxy Could you help me review this pull request?

Copy link
Contributor

@advancedxy advancedxy left a comment

Choose a reason for hiding this comment

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

Thanks for continuing this work. It looks good to me generally.

Comment on lines 215 to 223
for key, value := range reservedAnnotations {
annotations[key] = value
}

for key, value := range rss.Spec.ShuffleServer.Annotations {
if _, exist := reservedAnnotations[key]; !exist {
annotations[key] = value
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: it might be clearer to override by reservedAnnotations, such as:

	for key, value := range rss.Spec.ShuffleServer.Annotations {
                annotations[key] = value
	}
        // reserved annotations have higher preference.
        for key, value := range reservedAnnotations {
		annotations[key] = value
	}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

Comment on lines 164 to 167
testAnnotations = map[string]string{
"key1": "value1",
"key2": "value2",
}
Copy link
Contributor

Choose a reason for hiding this comment

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

could we also add a test case with reserved one, so that we can make sure the override logic is correct.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@jerqi jerqi requested a review from advancedxy June 25, 2024 02:52
Copy link
Contributor

@advancedxy advancedxy left a comment

Choose a reason for hiding this comment

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

LGTM, thanks. Pending CI passes.

@jerqi jerqi merged commit 3aa03cf into master Jun 25, 2024
42 checks passed
@jerqi jerqi deleted the support-annotations branch June 25, 2024 03:32
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.

[FEATURE] Operator support annotation
2 participants