You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@uniffle.apache.org by GitBox <gi...@apache.org> on 2023/01/10 13:20:42 UTC

[GitHub] [incubator-uniffle] advancedxy commented on a diff in pull request #467: [ISSUE-289] Support annotations

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: issues-unsubscribe@uniffle.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org