Skip to content

Commit

Permalink
use NotifyContext and remove NotifyNodeStatus
Browse files Browse the repository at this point in the history
Signed-off-by: Heba Elayoty <hebaelayoty@gmail.com>
  • Loading branch information
helayoty committed Jan 18, 2023
1 parent 26a0a6f commit 134adad
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 38 deletions.
31 changes: 0 additions & 31 deletions cmd/virtual-kubelet/context.go

This file was deleted.

3 changes: 2 additions & 1 deletion cmd/virtual-kubelet/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import (
"fmt"
"net/http"
"os"
"os/signal"
"path/filepath"
"strconv"
"strings"
Expand Down Expand Up @@ -51,7 +52,7 @@ var (
)

func main() {
ctx, cancel := BaseContext(context.Background())
ctx, cancel := signal.NotifyContext(context.Background(), os.Interrupt)
defer cancel()

binaryName := filepath.Base(os.Args[0])
Expand Down
3 changes: 0 additions & 3 deletions pkg/provider/aci.go
Original file line number Diff line number Diff line change
Expand Up @@ -763,9 +763,6 @@ func (p *ACIProvider) Ping(ctx context.Context) error {
return nil
}

func (p *ACIProvider) NotifyNodeStatus(ctx context.Context, cb func(*v1.Node)) {
}

func (p *ACIProvider) getImagePullSecrets(pod *v1.Pod) (*[]azaci.ImageRegistryCredential, error) {
ips := make([]azaci.ImageRegistryCredential, 0, len(pod.Spec.ImagePullSecrets))
for _, ref := range pod.Spec.ImagePullSecrets {
Expand Down
3 changes: 0 additions & 3 deletions provider/aci.go
Original file line number Diff line number Diff line change
Expand Up @@ -1233,9 +1233,6 @@ func (p *ACIProvider) Ping(ctx context.Context) error {
return nil
}

func (p *ACIProvider) NotifyNodeStatus(ctx context.Context, cb func(*v1.Node)) {
}

// getContainerGroup returns a container group from ACI.
func (p *ACIProvider) getContainerGroup(ctx context.Context, namespace, name string) (*aci.ContainerGroup, error) {
cg, status, err := p.aciClient.GetContainerGroup(ctx, p.resourceGroup, fmt.Sprintf("%s-%s", namespace, name))
Expand Down

0 comments on commit 134adad

Please sign in to comment.