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 10, 2023
1 parent 549e66a commit 1980aeb
Show file tree
Hide file tree
Showing 31 changed files with 793 additions and 384 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 1980aeb

Please sign in to comment.