Skip to content

adding a new helm-upgrade module under community folder.#5595

Merged
arpit974 merged 3 commits into
GoogleCloudPlatform:developfrom
arpit974:community/modules/management/helm-upgrade
May 15, 2026
Merged

adding a new helm-upgrade module under community folder.#5595
arpit974 merged 3 commits into
GoogleCloudPlatform:developfrom
arpit974:community/modules/management/helm-upgrade

Conversation

@arpit974

@arpit974 arpit974 commented May 4, 2026

Copy link
Copy Markdown
Contributor

Adding a community module for managing Helm chart lifecycles using the Helm CLI.

This module provides a standardized way to deploy and upgrade Helm charts on GKE by wrapping the helm upgrade --install command within a local-exec provisioner.

While the native Terraform Helm provider is preferred for standard resource management, this CLI-based module is specifically designed for complex orchestration scenarios where direct control over the Helm binary is required or where "zero-touch" dynamic authentication is a priority.

Key Changes:

Dynamic Authentication: The module manages its own cluster connection on-the-fly by executing gcloud container clusters get-credentials at the beginning of the provisioner block. This ensures it is self-sufficient in clean CI/CD environments like Cloud Build.
Unified Lifecycle: Utilizes the --install flag to handle both new installations and version upgrades in a single declarative block.
Flexible Configuration: Supports both local file-based overrides (values_yaml) and dynamic key-value pairs (set_values).
Trigger-based Updates: Uses Terraform triggers to ensure the local-exec block re-runs whenever the set_values configuration is modified.

Requirements:
The host environment executing Terraform must have the gcloud (Google Cloud SDK) and helm CLI binaries installed and available in the system PATH.

Submission Checklist

NOTE: Community submissions can take up to 2 weeks to be reviewed.

Please take the following actions before submitting this pull request.

  • Fork your PR branch from the Toolkit "develop" branch (not main)
  • Test all changes with pre-commit in a local branch #
  • Confirm that "make tests" passes all tests
  • Add or modify unit tests to cover code changes
  • Ensure that unit test coverage remains above 80%
  • Update all applicable documentation
  • Follow Cluster Toolkit Contribution guidelines #

@arpit974 arpit974 added the release-new-modules Added to release notes under the "New Modules" heading. label May 4, 2026
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request adds a new community module designed to manage Helm chart deployments on GKE clusters. By leveraging the local Helm CLI via a Terraform local-exec provisioner, it provides a robust alternative for complex orchestration scenarios where direct binary control or dynamic, zero-touch authentication is required.

Highlights

  • New Helm Upgrade Module: Introduced a new community module under the management category that facilitates Helm chart lifecycles using the native Helm CLI.
  • Dynamic Authentication: Implemented on-the-fly cluster authentication using gcloud, ensuring compatibility with clean CI/CD environments.
  • Declarative Lifecycle Management: Utilizes the helm upgrade --install command to unify installation and upgrade processes within a single Terraform resource.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request adds a new community module for Helm chart management on GKE using local-exec. The reviewer identified a critical command injection risk in the shell command and suggested quoting variables. Other feedback includes expanding resource triggers to ensure consistency, using 'type = any' for complex variables with default values, and relaxing the Terraform version constraint for better compatibility.

Comment thread community/modules/management/helm-upgrade/main.tf Outdated
Comment thread community/modules/management/helm-upgrade/main.tf
Comment thread community/modules/management/helm-upgrade/variables.tf
Comment thread community/modules/management/helm-upgrade/variables.tf
Comment thread community/modules/management/helm-upgrade/versions.tf
@arpit974 arpit974 marked this pull request as ready for review May 4, 2026 11:01
@arpit974 arpit974 requested a review from a team as a code owner May 4, 2026 11:01

@kvenkatachala333 kvenkatachala333 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM. Just a minor nit: please handle the gemini suggestion of ensuring new module is added to the index in the root modules/README.md file as required by the repository style guide

Comment thread community/modules/management/helm-upgrade/main.tf Outdated
Comment thread community/modules/management/helm-upgrade/outputs.tf
Comment thread community/modules/management/helm-upgrade/main.tf
Comment thread community/modules/management/helm-upgrade/variables.tf
@arpit974 arpit974 merged commit 091f69d into GoogleCloudPlatform:develop May 15, 2026
14 of 80 checks passed
Thibaut-Nurit pushed a commit to Thibaut-Nurit/cluster-toolkit that referenced this pull request May 20, 2026
kadupoornima pushed a commit to kadupoornima/cluster-toolkit that referenced this pull request May 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-new-modules Added to release notes under the "New Modules" heading.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants