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

Do not create change when app-changes-max-to-keep=0 #807

Merged
merged 1 commit into from
Sep 14, 2023

Conversation

praveenrewar
Copy link
Member

What this PR does / why we need it:

Do not create change when app-changes-max-to-keep=0.
Existing behaviour for --app-changes-max-to-keep=0:

  • Create an app change before deployment begins, and garbage collect it at the end

New behaviour:

  • Do not create an app change at all, but still keep the last change details in the meta configmap.

If app changes are already present for an app, and we set the flag value to 0, then it would still need to clean up old app changes.

Which issue(s) this PR fixes:

Fixes #806

Does this PR introduce a user-facing change?


Additional Notes for your reviewer:

Review Checklist:
  • Follows the developer guidelines
  • Relevant tests are added or updated
  • Relevant docs in this repo added or updated
  • Relevant carvel.dev docs added or updated in a separate PR and there's
    a link to that PR
  • Code is at least as readable and maintainable as it was before this
    change

Additional documentation e.g., Proposal, usage docs, etc.:


pkg/kapp/cmd/app/deploy.go Outdated Show resolved Hide resolved
Existing behaviour for --app-changes-max-to-keep=0:
- Create an app change before deployment begins, and garbage collect it at the end

New behaviour: Do not create an app change at all, but still keep the last change details in the meta configmap.

Signed-off-by: Praveen Rewar <8457124+praveenrewar@users.noreply.github.com>
Copy link
Contributor

@100mik 100mik left a comment

Choose a reason for hiding this comment

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

LGTM!! 🚀

@praveenrewar praveenrewar merged commit a56d676 into develop Sep 14, 2023
5 checks passed
@praveenrewar praveenrewar deleted the app-changes-max-to-keep branch September 14, 2023 15:04
rcmadhankumar pushed a commit that referenced this pull request Oct 5, 2023
Existing behaviour for --app-changes-max-to-keep=0:
- Create an app change before deployment begins, and garbage collect it at the end

New behaviour: Do not create an app change at all, but still keep the last change details in the meta configmap.

Signed-off-by: Praveen Rewar <8457124+praveenrewar@users.noreply.github.com>
rcmadhankumar pushed a commit that referenced this pull request Oct 5, 2023
Existing behaviour for --app-changes-max-to-keep=0:
- Create an app change before deployment begins, and garbage collect it at the end

New behaviour: Do not create an app change at all, but still keep the last change details in the meta configmap.

Signed-off-by: Praveen Rewar <8457124+praveenrewar@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Setting --app-changes-max-to-keep to 0 shouldn't create and delete an app change
2 participants