Skip to content

Commit

Permalink
Merge pull request #138 from DataDog/jlegrone/k8s-extended-config
Browse files Browse the repository at this point in the history
Support Pod annotations and node tolerations in Kubernetes Driver
  • Loading branch information
glyn authored Oct 3, 2019
2 parents 75605e8 + 9871edc commit 525007a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion driver/kubernetes/kubernetes.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,10 @@ const (
type Driver struct {
Namespace string
ServiceAccountName string
Annotations map[string]string
LimitCPU resource.Quantity
LimitMemory resource.Quantity
Tolerations []v1.Toleration
ActiveDeadlineSeconds int64
BackoffLimit int32
SkipCleanup bool
Expand Down Expand Up @@ -141,12 +143,14 @@ func (k *Driver) Run(op *driver.Operation) (driver.OperationResult, error) {
BackoffLimit: &k.BackoffLimit,
Template: v1.PodTemplateSpec{
ObjectMeta: metav1.ObjectMeta{
Labels: labelMap,
Labels: labelMap,
Annotations: k.Annotations,
},
Spec: v1.PodSpec{
ServiceAccountName: k.ServiceAccountName,
AutomountServiceAccountToken: &mountServiceAccountToken,
RestartPolicy: v1.RestartPolicyNever,
Tolerations: k.Tolerations,
},
},
},
Expand Down

0 comments on commit 525007a

Please sign in to comment.