Skip to content

Commit

Permalink
PR Comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ellistarn committed Jan 15, 2022
1 parent 660cfd6 commit 4a064e2
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pkg/cloudprovider/aws/instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ func (p *InstanceProvider) launchInstances(ctx context.Context, constraints *v1a
TagSpecifications: []*ec2.TagSpecification{
{
ResourceType: aws.String(ec2.ResourceTypeInstance),
Tags: v1alpha1.MergeTags(ctx, constraints.Tags),
Tags: v1alpha1.MergeTags(ctx, constraints.Tags, map[string]string{fmt.Sprintf("kubernetes.io/cluster/%s", injection.GetOptions(ctx).ClusterName): "owned"}),
},
},
}
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 @@ -181,7 +181,7 @@ func (p *LaunchTemplateProvider) createLaunchTemplate(ctx context.Context, optio
},
TagSpecifications: []*ec2.TagSpecification{{
ResourceType: aws.String(ec2.ResourceTypeLaunchTemplate),
Tags: v1alpha1.MergeTags(ctx, options.Tags, map[string]string{fmt.Sprintf("kubernetes.io/cluster/%s", injection.GetOptions(ctx).ClusterName): "owned"}),
Tags: v1alpha1.MergeTags(ctx, options.Tags),
}},
})
if err != nil {
Expand Down
4 changes: 3 additions & 1 deletion pkg/cloudprovider/aws/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,9 @@ var _ = Describe("Allocation", func() {

BeforeEach(func() {
provider = &v1alpha1.AWS{
InstanceProfile: "test-instance-profile",
InstanceProfile: "test-instance-profile",
SubnetSelector: map[string]string{"foo": "bar"},
SecurityGroupSelector: map[string]string{"foo": "bar"},
}
provisioner = ProvisionerWithProvider(&v1alpha5.Provisioner{ObjectMeta: metav1.ObjectMeta{Name: strings.ToLower(randomdata.SillyName())}}, provider)
provisioner.SetDefaults(ctx)
Expand Down
7 changes: 4 additions & 3 deletions website/content/en/docs/getting-started/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,9 +196,10 @@ shapes. Karpenter makes scheduling and provisioning decisions based on pod
attributes such as labels and affinity. In other words, Karpenter eliminates
the need to manage many different node groups.

Create a default provisioner using the command below. This provisioner
configures instances to connect to your cluster's endpoint and discovers
resources like subnets and security groups using the cluster's name.
Create a default provisioner using the command below.
This provisioner uses `securityGroupSelector` and `subnetSelector` to discover resources used to launch nodes.
We applied the tag `karpenter.sh/discovery` in the `eksctl` command above.
Depending how these resources are shared between clusters, you may need to use different tagging schemes.

The `ttlSecondsAfterEmpty` value configures Karpenter to terminate empty nodes.
This behavior can be disabled by leaving the value undefined.
Expand Down

0 comments on commit 4a064e2

Please sign in to comment.