Skip to content

Commit ebade1c

Browse files
committed
chore: lint issue
1 parent 88654ec commit ebade1c

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

internal/webhook/v1/tf_parser.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ func ParseTensorFusionInfo(ctx context.Context, k8sClient client.Client, pod *co
5555
}
5656
info.WorkloadName = workloadName
5757
genWorkload, ok := pod.Annotations[constants.GenWorkloadAnnotation]
58-
info.GenWorkload = (ok && genWorkload == "true")
58+
info.GenWorkload = (ok && genWorkload == constants.TrueStringValue)
5959

6060
replicas, ok := pod.Annotations[constants.ReplicasAnnotation]
6161

@@ -110,25 +110,25 @@ func ParseTensorFusionInfo(ctx context.Context, k8sClient client.Client, pod *co
110110
}
111111

112112
localGPU, ok := pod.Annotations[constants.IsLocalGPUAnnotation]
113-
if ok && localGPU == "true" {
113+
if ok && localGPU == constants.TrueStringValue {
114114
workloadProfile.Spec.IsLocalGPU = true
115115
}
116116
noStandaloneWorkerMode, ok := pod.Annotations[constants.NoStandaloneWorkerModeAnnotation]
117-
if ok && noStandaloneWorkerMode == "true" {
117+
if ok && noStandaloneWorkerMode == constants.TrueStringValue {
118118
workloadProfile.Spec.NoStandaloneWorkerMode = true
119119
}
120120

121121
// Parse auto-scaling annotations
122122
autoLimits, ok := pod.Annotations[constants.AutoScaleLimitsAnnotation]
123-
if ok && autoLimits == "true" {
123+
if ok && autoLimits == constants.TrueStringValue {
124124
workloadProfile.Spec.AutoScalingConfig.AutoSetLimits.Enable = true
125125
}
126126
autoRequests, ok := pod.Annotations[constants.AutoScaleRequestsAnnotation]
127-
if ok && autoRequests == "true" {
127+
if ok && autoRequests == constants.TrueStringValue {
128128
workloadProfile.Spec.AutoScalingConfig.AutoSetRequests.Enable = true
129129
}
130130
autoReplicas, ok := pod.Annotations[constants.AutoScaleReplicasAnnotation]
131-
if ok && autoReplicas == "true" {
131+
if ok && autoReplicas == constants.TrueStringValue {
132132
workloadProfile.Spec.AutoScalingConfig.AutoSetReplicas.Enable = true
133133
}
134134

0 commit comments

Comments
 (0)