advancedxy commented on code in PR #467:
URL: https://github.com/apache/incubator-uniffle/pull/467#discussion_r1065776647
##########
deploy/kubernetes/operator/pkg/controller/sync/shuffleserver/shuffleserver.go:
##########
@@ -196,20 +196,26 @@ func GenerateSts(rss
*unifflev1alpha1.RemoteShuffleService) *appsv1.StatefulSet
Template: corev1.PodTemplateSpec{
ObjectMeta: metav1.ObjectMeta{
Labels:
utils.GenerateShuffleServerLabels(rss),
- Annotations: map[string]string{
- constants.AnnotationRssName:
rss.Name,
- constants.AnnotationRssUID:
string(rss.UID),
-
constants.AnnotationMetricsServerPort: fmt.Sprintf("%v",
-
controllerconstants.ContainerShuffleServerHTTPPort),
-
constants.AnnotationShuffleServerPort: fmt.Sprintf("%v",
-
controllerconstants.ContainerShuffleServerRPCPort),
- },
},
Spec: podSpec,
},
},
}
+ //add custom annotation, and default annotation used by rss
+ annotations := map[string]string{
+ constants.AnnotationRssName: rss.Name,
+ constants.AnnotationRssUID: string(rss.UID),
+ constants.AnnotationMetricsServerPort: fmt.Sprintf("%v",
+ controllerconstants.ContainerShuffleServerHTTPPort),
+ constants.AnnotationShuffleServerPort: fmt.Sprintf("%v",
+ controllerconstants.ContainerShuffleServerRPCPort),
+ }
+ for key, value := range rss.Spec.ShuffleServer.Annotations {
+ annotations[key] = value
Review Comment:
Some annotation generated by system shall not be updated by user, such as
`AnnotationRssName` and `AnnotationRssUID`?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]