generated from ministryofjustice/template-repository
-
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.
Merge pull request #6714 from ministryofjustice/feat/apc-karpenter
✨ APC Karpenter
- Loading branch information
Showing
15 changed files
with
335 additions
and
8 deletions.
There are no files selected for viewing
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
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
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
3 changes: 3 additions & 0 deletions
3
terraform/environments/analytical-platform-compute/service-linked-roles.tf
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,3 @@ | ||
resource "aws_iam_service_linked_role" "spot" { | ||
aws_service_name = "spot.amazonaws.com" | ||
} |
6 changes: 6 additions & 0 deletions
6
...vironments/analytical-platform-compute/src/helm/charts/karpenter-configuration/Chart.yaml
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,6 @@ | ||
--- | ||
apiVersion: v2 | ||
name: karpenter-configuration | ||
description: A Helm chart to deploy Karpenter's configuration | ||
type: application | ||
version: 1.0.0 |
31 changes: 31 additions & 0 deletions
31
...rc/helm/charts/karpenter-configuration/templates/ec2-node-class-bottlerocket-general.yaml
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,31 @@ | ||
--- | ||
apiVersion: karpenter.k8s.aws/v1beta1 | ||
kind: EC2NodeClass | ||
metadata: | ||
name: bottlerocket-general | ||
spec: | ||
amiFamily: Bottlerocket | ||
role: {{ .Values.nodeRole }} | ||
subnetSelectorTerms: | ||
- tags: | ||
karpenter.sh/discovery: {{ .Values.clusterName }} | ||
securityGroupSelectorTerms: | ||
- tags: | ||
karpenter.sh/discovery: {{ .Values.clusterName }} | ||
amiSelectorTerms: | ||
- name: "bottlerocket-aws-k8s-{{ .Values.clusterVersion }}-x86_64-v{{ .Values.nodeVersion }}" | ||
metadataOptions: | ||
httpEndpoint: enabled | ||
httpPutResponseHopLimit: 1 | ||
httpTokens: required | ||
blockDeviceMappings: | ||
- deviceName: /dev/xvdb | ||
ebs: | ||
volumeSize: 100Gi | ||
volumeType: gp3 | ||
iops: 3000 | ||
encrypted: true | ||
kmsKeyID: {{ .Values.ebsKmsKeyId }} | ||
deleteOnTermination: true | ||
throughput: 125 | ||
detailedMonitoring: true |
35 changes: 35 additions & 0 deletions
35
...ompute/src/helm/charts/karpenter-configuration/templates/node-pool-general-on-demand.yaml
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,35 @@ | ||
--- | ||
apiVersion: karpenter.sh/v1beta1 | ||
kind: NodePool | ||
metadata: | ||
name: general-on-demand | ||
spec: | ||
template: | ||
metadata: | ||
labels: | ||
compute.analytical-platform.service.justice.gov.uk/karpenter-node-pool: "general-on-demand" | ||
spec: | ||
nodeClassRef: | ||
apiVersion: karpenter.k8s.aws/v1beta1 | ||
kind: EC2NodeClass | ||
name: bottlerocket-general | ||
taints: | ||
- key: compute.analytical-platform.service.justice.gov.uk/karpenter-node-pool | ||
value: "general-on-demand" | ||
effect: NoSchedule | ||
requirements: | ||
- key: kubernetes.io/arch | ||
operator: In | ||
values: ["amd64"] | ||
- key: kubernetes.io/os | ||
operator: In | ||
values: ["linux"] | ||
- key: karpenter.sh/capacity-type | ||
operator: In | ||
values: ["on-demand"] | ||
- key: karpenter.k8s.aws/instance-category | ||
operator: In | ||
values: ["c", "m", "r"] | ||
- key: karpenter.k8s.aws/instance-generation | ||
operator: Gt | ||
values: ["2"] |
Oops, something went wrong.