Open asgerjensen opened 2 months ago
@asgerjensen I'm not able to reproduce this...
Here is the code i'm using:
#!/usr/bin/env node
import 'source-map-support/register';
import * as cdk from 'aws-cdk-lib';
import * as cdk8s from 'cdk8s';
import * as eks from 'aws-cdk-lib/aws-eks';
const app = new cdk.App();
const stack = new cdk.Stack(app, 'CdkCdk8STypescriptStack', {});
const cluster = eks.Cluster.fromClusterAttributes(stack, 'Cluster', {
clusterName: 'my-cluster',
kubectlRoleArn: 'arn:aws:iam::123456789012:role/example-role'
});
const chart = new cdk8s.Chart(new cdk8s.App(), 'Chart');
new cdk8s.ApiObject(chart, 'ApiObject', {
kind: 'ConfigMap',
apiVersion: 'v1',
data: {
foo: 'bar'
}
});
cluster.addCdk8sChart('Chart', chart);
app.synth();
With the following dependencies:
"dependencies": {
"aws-cdk-lib": "2.94.0",
"cdk8s":"2.68.73",
"constructs": "^10.0.0",
}
Are you able to spot a significant difference from what you are doing? Can you give a small (yet complete) code repro of the issue? also please share your dependencies.
Thanks.
This issue has not received a response in a while and will be closed soon. If you want to keep it open, please leave a comment below @mentioning a maintainer.
Description of the bug:
I have a combined CDK8s + CDK stack using an imported cluster to add an extra Deployment to the EKS cluster.
With CDK8s v2.64.0
synth
works, but with v2.65.0+ i get an exception like2.65.0 error:
2.68.58:
While the error messages are different, i think it relates to the same thing
Reproduction Steps:
in cdk stack
In the main CDK stack file, i then have
From looking at the stack trace, i would imagine its because it assumes the cdk8s App, as a construct, would have a node, which maybe it doesnt, as it is created /next/ to the normal hierachy that has a aws-cdk-lib App at its top.
Anyways, long story short...
It used to work perfectly, to allow combining CDK and CDK8s constructs. And now it doesn't.
Error Log:
Environment:
Other:
I've both tried updating cdk8s-23-plus and leaving it at its original version (pre-update-attempt), with no change.
This is :bug: Bug Report