@@ -55,7 +55,7 @@ func ParseTensorFusionInfo(ctx context.Context, k8sClient client.Client, pod *co
55
55
}
56
56
info .WorkloadName = workloadName
57
57
genWorkload , ok := pod .Annotations [constants .GenWorkloadAnnotation ]
58
- info .GenWorkload = (ok && genWorkload == "true" )
58
+ info .GenWorkload = (ok && genWorkload == constants . TrueStringValue )
59
59
60
60
replicas , ok := pod .Annotations [constants .ReplicasAnnotation ]
61
61
@@ -110,25 +110,25 @@ func ParseTensorFusionInfo(ctx context.Context, k8sClient client.Client, pod *co
110
110
}
111
111
112
112
localGPU , ok := pod .Annotations [constants .IsLocalGPUAnnotation ]
113
- if ok && localGPU == "true" {
113
+ if ok && localGPU == constants . TrueStringValue {
114
114
workloadProfile .Spec .IsLocalGPU = true
115
115
}
116
116
noStandaloneWorkerMode , ok := pod .Annotations [constants .NoStandaloneWorkerModeAnnotation ]
117
- if ok && noStandaloneWorkerMode == "true" {
117
+ if ok && noStandaloneWorkerMode == constants . TrueStringValue {
118
118
workloadProfile .Spec .NoStandaloneWorkerMode = true
119
119
}
120
120
121
121
// Parse auto-scaling annotations
122
122
autoLimits , ok := pod .Annotations [constants .AutoScaleLimitsAnnotation ]
123
- if ok && autoLimits == "true" {
123
+ if ok && autoLimits == constants . TrueStringValue {
124
124
workloadProfile .Spec .AutoScalingConfig .AutoSetLimits .Enable = true
125
125
}
126
126
autoRequests , ok := pod .Annotations [constants .AutoScaleRequestsAnnotation ]
127
- if ok && autoRequests == "true" {
127
+ if ok && autoRequests == constants . TrueStringValue {
128
128
workloadProfile .Spec .AutoScalingConfig .AutoSetRequests .Enable = true
129
129
}
130
130
autoReplicas , ok := pod .Annotations [constants .AutoScaleReplicasAnnotation ]
131
- if ok && autoReplicas == "true" {
131
+ if ok && autoReplicas == constants . TrueStringValue {
132
132
workloadProfile .Spec .AutoScalingConfig .AutoSetReplicas .Enable = true
133
133
}
134
134
0 commit comments