-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Switches presubmits to track main. (#139) * Switches presubmits to track main. * Address https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/ * Added WORKING_GROUP (#140) * Readme edits + organization docs (#142) * readme and admin docs * faq edits * doc edits * edits and organization * readme edits * readme edit * Remove Queue reference from NodeGroup overprovisioning example (#145) * correct a typo in README.md (#143) * readme typo (#146) * Capitalise TERMS.md link (#147) * Update OWNERS (#150) * Update README.md (#149) * Fix installation to target `main` branch instead of `master` (#153) * Cleaned up FAQs, Working Group Invite, and other typos (#148) * Update OWNERS (#155) add tabern * Switches to Allocatable from Capacity and exposes more human readable (#154) values in capacity reservation status. * Update FAQs.md (#156) * Update DESIGN.md (#158) Fixed typos * Update README.md (#160) * Update README.md * Update README.md * Update README.md * Initial github banner image (#162) * Initial github banner image * Small image fix and add to readme * Remove repo name from top of readme * Smaller readme banner. Add repo preview * HA Bottoms out at 1 DesiredReplica for Utilization and Value metrics (#161) * Update README.md (#163) * changed consumer context from customer to user (#168) * changed consumer context from customer to user (#167) * Reorganized OWNERS (#169) * grammar & syntax updates in docs/DESIGN.md (#170) * Add unit test for scalable node group controller (#157) * Add unit test for scalable node group controller * Add some more tests * Add error checks for SetReplicas call * Fix Unit tests * rename fakeError * update tests * rename a few things * rename fake error object * Fixed pointers comparison * Simplify tests a little * Updated release image to use public ecr (#171) * Improved release automation. Cut pre-release for v0.1.1 (#174) * Changed desiredReplicas to be a pointer to allow for displaying scale to (#172) * Changed desiredReplicas to be a pointer to allow for displaying scale to zero. * Updated tests * Created a minimal Helm Chart (#175) * Implemented a minimal helm chart with release automation using Github Pages * Removed stray files * Updated chart * Updated install instructions (#176) * Updated install instructions * Fixed a typo * Improved calendar invite for Working Group (#177) * Add working group meeting notes (#180) * Add working group meeting notes (#182) * Create NOTICE (#178) * Fix errors in hack/quick-install.sh (#185) Fix issues: 1/ Command helm upgrade --install karpenter charts/karpenter fails. 2/ Uninstall: Current order of operation leaves deployment: karpenter and statefulset: prometheus-karpenter-monitor remaining: * Fixed a few typos in developer guide (#187) The developer guide hadn't been updated after some of the make commands changed name. Also corrected an environment variable name. * Add notes from working group meeting (#192) * ScheduledCapacity API (#194) * fixed a small typo in metricsproducer (#195) * Add notes from working group meeting (#196) * Implemented Scheduled Capacity Metrics Producer (#200) * fixing merge problems * Implemented Scheduled Capacity Metrics Producer * Design Doc for ScheduledCapacity (#197) * Delete karpenter.ics (#204) Deleted in ics invite favor of google calendar. * enable build on provisioner branch too (#206) * Validations for MetricsProducers (#211) * MetricsProducer Schedule Validation * cleaned up validation efforts for non-schedules * Added Validation checks in all resource reconcile loops * Add working group notes (#217) * add working group notes * add some more notes to WG notes * Rebase provisioner-work into main. (#219) * Provisioner api (#198) * First commit for provisioner spec * remove comented code * Added a simple controller skeleton (#199) * Adding capacity API client (#202) * Adding fleet API client * Add capacity provisioner and refine the interface definitions * Provisioner skeleton code (#203) * Wired up controller to main and trivial test (#205) * More tweaks to test wiring (#207) * Add end to end functionality for pending pods (#209) * add end to end functionality * simplify functions after PR feedback * simplify create fleet method * fix comments, remove new line char and remove private create method * Implemented cloud provider initialization (#208) * Implemented Cloud Provider initialization and discovery logic. * Implemented cloud provider initialization * Cloudprovider improvements: Lazy Initialization, IAM Separation, and Topology Support (#213) * Create node objects and bind pods to nodes (#215) * Create node objects and bind pods to nodes * fix error check * fix error check * Reoriented Capacity CloudProvider around BinPacking (#214) * Setup packing interface and refactored instance provider for launching constrained instances (#216) * Pausing on packing * Setup packing interface and refactored instance provider for launching constrained instances Co-authored-by: Prateek Gogia <[email protected]> * Defaults for Metrics Producers (#222) * Refactor cloud provider, add packing package (#221) * refactor cloud provider, add packing package * Refactored allocator and improve logging (#218) * Skeleton code for reallocator (#235) * Generated v0.1.2 release Co-authored-by: Nate Taber <[email protected]> Co-authored-by: Guy Templeton <[email protected]> Co-authored-by: dherman <[email protected]> Co-authored-by: Guy Templeton <[email protected]> Co-authored-by: Tom Kerkhove <[email protected]> Co-authored-by: alethatarn <[email protected]> Co-authored-by: Justin Garrison <[email protected]> Co-authored-by: Cameron Senese <[email protected]> Co-authored-by: Prateek Gogia <[email protected]> Co-authored-by: Prateek Gogia <[email protected]> Co-authored-by: Henri Yandell <[email protected]> Co-authored-by: Jacob Gabrielson <[email protected]> Co-authored-by: Nick Tran <[email protected]>
- Loading branch information
1 parent
9f4da79
commit 6d90eb2
Showing
103 changed files
with
4,967 additions
and
424 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 was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Karpenter | ||
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. |
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 |
---|---|---|
@@ -1,3 +1,7 @@ | ||
approvers: | ||
- ellistarn | ||
- JacobGabrielson | ||
- tabern | ||
reviewers: | ||
- prateekgogia | ||
- njtran |
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 |
---|---|---|
@@ -1,34 +1,53 @@ | ||
# Karpenter | ||
![](./docs/images/logo.jpeg) | ||
![](./docs/images/karpenter-banner.png) | ||
|
||
Karpenter is a metrics-driven autoscaler for Kubernetes. It's performant, extensible, and can autoscale anything that implements the Kubernetes [scale subresource](https://github.com/kubernetes/community/blob/master/contributors/design-proposals/autoscaling/horizontal-pod-autoscaler.md#scale-subresource). | ||
Karpenter is a metrics-driven autoscaler built for Kubernetes and can run in any Kubernetes cluster anywhere. It's performant, extensible, and can autoscale anything that implements the Kubernetes [scale subresource](https://github.com/kubernetes/community/blob/master/contributors/design-proposals/autoscaling/horizontal-pod-autoscaler.md#scale-subresource). | ||
|
||
This is an early stage, experimental project built with ❤️ and is available as a **developer preview**. We're excited you are here - jump in, let us know what you think. We welcome contributions. | ||
|
||
## Getting Started | ||
We will learn about Karpenter's APIs, look at some sample configurations, and install Karpenter's Controller. | ||
We will learn about Karpenter's APIs, look at some sample configurations, and install Karpenter's Controller. Alternatively, you can dive right into the [demo](https://github.com/ellistarn/karpenter-aws-demo). | ||
|
||
### APIs | ||
Karpenter defines three custom resources to configure autoscaling behavior. | ||
|
||
**[HorizontalAutoscalers](./pkg/apis/autoscaling/v1alpha1/horizontalautoscaler.go)** define your autoscaling policy. It's modeled closely after the [HoriontalPodAutoscaler](https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/), but has been generalized to support autoscaling for arbitrary resources. HorizontalAutoscalers periodically query metrics configured by `spec.metrics`, compute an autoscaling decision controlled by `spec.behavior`, and adjust the replicas of their `spec.scaleTargetRef`. Unlike the HPA, Karpenter's HorizontalAutoscalers integrate directly with Prometheus and can use any [promql](https://prometheus.io/docs/prometheus/latest/querying/basics/) response of type "instant vector" in their calculations. | ||
**[HorizontalAutoscalers](./pkg/apis/autoscaling/v1alpha1/horizontalautoscaler.go)** define your autoscaling policy. It's modeled closely after the [HorizontalPodAutoscaler](https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/), but has been generalized to support autoscaling for arbitrary resources. HorizontalAutoscalers periodically query metrics configured by `spec.metrics`, compute an autoscaling decision controlled by `spec.behavior`, and adjust the replicas of their `spec.scaleTargetRef`. Unlike the HPA, Karpenter's HorizontalAutoscalers integrate directly with Prometheus and can use any [promql](https://prometheus.io/docs/prometheus/latest/querying/basics/) response of type "instant vector" in their calculations. | ||
|
||
**[MetricsProducers](./pkg/apis/autoscaling/v1alpha1/metricsproducer.go)** generate Prometheus metrics for commonly used autoscaling use cases. They periodically calculate a metric based on their configuration and expose it at a metrics endpoint that can be scraped by Prometheus. If you already have metrics you wish to use for autoscaling available in Prometheus, it is not necessary to define a Metrics Producer. | ||
|
||
**[ScalableNodeGroups](./pkg/apis/autoscaling/v1alpha1/scalablenodegroup.go)** provide a minimal way to point a HorizontalAutoscaler's `scaleTargetRef` to a Cloud Provider's Node Group API. Kubernetes core does not define an abstraction for Node Group. Instead, Cloud Providers typically expose non-Kubernetes Node Group APIs. ScalableNodeGroups are a shim in front of these APIs that are limited to `spec.replicas` and `status.replicas`. It is not a replcement or wrapper for these APIs. If you're using a solution that provides a Kubernetes API (e.g. [Kops](https://github.com/kubernetes/kops) or [Cluster API](https://github.com/kubernetes-sigs/cluster-api)), you can point the HorizontalAutoscaler's `scaleTargetRef` to these resources instead of a ScalableNodeGroup. | ||
**[ScalableNodeGroups](./pkg/apis/autoscaling/v1alpha1/scalablenodegroup.go)** provide a minimal way to point a HorizontalAutoscaler's `scaleTargetRef` to a Cloud Provider's Node Group API. Kubernetes core does not define an abstraction for Node Group. Instead, Cloud Providers typically expose non-Kubernetes Node Group APIs. ScalableNodeGroups are a shim in front of these APIs that are limited to `spec.replicas` and `status.replicas`. It is not a replacement or wrapper for these APIs. If you're using a solution that provides a Kubernetes API (e.g. [Kops](https://github.com/kubernetes/kops) or [Cluster API](https://github.com/kubernetes-sigs/cluster-api)), you can point the HorizontalAutoscaler's `scaleTargetRef` to these resources instead of a ScalableNodeGroup. | ||
|
||
[Learn more](./docs) about the different ways to configure Karpenter's resources. | ||
|
||
## Installation | ||
Follow the setup recommendations of your cloud provider. | ||
- [AWS](./docs/aws/README.md#installation) | ||
|
||
Then install the controller. | ||
### Quick Install - Controller + Dependencies | ||
``` | ||
CLOUD_PROVIDER=aws | ||
VERSION=v0.1.0 | ||
kubectl apply -f https://raw.githubusercontent.com/awslabs/karpenter/master/releases/${CLOUD_PROVIDER}/${VERSION}.yaml | ||
sh -c "$(curl -fsSL https://raw.githubusercontent.com/awslabs/karpenter/v0.1.2/hack/quick-install.sh)" | ||
``` | ||
|
||
# Docs | ||
### Kubectl - Standalone | ||
``` | ||
kubectl apply -f https://raw.githubusercontent.com/awslabs/karpenter/v0.1.2/releases/aws/manifest.yaml | ||
``` | ||
|
||
### Helm - Standalone | ||
``` | ||
helm repo add karpenter https://awslabs.github.io/karpenter/charts | ||
helm install karpenter karpenter/karpenter | ||
``` | ||
|
||
## Docs | ||
- [Examples](./docs/examples) | ||
- [Working Group](./docs/working-group) | ||
- [Developer Guide](./docs/DEVELOPER_GUIDE.md) | ||
- [Design](./docs/DESIGN.md) | ||
- [Design](./docs/designs/DESIGN.md) | ||
- [FAQs](./docs/FAQs.md) | ||
- [Contributing](./docs/CONTRIBUTING.md) | ||
|
||
## Terms | ||
Karpenter is an early stage, experimental project that is currently maintained by AWS and available as a preview. We request that you do not use Karpenter for production workloads at this time. See details in our [terms](./docs/TERMS.md). | ||
|
||
## License | ||
This project is licensed under the Apache-2.0 License. |
This file was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
apiVersion: v1 | ||
entries: | ||
karpenter: | ||
- apiVersion: v2 | ||
created: "2021-02-10T11:12:45.601847-08:00" | ||
description: A Helm chart for https://github.com/awslabs/karpenter/. | ||
digest: 3a64d3c51f5a706df905e49bdd7fb767d87658540864c4b97ffb959c3b15c8dd | ||
name: karpenter | ||
type: application | ||
urls: | ||
- karpenter-v0.1.2.tgz | ||
version: v0.1.2 | ||
- apiVersion: v2 | ||
created: "2021-02-10T11:12:45.601157-08:00" | ||
description: A Helm chart for https://github.com/awslabs/karpenter/. | ||
digest: 39685c8cbe9a757ca48721aed08b49111fef18bc2a9f67d3223f19d0706f09f7 | ||
name: karpenter | ||
type: application | ||
urls: | ||
- karpenter-v0.1.1.tgz | ||
version: v0.1.1 | ||
generated: "2021-02-10T11:12:45.599256-08:00" |
Binary file not shown.
Binary file not shown.
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,9 @@ | ||
dependencies: | ||
- name: cert-manager | ||
repository: https://charts.jetstack.io | ||
version: v1.1.0 | ||
- name: kube-prometheus-stack | ||
repository: https://prometheus-community.github.io/helm-charts | ||
version: 12.3.0 | ||
digest: sha256:5595919ac269b4105dd65d20eb27cb271b8976c1d10903e0b504d349df30f017 | ||
generated: "2020-12-02T11:48:25.741819-08:00" |
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,5 @@ | ||
apiVersion: v2 | ||
name: karpenter | ||
description: A Helm chart for https://github.com/awslabs/karpenter/. | ||
type: application | ||
version: v0.1.2 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
resources: | ||
- serviceaccount.yaml | ||
- role.yaml | ||
- role_binding.yaml | ||
- leader_election_role.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
Oops, something went wrong.