Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor fixes from linter #745

Merged
merged 7 commits into from
Oct 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/apis/apis.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ var (
)
// AddToScheme may be used to add all resources defined in the project to a Scheme
AddToScheme = Builder.AddToScheme
// Resources
// Resources defined in the project
Resources = map[schema.GroupVersionKind]resourcesemantics.GenericCRD{
v1alpha4.SchemeGroupVersion.WithKind("Provisioner"): &v1alpha4.Provisioner{},
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/provisioning/v1alpha4/register.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ var (
)

var (
// The following fields are injected by Cloud Providers
// RestrictedLabels are injected by Cloud Providers
RestrictedLabels = []string{
// Use strongly typed fields instead
v1.LabelArchStable,
Expand Down
6 changes: 3 additions & 3 deletions pkg/cloudprovider/aws/ami.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"github.com/aws/aws-sdk-go/service/ssm/ssmiface"
"github.com/awslabs/karpenter/pkg/apis/provisioning/v1alpha4"
"github.com/awslabs/karpenter/pkg/cloudprovider"
v1alpha1 "github.com/awslabs/karpenter/pkg/cloudprovider/aws/apis/v1alpha1"
"github.com/awslabs/karpenter/pkg/cloudprovider/aws/apis/v1alpha1"
"github.com/patrickmn/go-cache"
"k8s.io/client-go/kubernetes"
"knative.dev/pkg/logging"
Expand Down Expand Up @@ -55,7 +55,7 @@ func (p *AMIProvider) Get(ctx context.Context, constraints *v1alpha1.Constraints
// Separate instance types by unique queries
amiQueries := map[string][]cloudprovider.InstanceType{}
for _, instanceType := range instanceTypes {
query := p.getSSMQuery(ctx, constraints, instanceType, version)
query := p.getSSMQuery(constraints, instanceType, version)
amiQueries[query] = append(amiQueries[query], instanceType)
}
// Separate instance types by unique AMIIDs
Expand Down Expand Up @@ -84,7 +84,7 @@ func (p *AMIProvider) getAMIID(ctx context.Context, query string) (string, error
return ami, nil
}

func (p *AMIProvider) getSSMQuery(ctx context.Context, constraints *v1alpha1.Constraints, instanceType cloudprovider.InstanceType, version string) string {
func (p *AMIProvider) getSSMQuery(constraints *v1alpha1.Constraints, instanceType cloudprovider.InstanceType, version string) string {
var amiSuffix string
if !instanceType.NvidiaGPUs().IsZero() || !instanceType.AWSNeurons().IsZero() {
amiSuffix = "-gpu"
Expand Down
2 changes: 1 addition & 1 deletion pkg/cloudprovider/aws/apis/v1alpha1/constraints.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ type Constraints struct {
*AWS
}

// Extensions are parameters specific to this cloud provider
// AWS contains parameters specific to this cloud provider
// +kubebuilder:object:root=true
type AWS struct {
// TypeMeta includes version and kind of the extensions, inferred if not provided.
Expand Down
14 changes: 7 additions & 7 deletions pkg/cloudprovider/aws/apis/v1alpha1/constraints_defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,26 +27,26 @@ var ClusterDiscoveryTagKeyFormat = "kubernetes.io/cluster/%s"

// Default the constraints.
func (c *Constraints) Default(ctx context.Context) {
c.defaultCapacityTypes(ctx)
c.defaultSubnets(ctx)
c.defaultSecurityGroups(ctx)
c.defaultCapacityTypes()
c.defaultSubnets()
c.defaultSecurityGroups()
}

func (c *Constraints) defaultCapacityTypes(ctx context.Context) {
func (c *Constraints) defaultCapacityTypes() {
if len(c.CapacityTypes) != 0 {
return
}
c.CapacityTypes = []string{CapacityTypeOnDemand}
}

func (c *Constraints) defaultSubnets(ctx context.Context) {
func (c *Constraints) defaultSubnets() {
if c.SubnetSelector != nil {
return
}
c.SubnetSelector = map[string]string{fmt.Sprintf(ClusterDiscoveryTagKeyFormat, c.Cluster.Name): "*"}
}

func (c *Constraints) defaultSecurityGroups(ctx context.Context) {
func (c *Constraints) defaultSecurityGroups() {
if c.SecurityGroupSelector != nil {
return
}
Expand All @@ -55,7 +55,7 @@ func (c *Constraints) defaultSecurityGroups(ctx context.Context) {

// Constrain applies the pod's scheduling constraints to the constraints.
// Returns an error if the constraints cannot be applied.
func (c *Constraints) Constrain(ctx context.Context, pods ...*v1.Pod) error {
func (c *Constraints) Constrain(pods ...*v1.Pod) error {
nodeAffinity := scheduling.NodeAffinityFor(pods...)
capacityTypes := nodeAffinity.GetLabelValues(CapacityTypeLabel, c.CapacityTypes, v1alpha4.WellKnownLabels[CapacityTypeLabel])
if len(capacityTypes) == 0 {
Expand Down
22 changes: 11 additions & 11 deletions pkg/cloudprovider/aws/apis/v1alpha1/constraints_validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,32 +29,32 @@ func (c *Constraints) Validate(ctx context.Context) (errs *apis.FieldError) {

func (c *Constraints) validate(ctx context.Context) (errs *apis.FieldError) {
return errs.Also(
c.validateInstanceProfile(ctx),
c.validateCapacityTypes(ctx),
c.validateLaunchTemplate(ctx),
c.validateSubnets(ctx),
c.validateSecurityGroups(ctx),
c.validateInstanceProfile(),
c.validateCapacityTypes(),
c.validateLaunchTemplate(),
c.validateSubnets(),
c.validateSecurityGroups(),
c.Cluster.Validate(ctx).ViaField("cluster"),
)
}

func (c *Constraints) validateCapacityTypes(ctx context.Context) (errs *apis.FieldError) {
func (c *Constraints) validateCapacityTypes() (errs *apis.FieldError) {
return v1alpha4.ValidateWellKnown(CapacityTypeLabel, c.CapacityTypes, "capacityTypes")
}

func (c *Constraints) validateInstanceProfile(ctx context.Context) (errs *apis.FieldError) {
func (c *Constraints) validateInstanceProfile() (errs *apis.FieldError) {
if c.InstanceProfile == "" {
errs = errs.Also(apis.ErrMissingField("instanceProfile"))
}
return errs
}

func (c *Constraints) validateLaunchTemplate(ctx context.Context) (errs *apis.FieldError) {
func (c *Constraints) validateLaunchTemplate() (errs *apis.FieldError) {
// nothing to validate at the moment
return errs
}

func (c *Constraints) validateSubnets(ctx context.Context) (errs *apis.FieldError) {
func (c *Constraints) validateSubnets() (errs *apis.FieldError) {
if c.SubnetSelector == nil {
errs = errs.Also(apis.ErrMissingField("subnetSelector"))
}
Expand All @@ -66,7 +66,7 @@ func (c *Constraints) validateSubnets(ctx context.Context) (errs *apis.FieldErro
return errs
}

func (c *Constraints) validateSecurityGroups(ctx context.Context) (errs *apis.FieldError) {
func (c *Constraints) validateSecurityGroups() (errs *apis.FieldError) {
if c.SecurityGroupSelector == nil {
errs = errs.Also(apis.ErrMissingField("securityGroupSelector"))
}
Expand All @@ -78,7 +78,7 @@ func (c *Constraints) validateSecurityGroups(ctx context.Context) (errs *apis.Fi
return errs
}

func (c *Cluster) Validate(ctx context.Context) (errs *apis.FieldError) {
func (c *Cluster) Validate(context.Context) (errs *apis.FieldError) {
if len(c.Name) == 0 {
errs = errs.Also(apis.ErrMissingField("name"))
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/cloudprovider/aws/apis/v1alpha1/register.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ package v1alpha1
import (
"github.com/aws/aws-sdk-go/service/ec2"
"github.com/awslabs/karpenter/pkg/apis/provisioning/v1alpha4"
runtime "k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/apimachinery/pkg/runtime/serializer"
)
Expand Down
14 changes: 2 additions & 12 deletions pkg/cloudprovider/aws/cloudprovider.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
"github.com/aws/aws-sdk-go/service/ssm"
"github.com/awslabs/karpenter/pkg/apis/provisioning/v1alpha4"
"github.com/awslabs/karpenter/pkg/cloudprovider"
v1alpha1 "github.com/awslabs/karpenter/pkg/cloudprovider/aws/apis/v1alpha1"
"github.com/awslabs/karpenter/pkg/cloudprovider/aws/apis/v1alpha1"
"github.com/awslabs/karpenter/pkg/utils/parallel"
"github.com/awslabs/karpenter/pkg/utils/project"
"go.uber.org/multierr"
Expand Down Expand Up @@ -59,16 +59,6 @@ const (
KarpenterTagKeyFormat = "karpenter.sh/cluster/%s"
)

var (
SupportedOperatingSystems = []string{
v1alpha4.OperatingSystemLinux,
}
SupportedArchitectures = []string{
v1alpha4.ArchitectureAmd64,
v1alpha4.ArchitectureArm64,
}
)

type CloudProvider struct {
instanceTypeProvider *InstanceTypeProvider
instanceProvider *InstanceProvider
Expand Down Expand Up @@ -184,7 +174,7 @@ func (c *CloudProvider) Constrain(ctx context.Context, constraints *v1alpha4.Con
if err != nil {
return fmt.Errorf("failed to deserialize provider, %w", err)
}
if err := vendorConstraints.Constrain(ctx, pods...); err != nil {
if err := vendorConstraints.Constrain(pods...); err != nil {
return err
}
constraints.Provider.Raw, err = json.Marshal(vendorConstraints.AWS)
Expand Down
12 changes: 6 additions & 6 deletions pkg/cloudprovider/aws/fake/ec2api.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func (e *EC2API) Reset() {
}
}

func (e *EC2API) CreateFleetWithContext(ctx context.Context, input *ec2.CreateFleetInput, options ...request.Option) (*ec2.CreateFleetOutput, error) {
func (e *EC2API) CreateFleetWithContext(_ context.Context, input *ec2.CreateFleetInput, _ ...request.Option) (*ec2.CreateFleetOutput, error) {
e.CalledWithCreateFleetInput.Add(input)
if input.LaunchTemplateConfigs[0].LaunchTemplateSpecification.LaunchTemplateName == nil {
return nil, fmt.Errorf("missing launch template name")
Expand All @@ -81,14 +81,14 @@ func (e *EC2API) CreateFleetWithContext(ctx context.Context, input *ec2.CreateFl
return &ec2.CreateFleetOutput{Instances: []*ec2.CreateFleetInstance{{InstanceIds: instanceIds}}}, nil
}

func (e *EC2API) CreateLaunchTemplateWithContext(ctx context.Context, input *ec2.CreateLaunchTemplateInput, options ...request.Option) (*ec2.CreateLaunchTemplateOutput, error) {
func (e *EC2API) CreateLaunchTemplateWithContext(_ context.Context, input *ec2.CreateLaunchTemplateInput, _ ...request.Option) (*ec2.CreateLaunchTemplateOutput, error) {
e.CalledWithCreateLaunchTemplateInput.Add(input)
launchTemplate := &ec2.LaunchTemplate{LaunchTemplateName: input.LaunchTemplateName}
e.LaunchTemplates.Store(input.LaunchTemplateName, launchTemplate)
return &ec2.CreateLaunchTemplateOutput{LaunchTemplate: launchTemplate}, nil
}

func (e *EC2API) DescribeInstancesWithContext(ctx context.Context, input *ec2.DescribeInstancesInput, options ...request.Option) (*ec2.DescribeInstancesOutput, error) {
func (e *EC2API) DescribeInstancesWithContext(_ context.Context, input *ec2.DescribeInstancesInput, _ ...request.Option) (*ec2.DescribeInstancesOutput, error) {
if e.DescribeInstancesOutput != nil {
return e.DescribeInstancesOutput, nil
}
Expand All @@ -103,7 +103,7 @@ func (e *EC2API) DescribeInstancesWithContext(ctx context.Context, input *ec2.De
}, nil
}

func (e *EC2API) DescribeLaunchTemplatesWithContext(ctx context.Context, input *ec2.DescribeLaunchTemplatesInput, options ...request.Option) (*ec2.DescribeLaunchTemplatesOutput, error) {
func (e *EC2API) DescribeLaunchTemplatesWithContext(_ context.Context, input *ec2.DescribeLaunchTemplatesInput, _ ...request.Option) (*ec2.DescribeLaunchTemplatesOutput, error) {
if e.DescribeLaunchTemplatesOutput != nil {
return e.DescribeLaunchTemplatesOutput, nil
}
Expand Down Expand Up @@ -157,7 +157,7 @@ func (e *EC2API) DescribeAvailabilityZonesWithContext(context.Context, *ec2.Desc
}}, nil
}

func (e *EC2API) DescribeInstanceTypesPagesWithContext(ctx context.Context, input *ec2.DescribeInstanceTypesInput, fn func(*ec2.DescribeInstanceTypesOutput, bool) bool, opts ...request.Option) error {
func (e *EC2API) DescribeInstanceTypesPagesWithContext(_ context.Context, _ *ec2.DescribeInstanceTypesInput, fn func(*ec2.DescribeInstanceTypesOutput, bool) bool, _ ...request.Option) error {
if e.DescribeInstanceTypesOutput != nil {
fn(e.DescribeInstanceTypesOutput, false)
return nil
Expand Down Expand Up @@ -280,7 +280,7 @@ func (e *EC2API) DescribeInstanceTypesPagesWithContext(ctx context.Context, inpu
return nil
}

func (e *EC2API) DescribeInstanceTypeOfferingsPagesWithContext(ctx context.Context, input *ec2.DescribeInstanceTypeOfferingsInput, fn func(*ec2.DescribeInstanceTypeOfferingsOutput, bool) bool, opts ...request.Option) error {
func (e *EC2API) DescribeInstanceTypeOfferingsPagesWithContext(_ context.Context, _ *ec2.DescribeInstanceTypeOfferingsInput, fn func(*ec2.DescribeInstanceTypeOfferingsOutput, bool) bool, _ ...request.Option) error {
if e.DescribeInstanceTypeOfferingsOutput != nil {
fn(e.DescribeInstanceTypeOfferingsOutput, false)
return nil
Expand Down
4 changes: 2 additions & 2 deletions pkg/cloudprovider/aws/instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ func (p *InstanceProvider) Create(ctx context.Context, constraints *v1alpha1.Con
)

// Convert Instance to Node
node, err := p.instanceToNode(ctx, instance, instanceTypes)
node, err := p.instanceToNode(instance, instanceTypes)
if err != nil {
logging.FromContext(ctx).Errorf("creating Node from an EC2 Instance: %s", err.Error())
continue
Expand Down Expand Up @@ -225,7 +225,7 @@ func (p *InstanceProvider) getInstances(ctx context.Context, ids []*string) ([]*
return instances, err
}

func (p *InstanceProvider) instanceToNode(ctx context.Context, instance *ec2.Instance, instanceTypes []cloudprovider.InstanceType) (*v1.Node, error) {
func (p *InstanceProvider) instanceToNode(instance *ec2.Instance, instanceTypes []cloudprovider.InstanceType) (*v1.Node, error) {
for _, instanceType := range instanceTypes {
if instanceType.Name() == aws.StringValue(instance.InstanceType) {
return &v1.Node{
Expand Down
8 changes: 4 additions & 4 deletions pkg/cloudprovider/aws/instancetype.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ import (
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/service/ec2"
"github.com/awslabs/karpenter/pkg/apis/provisioning/v1alpha4"
v1alpha1 "github.com/awslabs/karpenter/pkg/cloudprovider/aws/apis/v1alpha1"
"github.com/awslabs/karpenter/pkg/cloudprovider/aws/apis/v1alpha1"
"github.com/awslabs/karpenter/pkg/utils/resources"
v1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/resource"
)

// EC2VMOverheadFactor assumes the EC2 VM will consume <7.25% of the memory of a given machine
// EC2VMAvailableMemoryFactor assumes the EC2 VM will consume <7.25% of the memory of a given machine
const EC2VMAvailableMemoryFactor = .925

type InstanceType struct {
Expand Down Expand Up @@ -107,8 +107,8 @@ func (i *InstanceType) AWSNeurons() *resource.Quantity {
return resources.Quantity(fmt.Sprint(count))
}

// Computes overhead for https://kubernetes.io/docs/tasks/administer-cluster/reserve-compute-resources/#node-allocatable
// Overhead calculations copied from https://github.com/bottlerocket-os/bottlerocket#kubernetes-settings
// Overhead computes overhead for https://kubernetes.io/docs/tasks/administer-cluster/reserve-compute-resources/#node-allocatable
// using calculations copied from https://github.com/bottlerocket-os/bottlerocket#kubernetes-settings
func (i *InstanceType) Overhead() v1.ResourceList {
overhead := v1.ResourceList{
v1.ResourceCPU: *resource.NewMilliQuantity(
Expand Down
2 changes: 1 addition & 1 deletion pkg/cloudprovider/aws/launchtemplate.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
"github.com/aws/aws-sdk-go/service/ec2"
"github.com/aws/aws-sdk-go/service/ec2/ec2iface"
"github.com/awslabs/karpenter/pkg/cloudprovider"
v1alpha1 "github.com/awslabs/karpenter/pkg/cloudprovider/aws/apis/v1alpha1"
"github.com/awslabs/karpenter/pkg/cloudprovider/aws/apis/v1alpha1"
"github.com/awslabs/karpenter/pkg/utils/functional"
"github.com/awslabs/karpenter/pkg/utils/restconfig"
"github.com/mitchellh/hashstructure/v2"
Expand Down
6 changes: 3 additions & 3 deletions pkg/cloudprovider/aws/securitygroups.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/service/ec2"
"github.com/aws/aws-sdk-go/service/ec2/ec2iface"
v1alpha1 "github.com/awslabs/karpenter/pkg/cloudprovider/aws/apis/v1alpha1"
"github.com/awslabs/karpenter/pkg/cloudprovider/aws/apis/v1alpha1"
"github.com/mitchellh/hashstructure/v2"
"github.com/patrickmn/go-cache"
"knative.dev/pkg/logging"
Expand All @@ -41,7 +41,7 @@ func NewSecurityGroupProvider(ec2api ec2iface.EC2API) *SecurityGroupProvider {

func (s *SecurityGroupProvider) Get(ctx context.Context, constraints *v1alpha1.Constraints) ([]string, error) {
// Get SecurityGroups
securityGroups, err := s.getSecurityGroups(ctx, s.getFilters(ctx, constraints))
securityGroups, err := s.getSecurityGroups(ctx, s.getFilters(constraints))
if err != nil {
return nil, err
}
Expand All @@ -57,7 +57,7 @@ func (s *SecurityGroupProvider) Get(ctx context.Context, constraints *v1alpha1.C
return securityGroupIds, nil
}

func (s *SecurityGroupProvider) getFilters(ctx context.Context, constraints *v1alpha1.Constraints) []*ec2.Filter {
func (s *SecurityGroupProvider) getFilters(constraints *v1alpha1.Constraints) []*ec2.Filter {
filters := []*ec2.Filter{}
for key, value := range constraints.SecurityGroupSelector {
if value == "*" {
Expand Down
6 changes: 3 additions & 3 deletions pkg/cloudprovider/aws/subnets.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/service/ec2"
"github.com/aws/aws-sdk-go/service/ec2/ec2iface"
v1alpha1 "github.com/awslabs/karpenter/pkg/cloudprovider/aws/apis/v1alpha1"
"github.com/awslabs/karpenter/pkg/cloudprovider/aws/apis/v1alpha1"
"github.com/mitchellh/hashstructure/v2"
"github.com/patrickmn/go-cache"
"knative.dev/pkg/logging"
Expand All @@ -41,7 +41,7 @@ func NewSubnetProvider(ec2api ec2iface.EC2API) *SubnetProvider {

func (s *SubnetProvider) Get(ctx context.Context, constraints *v1alpha1.Constraints) ([]*ec2.Subnet, error) {
// Get subnets
subnets, err := s.getSubnets(ctx, s.getFilters(ctx, constraints))
subnets, err := s.getSubnets(ctx, s.getFilters(constraints))
if err != nil {
return nil, err
}
Expand All @@ -53,7 +53,7 @@ func (s *SubnetProvider) Get(ctx context.Context, constraints *v1alpha1.Constrai
return subnets, nil
}

func (s *SubnetProvider) getFilters(ctx context.Context, constraints *v1alpha1.Constraints) []*ec2.Filter {
func (s *SubnetProvider) getFilters(constraints *v1alpha1.Constraints) []*ec2.Filter {
filters := []*ec2.Filter{}
// Filter by zone
if constraints.Zones != nil {
Expand Down
4 changes: 2 additions & 2 deletions pkg/cloudprovider/aws/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (

"github.com/Pallinder/go-randomdata"
"github.com/awslabs/karpenter/pkg/apis/provisioning/v1alpha4"
v1alpha1 "github.com/awslabs/karpenter/pkg/cloudprovider/aws/apis/v1alpha1"
"github.com/awslabs/karpenter/pkg/cloudprovider/aws/apis/v1alpha1"
"github.com/awslabs/karpenter/pkg/cloudprovider/aws/fake"
"github.com/awslabs/karpenter/pkg/cloudprovider/registry"
"github.com/awslabs/karpenter/pkg/controllers/allocation"
Expand Down Expand Up @@ -83,7 +83,7 @@ var _ = BeforeSuite(func() {
Filter: &allocation.Filter{KubeClient: e.Client},
Binder: &allocation.Binder{KubeClient: e.Client, CoreV1Client: clientSet.CoreV1()},
Batcher: allocation.NewBatcher(1*time.Millisecond, 1*time.Millisecond),
Scheduler: scheduling.NewScheduler(cloudProvider, e.Client),
Scheduler: scheduling.NewScheduler(e.Client),
Packer: binpacking.NewPacker(),
CloudProvider: cloudProvider,
KubeClient: e.Client,
Expand Down
Loading