Skip to content

Commit

Permalink
fix: mitigate packaging error
Browse files Browse the repository at this point in the history
methods are not allowed to have names prefixed with `get` to avoid Java property
getters problems.
  • Loading branch information
andskli committed Nov 3, 2023
1 parent d3efab8 commit 9691d66
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 34 deletions.
47 changes: 29 additions & 18 deletions API.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 1 addition & 10 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export class Karpenter extends Construct {

private readonly chart: HelmChart;
private readonly serviceAccount: any;
private helmChartValues: Record<string, any>;
public helmChartValues: Record<string, any>;
private controllerIAMPolicyStatements: PolicyStatement[];
private interruptionQueue: IQueue | undefined;

Expand Down Expand Up @@ -367,15 +367,6 @@ export class Karpenter extends Construct {
this.serviceAccount.role.addManagedPolicy(managedPolicy);
}

/**
* getHelmChartValues returns the finalized values passed to the helm chart
*
* @returns Record<string, any>
*/
public getHelmChartValues(): Record<string, any> {
return this.helmChartValues;
}

/**
* Get the Helm repo URL based on the Karpenter version
*
Expand Down
2 changes: 1 addition & 1 deletion test/integ.karpenter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ class TestEKSStack extends Stack {
});

new CfnOutput(this, 'UpdateKubeConfigCommand', {
value: `aws eks update-kubeconfig --name ${cluster.clusterName} --role-arn ${cluster.adminRole.roleArn}`
value: `aws eks update-kubeconfig --name ${cluster.clusterName} --role-arn ${cluster.adminRole.roleArn}`,
});
}
}
Expand Down
8 changes: 3 additions & 5 deletions test/versions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,7 @@ describe('Karpenter Versions', () => {
t.hasResource('Custom::AWSCDK-EKS-Cluster', {});
t.hasResource('Custom::AWSCDK-EKS-HelmChart', {});

const helmChartValues = karpenter.getHelmChartValues();
expect(helmChartValues).toEqual(
expect(karpenter.helmChartValues).toEqual(
expect.objectContaining({
settings: expect.objectContaining({
aws: expect.objectContaining({
Expand Down Expand Up @@ -188,13 +187,12 @@ describe('Karpenter Versions', () => {
version: 'v0.32.0',
});

const helmChartValues = karpenter.getHelmChartValues();
expect(helmChartValues).not.toContain(
expect(karpenter.helmChartValues).not.toContain(
expect.objectContaining({
aws: expect.anything,
}),
);
expect(helmChartValues).toEqual(
expect(karpenter.helmChartValues).toEqual(
expect.objectContaining({
settings: expect.objectContaining({
clusterName: expect.any(String),
Expand Down

0 comments on commit 9691d66

Please sign in to comment.