Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8f6b4b9e20 | ||
|
|
fc22300b71 | ||
|
|
f3ebde2533 | ||
|
|
acf2871edd | ||
|
|
28f555e9ba | ||
|
|
b96181afa8 | ||
|
|
18adde2aca | ||
|
|
23a9d9954f |
2
Makefile
2
Makefile
@@ -54,7 +54,7 @@ docker:
|
||||
@echo "Docker Build..."
|
||||
$Q docker build -t $(DOCKER_IMAGE) .
|
||||
|
||||
clean: clean-build
|
||||
clean:
|
||||
@echo "Clean..."
|
||||
$Q rm -rf bin
|
||||
|
||||
|
||||
@@ -102,6 +102,9 @@ func (p *FargateProvider) loadConfig(r io.Reader) error {
|
||||
if config.OperatingSystem != providers.OperatingSystemLinux {
|
||||
return fmt.Errorf("Fargate does not support operating system %v", config.OperatingSystem)
|
||||
}
|
||||
if config.CloudWatchLogGroupName != "" && config.ExecutionRoleArn == "" {
|
||||
return fmt.Errorf("Execution role required if CloudWatch log group is specified")
|
||||
}
|
||||
|
||||
// Validate advertised capacity.
|
||||
if q, err = resource.ParseQuantity(config.CPU); err != nil {
|
||||
|
||||
@@ -32,6 +32,7 @@ ExecutionRoleArn = ""
|
||||
|
||||
# Amazon CloudWatch log group name used to store container logs. Optional.
|
||||
# If omitted, container logs will not be available.
|
||||
# If specified, an execution role with access to CloudWatch logs is required.
|
||||
CloudWatchLogGroupName = ""
|
||||
|
||||
# AWS Fargate platform version. Optional. Defaults to "LATEST".
|
||||
|
||||
@@ -195,6 +195,9 @@ func (pod *Pod) Start() error {
|
||||
runTaskOutput, err := api.RunTask(runTaskInput)
|
||||
log.Printf("RunTask err:%+v output:%+v", err, runTaskOutput)
|
||||
if err != nil || len(runTaskOutput.Tasks) == 0 {
|
||||
if len(runTaskOutput.Failures) != 0 {
|
||||
err = fmt.Errorf("reason: %s", *runTaskOutput.Failures[0].Reason)
|
||||
}
|
||||
err = fmt.Errorf("failed to run task: %v", err)
|
||||
return err
|
||||
}
|
||||
@@ -332,7 +335,11 @@ func (pod *Pod) describe() (*ecs.Task, error) {
|
||||
}
|
||||
|
||||
describeTasksOutput, err := api.DescribeTasks(describeTasksInput)
|
||||
if err != nil {
|
||||
if err != nil || len(describeTasksOutput.Tasks) == 0 {
|
||||
if len(describeTasksOutput.Failures) != 0 {
|
||||
err = fmt.Errorf("reason: %s", *describeTasksOutput.Failures[0].Reason)
|
||||
}
|
||||
err = fmt.Errorf("failed to describe task: %v", err)
|
||||
return nil, err
|
||||
}
|
||||
|
||||
|
||||
@@ -12,6 +12,9 @@ var (
|
||||
// FargateRegions are AWS regions where Fargate is available.
|
||||
FargateRegions = Regions{
|
||||
"us-east-1",
|
||||
"us-east-2",
|
||||
"us-west-2",
|
||||
"eu-west-1",
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
@@ -7,13 +7,13 @@ The Azure Container Instances provider for the Virtual Kubelet configures an ACI
|
||||
This document details configuring the Virtual Kubelet ACI provider.
|
||||
#### Table of Contents
|
||||
|
||||
* [Prerequiste](#Prerequisite)
|
||||
* [Quick set-up with the ACI Connector](#Quick-set-up-with-the-ACI-Connector)
|
||||
* [Manual set-up](#Manual-set-up)
|
||||
* [Validate the Virtual Kubelet ACI provider](#Validate-the-Virtual-Kubelet-ACI-provider)
|
||||
* [Schedule a pod in ACI](#Schedule-a-pod-in-ACI)
|
||||
* [Upgrade the ACI Connector ](#Upgrade-the-ACI-Connector)
|
||||
* [Remove the Virtual Kubelet](#Remove-the-Virtual-Kubelet)
|
||||
* [Prerequiste](#prerequisite)
|
||||
* [Quick set-up with the ACI Connector](#quick-set-up-with-the-aci-connector)
|
||||
* [Manual set-up](#manual-set-up)
|
||||
* [Validate the Virtual Kubelet ACI provider](#validate-the-virtual-kubelet-aci-provider)
|
||||
* [Schedule a pod in ACI](#schedule-a-pod-in-aci)
|
||||
* [Upgrade the ACI Connector ](#upgrade-the-aci-connector)
|
||||
* [Remove the Virtual Kubelet](#remove-the-virtual-kubelet)
|
||||
## Prerequisite
|
||||
|
||||
This guide assumes that you have a Kubernetes cluster up and running (can be `minikube`) and that `kubectl` is already configured to talk to it.
|
||||
@@ -299,6 +299,14 @@ spec:
|
||||
effect: NoSchedule
|
||||
```
|
||||
|
||||
Notice that Virtual-Kubelet nodes are tainted by default to avoid unexpected pods running on them, i.e. kube-proxy, other virtual-kubelet pods, etc. To schedule a pod to them, you need to add the tolerations to your pod spec:
|
||||
|
||||
```
|
||||
tolerations:
|
||||
- key: azure.com/aci
|
||||
effect: NoSchedule
|
||||
```
|
||||
|
||||
Run the application with the [kubectl create][kubectl-create] command.
|
||||
|
||||
```cli
|
||||
|
||||
@@ -147,7 +147,7 @@ func (s *Server) registerNode() error {
|
||||
"type": "virtual-kubelet",
|
||||
"kubernetes.io/role": "agent",
|
||||
"beta.kubernetes.io/os": strings.ToLower(s.provider.OperatingSystem()),
|
||||
|
||||
"kubernetes.io/hostname": s.nodeName,
|
||||
"alpha.service-controller.kubernetes.io/exclude-balancer": "true",
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user