Merge from master (#328)
* Add default provider taint and taint configuration options This allows for more specificity when setting taint tolerations for workloads. Three new env variables are introduced: VKUBELET_TAINT_KEY (defaults to `virtual-kubelet.io/provider`) VKUBELET_TAINT_VALUE (defaults to provider name) VKUBELET_TAINT_EFFECT (defaults to `NoSchedule`) BREAKING CHANGES: - The default taint key of `azure.com/aci` is now `virtual-kubelet.io/provider`. - Specifying a custom taint key is now done via an environment variable rather than the `--taint` command line flag. * Add back deprecated taint flag TODO: Revert this commit Related to #316 * Add darwin tag to not build for osx * Darwin specific lookup file without cri and vic * Fix chart notes template (#317) Values were moved from env to top level. * If --taint is specified, set the taint value to empty (#322) Add the old tolerations the examples to make it backward compatible during the switch * Use standard logging package (#323) * Update kubelet vendor to pull in stats API * Add errgroup dep which will be used for ACI stats * Add supports for stats in ACI provider This adds a new, optional, interface for providers that want to provide stats. * Don't use globals for API server Refactors how HTTP servers are started and binds them to objects that can store the provider rather than relying on a global. * Fix merge conflict * Fix couple errors
This commit is contained in:
@@ -52,7 +52,7 @@ This allows users to schedule kubernetes workloads on nodes that aren't running
|
|||||||
Run: func(cmd *cobra.Command, args []string) {
|
Run: func(cmd *cobra.Command, args []string) {
|
||||||
f, err := vkubelet.New(nodeName, operatingSystem, kubeNamespace, kubeConfig, provider, providerConfig, taintKey, disableTaint, metricsAddr)
|
f, err := vkubelet.New(nodeName, operatingSystem, kubeNamespace, kubeConfig, provider, providerConfig, taintKey, disableTaint, metricsAddr)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.L.WithError(err).Fatal("Error initializing vritual kubelet")
|
log.L.WithError(err).Fatal("Error initializing virtual kubelet")
|
||||||
}
|
}
|
||||||
if err := f.Run(context.Background()); err != nil {
|
if err := f.Run(context.Background()); err != nil {
|
||||||
log.L.Fatal(err)
|
log.L.Fatal(err)
|
||||||
|
|||||||
@@ -331,7 +331,7 @@ func (p *ACIProvider) setupNetworkProfile(auth *client.Authentication) error {
|
|||||||
subnet = &network.Subnet{Name: p.subnetName}
|
subnet = &network.Subnet{Name: p.subnetName}
|
||||||
}
|
}
|
||||||
populateSubnet(subnet, p.subnetCIDR)
|
populateSubnet(subnet, p.subnetCIDR)
|
||||||
subnet, err = c.CreateOrUpdateSubnet(p.resourceGroup, p.vnetName, subnet)
|
subnet, err = c.CreateOrUpdateSubnet(p.vnetResourceGroup, p.vnetName, subnet)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("error creating subnet: %v", err)
|
return fmt.Errorf("error creating subnet: %v", err)
|
||||||
}
|
}
|
||||||
@@ -594,6 +594,10 @@ func (p *ACIProvider) amendVnetResources(containerGroup *aci.ContainerGroup) {
|
|||||||
containerGroup.ContainerGroupProperties.Volumes = append(containerGroup.ContainerGroupProperties.Volumes, *(p.kubeProxyVolume))
|
containerGroup.ContainerGroupProperties.Volumes = append(containerGroup.ContainerGroupProperties.Volumes, *(p.kubeProxyVolume))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func containerGroupName(pod *v1.Pod) string {
|
||||||
|
return fmt.Sprintf("%s-%s", pod.Namespace, pod.Name)
|
||||||
|
}
|
||||||
|
|
||||||
// UpdatePod is a noop, ACI currently does not support live updates of a pod.
|
// UpdatePod is a noop, ACI currently does not support live updates of a pod.
|
||||||
func (p *ACIProvider) UpdatePod(pod *v1.Pod) error {
|
func (p *ACIProvider) UpdatePod(pod *v1.Pod) error {
|
||||||
return nil
|
return nil
|
||||||
|
|||||||
Reference in New Issue
Block a user