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

ClusterAutoScalerAddOn: Serviceaccount not deploying due to missing namespace dependency. #957

Closed
Hounddog opened this issue Mar 15, 2024 · 1 comment · Fixed by #958
Closed
Assignees
Labels
bug Something isn't working

Comments

@Hounddog
Copy link
Contributor

Describe the bug

When deploying ClusterAutoScalerAddOn with a different Namespace, we receive a CloudFormation error:

Received response status [FAILED] from custom resource. Message returned: Error: b'Error from server (NotFound): error when creating "/tmp/manifest.yaml": namespaces "infra-system-autoscaler" not found\n' Logs: /aws/lambda/xxx at invokeUserFunction (/var/task/framework.js:2:6) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async onEvent (/var/task/framework.js:1:369) at async Runtime.handler (/var/task/cfn-response.js:1:1573) (RequestId: xxx)

Upon further inspection, there seems to be no dependencies between namespace and service account that are created as part of the addon.

Expected Behavior

I expect to deploy the addon successfully.

Current Behavior

The addon does NOT deploy, with the error produced from CloudFormation as mentioned in the bug report.

Reproduction Steps

The blueprint that I used to deploy is:

const addOns: Array<blueprints.ClusterAddOn> = [
  new blueprints.addons.ClusterAutoScalerAddOn(autoscalerAddonProperties)
];

We have extended the Properties which are passed to the blueprints.addon

import * as blueprints from "@aws-quickstart/eks-blueprints";
import { loadYaml, readYamlDocument } from "@aws-quickstart/eks-blueprints/dist/utils";

export const autoscalerAddonProperties: blueprints.ClusterAutoScalerAddOnProps = {
  repository: "oci://xxx.dkr.ecr.eu-central-1.amazonaws.com/infra/helm/cluster-autoscaler",
  version: "9.35.0",
  namespace: "autoscaler",
  createNamespace: true,
  values: loadYaml(readYamlDocument("./lib/base-services/autoscaler/values.yaml")),
};

### Possible Solution

Add dependencies to the namespace and serviceaccount.

### Additional Information/Context

_No response_

### CDK CLI Version

2.99.1

### EKS Blueprints Version

1.12.0

### Node.js Version

v20.9.0

### Environment details (OS name and version, etc.)

Ubuntu 22.04.4 LTS

### Other information

_No response_
@elamaran11
Copy link
Collaborator

This issue is fixed, thanks for the PR @Hounddog closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants