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

Add support for --dry-run in Helm Client #2824

Merged
merged 21 commits into from
May 20, 2024

Conversation

r4rajat
Copy link
Contributor

@r4rajat r4rajat commented Apr 17, 2024

Change Overview

Add support for --dry-run in Helm Client for better debugging

Pull request type

Please check the type of change your PR introduces:

  • 🚧 Work in Progress
  • 🌈 Refactoring (no functional changes, no api changes)
  • 🐹 Trivial/Minor
  • πŸ› Bugfix
  • 🌻 Feature
  • πŸ—ΊοΈ Documentation
  • πŸ€– Test

Issues

Test Plan

  • πŸ’ͺ Manual
  • ⚑ Unit test
  • πŸ’š E2E

Signed-off-by: Rajat Gupta <rajat.gupta@veeam.com>
@infraq infraq added this to In Progress in Kanister Apr 17, 2024
Signed-off-by: Rajat Gupta <rajat.gupta@veeam.com>
Signed-off-by: Rajat Gupta <rajat.gupta@veeam.com>
pkg/helm/client.go Outdated Show resolved Hide resolved
pkg/helm/helm_helpers.go Outdated Show resolved Hide resolved
pkg/helm/helm_helpers.go Outdated Show resolved Hide resolved
pkg/helm/helm_helpers.go Show resolved Hide resolved
Copy link
Contributor

@viveksinghggits viveksinghggits left a comment

Choose a reason for hiding this comment

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

@r4rajat can you please write a test that would use these utilities to install Kanister by specifying a helm field and make sure that the rendered output has respective change.
If you want to do that as part of another PR that is also ok, in that case can you document in the PR description how exactly/which method calls are involved to write that test.

pkg/helm/client.go Outdated Show resolved Hide resolved
pkg/helm/client.go Outdated Show resolved Hide resolved
Signed-off-by: Abhijit Mukherjee <abhijit.mukherjee@infracloud.io>
@mabhi mabhi requested a review from viveksinghggits May 9, 2024 07:34
Signed-off-by: Abhijit Mukherjee <abhijit.mukherjee@infracloud.io>
pkg/helm/client.go Outdated Show resolved Hide resolved
pkg/helm/client.go Outdated Show resolved Hide resolved
pkg/testing/helm/helm_app.go Outdated Show resolved Hide resolved
Signed-off-by: Abhijit Mukherjee <abhijit.mukherjee@infracloud.io>
pkg/helm/helm_helpers.go Outdated Show resolved Hide resolved
pkg/helm/helm_helpers.go Outdated Show resolved Hide resolved
pkg/helm/helm_helpers.go Outdated Show resolved Hide resolved
Kanister automation moved this from In Progress to Review Required May 10, 2024
mabhi added 2 commits May 10, 2024 22:50
Signed-off-by: Abhijit Mukherjee <abhijit.mukherjee@infracloud.io>
Signed-off-by: Abhijit Mukherjee <abhijit.mukherjee@infracloud.io>
pkg/helm/client.go Outdated Show resolved Hide resolved
pkg/helm/client.go Outdated Show resolved Hide resolved
pkg/helm/helm_helpers.go Outdated Show resolved Hide resolved
Signed-off-by: Abhijit Mukherjee <abhijit.mukherjee@infracloud.io>
mabhi added 3 commits May 16, 2024 16:36
Signed-off-by: Abhijit Mukherjee <abhijit.mukherjee@infracloud.io>
Signed-off-by: Abhijit Mukherjee <abhijit.mukherjee@infracloud.io>
Signed-off-by: Abhijit Mukherjee <abhijit.mukherjee@infracloud.io>
pkg/helm/client.go Outdated Show resolved Hide resolved
// Install installs helm chart with given release name.
// The output string is to check the generated manifests of a release without installing the chart when β€˜dryRun’ flags combined.
// For normal installation, this output string is blank.
func (h CliClient) Install(ctx context.Context, chart, version, release, namespace string, values map[string]string, wait, dryRun bool) (string, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
func (h CliClient) Install(ctx context.Context, chart, version, release, namespace string, values map[string]string, wait, dryRun bool) (string, error) {
func (h CliClient) Install(
ctx context.Context,
chart,
version,
release,
namespace string,
values map[string]string,
wait,
dryRun bool) (string, error) {

Copy link
Contributor

Choose a reason for hiding this comment

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

I was thinking if there should be a type InstallOptions that would have all these fields. But we can do that later as well.

pkg/helm/helm_helpers.go Outdated Show resolved Hide resolved
pkg/helm/helm_helpers.go Outdated Show resolved Hide resolved
pkg/helm/helm_helpers.go Outdated Show resolved Hide resolved
pkg/helm/helm_helpers.go Outdated Show resolved Hide resolved
pkg/helm/helm_helpers.go Outdated Show resolved Hide resolved
pkg/testing/helm/helm_test.go Outdated Show resolved Hide resolved
Signed-off-by: Abhijit Mukherjee <abhijit.mukherjee@infracloud.io>
mabhi added 3 commits May 17, 2024 20:17
Signed-off-by: Abhijit Mukherjee <abhijit.mukherjee@infracloud.io>
Signed-off-by: Abhijit Mukherjee <abhijit.mukherjee@infracloud.io>
pkg/helm/client.go Outdated Show resolved Hide resolved
pkg/helm/helm_helpers.go Outdated Show resolved Hide resolved
pkg/helm/helm_helpers.go Outdated Show resolved Hide resolved
pkg/helm/helm_helpers.go Outdated Show resolved Hide resolved
pkg/helm/helm_helpers.go Outdated Show resolved Hide resolved
Signed-off-by: Abhijit Mukherjee <abhijit.mukherjee@infracloud.io>
pkg/helm/client.go Outdated Show resolved Hide resolved
Kanister automation moved this from Review Required to Reviewer approved May 20, 2024
pkg/helm/helm_helpers.go Outdated Show resolved Hide resolved
pkg/helm/helm_helpers.go Outdated Show resolved Hide resolved
Signed-off-by: Abhijit Mukherjee <abhijit.mukherjee@infracloud.io>
@mabhi mabhi added the kueue label May 20, 2024
@mergify mergify bot merged commit 9556d54 into master May 20, 2024
15 checks passed
Kanister automation moved this from Reviewer approved to Done May 20, 2024
@mergify mergify bot deleted the add-supprt-for-dry-run-helm-client branch May 20, 2024 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

Successfully merging this pull request may close these issues.

Make helm install utility accept --dry-run
3 participants