-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(processing): bump to karpenter v1 in SparkEmrContainersRuntime (#…
…744) * bump to karpenter v1
- Loading branch information
Showing
11 changed files
with
777 additions
and
50 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
...r-containers/resources/k8s/karpenter-provisioner-config/1.0.1/Dockerfile-nvme-raid0-mount
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
FROM public.ecr.aws/amazonlinux/amazonlinux:2023 | ||
RUN dnf -y install e2fsprogs bash mdadm util-linux | ||
COPY setup-runtime-storage ./ | ||
RUN chmod +x ./setup-runtime-storage | ||
ENTRYPOINT ["sh", "setup-runtime-storage"] |
102 changes: 102 additions & 0 deletions
102
.../emr-containers/resources/k8s/karpenter-provisioner-config/1.0.1/critical-provisioner.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
apiVersion: karpenter.sh/v1 | ||
kind: NodePool | ||
metadata: | ||
name: critical-{{az}} | ||
spec: | ||
# References cloud provider-specific custom resource, see your cloud provider specific documentation | ||
template: | ||
metadata: | ||
# Labels are arbitrary key-values that are applied to all nodes | ||
labels: | ||
role: critical | ||
node-lifecycle: on-demand | ||
|
||
spec: | ||
nodeClassRef: | ||
group: karpenter.k8s.aws | ||
kind: EC2NodeClass | ||
name: critical-nodes-{{az}} | ||
|
||
expireAfter: 720h | ||
|
||
taints: | ||
- key: role | ||
value: critical | ||
effect: NoSchedule | ||
|
||
# Requirements that constrain the parameters of provisioned nodes. | ||
# These requirements are combined with pod.spec.affinity.nodeAffinity rules. | ||
# Operators { In, NotIn } are supported to enable including or excluding values | ||
requirements: | ||
# Include general purpose instance families | ||
- key: "karpenter.k8s.aws/instance-family" | ||
operator: In | ||
values: ["m6gd"] | ||
- key: "kubernetes.io/arch" | ||
operator: In | ||
values: ["arm64"] | ||
# Exclude smaller instance sizes | ||
- key: "karpenter.k8s.aws/instance-size" | ||
operator: NotIn | ||
values: [nano, micro, small, medium, large] | ||
- key: "karpenter.sh/capacity-type" # If not included, the webhook for the AWS cloud provider will default to on-demand | ||
operator: In | ||
values: ["on-demand"] | ||
- key: "topology.kubernetes.io/zone" | ||
operator: In | ||
values: ["{{az}}"] | ||
- key: "karpenter.k8s.aws/instance-hypervisor" | ||
operator: In | ||
values: ["nitro"] | ||
|
||
# Resource limits constrain the total size of the cluster. | ||
# Limits prevent Karpenter from creating new instances once the limit is exceeded. | ||
|
||
limits: | ||
cpu: "3200" | ||
memory: 12800Gi | ||
|
||
disruption: | ||
|
||
consolidationPolicy: WhenEmptyOrUnderutilized | ||
|
||
# If omitted, the feature is disabled, nodes will never scale down due to low utilization | ||
consolidateAfter: 300s | ||
|
||
# Priority given to the provisioner when the scheduler considers which provisioner | ||
# to select. Higher weights indicate higher priority when comparing provisioners. | ||
# Specifying no weight is equivalent to specifying a weight of 0. | ||
weight: 10 | ||
|
||
--- | ||
apiVersion: karpenter.k8s.aws/v1 | ||
kind: EC2NodeClass | ||
metadata: | ||
name: critical-nodes-{{az}} | ||
spec: | ||
subnetSelectorTerms: | ||
- id: {{subnet-id}} | ||
securityGroupSelectorTerms: | ||
- tags: | ||
kubernetes.io/cluster/{{cluster-name}}: owned | ||
tags: | ||
KarpenerProvisionerName: "critical" | ||
|
||
role: {{ROLENAME}} | ||
|
||
metadataOptions: | ||
httpEndpoint: enabled | ||
httpProtocolIPv6: disabled | ||
httpPutResponseHopLimit: 2 | ||
httpTokens: required | ||
amiFamily: Bottlerocket | ||
amiSelectorTerms: | ||
- alias: bottlerocket@latest | ||
userData: | | ||
[settings.bootstrap-containers.bootstrap-nvme-raid0] | ||
source = "{{REPLACE-WITH-IMAGE-ECR}}" | ||
mode = "once" | ||
essential = true |
Oops, something went wrong.