chenyulin0719 commented on code in PR #808:
URL: https://github.com/apache/yunikorn-k8shim/pull/808#discussion_r1595353079
##########
pkg/common/utils/utils.go:
##########
@@ -373,10 +373,27 @@ func GetPlaceholderFlagFromPodSpec(pod *v1.Pod) bool {
}
}
- if value := GetPodLabelValue(pod, constants.LabelPlaceholderFlag);
value != "" {
+ // Deprecated: Support for old placeholder flags should be removed in
version 1.7.0.
+ if value := GetPodAnnotationValue(pod,
constants.OldAnnotationPlaceholderFlag); value != "" { // nolint:staticcheck
if v, err := strconv.ParseBool(value); err == nil {
+ log.Log(log.ShimUtils).Warn("Using deprecated
placeholder annotation. The support for old placeholder flag will be removed in
version 1.7.0",
+ zap.String("podName", pod.Name),
+ zap.String("annotation",
constants.OldAnnotationPlaceholderFlag), // nolint:staticcheck
+ zap.String("value", value))
return v
}
}
+
+ // Deprecated: Support for old placeholder flags should be removed in
version 1.7.0.
+ if value := GetPodLabelValue(pod, constants.OldLabelPlaceholderFlag);
value != "" { // nolint:staticcheck
+ if v, err := strconv.ParseBool(value); err == nil {
+ log.Log(log.ShimUtils).Warn("Using deprecated
placeholder label. The support for old placeholder flag will be removed in
version 1.7.0",
Review Comment:
Same reason as the previous response.
--
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]