Skip to content

Commit 13d5d42

Browse files
authored
fix typo (#154)
1 parent e558c44 commit 13d5d42

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

internal/webhook/v1/pod_webhook.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ func (m *TensorFusionPodMutator) Handle(ctx context.Context, req admission.Reque
9393

9494
workload := &tfv1.TensorFusionWorkload{}
9595
if tfInfo.GenWorkload {
96-
if err := m.createOrUpdateWrokload(ctx, pod, &tfInfo, workload); err != nil {
96+
if err := m.createOrUpdateWorkload(ctx, pod, &tfInfo, workload); err != nil {
9797
return admission.Errored(http.StatusInternalServerError, fmt.Errorf("create tf workload: %w", err))
9898
}
9999
}
@@ -147,7 +147,7 @@ func (m *TensorFusionPodMutator) InjectDecoder(d admission.Decoder) error {
147147
return nil
148148
}
149149

150-
func (m *TensorFusionPodMutator) createOrUpdateWrokload(ctx context.Context, pod *corev1.Pod, tfInfo *TensorFusionInfo, workload *tfv1.TensorFusionWorkload) error {
150+
func (m *TensorFusionPodMutator) createOrUpdateWorkload(ctx context.Context, pod *corev1.Pod, tfInfo *TensorFusionInfo, workload *tfv1.TensorFusionWorkload) error {
151151
// Check if workload exists
152152
err := m.Client.Get(ctx, client.ObjectKey{Name: tfInfo.WorkloadName, Namespace: pod.Namespace}, workload)
153153

@@ -231,7 +231,7 @@ func (m *TensorFusionPodMutator) patchTFClient(
231231
}
232232
}
233233

234-
contianerPatched := false
234+
containerPatched := false
235235
// Patch to Container
236236
for _, name := range containerNames {
237237
for i := range pod.Spec.Containers {
@@ -280,13 +280,13 @@ func (m *TensorFusionPodMutator) patchTFClient(
280280
Name: constants.GetConnectionURLEnv,
281281
Value: fmt.Sprintf("%s/api/connection?name=%s&namespace=%s", clientConfig.OperatorEndpoint, connectionName, connectionNamespace),
282282
})
283-
contianerPatched = true
283+
containerPatched = true
284284
}
285285
pod.Spec.Containers[i] = *container
286286
}
287287
}
288288

289-
if !contianerPatched {
289+
if !containerPatched {
290290
return nil, fmt.Errorf("no container found that needs tf-client injection")
291291
}
292292

0 commit comments

Comments
 (0)