Open danimorelo opened 2 years ago
I'm not entirely sure - but I think this error is occurring because the custom resource handler can't handle the size of the payload you're giving it.
Regardless of the true source of the error, the CDK doesn't give us a nice way to work around this - I believe the expectation is to break down the manifest here.
This issue has not received a response in a while. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.
Was able to workaround it deploying the manifest via Helm charts. Still it would be nice to have an option to provide the manifest to the lambda via S3 object for example instead of as an argument only.
+1 on this. Tried to increase the memory on the lambda function with no success. Splitting the yaml document into 2 manifests is inefficient.
Agreed, running into the same issue and splitting the yaml is resulting in a yaml invalidation error now. Probably going to try Helm charts next
Same problem here. Like to see if the construct would upload the code to the bootstrap stacks bucket first.
A large CRD manifest can't be broken down into smaller chunk, blocking deploy.
+1 - just ran into this: there's no good way to break up a multi-versioned CRD that is large and pulled down from a URL.
Anyone seeing the large CRDs causing issues, a few possible workarounds are;
There are two options that I think would be useful for eks.KubernetesManifest
to grow to help this:
manifestAsset: new s3Assets.Asset(this, 'ManifestAsset', { path: './path/to/asset' })
manifestUrl: 'https://solr.apache.org/operator/downloads/crds/v0.7.1/all-with-dependencies.yaml'
And then manifest
, manifestAsset
, and manifestUrl
would be mutually exclusive options.
A full example, again using solr-operator, where I'm able to write code that very closely follows the install docs https://artifacthub.io/packages/helm/apache-solr/solr-operator/0.7.1#installing-the-chart:
const crds = new eks.KubernetesManifest(this, 'Crds', {
cluster,
manifestUrl: 'https://solr.apache.org/operator/downloads/crds/v0.7.1/all-with-dependencies.yaml',
// or, if I don't want to rely on downloading them at deploy time, I could check them in with my code, then:
// manifestAsset: new s3Assets.Asset(this, 'CrdsAsset', { path: './manifests/solr-operator/crds.yaml' }),
});
const chart = new eks.HelmChart({
cluster,
repository: 'https://solr.apache.org/charts',
chart: 'solr-operator',
version: '0.7.1',
// ...
});
chart.node.addDependency(crds);
I'd be happy to have a crack at implementing this. Would a maintainer (@peterwoodworth maybe) like to offer some opinions re the interface/naming/implementation/other? And whether these should be part of the same PR or separate (I think the asset will require a little bit of (non test) code and the URL will require a tiny bit of (non test) code).
@pahud could you help out with this? Thanks! 🙂
@plumdog,
We're in the process of migrating from our old YAML-based CloudFormation deploys of EKS clusters to new CDK-based deployments and just ran into this. In our "old" setup, we had exactly what you described ... I can pass in manifestUrl
to a kubectl
function and it just applies kubectl apply -f <url>..
... I was blown away this morning when I realized we can't do that with the KubernetesManifest
resource. My feeling is that the manifestUrl
pattern is the simplest and most flexible to implement.
Come on!! https://github.com/kubernetes-sigs/gateway-api/releases/download/v1.0.0/standard-install.yaml
293000 byte payload is too large for the Event invocation type (limit 262144 bytes) (Service: AWSLambda; Status Code: 413; >Error Code: RequestEntityTooLargeException;
please download and kubectl apply inside the Labmda, NOT thru properties!
This is more like a bug from designing phase! How on earth could passing large manifest thru property work ever?!
I've been bitten by this. Any workaround?
This issue could really use an update as none of the workarounds are ideal.
+1 to manifestUrl as a property on the KubernetesManifest.
@peterwoodworth - do you have any updates on this?
General Issue
eks.KubernetesManifest can't handle large manifests
The Question
Trying to deploy a bundle yaml manifest of 1.6MB, I come across the following error:
Is there a way for CDK to manage this? or the expectation is to break down the manifests?
Thank you, Daniel
CDK CLI Version
2.6.0 (build 1a22ad7)
Framework Version
No response
Node.js Version
No response
OS
No response
Language
Python
Language Version
No response
Other information
No response