diff --git a/charts/karpenter/README.md b/charts/karpenter/README.md index bab7f9dd2236..1b814bfe55e3 100644 --- a/charts/karpenter/README.md +++ b/charts/karpenter/README.md @@ -91,6 +91,7 @@ cosign verify public.ecr.aws/karpenter/karpenter:1.0.0 \ | settings.featureGates.spotToSpotConsolidation | bool | `false` | spotToSpotConsolidation is ALPHA and is disabled by default. Setting this to true will enable spot replacement consolidation for both single and multi-node consolidation. | | settings.interruptionQueue | string | `""` | Interruption queue is the name of the SQS queue used for processing interruption events from EC2 Interruption handling is disabled if not specified. Enabling interruption handling may require additional permissions on the controller service account. Additional permissions are outlined in the docs. | | settings.isolatedVPC | bool | `false` | If true then assume we can't reach AWS services which don't have a VPC endpoint This also has the effect of disabling look-ups to the AWS pricing endpoint | +| settings.eksControlPlane | bool | `false` | Marking this true means that your cluster is running with an EKS control plane and Karpenter should attempt to discover cluster details from the DescribeCluster API | | settings.reservedENIs | string | `"0"` | Reserved ENIs are not included in the calculations for max-pods or kube-reserved This is most often used in the VPC CNI custom networking setup https://docs.aws.amazon.com/eks/latest/userguide/cni-custom-network.html | | settings.vmMemoryOverheadPercent | float | `0.075` | The VM memory overhead as a percent that will be subtracted from the total memory for all instance types. The value of `0.075` equals to 7.5%. | | strategy | object | `{"rollingUpdate":{"maxUnavailable":1}}` | Strategy for updating the pod. | diff --git a/charts/karpenter/templates/deployment.yaml b/charts/karpenter/templates/deployment.yaml index 4f0ea6b27576..c48718497aeb 100644 --- a/charts/karpenter/templates/deployment.yaml +++ b/charts/karpenter/templates/deployment.yaml @@ -128,6 +128,10 @@ spec: - name: ISOLATED_VPC value: "{{ . }}" {{- end }} + {{- with .Values.settings.eksControlPlane }} + - name: EKS_CONTROL_PLANE + value: "{{ . }}" + {{- end }} {{- with .Values.settings.vmMemoryOverheadPercent }} - name: VM_MEMORY_OVERHEAD_PERCENT value: "{{ . }}" diff --git a/charts/karpenter/values.yaml b/charts/karpenter/values.yaml index a6f7f38b71e7..72ff1160bbc3 100644 --- a/charts/karpenter/values.yaml +++ b/charts/karpenter/values.yaml @@ -166,6 +166,8 @@ settings: # -- If true then assume we can't reach AWS services which don't have a VPC endpoint # This also has the effect of disabling look-ups to the AWS pricing endpoint isolatedVPC: false + # Marking this true means that your cluster is running with an EKS control plane and Karpenter should attempt to discover cluster details from the DescribeCluster API + eksControlPlane: false # -- The VM memory overhead as a percent that will be subtracted from the total memory for all instance types. The value of `0.075` equals to 7.5%. vmMemoryOverheadPercent: 0.075 # -- Interruption queue is the name of the SQS queue used for processing interruption events from EC2 diff --git a/pkg/apis/v1/suite_test.go b/pkg/apis/v1/suite_test.go index 448e2e8290db..adaeed32983e 100644 --- a/pkg/apis/v1/suite_test.go +++ b/pkg/apis/v1/suite_test.go @@ -29,6 +29,7 @@ import ( coretest "sigs.k8s.io/karpenter/pkg/test" "github.com/aws/karpenter-provider-aws/pkg/apis" + "github.com/aws/karpenter-provider-aws/pkg/operator/options" "github.com/aws/karpenter-provider-aws/pkg/test" ) @@ -43,6 +44,7 @@ func TestAPIs(t *testing.T) { } var _ = BeforeSuite(func() { + ctx = options.ToContext(ctx, test.Options()) env = coretest.NewEnvironment(coretest.WithCRDs(apis.CRDs...), coretest.WithCRDs(v1alpha1.CRDs...)) awsEnv = test.NewEnvironment(ctx, env) }) diff --git a/pkg/cloudprovider/suite_test.go b/pkg/cloudprovider/suite_test.go index 5442eb6db502..d59f95be9b33 100644 --- a/pkg/cloudprovider/suite_test.go +++ b/pkg/cloudprovider/suite_test.go @@ -44,7 +44,6 @@ import ( v1 "github.com/aws/karpenter-provider-aws/pkg/apis/v1" "github.com/aws/karpenter-provider-aws/pkg/cloudprovider" "github.com/aws/karpenter-provider-aws/pkg/controllers/nodeclass/status" - controllersversion "github.com/aws/karpenter-provider-aws/pkg/controllers/providers/version" "github.com/aws/karpenter-provider-aws/pkg/fake" "github.com/aws/karpenter-provider-aws/pkg/operator/options" "github.com/aws/karpenter-provider-aws/pkg/test" @@ -1150,9 +1149,7 @@ var _ = Describe("CloudProvider", func() { Tags: []ec2types.Tag{{Key: aws.String("Name"), Value: aws.String("test-subnet-2")}}}, }}) controller := status.NewController(env.Client, awsEnv.SubnetProvider, awsEnv.SecurityGroupProvider, awsEnv.AMIProvider, awsEnv.InstanceProfileProvider, awsEnv.LaunchTemplateProvider) - versionController := controllersversion.NewController(awsEnv.VersionProvider) ExpectApplied(ctx, env.Client, nodePool, nodeClass) - ExpectSingletonReconciled(ctx, versionController) ExpectObjectReconciled(ctx, env.Client, controller, nodeClass) pod := coretest.UnschedulablePod(coretest.PodOptions{NodeSelector: map[string]string{corev1.LabelTopologyZone: "test-zone-1a"}}) ExpectProvisioned(ctx, env.Client, cluster, cloudProvider, prov, pod) @@ -1169,13 +1166,11 @@ var _ = Describe("CloudProvider", func() { Tags: []ec2types.Tag{{Key: aws.String("Name"), Value: aws.String("test-subnet-2")}}}, }}) controller := status.NewController(env.Client, awsEnv.SubnetProvider, awsEnv.SecurityGroupProvider, awsEnv.AMIProvider, awsEnv.InstanceProfileProvider, awsEnv.LaunchTemplateProvider) - versionController := controllersversion.NewController(awsEnv.VersionProvider) nodeClass.Spec.Kubelet = &v1.KubeletConfiguration{ MaxPods: aws.Int32(1), } ExpectApplied(ctx, env.Client, nodePool, nodeClass) nodeClass = ExpectExists(ctx, env.Client, nodeClass) - ExpectSingletonReconciled(ctx, versionController) ExpectObjectReconciled(ctx, env.Client, controller, nodeClass) pod1 := coretest.UnschedulablePod(coretest.PodOptions{NodeSelector: map[string]string{corev1.LabelTopologyZone: "test-zone-1a"}}) pod2 := coretest.UnschedulablePod(coretest.PodOptions{NodeSelector: map[string]string{corev1.LabelTopologyZone: "test-zone-1a"}}) @@ -1212,8 +1207,6 @@ var _ = Describe("CloudProvider", func() { nodeClass.Spec.SubnetSelectorTerms = []v1.SubnetSelectorTerm{{Tags: map[string]string{"Name": "test-subnet-1"}}} ExpectApplied(ctx, env.Client, nodePool, nodeClass) controller := status.NewController(env.Client, awsEnv.SubnetProvider, awsEnv.SecurityGroupProvider, awsEnv.AMIProvider, awsEnv.InstanceProfileProvider, awsEnv.LaunchTemplateProvider) - versionController := controllersversion.NewController(awsEnv.VersionProvider) - ExpectSingletonReconciled(ctx, versionController) ExpectObjectReconciled(ctx, env.Client, controller, nodeClass) podSubnet1 := coretest.UnschedulablePod() ExpectProvisioned(ctx, env.Client, cluster, cloudProvider, prov, podSubnet1) diff --git a/pkg/controllers/interruption/suite_test.go b/pkg/controllers/interruption/suite_test.go index 11aa11bf36ec..d66be882b6fc 100644 --- a/pkg/controllers/interruption/suite_test.go +++ b/pkg/controllers/interruption/suite_test.go @@ -49,6 +49,7 @@ import ( "github.com/aws/karpenter-provider-aws/pkg/controllers/interruption/messages/spotinterruption" "github.com/aws/karpenter-provider-aws/pkg/controllers/interruption/messages/statechange" "github.com/aws/karpenter-provider-aws/pkg/fake" + "github.com/aws/karpenter-provider-aws/pkg/operator/options" "github.com/aws/karpenter-provider-aws/pkg/providers/sqs" "github.com/aws/karpenter-provider-aws/pkg/test" "github.com/aws/karpenter-provider-aws/pkg/utils" @@ -82,6 +83,7 @@ func TestAPIs(t *testing.T) { } var _ = BeforeSuite(func() { + ctx = options.ToContext(ctx, test.Options()) env = coretest.NewEnvironment(coretest.WithCRDs(apis.CRDs...), coretest.WithCRDs(v1alpha1.CRDs...)) awsEnv = test.NewEnvironment(ctx, env) fakeClock = &clock.FakeClock{} diff --git a/pkg/controllers/nodeclass/status/ami_test.go b/pkg/controllers/nodeclass/status/ami_test.go index 7345b7e2ef86..ee9ad4d7bf01 100644 --- a/pkg/controllers/nodeclass/status/ami_test.go +++ b/pkg/controllers/nodeclass/status/ami_test.go @@ -36,7 +36,6 @@ import ( var _ = Describe("NodeClass AMI Status Controller", func() { var k8sVersion string BeforeEach(func() { - ExpectSingletonReconciled(ctx, versionController) k8sVersion = awsEnv.VersionProvider.Get(ctx) nodeClass = test.EC2NodeClass(v1.EC2NodeClass{ Spec: v1.EC2NodeClassSpec{ @@ -133,7 +132,6 @@ var _ = Describe("NodeClass AMI Status Controller", func() { } nodeClass.Spec.AMISelectorTerms = []v1.AMISelectorTerm{{Alias: "al2023@latest"}} ExpectApplied(ctx, env.Client, nodeClass) - ExpectSingletonReconciled(ctx, versionController) ExpectObjectReconciled(ctx, env.Client, statusController, nodeClass) nodeClass = ExpectExists(ctx, env.Client, nodeClass) @@ -218,7 +216,6 @@ var _ = Describe("NodeClass AMI Status Controller", func() { } nodeClass.Spec.AMISelectorTerms = []v1.AMISelectorTerm{{Alias: "al2@latest"}} ExpectApplied(ctx, env.Client, nodeClass) - ExpectSingletonReconciled(ctx, versionController) ExpectObjectReconciled(ctx, env.Client, statusController, nodeClass) nodeClass = ExpectExists(ctx, env.Client, nodeClass) @@ -422,7 +419,6 @@ var _ = Describe("NodeClass AMI Status Controller", func() { } nodeClass.Spec.AMISelectorTerms = []v1.AMISelectorTerm{{Alias: "windows2022@latest"}} ExpectApplied(ctx, env.Client, nodeClass) - ExpectSingletonReconciled(ctx, versionController) ExpectObjectReconciled(ctx, env.Client, statusController, nodeClass) nodeClass = ExpectExists(ctx, env.Client, nodeClass) diff --git a/pkg/controllers/nodeclass/status/instanceprofile_test.go b/pkg/controllers/nodeclass/status/instanceprofile_test.go index 3fdb2e50ac98..62e9420a9680 100644 --- a/pkg/controllers/nodeclass/status/instanceprofile_test.go +++ b/pkg/controllers/nodeclass/status/instanceprofile_test.go @@ -39,7 +39,6 @@ var _ = Describe("NodeClass InstanceProfile Status Controller", func() { It("should create the instance profile when it doesn't exist", func() { nodeClass.Spec.Role = "test-role" ExpectApplied(ctx, env.Client, nodeClass) - ExpectSingletonReconciled(ctx, versionController) ExpectObjectReconciled(ctx, env.Client, statusController, nodeClass) Expect(awsEnv.IAMAPI.InstanceProfiles).To(HaveLen(1)) @@ -65,7 +64,6 @@ var _ = Describe("NodeClass InstanceProfile Status Controller", func() { nodeClass.Spec.Role = "test-role" ExpectApplied(ctx, env.Client, nodeClass) - ExpectSingletonReconciled(ctx, versionController) ExpectObjectReconciled(ctx, env.Client, statusController, nodeClass) Expect(awsEnv.IAMAPI.InstanceProfiles).To(HaveLen(1)) @@ -91,7 +89,6 @@ var _ = Describe("NodeClass InstanceProfile Status Controller", func() { nodeClass.Spec.Role = "test-role" ExpectApplied(ctx, env.Client, nodeClass) - ExpectSingletonReconciled(ctx, versionController) ExpectObjectReconciled(ctx, env.Client, statusController, nodeClass) Expect(awsEnv.IAMAPI.InstanceProfiles).To(HaveLen(1)) @@ -117,7 +114,6 @@ var _ = Describe("NodeClass InstanceProfile Status Controller", func() { nodeClass.Spec.Role = "test-role" ExpectApplied(ctx, env.Client, nodeClass) - ExpectSingletonReconciled(ctx, versionController) ExpectObjectReconciled(ctx, env.Client, statusController, nodeClass) Expect(awsEnv.IAMAPI.InstanceProfiles).To(HaveLen(1)) @@ -133,7 +129,6 @@ var _ = Describe("NodeClass InstanceProfile Status Controller", func() { nodeClass.Spec.Role = "" nodeClass.Spec.InstanceProfile = lo.ToPtr("test-instance-profile") ExpectApplied(ctx, env.Client, nodeClass) - ExpectSingletonReconciled(ctx, versionController) ExpectObjectReconciled(ctx, env.Client, statusController, nodeClass) nodeClass = ExpectExists(ctx, env.Client, nodeClass) @@ -144,7 +139,6 @@ var _ = Describe("NodeClass InstanceProfile Status Controller", func() { nodeClass.Spec.Role = "" nodeClass.Spec.InstanceProfile = lo.ToPtr("test-instance-profile") ExpectApplied(ctx, env.Client, nodeClass) - ExpectSingletonReconciled(ctx, versionController) ExpectObjectReconciled(ctx, env.Client, statusController, nodeClass) Expect(awsEnv.IAMAPI.CreateInstanceProfileBehavior.Calls()).To(BeZero()) diff --git a/pkg/controllers/nodeclass/status/launchtemplate_test.go b/pkg/controllers/nodeclass/status/launchtemplate_test.go index b334f6fd9425..b9273453053d 100644 --- a/pkg/controllers/nodeclass/status/launchtemplate_test.go +++ b/pkg/controllers/nodeclass/status/launchtemplate_test.go @@ -59,7 +59,6 @@ var _ = Describe("NodeClass Launch Template CIDR Resolution Controller", func() nodeClass.Spec.AMIFamily = lo.ToPtr(family) nodeClass.Spec.AMISelectorTerms = terms ExpectApplied(ctx, env.Client, nodeClass) - ExpectSingletonReconciled(ctx, versionController) ExpectObjectReconciled(ctx, env.Client, statusController, nodeClass) Expect(awsEnv.LaunchTemplateProvider.ClusterCIDR.Load()).To(BeNil()) }, @@ -73,7 +72,6 @@ var _ = Describe("NodeClass Launch Template CIDR Resolution Controller", func() nodeClass.Spec.AMIFamily = lo.ToPtr(v1.AMIFamilyAL2023) nodeClass.Spec.AMISelectorTerms = []v1.AMISelectorTerm{{Alias: "al2023@latest"}} ExpectApplied(ctx, env.Client, nodeClass) - ExpectSingletonReconciled(ctx, versionController) ExpectObjectReconciled(ctx, env.Client, statusController, nodeClass) Expect(lo.FromPtr(awsEnv.LaunchTemplateProvider.ClusterCIDR.Load())).To(Equal("10.100.0.0/16")) nodeClass = ExpectExists(ctx, env.Client, nodeClass) diff --git a/pkg/controllers/nodeclass/status/suite_test.go b/pkg/controllers/nodeclass/status/suite_test.go index 1b3cf8f5d65b..afb51f1f069a 100644 --- a/pkg/controllers/nodeclass/status/suite_test.go +++ b/pkg/controllers/nodeclass/status/suite_test.go @@ -26,7 +26,6 @@ import ( "github.com/aws/karpenter-provider-aws/pkg/apis" v1 "github.com/aws/karpenter-provider-aws/pkg/apis/v1" "github.com/aws/karpenter-provider-aws/pkg/controllers/nodeclass/status" - controllersversion "github.com/aws/karpenter-provider-aws/pkg/controllers/providers/version" "github.com/aws/karpenter-provider-aws/pkg/operator/options" "github.com/aws/karpenter-provider-aws/pkg/test" @@ -41,7 +40,6 @@ var env *coretest.Environment var awsEnv *test.Environment var nodeClass *v1.EC2NodeClass var statusController *status.Controller -var versionController *controllersversion.Controller func TestAPIs(t *testing.T) { ctx = TestContextWithLogger(t) @@ -63,8 +61,6 @@ var _ = BeforeSuite(func() { awsEnv.InstanceProfileProvider, awsEnv.LaunchTemplateProvider, ) - - versionController = controllersversion.NewController(awsEnv.VersionProvider) }) var _ = AfterSuite(func() { diff --git a/pkg/controllers/providers/ssm/invalidation/suite_test.go b/pkg/controllers/providers/ssm/invalidation/suite_test.go index 7011428cd2ac..62fff9768498 100644 --- a/pkg/controllers/providers/ssm/invalidation/suite_test.go +++ b/pkg/controllers/providers/ssm/invalidation/suite_test.go @@ -29,7 +29,6 @@ import ( "github.com/aws/karpenter-provider-aws/pkg/apis" v1 "github.com/aws/karpenter-provider-aws/pkg/apis/v1" "github.com/aws/karpenter-provider-aws/pkg/controllers/providers/ssm/invalidation" - controllersversion "github.com/aws/karpenter-provider-aws/pkg/controllers/providers/version" "github.com/aws/karpenter-provider-aws/pkg/operator/options" "github.com/aws/karpenter-provider-aws/pkg/providers/ssm" "github.com/aws/karpenter-provider-aws/pkg/test" @@ -45,7 +44,6 @@ var stop context.CancelFunc var env *coretest.Environment var awsEnv *test.Environment var invalidationController *invalidation.Controller -var versionController *controllersversion.Controller func TestAWS(t *testing.T) { ctx = TestContextWithLogger(t) @@ -61,7 +59,6 @@ var _ = BeforeSuite(func() { awsEnv = test.NewEnvironment(ctx, env) invalidationController = invalidation.NewController(awsEnv.SSMCache, awsEnv.AMIProvider) - versionController = controllersversion.NewController(awsEnv.VersionProvider) }) var _ = AfterSuite(func() { @@ -85,7 +82,6 @@ var _ = Describe("SSM Invalidation Controller", func() { } }) It("shouldn't invalidate cache entries for non-deprecated AMIs", func() { - ExpectSingletonReconciled(ctx, versionController) _, err := awsEnv.AMIProvider.List(ctx, nodeClass) Expect(err).To(BeNil()) currentEntries := getSSMCacheEntries() @@ -104,7 +100,6 @@ var _ = Describe("SSM Invalidation Controller", func() { } }) It("shouldn't invalidate cache entries for deprecated AMIs when the SSM parameter is immutable", func() { - ExpectSingletonReconciled(ctx, versionController) nodeClass.Spec.AMISelectorTerms[0].Alias = "al2023@v20241024" _, err := awsEnv.AMIProvider.List(ctx, nodeClass) Expect(err).To(BeNil()) @@ -125,7 +120,6 @@ var _ = Describe("SSM Invalidation Controller", func() { } }) It("should invalidate cache entries for deprecated AMIs when the SSM parameter is mutable", func() { - ExpectSingletonReconciled(ctx, versionController) _, err := awsEnv.AMIProvider.List(ctx, nodeClass) Expect(err).To(BeNil()) currentEntries := getSSMCacheEntries() diff --git a/pkg/providers/amifamily/suite_test.go b/pkg/providers/amifamily/suite_test.go index eb2d8fe8f4c8..77a5452918c1 100644 --- a/pkg/providers/amifamily/suite_test.go +++ b/pkg/providers/amifamily/suite_test.go @@ -30,7 +30,6 @@ import ( . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" - . "sigs.k8s.io/karpenter/pkg/test/expectations" . "sigs.k8s.io/karpenter/pkg/utils/testing" "github.com/samber/lo" @@ -43,7 +42,6 @@ import ( "github.com/aws/karpenter-provider-aws/pkg/apis" v1 "github.com/aws/karpenter-provider-aws/pkg/apis/v1" - controllersversion "github.com/aws/karpenter-provider-aws/pkg/controllers/providers/version" "github.com/aws/karpenter-provider-aws/pkg/operator/options" "github.com/aws/karpenter-provider-aws/pkg/providers/amifamily" "github.com/aws/karpenter-provider-aws/pkg/test" @@ -53,7 +51,6 @@ var ctx context.Context var env *coretest.Environment var awsEnv *test.Environment var nodeClass *v1.EC2NodeClass -var versionController *controllersversion.Controller func TestAWS(t *testing.T) { ctx = TestContextWithLogger(t) @@ -73,7 +70,6 @@ var _ = BeforeSuite(func() { ctx = coreoptions.ToContext(ctx, coretest.Options()) ctx = options.ToContext(ctx, test.Options()) awsEnv = test.NewEnvironment(ctx, env) - versionController = controllersversion.NewController(awsEnv.VersionProvider) }) var _ = BeforeEach(func() { @@ -135,7 +131,6 @@ var _ = AfterSuite(func() { var _ = Describe("AMIProvider", func() { var version string BeforeEach(func() { - ExpectSingletonReconciled(ctx, versionController) version = awsEnv.VersionProvider.Get(ctx) nodeClass = test.EC2NodeClass() }) diff --git a/pkg/providers/launchtemplate/suite_test.go b/pkg/providers/launchtemplate/suite_test.go index d9fedea241e8..dce50be2e14f 100644 --- a/pkg/providers/launchtemplate/suite_test.go +++ b/pkg/providers/launchtemplate/suite_test.go @@ -63,7 +63,6 @@ import ( v1 "github.com/aws/karpenter-provider-aws/pkg/apis/v1" "github.com/aws/karpenter-provider-aws/pkg/cloudprovider" "github.com/aws/karpenter-provider-aws/pkg/controllers/nodeclass/status" - controllersversion "github.com/aws/karpenter-provider-aws/pkg/controllers/providers/version" "github.com/aws/karpenter-provider-aws/pkg/fake" "github.com/aws/karpenter-provider-aws/pkg/operator/options" "github.com/aws/karpenter-provider-aws/pkg/providers/amifamily" @@ -2078,8 +2077,6 @@ essential = true Expect(awsEnv.EC2API.CalledWithCreateLaunchTemplateInput.Len()).To(Equal(0)) }) It("should choose amis from SSM if no selector specified in EC2NodeClass", func() { - versionController := controllersversion.NewController(awsEnv.VersionProvider) - ExpectSingletonReconciled(ctx, versionController) version := awsEnv.VersionProvider.Get(ctx) awsEnv.SSMAPI.Parameters = map[string]string{ fmt.Sprintf("/aws/service/eks/optimized-ami/%s/amazon-linux-2/recommended/image_id", version): "test-ami-123", diff --git a/pkg/test/environment.go b/pkg/test/environment.go index dcd9b6c8aacd..2d9a9d243083 100644 --- a/pkg/test/environment.go +++ b/pkg/test/environment.go @@ -117,6 +117,10 @@ func NewEnvironment(ctx context.Context, env *coretest.Environment) *Environment subnetProvider := subnet.NewDefaultProvider(ec2api, subnetCache, availableIPAdressCache, associatePublicIPAddressCache) securityGroupProvider := securitygroup.NewDefaultProvider(ec2api, securityGroupCache) versionProvider := version.NewDefaultProvider(env.KubernetesInterface, eksapi) + // Ensure we're able to hydrate the version before starting any reliant controllers. + // Version updates are hydrated asynchronously after this, in the event of a failure + // the previously resolved value will be used. + lo.Must0(versionProvider.UpdateVersion(ctx)) instanceProfileProvider := instanceprofile.NewDefaultProvider(fake.DefaultRegion, iamapi, instanceProfileCache) ssmProvider := ssmp.NewDefaultProvider(ssmapi, ssmCache) amiProvider := amifamily.NewDefaultProvider(clock, versionProvider, ssmProvider, ec2api, ec2Cache) diff --git a/website/content/en/docs/reference/settings.md b/website/content/en/docs/reference/settings.md index 150a62c9662b..4aa95bd41826 100644 --- a/website/content/en/docs/reference/settings.md +++ b/website/content/en/docs/reference/settings.md @@ -24,6 +24,7 @@ Karpenter surfaces environment variables and CLI parameters to allow you to conf | HEALTH_PROBE_PORT | \-\-health-probe-port | The port the health probe endpoint binds to for reporting controller health (default = 8081)| | INTERRUPTION_QUEUE | \-\-interruption-queue | Interruption queue is the name of the SQS queue used for processing interruption events from EC2. Interruption handling is disabled if not specified. Enabling interruption handling may require additional permissions on the controller service account. Additional permissions are outlined in the docs.| | ISOLATED_VPC | \-\-isolated-vpc | If true, then assume we can't reach AWS services which don't have a VPC endpoint. This also has the effect of disabling look-ups to the AWS on-demand pricing endpoint.| +| EKS_CONTROL_PLANE | \-\-eks-control-plane | Marking this true means that your cluster is running with an EKS control plane and Karpenter should attempt to discover cluster details from the DescribeCluster API| | KARPENTER_SERVICE | \-\-karpenter-service | The Karpenter Service name for the dynamic webhook certificate| | KUBE_CLIENT_BURST | \-\-kube-client-burst | The maximum allowed burst of queries to the kube-apiserver (default = 300)| | KUBE_CLIENT_QPS | \-\-kube-client-qps | The smoothed rate of qps to kube-apiserver (default = 200)| diff --git a/website/content/en/preview/reference/settings.md b/website/content/en/preview/reference/settings.md index b8f38ef3afbd..a1a691496259 100644 --- a/website/content/en/preview/reference/settings.md +++ b/website/content/en/preview/reference/settings.md @@ -23,6 +23,7 @@ Karpenter surfaces environment variables and CLI parameters to allow you to conf | HEALTH_PROBE_PORT | \-\-health-probe-port | The port the health probe endpoint binds to for reporting controller health (default = 8081)| | INTERRUPTION_QUEUE | \-\-interruption-queue | Interruption queue is the name of the SQS queue used for processing interruption events from EC2. Interruption handling is disabled if not specified. Enabling interruption handling may require additional permissions on the controller service account. Additional permissions are outlined in the docs.| | ISOLATED_VPC | \-\-isolated-vpc | If true, then assume we can't reach AWS services which don't have a VPC endpoint. This also has the effect of disabling look-ups to the AWS on-demand pricing endpoint.| +| EKS_CONTROL_PLANE | \-\-eks-control-plane | Marking this true means that your cluster is running with an EKS control plane and Karpenter should attempt to discover cluster details from the DescribeCluster API| | KARPENTER_SERVICE | \-\-karpenter-service | The Karpenter Service name for the dynamic webhook certificate| | KUBE_CLIENT_BURST | \-\-kube-client-burst | The maximum allowed burst of queries to the kube-apiserver (default = 300)| | KUBE_CLIENT_QPS | \-\-kube-client-qps | The smoothed rate of qps to kube-apiserver (default = 200)| diff --git a/website/content/en/v0.32/reference/settings.md b/website/content/en/v0.32/reference/settings.md index 8c6f2440ac05..3a4f63c6879c 100644 --- a/website/content/en/v0.32/reference/settings.md +++ b/website/content/en/v0.32/reference/settings.md @@ -25,6 +25,7 @@ Karpenter surfaces environment variables and CLI parameters to allow you to conf | HEALTH_PROBE_PORT | \-\-health-probe-port | The port the health probe endpoint binds to for reporting controller health (default = 8081)| | INTERRUPTION_QUEUE | \-\-interruption-queue | Interruption queue is disabled if not specified. Enabling interruption handling may require additional permissions on the controller service account. Additional permissions are outlined in the docs.| | ISOLATED_VPC | \-\-isolated-vpc | If true, then assume we can't reach AWS services which don't have a VPC endpoint. This also has the effect of disabling look-ups to the AWS pricing endpoint.| +| EKS_CONTROL_PLANE | \-\-eks-control-plane | Marking this true means that your cluster is running with an EKS control plane and Karpenter should attempt to discover cluster details from the DescribeCluster API| | KARPENTER_SERVICE | \-\-karpenter-service | The Karpenter Service name for the dynamic webhook certificate| | KUBE_CLIENT_BURST | \-\-kube-client-burst | The maximum allowed burst of queries to the kube-apiserver (default = 300)| | KUBE_CLIENT_QPS | \-\-kube-client-qps | The smoothed rate of qps to kube-apiserver (default = 200)| diff --git a/website/content/en/v0.36/reference/settings.md b/website/content/en/v0.36/reference/settings.md index c39b46e50e02..488a18d5c066 100644 --- a/website/content/en/v0.36/reference/settings.md +++ b/website/content/en/v0.36/reference/settings.md @@ -25,6 +25,7 @@ Karpenter surfaces environment variables and CLI parameters to allow you to conf | HEALTH_PROBE_PORT | \-\-health-probe-port | The port the health probe endpoint binds to for reporting controller health (default = 8081)| | INTERRUPTION_QUEUE | \-\-interruption-queue | Interruption queue is disabled if not specified. Enabling interruption handling may require additional permissions on the controller service account. Additional permissions are outlined in the docs.| | ISOLATED_VPC | \-\-isolated-vpc | If true, then assume we can't reach AWS services which don't have a VPC endpoint. This also has the effect of disabling look-ups to the AWS on-demand pricing endpoint.| +| EKS_CONTROL_PLANE | \-\-eks-control-plane | Marking this true means that your cluster is running with an EKS control plane and Karpenter should attempt to discover cluster details from the DescribeCluster API| | KARPENTER_SERVICE | \-\-karpenter-service | The Karpenter Service name for the dynamic webhook certificate| | KUBE_CLIENT_BURST | \-\-kube-client-burst | The maximum allowed burst of queries to the kube-apiserver (default = 300)| | KUBE_CLIENT_QPS | \-\-kube-client-qps | The smoothed rate of qps to kube-apiserver (default = 200)| diff --git a/website/content/en/v0.37/reference/settings.md b/website/content/en/v0.37/reference/settings.md index 6a9bd1a2dfec..6a4694b6f786 100644 --- a/website/content/en/v0.37/reference/settings.md +++ b/website/content/en/v0.37/reference/settings.md @@ -25,6 +25,7 @@ Karpenter surfaces environment variables and CLI parameters to allow you to conf | HEALTH_PROBE_PORT | \-\-health-probe-port | The port the health probe endpoint binds to for reporting controller health (default = 8081)| | INTERRUPTION_QUEUE | \-\-interruption-queue | Interruption queue is the name of the SQS queue used for processing interruption events from EC2. Interruption handling is disabled if not specified. Enabling interruption handling may require additional permissions on the controller service account. Additional permissions are outlined in the docs.| | ISOLATED_VPC | \-\-isolated-vpc | If true, then assume we can't reach AWS services which don't have a VPC endpoint. This also has the effect of disabling look-ups to the AWS on-demand pricing endpoint.| +| EKS_CONTROL_PLANE | \-\-eks-control-plane | Marking this true means that your cluster is running with an EKS control plane and Karpenter should attempt to discover cluster details from the DescribeCluster API| | KARPENTER_SERVICE | \-\-karpenter-service | The Karpenter Service name for the dynamic webhook certificate| | KUBE_CLIENT_BURST | \-\-kube-client-burst | The maximum allowed burst of queries to the kube-apiserver (default = 300)| | KUBE_CLIENT_QPS | \-\-kube-client-qps | The smoothed rate of qps to kube-apiserver (default = 200)| diff --git a/website/content/en/v1.0/reference/settings.md b/website/content/en/v1.0/reference/settings.md index 11f14ac51462..3d75bb392698 100644 --- a/website/content/en/v1.0/reference/settings.md +++ b/website/content/en/v1.0/reference/settings.md @@ -24,6 +24,7 @@ Karpenter surfaces environment variables and CLI parameters to allow you to conf | HEALTH_PROBE_PORT | \-\-health-probe-port | The port the health probe endpoint binds to for reporting controller health (default = 8081)| | INTERRUPTION_QUEUE | \-\-interruption-queue | Interruption queue is the name of the SQS queue used for processing interruption events from EC2. Interruption handling is disabled if not specified. Enabling interruption handling may require additional permissions on the controller service account. Additional permissions are outlined in the docs.| | ISOLATED_VPC | \-\-isolated-vpc | If true, then assume we can't reach AWS services which don't have a VPC endpoint. This also has the effect of disabling look-ups to the AWS on-demand pricing endpoint.| +| EKS_CONTROL_PLANE | \-\-eks-control-plane | Marking this true means that your cluster is running with an EKS control plane and Karpenter should attempt to discover cluster details from the DescribeCluster API| | KARPENTER_SERVICE | \-\-karpenter-service | The Karpenter Service name for the dynamic webhook certificate| | KUBE_CLIENT_BURST | \-\-kube-client-burst | The maximum allowed burst of queries to the kube-apiserver (default = 300)| | KUBE_CLIENT_QPS | \-\-kube-client-qps | The smoothed rate of qps to kube-apiserver (default = 200)|