Skip to content

Migrating install_aspad_lite module to helm#5410

Draft
agrawalkhushi18 wants to merge 2 commits intoGoogleCloudPlatform:developfrom
agrawalkhushi18:aspad_lite
Draft

Migrating install_aspad_lite module to helm#5410
agrawalkhushi18 wants to merge 2 commits intoGoogleCloudPlatform:developfrom
agrawalkhushi18:aspad_lite

Conversation

@agrawalkhushi18
Copy link
Copy Markdown
Contributor

This PR migrates the install_aspad_lite module to use helm provider instead of gavinbunney/kubectl provider as an effort to deprecate the kubectl submodule usage across kubectl-apply.

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 #

@agrawalkhushi18 agrawalkhushi18 added the release-improvements Added to release notes under the "Improvements" heading. label Mar 26, 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 significantly refactors the install_asapd_lite module within the kubectl-apply management module. The core change involves transitioning its deployment mechanism from direct kubectl application to a Helm-based approach. This move streamlines the deployment process for asapd-lite and provides greater configurability through templating options, contributing to a broader initiative to standardize deployments using Helm.

Highlights

  • Migration to Helm: The install_asapd_lite module has been migrated from using the gavinbunney/kubectl provider to the helm_install provider, aligning with the effort to deprecate kubectl submodule usage.
  • Configuration Flexibility: The asapd_lite input variable now supports optional fields for install and config_path, and introduces config_template_vars to allow for templating of configuration files, enhancing flexibility.
  • README Documentation Update: The README.md has been updated to reflect the change in the install_asapd_lite module's source from ./kubectl to ./helm_install and the revised input variable structure.
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.

Copy link
Copy Markdown
Contributor

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

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 refactors the installation of the asapd_lite daemonset by migrating its deployment from a direct kubectl module to a helm_install module. This change involves updating the asapd_lite variable definition in variables.tf and README.md to include optional parameters for installation, configuration path, and template variables. A new local variable asapd_lite_config_content is introduced in main.tf to process the configuration, which is then passed to the helm_install module. A review comment suggests simplifying a conditional check for var.asapd_lite.config_path in main.tf by removing the redundant != null check, as the variable's definition ensures it will default to an empty string.

)

asapd_lite_config_content = (
var.asapd_lite.config_path != null && var.asapd_lite.config_path != "" ?
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.

medium

The check var.asapd_lite.config_path != null is redundant. Since config_path is defined in variables.tf as optional(string, ""), its value will never be null; it will default to an empty string ("") if not provided. Simplifying this condition will make the code clearer and more aligned with the variable's definition.

    var.asapd_lite.config_path != "" ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-improvements Added to release notes under the "Improvements" heading.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant