• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

zalando-incubator / cluster-lifecycle-manager / 10108880484

26 Jul 2024 09:17AM UTC coverage: 48.258% (-2.4%) from 50.656%
10108880484

Pull #777

github

gargravarr
Implement EKS provisioning and support multiple provisioners. (#797)

* Implement EKS provisioning; support multiple provisioners.

Signed-off-by: Rodrigo Reis <rodrigo@zalando.de>

* Fix linting; add token source for AWS provisioning.

Signed-off-by: Rodrigo Reis <rodrigo@zalando.de>

* Fix tests; check for supported provider as the first action.

Signed-off-by: Rodrigo Reis <rodrigo@zalando.de>

* Fix provider code.

Signed-off-by: Rodrigo Reis <rodrigo@zalando.de>

* Fix provisioner creation.

Signed-off-by: Rodrigo Reis <rodrigo@zalando.de>

* Create master nodes when needed.

Signed-off-by: Rodrigo Reis <rodrigo@zalando.de>

* don't override aws adapter.

Signed-off-by: gargravarr <rodrigo.gargravarr@gmail.com>

* Fix kubectl arguments.

Signed-off-by: gargravarr <rodrigo.gargravarr@gmail.com>

---------

Signed-off-by: Rodrigo Reis <rodrigo@zalando.de>
Signed-off-by: gargravarr <rodrigo.gargravarr@gmail.com>
Co-authored-by: Rodrigo Reis <rodrigo@zalando.de>
Signed-off-by: gargravarr <rodrigo.gargravarr@gmail.com>
Pull Request #777: Add EKS support

24 of 442 new or added lines in 10 files covered. (5.43%)

54 existing lines in 5 files now uncovered.

3019 of 6256 relevant lines covered (48.26%)

14.09 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

14.29
/api/node_pool.go
1
package api
2

3
import (
4
        "strings"
5

6
        "github.com/zalando-incubator/cluster-lifecycle-manager/pkg/kubernetes"
7
        corev1 "k8s.io/api/core/v1"
8
)
9

10
// NodePool describes a node pool in a kubernetes cluster.
11
type NodePool struct {
12
        DiscountStrategy string            `json:"discount_strategy" yaml:"discount_strategy"`
13
        InstanceTypes    []string          `json:"instance_types"    yaml:"instance_types"`
14
        Name             string            `json:"name"              yaml:"name"`
15
        Profile          string            `json:"profile"           yaml:"profile"`
16
        MinSize          int64             `json:"min_size"          yaml:"min_size"`
17
        MaxSize          int64             `json:"max_size"          yaml:"max_size"`
18
        ConfigItems      map[string]string `json:"config_items"      yaml:"config_items"`
19

20
        // Deprecated, only kept here so the existing clusters don't break
21
        InstanceType string
22
}
23

UNCOV
24
func (np NodePool) IsSpot() bool {
×
UNCOV
25
        return np.DiscountStrategy == "spot_max_price" || np.DiscountStrategy == "spot"
×
UNCOV
26
}
×
27

28
func (np NodePool) IsMaster() bool {
×
29
        return strings.Contains(np.Profile, "master")
×
UNCOV
30
}
×
31

32
func (np NodePool) IsKarpenter() bool {
1✔
33
        return np.Profile == "worker-karpenter"
1✔
34
}
1✔
35

UNCOV
36
func (np NodePool) Taints() []*corev1.Taint {
×
UNCOV
37
        conf, exist := np.ConfigItems["taints"]
×
UNCOV
38
        if !exist {
×
39
                return nil
×
40
        }
×
41
        var taints []*corev1.Taint
×
42
        for _, t := range strings.Split(conf, ",") {
×
43
                taint, err := kubernetes.ParseTaint(t)
×
44
                if err == nil {
×
45
                        taints = append(taints, taint)
×
46
                }
×
47
        }
48
        return taints
×
49
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc