Skip to content

Commit

Permalink
update: karpenter to v1, remove from autoscaling sub-command
Browse files Browse the repository at this point in the history
  • Loading branch information
aaroniscode committed Aug 18, 2024
1 parent 78507af commit 957f47e
Show file tree
Hide file tree
Showing 12 changed files with 107 additions and 311 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@ The easy button for learning, testing, and demoing Amazon EKS:
## Why `eksdemo`?
While creating an EKS cluster is fairly easy thanks to [`eksctl`](https://eksctl.io/), manually installing and configuring applications on EKS is complex, time consuming and error-prone. One of the most powerful feature of `eksdemo` is its extensive application catalog. An application can be installed (including dependencies) with a single command.

For example, the command: **`eksdemo install autoscaling-karpenter -c <cluster-name>`** will:
For example, the command: **`eksdemo install karpenter -c <cluster-name>`** will:
1. Create the EC2 Spot Service Linked Role (if it doesn't already exist)
2. Create the Karpenter Controller IAM Role (IRSA)
3. Create the Karpenter Node IAM Role
4. Create an SQS Queue and EventBridge rules for native Spot Termination Handling
5. Add an entry to the `aws-auth` ConfigMap for the Karpenter Node IAM Role
6. Install the Karpenter Helm Chart
7. Create default Karpenter `Provisioner` and `AWSNodeTemplate` Custom Resources
7. Create default Karpenter `NodePool` and `EC2NodeClass` Custom Resources

### No Magic
Application installs are:
Expand Down
2 changes: 0 additions & 2 deletions cmd/install/autoscaling.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package install
import (
"github.com/awslabs/eksdemo/pkg/application"
"github.com/awslabs/eksdemo/pkg/application/autoscaling/cluster_autoscaler"
"github.com/awslabs/eksdemo/pkg/application/autoscaling/karpenter"
"github.com/awslabs/eksdemo/pkg/application/autoscaling/keda"
"github.com/awslabs/eksdemo/pkg/application/autoscaling/vpa"
"github.com/spf13/cobra"
Expand Down Expand Up @@ -48,7 +47,6 @@ func NewUninstallAutoscalingCmd() *cobra.Command {
func init() {
autoscalingApps = []func() *application.Application{
cluster_autoscaler.NewApp,
karpenter.NewApp,
keda.NewApp,
vpa.NewApp,
}
Expand Down
4 changes: 2 additions & 2 deletions cmd/install/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"github.com/awslabs/eksdemo/pkg/application/appmesh_controller"
"github.com/awslabs/eksdemo/pkg/application/argo/argo_cd"
"github.com/awslabs/eksdemo/pkg/application/autoscaling/cluster_autoscaler"
"github.com/awslabs/eksdemo/pkg/application/autoscaling/karpenter"
"github.com/awslabs/eksdemo/pkg/application/aws_fluent_bit"
"github.com/awslabs/eksdemo/pkg/application/aws_lb_controller"
"github.com/awslabs/eksdemo/pkg/application/cert_manager"
Expand All @@ -19,6 +18,7 @@ import (
"github.com/awslabs/eksdemo/pkg/application/harbor"
"github.com/awslabs/eksdemo/pkg/application/headlamp"
"github.com/awslabs/eksdemo/pkg/application/k8sgpt"
"github.com/awslabs/eksdemo/pkg/application/karpenter"
"github.com/awslabs/eksdemo/pkg/application/keycloak_amg"
"github.com/awslabs/eksdemo/pkg/application/kube_state_metrics"
"github.com/awslabs/eksdemo/pkg/application/metrics_server"
Expand Down Expand Up @@ -76,6 +76,7 @@ func NewInstallCmd() *cobra.Command {
cmd.AddCommand(NewInstallIstioCmd())
cmd.AddCommand(NewInstallAliasCmds(istioApps, "istio-")...)
cmd.AddCommand(k8sgpt.NewApp().NewInstallCmd())
cmd.AddCommand(karpenter.NewApp().NewInstallCmd())
cmd.AddCommand(keycloak_amg.NewApp().NewInstallCmd())
cmd.AddCommand(NewInstallKubePrometheusCmd())
cmd.AddCommand(NewInstallAliasCmds(kubePrometheusApps, "kube-prometheus-")...)
Expand Down Expand Up @@ -104,7 +105,6 @@ func NewInstallCmd() *cobra.Command {
cmd.AddCommand(NewInstallAliasCmds([]func() *application.Application{argo_cd.NewApp}, "argo")...)
cmd.AddCommand(NewInstallAliasCmds([]func() *application.Application{cluster_autoscaler.NewApp}, "")...)
cmd.AddCommand(NewInstallAliasCmds([]func() *application.Application{ebs_csi.NewApp}, "")...)
cmd.AddCommand(NewInstallAliasCmds([]func() *application.Application{karpenter.NewApp}, "")...)

return cmd
}
Expand Down
6 changes: 4 additions & 2 deletions cmd/install/uninstall.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"github.com/awslabs/eksdemo/pkg/application/appmesh_controller"
"github.com/awslabs/eksdemo/pkg/application/argo/argo_cd"
"github.com/awslabs/eksdemo/pkg/application/autoscaling/cluster_autoscaler"
"github.com/awslabs/eksdemo/pkg/application/autoscaling/karpenter"
"github.com/awslabs/eksdemo/pkg/application/aws_fluent_bit"
"github.com/awslabs/eksdemo/pkg/application/aws_lb_controller"
"github.com/awslabs/eksdemo/pkg/application/cert_manager"
Expand All @@ -18,6 +17,8 @@ import (
"github.com/awslabs/eksdemo/pkg/application/goldilocks"
"github.com/awslabs/eksdemo/pkg/application/harbor"
"github.com/awslabs/eksdemo/pkg/application/headlamp"
"github.com/awslabs/eksdemo/pkg/application/k8sgpt"
"github.com/awslabs/eksdemo/pkg/application/karpenter"
"github.com/awslabs/eksdemo/pkg/application/keycloak_amg"
"github.com/awslabs/eksdemo/pkg/application/kube_state_metrics"
"github.com/awslabs/eksdemo/pkg/application/metrics_server"
Expand Down Expand Up @@ -74,6 +75,8 @@ func NewUninstallCmd() *cobra.Command {
cmd.AddCommand(NewUninstallAliasCmds(ingressControllers, "ingress-")...)
cmd.AddCommand(NewUninstallIstioCmd())
cmd.AddCommand(NewUninstallAliasCmds(istioApps, "istio-")...)
cmd.AddCommand(k8sgpt.NewApp().NewUninstallCmd())
cmd.AddCommand(karpenter.NewApp().NewUninstallCmd())
cmd.AddCommand(keycloak_amg.NewApp().NewUninstallCmd())
cmd.AddCommand(NewUninstallKubePrometheusCmd())
cmd.AddCommand(NewUninstallAliasCmds(kubePrometheusApps, "kube-prometheus-")...)
Expand Down Expand Up @@ -102,7 +105,6 @@ func NewUninstallCmd() *cobra.Command {
cmd.AddCommand(NewUninstallAliasCmds([]func() *application.Application{argo_cd.NewApp}, "argo")...)
cmd.AddCommand(NewUninstallAliasCmds([]func() *application.Application{cluster_autoscaler.NewApp}, "")...)
cmd.AddCommand(NewUninstallAliasCmds([]func() *application.Application{ebs_csi.NewApp}, "")...)
cmd.AddCommand(NewUninstallAliasCmds([]func() *application.Application{karpenter.NewApp}, "")...)

return cmd
}
Expand Down
Loading

0 comments on commit 957f47e

Please sign in to comment.