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

Installing in AWS EKS using CDK fails #278

Open
rudpot opened this issue Sep 26, 2022 · 2 comments
Open

Installing in AWS EKS using CDK fails #278

rudpot opened this issue Sep 26, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@rudpot
Copy link

rudpot commented Sep 26, 2022

Possibly related to #157

Trying to install litmus in AWS EKS using AWS CDK fails with the following error message:

Received response status [FAILED] from custom resource. Message returned: Error
: b'Error: UPGRADE FAILED: failed to create resource: ClusterRole.rbac.authoriz
ation.k8s.io "litmus-cluster-scope-for-fisstackeksclusterchartlitmuse35dacde-se
rver" is invalid: metadata.labels: Invalid value: "litmus-cluster-scope-for-fis
stackeksclusterchartlitmuse35dacde-server": must be no more than 63 characters\
n'

This seems to be caused by https://github.com/litmuschaos/litmus-helm/blob/master/charts/litmus/templates/server-cluster-role.yaml#L44 where the role name is expanded from name: litmus-cluster-scope-for-{{ include "litmus-portal.fullname" . }}-server. CDK generates a unique 38 character string like fisstackeksclusterchartlitmuse35dacde which in conjunction with the type extension -server exceeds the 63 character limit.

How to reproduce

Create EKS Cluser and add this

    // Currently does not work - somehow CDK+Litmus helm chart crate an illegal resource name 
    // Install Litmus via helm chart
    // https://chaos-mesh.org/docs/production-installation-using-helm/
    eksCluster.addHelmChart('Litmus', {
      chart: 'litmus,
      repository: 'https://litmuschaos.github.io/litmus-helm/',
      namespace: 'litmus',
    });
@rudpot
Copy link
Author

rudpot commented Sep 27, 2022

Also tried using kube-aws. That doesn't barf but also doesn't start any resources when checking with kubectl get po -n litmus

@rudpot
Copy link
Author

rudpot commented Sep 27, 2022

I won't venture an opinion on where the problem exists - it originates in CDK but really litmus should be validating the resource names it's trying to generate. Workaround until that happens: you can set "release" in CDK:

    // Install Litmus via helm chart
    // https://chaos-mesh.org/docs/production-installation-using-helm/
    eksCluster.addHelmChart('Litmus', {
      chart: 'litmus',
      repository: 'https://litmuschaos.github.io/litmus-helm/',
      namespace: 'litmus',
      // Override auto-generated hash from kubectl-provider to avoid name length issues
      release: 'litmus',
    });

@uditgaurav uditgaurav added the enhancement New feature or request label May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants