Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get rid of ProviderFailed due to expected pod spec mismatch #18

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,15 @@ func (p *FargateProvider) CreatePod(ctx context.Context, pod *corev1.Pod) error
// UpdatePod takes a Kubernetes Pod and updates it within the provider.
func (p *FargateProvider) UpdatePod(ctx context.Context, pod *corev1.Pod) error {
log.Printf("Received UpdatePod request for %s/%s.\n", pod.Namespace, pod.Name)
return errNotImplemented

// There's no need to get scheduled pod and update it in Fargate.
// However, this is called in every loop. Even worse, created k8s pod object will never be same as provider pod,
// because service account token and some default tolerance will be added to pod spec.
// https://github.com/virtual-kubelet/virtual-kubelet/blob/bd742d5d99eafb0140f32def3b071028925d9dfa/node/pod.go#L75-L76
//
// Returning any error will result in `ProviderFailed` status on the pod. We just return nil here.

return nil
}

// DeletePod takes a Kubernetes Pod and deletes it from the provider.
Expand Down