aws-quickstart / cdk-eks-blueprints

AWS Quick Start Team
Apache License 2.0
447 stars 198 forks source link

Missing a dependency for AdotCollectorAddOn #682

Closed NinoSkopac closed 1 year ago

NinoSkopac commented 1 year ago

Describe the bug

const addOns: Array<blueprints.ClusterAddOn> = [
    new blueprints.addons.CloudWatchAdotAddOn(),
    new blueprints.addons.ArgoCDAddOn(),
    new blueprints.addons.CalicoOperatorAddOn(),
    new blueprints.addons.MetricsServerAddOn(),
    new blueprints.addons.ClusterAutoScalerAddOn(),
    new blueprints.addons.AwsLoadBalancerControllerAddOn(),
    new blueprints.addons.VpcCniAddOn(),
    new blueprints.addons.CoreDnsAddOn(),
    new blueprints.addons.KubeProxyAddOn(),
    new blueprints.addons.EbsCsiDriverAddOn(),
];

const cluster = blueprints.EksBlueprint.builder()
    .account(account)
    .region(region)
    .addOns(...addOns)
    .useDefaultSecretEncryption(true) // set to false to turn secret encryption off (non-production/demo cases)
    .build(app, 'k8-test');

Expected Behavior

Adot addon installing

Current Behavior

DEBUG Core add-on vpc-cni is at version v1.12.6-eksbuild.1 DEBUG Core add-on coredns is at version v1.9.3-eksbuild.3 DEBUG Core add-on kube-proxy is at version v1.24.10-eksbuild.2 DEBUG Core add-on aws-ebs-csi-driver is at version v1.18.0-eksbuild.1

AssertionError [ERR_ASSERTION]: Missing a dependency for AdotCollectorAddOn for k8-test

Reproduction Steps

cdk diff

Possible Solution

No response

Additional Information/Context

No response

CDK CLI Version

2.79.0 (build e4a2c01)

EKS Blueprints Version

1.7.3

Node.js Version

v19.8.1

Environment details (OS name and version, etc.)

Darwin

Other information

No response

NinoSkopac commented 1 year ago

When I try to install it manually thru EKS console, I get Create failed as well.

K8sResourceNotFound | cert-manager is not installed on this cluster. During preview, you are required to have previously installed cert-manager.

I guess I need to recreate the cluster

shapirov103 commented 1 year ago

@NinoSkopac you need to add AdotCollectorAddOn to the list of the add-ons, as specified in the error message. Please make sure that Adot collector addon is above the CloudWatchAdotAddOn in the list.

NinoSkopac commented 1 year ago

Hi @shapirov103

Thanks for your help!

However, I still can't synthesize.

const addOns: Array<blueprints.ClusterAddOn> = [
    new blueprints.addons.AdotCollectorAddOn(),
    new blueprints.addons.CloudWatchAdotAddOn(),
    new blueprints.addons.ArgoCDAddOn(),
    new blueprints.addons.CalicoOperatorAddOn(),
    new blueprints.addons.MetricsServerAddOn(),
    new blueprints.addons.ClusterAutoScalerAddOn(),
    new blueprints.addons.AwsLoadBalancerControllerAddOn(),
    new blueprints.addons.VpcCniAddOn(),
    new blueprints.addons.CoreDnsAddOn(),
    new blueprints.addons.KubeProxyAddOn(),
    new blueprints.addons.EbsCsiDriverAddOn(),
];

Error:

AssertionError [ERR_ASSERTION]: Missing a dependency for CertManagerAddOn for k8-test
NinoSkopac commented 1 year ago

I think I might've found a working order of Addons (it synths but won't deploy - redeploying the cluster with destroy/desploy)

const addOns: Array<blueprints.ClusterAddOn> = [
    new blueprints.addons.ClusterAutoScalerAddOn(),
    new blueprints.addons.AwsLoadBalancerControllerAddOn(),
    new blueprints.addons.CertManagerAddOn(),
    new blueprints.addons.AdotCollectorAddOn(),
    new blueprints.addons.CloudWatchAdotAddOn(),
    new blueprints.addons.ArgoCDAddOn(),
    new blueprints.addons.CalicoOperatorAddOn(),
    new blueprints.addons.MetricsServerAddOn(),
    new blueprints.addons.VpcCniAddOn(),
    new blueprints.addons.CoreDnsAddOn(),
    new blueprints.addons.KubeProxyAddOn(),
    new blueprints.addons.EbsCsiDriverAddOn(),
];
shapirov103 commented 1 year ago

Indeed, cert manager is required for ADOT and hence all the OT based addons like CloudWatch. As of version 2.5 of AWS Load balancer controller, it is mandatory for any addon and/or workload that uses service of type LoadBalancer. It makes sense to include it as the first add-on.

NinoSkopac commented 1 year ago

Yep, the code I pasted above worked.

Thank you for your help!

Now I'm trying to figure out how to actually see my application's logs (running in pods)