Skip to content

Commit

Permalink
Remove Addons (#319)
Browse files Browse the repository at this point in the history
* Remove metrics server

* remove aws-node-termination-handler

* Remove nvidia_device_plugin
  • Loading branch information
errm authored Jun 27, 2022
1 parent 8ad9bb2 commit 0e9bec5
Show file tree
Hide file tree
Showing 18 changed files with 0 additions and 1,071 deletions.
7 changes: 0 additions & 7 deletions examples/cluster/gpu_node_group/cluster.tf

This file was deleted.

38 changes: 0 additions & 38 deletions examples/cluster/gpu_node_group/main.tf

This file was deleted.

2 changes: 0 additions & 2 deletions examples/cluster/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,10 @@ module "cluster" {
vpc_config = data.terraform_remote_state.environment.outputs.vpc_config
iam_config = data.terraform_remote_state.environment.outputs.iam_config

metrics_server = true
aws_ebs_csi_driver = var.aws_ebs_csi_driver

critical_addons_node_group_key_name = "development"


endpoint_public_access = true
endpoint_public_access_cidrs = ["${chomp(data.http.ip.body)}/32"]

Expand Down
13 changes: 0 additions & 13 deletions hack/generate_addons.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,11 @@ set -xeuo pipefail
cd "$(dirname "$(realpath "${BASH_SOURCE[0]}")")"
ADDONS_DIR=../modules/cluster/addons

helm repo add eks https://aws.github.io/eks-charts
helm repo add autoscaler https://kubernetes.github.io/autoscaler
helm repo add nvdp https://nvidia.github.io/k8s-device-plugin
helm repo add eks https://aws.github.io/eks-charts
helm repo update

helm_template() {
helm template --no-hooks --namespace=kube-system --version $3 -f $ADDONS_DIR/helm/$2.yaml $2 $1/$2${4:-} | grep -v Helm > $ADDONS_DIR/$2.yaml
}

kustomize_build() {
kustomize build $ADDONS_DIR/kustomize/overlays/$1 > $ADDONS_DIR/$1.yaml
}

helm_template eks aws-node-termination-handler 0.18.4
helm_template autoscaler cluster-autoscaler 9.18.1
helm_template nvdp nvidia-device-plugin 0.11.0

curl -o $ADDONS_DIR/kustomize/overlays/metrics-server/resources/metrics-server.yaml -L https://github.com/kubernetes-sigs/metrics-server/releases/download/v0.5.2/components.yaml
kustomize_build metrics-server

5 changes: 0 additions & 5 deletions modules/cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ module "cluster" {
* Configures [envelope encryption](https://aws.amazon.com/about-aws/whats-new/2020/03/amazon-eks-adds-envelope-encryption-for-secrets-with-aws-kms/) for Kubernetes secrets with KMS
* Provisions a node group dedicated to running critical cluster level services:
* [cluster-autoscaler](https://github.com/kubernetes/autoscaler/tree/master/cluster-autoscaler)
* [metrics-server](https://github.com/kubernetes-sigs/metrics-server)
* [aws-node-termination-handler](https://github.com/aws/aws-node-termination-handler)
* Configures EKS [cluster authentication](https://docs.aws.amazon.com/eks/latest/userguide/managing-auth.html)
* Provisions security groups for node to cluster and infra node communication.
* Supports [IAM Roles for service accounts](https://docs.aws.amazon.com/eks/latest/userguide/iam-roles-for-service-accounts.html)
Expand Down Expand Up @@ -87,9 +85,6 @@ specify the arn of an existing key by setting `kms_cmk_arn`
| addon | variable | default | iam role variable |
|-------|----------|---------|-------------------|
| [Cluster Autoscaler](https://github.com/kubernetes/autoscaler/tree/master/cluster-autoscaler) | `cluster_autoscaler` | ✅ enabled | `cluster_autoscaler_iam_role_arn` |
| [AWS Node Termination Handler](https://github.com/aws/aws-node-termination-handler) | `aws_node_termination_handler` | ✅ enabled ||
| [NVIDIA device plugin for Kubernetes](https://github.com/NVIDIA/k8s-device-plugin) | `nvidia_device_plugin` | ✅ enabled (but only schedules to gpu nodes) ||
| [Kubernetes Metrics Server](https://github.com/kubernetes-sigs/metrics-server) | `metrics_server` | ❌ disabled ||
| [Amazon Elastic Block Store (EBS) CSI driver](https://github.com/kubernetes-sigs/aws-ebs-csi-driver/) | `aws_ebs_csi_driver` | ❌ disabled | `aws_ebs_csi_driver_iam_role_arn` |

Note that setting these variables to false will not remove provisioned add-ons from an existing cluster.
Expand Down
32 changes: 0 additions & 32 deletions modules/cluster/addons.tf
Original file line number Diff line number Diff line change
Expand Up @@ -69,35 +69,3 @@ module "cluster_autoscaler" {
}
)
}

module "metrics_server" {
source = "./kubectl"
config = local.config
apply = var.metrics_server
manifest = file("${path.module}/addons/metrics-server.yaml")
replace = true
}

module "pod_nanny" {
source = "./kubectl"
config = local.config
apply = var.metrics_server
manifest = file("${path.module}/addons/pod-nanny.yaml")
}

module "aws_node_termination_handler" {
source = "./kubectl"
config = local.config
apply = var.aws_node_termination_handler
manifest = file("${path.module}/addons/aws-node-termination-handler.yaml")
replace = true
}

module "nvidia_device_plugin" {
source = "./kubectl"
config = local.config
apply = var.nvidia_device_plugin
manifest = file("${path.module}/addons/nvidia-device-plugin.yaml")
replace = true
}

Loading

0 comments on commit 0e9bec5

Please sign in to comment.