Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ADOT Versions #943

Merged
merged 2 commits into from
Mar 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/blueprint-construct/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
new blueprints.addons.PrometheusNodeExporterAddOn(),
new blueprints.addons.AdotCollectorAddOn({
namespace:'adot',
version: 'v0.88.0-eksbuild.2'
version: 'auto'
}),
new blueprints.addons.AmpAddOn({
ampPrometheusEndpoint: ampWorkspace.attrPrometheusEndpoint,
Expand Down Expand Up @@ -418,7 +418,7 @@
};
}

function addInferentiaNodeGroup(): blueprints.ManagedNodeGroup {

Check warning on line 421 in examples/blueprint-construct/index.ts

View workflow job for this annotation

GitHub Actions / build (20.10.0)

'addInferentiaNodeGroup' is defined but never used

return {
id: "mng4-inferentia",
Expand Down
7 changes: 0 additions & 7 deletions lib/addons/adot/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { createNamespace, dependable, loadYaml, readYamlDocument, supportsALL }
import { CertManagerAddOn } from "../cert-manager";
import { CoreAddOn, CoreAddOnProps } from "../core-addon";
import { getAdotCollectorPolicyDocument } from "./iam-policy";
import { semverComparator } from "../helm-addon/helm-version-checker";
import { KubernetesVersion } from "aws-cdk-lib/aws-eks";

const versionMap: Map<KubernetesVersion, string> = new Map([
Expand Down Expand Up @@ -47,12 +46,6 @@ export class AdotCollectorAddOn extends CoreAddOn {
}
@dependable(CertManagerAddOn.name)
deploy(clusterInfo: ClusterInfo): Promise<Construct> {
if (semverComparator("0.88",this.coreAddOnProps.version)) {
console.log("Used Adot Addon Version is Valid");
}
else {
throw new Error(`Adot Addon Version is not Valid and greater than 0.88.0`);
}

const addOnPromise = super.deploy(clusterInfo);
return addOnPromise;
Expand Down
4 changes: 2 additions & 2 deletions lib/builders/windows-builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
}
};

const defaultKarpenterProps: addons.KarpenterAddOnProps = {

Check warning on line 122 in lib/builders/windows-builder.ts

View workflow job for this annotation

GitHub Actions / build (20.10.0)

'defaultKarpenterProps' is assigned a value but never used
version: "v0.31.3",
requirements: [
{ key: 'kubernetes.io/os', op: 'In', vals: ['windows']},
Expand Down Expand Up @@ -195,7 +195,7 @@
public enableKarpenter(): WindowsBuilder {
return this.addOns(
new addons.KarpenterAddOn(this.karpenterProps)
)
);
}

public withKarpenterProps(props:addons.KarpenterAddOnProps) : this {
Expand Down Expand Up @@ -249,7 +249,7 @@
function buildGenericNodeGroup(options: WindowsOptions, overrideOptions?: eks.NodegroupOptions): clusterproviders.ManagedNodeGroup {

let currentOptions = options.genericNodeGroupOptions;
if ( overrideOptions ) { currentOptions = merge(options.genericNodeGroupOptions, overrideOptions) }
if ( overrideOptions ) { currentOptions = merge(options.genericNodeGroupOptions, overrideOptions); }

return {
id: currentOptions.nodegroupName || "",
Expand Down
Loading