From 096208ed16b2f82298440b9bfe956deb0b76e99f Mon Sep 17 00:00:00 2001 From: Utkarsh Pandit <123978308+sm-utkarsh@users.noreply.github.com> Date: Wed, 27 Nov 2024 16:16:43 +0530 Subject: [PATCH] Revert "chore: onboarding kubecost addon (#37)" This reverts commit 8db3f909406cca5eb12ef8110e904115d0d975b5. --- src/constructs/core-addon.ts | 12 ------------ src/constructs/eks-cluster.ts | 16 +--------------- src/constructs/eks-managed-addon.ts | 3 +-- 3 files changed, 2 insertions(+), 29 deletions(-) diff --git a/src/constructs/core-addon.ts b/src/constructs/core-addon.ts index 1725b84..7cbb7d4 100644 --- a/src/constructs/core-addon.ts +++ b/src/constructs/core-addon.ts @@ -92,16 +92,4 @@ export class KubeProxyAddon extends CoreAddonAbstract { serviceAccountName: 'kube-proxy', }); } -} - -export class KubeCostAddon extends CoreAddonAbstract { - /** - * - */ - constructor(scope: Construct, id: string, props: CoreAddonProps) { - super(scope, id, { - ...props, - addonName: 'kubecost_kubecost', - }); - } } \ No newline at end of file diff --git a/src/constructs/eks-cluster.ts b/src/constructs/eks-cluster.ts index 80293e9..a4fc301 100644 --- a/src/constructs/eks-cluster.ts +++ b/src/constructs/eks-cluster.ts @@ -6,7 +6,7 @@ import * as kms from 'aws-cdk-lib/aws-kms'; import * as lambda from 'aws-cdk-lib/aws-lambda'; import { Construct } from 'constructs'; import { CommonHelmCharts, StandardHelmProps } from './common-helm-charts'; -import { CoreDnsAddon, KubeProxyAddon, KubeCostAddon } from './core-addon'; +import { CoreDnsAddon, KubeProxyAddon } from './core-addon'; import { VpcCniAddonVersion, VpcEniAddon, @@ -105,7 +105,6 @@ export interface EKSClusterProps { readonly addonProps?: AddonProps; readonly coreDnsAddonProps?: CoreAddonValuesProps; readonly kubeProxyAddonProps?: CoreAddonValuesProps; - readonly kubeCostAddonProps?: CoreAddonValuesProps; readonly region: string; } @@ -412,19 +411,6 @@ export class EKSCluster extends Construct { }); } - if (props.kubeCostAddonProps) { - const kubeDnsAddonConfig = this.props.kubeCostAddonProps?.addonVersion && this.props.kubeCostAddonProps?.configurationValues - ? { addonVersion: this.props.kubeCostAddonProps?.addonVersion, configurationValues: this.props.kubeCostAddonProps?.configurationValues } - : { addonVersion: this.props.kubeCostAddonProps?.addonVersion }; - - new KubeCostAddon(this, 'KubeCostAddon', { - cluster: this.cluster, - ...kubeDnsAddonConfig, - resolveConflicts: true, - }); - } - - const storageclassDefault = new eks.KubernetesManifest(this, 'gp2', { overwrite: true, cluster: this.cluster, diff --git a/src/constructs/eks-managed-addon.ts b/src/constructs/eks-managed-addon.ts index ff3b401..63ceb7b 100644 --- a/src/constructs/eks-managed-addon.ts +++ b/src/constructs/eks-managed-addon.ts @@ -2,7 +2,6 @@ import * as cdk from 'aws-cdk-lib'; import * as eks from 'aws-cdk-lib/aws-eks'; import * as iam from 'aws-cdk-lib/aws-iam'; import { Construct } from 'constructs'; - export interface VpcCniAddonProps extends EksManagedAddonProps { readonly addonVersion?: VpcCniAddonVersion; readonly configurationValues?: string; @@ -209,4 +208,4 @@ export class VpcEniAddon extends EksManagedAddonAbstract { awsManagedPolicyName: 'AmazonEKS_CNI_Policy', }); } -} \ No newline at end of file +}