You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By default, I get tons of log messages like this, that I don't find useful / wish I could easily turn off. DEBUG Core add-on kube-proxy is at version auto
I'm new to TypeScript and didn't see an easy way to disable the logging. After about a day of digging through the source code, following a trail of bread crumbs, reading upstream docs, and trial and error I learned a solution. I decided to document it in this issue ticket in case it helps anyone else out in the future.
import{userLog}from'@aws-quickstart/eks-blueprints/dist/utils';userLog.settings.minLevel=3;//3 = info, 2 = debug & info//^-- for more info see https://tslog.js.org/#/?id=default-log-level
Note:
upstream as in (import * as eks from 'aws-cdk-lib/aws-eks';)
Which cdk-eks-blueprints depends on uses it's own different log/warning methodology.
So the above userLog based solution only applies to eks-blueprints specific warning/debug messages.
Here's an example of how to disable other Warning messages that can come from upstream: https://github.com/aws/aws-cdk/blob/v2.158.0/packages/aws-cdk-lib/aws-eks/lib/cluster.ts#L2171
^-- per this, upstream uses Annotations.of(this).addWarningV2('@aws-cdk/aws-eks:clusterMustManuallyTagSubnet', 'Could not auto-tag ${type} subnet${subnetID} with "${tag}=1", please remember to do this manually');
I took care of such tags in IaC, and was annoyed by the false positive warnings, so I wanted to disable them.
Here's an example of how to disable it: cdk.Annotations.of(this.stack).acknowledgeWarning('@aws-cdk/aws-eks:clusterMustManuallyTagSubnet');
^-- Note in my custom implementation:
I have a stack that looks up a pre-existing VPC
I then I build eks-blueprint clusters from a construct, that references the pre-existing VPC
My eks-blueprint construct is then stored in this.stack, so my example won't work perfectly for most.
Based on this export class EksBlueprint extends cdk.Stack
since EksBlueprint is a cdk.Stack, it'd probably look more like this for other people.
Describe the documentation issue
By default, I get tons of log messages like this, that I don't find useful / wish I could easily turn off.
DEBUG Core add-on kube-proxy is at version auto
I'm new to TypeScript and didn't see an easy way to disable the logging. After about a day of digging through the source code, following a trail of bread crumbs, reading upstream docs, and trial and error I learned a solution. I decided to document it in this issue ticket in case it helps anyone else out in the future.
https://tslog.js.org/#/?id=changing-settings-at-runtime
https://tslog.js.org/#/?id=default-log-level
^-- based on this
I eventually learned, I can put the following in my cdk-main.ts
Links
This isn't documented anywhere on the docs, but maybe it should be, it could maybe go here?
https://aws-quickstart.github.io/cdk-eks-blueprints/core-concepts/
The text was updated successfully, but these errors were encountered: