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

fix(eks): reuse chart name as chart dir for helmchart deployment from OCI repository #23392

Merged

Conversation

psemeniuk
Copy link
Contributor

Fixes #22341

It migrates assigning chart_dir from release name to chart name, to be consistent with helm-pull's target directory.

I also added to integration test yet another chart deployment of a different chart. Why it's separate? Because of the way of how testing flow is working - if i understand it correctly it provisions previous snapshot, and finally after that provisions a new version of assets and test code on top of existing. Thanks to that i'm unable to cover my case in existing chart deployment, because when i change release name it conflicts with previously deployed (during old snapshot provisioning) chart (UPDATE_FAILED (The following resource(s) failed to update: [Clustercharttestocichart9C188967]. ): Received response status [FAILED] from custom resource. Message returned: Error: b'Release "s3-chart-release" does not exist. Installing it now.\nError: rendered manifests contain a resource that already exists. Unable to continue with install: ServiceAccount "ack-s3-controller" in namespace "ack-system" exists and cannot be imported into the current release: invalid ownership metadata; annotation validation error: key "meta.helm.sh/release-name" must equal "s3-chart-release": current value is "s3-chart"\n').

Actually i successfully ran the modified integration test, but i didn't commit changes caused by yarn integ command, because i don't know which i have to commit.


All Submissions:

Adding new Construct Runtime Dependencies:

  • This PR adds new construct runtime dependencies following the process described here

New Features

  • Have you added the new feature to an integration test?
  • Did you use yarn integ to deploy the infrastructure and generate the snapshot (i.e. yarn integ without --dry-run)?

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@gitpod-io
Copy link

gitpod-io bot commented Dec 19, 2022

@aws-cdk-automation aws-cdk-automation requested a review from a team December 19, 2022 13:56
@github-actions github-actions bot added beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK bug This issue is a bug. p2 labels Dec 19, 2022
Copy link
Collaborator

@aws-cdk-automation aws-cdk-automation left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The pull request linter has failed. See the aws-cdk-automation comment below for failure reasons. If you believe this pull request should receive an exemption, please comment and provide a justification.

Copy link
Contributor

@comcalvi comcalvi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you're not sure what integ test changes to commit, run git clean -fdx from the packages/@aws-cdk/aws-eks directory, then run yarn install && yarn build and then rerun the tests

@comcalvi comcalvi self-assigned this Dec 20, 2022
@aws-cdk-automation
Copy link
Collaborator

This PR has been in the CHANGES REQUESTED state for 3 weeks, and looks abandoned. To keep this PR from being closed, please continue work on it. If not, it will automatically be closed in a week.

@psemeniuk psemeniuk force-pushed the psemeniuk/fix_customizing_release_name_when_oci branch 2 times, most recently from 024d4e2 to db9dece Compare January 11, 2023 15:05
@aws-cdk-automation aws-cdk-automation dismissed their stale review January 11, 2023 15:07

✅ Updated pull request passes all PRLinter validations. Dissmissing previous PRLinter review.

Copy link
Contributor

@comcalvi comcalvi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was wrong, this is not a breaking change. However we do need some better docs to clarify what's happening with helm here.

@@ -82,7 +82,7 @@ def helm_handler(event, context):

if repository is not None and repository.startswith('oci://'):
tmpdir = tempfile.TemporaryDirectory()
chart_dir = get_chart_from_oci(tmpdir.name, release, repository, version)
chart_dir = get_chart_from_oci(tmpdir.name, repository, version)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's worth mentioning exactly why this does what it does, for those less familiar with helm and its specifics. Can you put a comment above this line explaining why we need the repository here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I put extensive explanation above the rpartition line. This will be "good enough"?

@psemeniuk psemeniuk force-pushed the psemeniuk/fix_customizing_release_name_when_oci branch from db9dece to e6b0313 Compare January 19, 2023 07:18
@mergify mergify bot dismissed comcalvi’s stale review January 19, 2023 07:18

Pull request has been modified.

@aws-cdk-automation
Copy link
Collaborator

This PR has been deemed to be abandoned, and will be automatically closed. Please create a new PR for these changes if you think this decision has been made in error.

@aws-cdk-automation aws-cdk-automation added the closed-for-staleness This issue was automatically closed because it hadn't received any attention in a while. label Jan 20, 2023
@comcalvi comcalvi reopened this Jan 20, 2023
@comcalvi comcalvi removed the closed-for-staleness This issue was automatically closed because it hadn't received any attention in a while. label Jan 20, 2023
@aws-cdk-automation
Copy link
Collaborator

This PR has been deemed to be abandoned, and will be automatically closed. Please create a new PR for these changes if you think this decision has been made in error.

@aws-cdk-automation aws-cdk-automation added the closed-for-staleness This issue was automatically closed because it hadn't received any attention in a while. label Jan 21, 2023
@comcalvi comcalvi reopened this Jan 25, 2023
@aws-cdk-automation
Copy link
Collaborator

This PR has been deemed to be abandoned, and will be automatically closed. Please create a new PR for these changes if you think this decision has been made in error.

@mergify
Copy link
Contributor

mergify bot commented Jan 26, 2023

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: 3218dad
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify mergify bot merged commit 070f5ec into aws:main Jan 26, 2023
@mergify
Copy link
Contributor

mergify bot commented Jan 26, 2023

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK bug This issue is a bug. closed-for-staleness This issue was automatically closed because it hadn't received any attention in a while. p2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[aws-eks]: deploying helmcharts doesn't work with ECR when release-name is different than chart-name
3 participants