Skip to content

Commit

Permalink
Update azure-aci to use nodeutil instead of node-cli
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 48d9055 commit 26a0a6f
Show file tree
Hide file tree
Showing 31 changed files with 790 additions and 381 deletions.
2 changes: 2 additions & 0 deletions charts/virtual-kubelet/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ spec:
value: /etc/virtual-kubelet/cert.pem
- name: APISERVER_KEY_LOCATION
value: /etc/virtual-kubelet/key.pem
- name: APISERVER_CA_CERT_LOCATION
value: /etc/kubernetes/certs/ca.crt
- name: VKUBELET_POD_IP
valueFrom:
fieldRef:
Expand Down
31 changes: 31 additions & 0 deletions cmd/virtual-kubelet/context.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/*
Copyright (c) Microsoft Corporation.
Licensed under the Apache 2.0 license.
*/
package main

import (
"context"
"os"
"os/signal"
)

func BaseContext(ctx context.Context) (context.Context, func()) {
sigC := make(chan os.Signal, 1)
ctx, cancel := context.WithCancel(ctx)

go func() {
for {
select {
case <-ctx.Done():
signal.Stop(sigC)
return
case <-sigC:
cancel()
}
}
}()

signal.Notify(sigC, cancelSigs()...)
return ctx, cancel
}
Loading

0 comments on commit 26a0a6f

Please sign in to comment.