Skip to content

Refactor namespace configuration to use global.namespace#68

Open
lanmaoxinqing wants to merge 1 commit intomainfrom
sky/namespace_opt
Open

Refactor namespace configuration to use global.namespace#68
lanmaoxinqing wants to merge 1 commit intomainfrom
sky/namespace_opt

Conversation

@lanmaoxinqing
Copy link
Collaborator

  • Replace all .Values.metadata.namespace with .Values.global.namespace across all sub-chart templates
  • Remove metadata.namespace configuration from parent and sub-chart values.yaml files
  • Update _helpers.tpl files to use .Values.global.namespace for service address generation
  • Remove sandbox namespace OSS secret creation from envhub
  • Preserve sandboxNamespace configuration for controller pod templates

Changes include:

  • deploy/values.yaml: Remove metadata.namespace from all sub-chart configurations
  • deploy/api-service/, deploy/controller/, deploy/envhub/, deploy/redis/:
    • Update templates to use .Values.global.namespace
    • Remove metadata.namespace from values.yaml
  • deploy/*/templates/_helpers.tpl: Update helper functions to use .Values.global.namespace

- Replace all .Values.metadata.namespace with .Values.global.namespace across all sub-chart templates
- Remove metadata.namespace configuration from parent and sub-chart values.yaml files
- Update _helpers.tpl files to use .Values.global.namespace for service address generation
- Remove sandbox namespace OSS secret creation from envhub
- Preserve sandboxNamespace configuration for controller pod templates

Changes include:
- deploy/values.yaml: Remove metadata.namespace from all sub-chart configurations
- deploy/api-service/, deploy/controller/, deploy/envhub/, deploy/redis/:
  - Update templates to use .Values.global.namespace
  - Remove metadata.namespace from values.yaml
- deploy/*/templates/_helpers.tpl: Update helper functions to use .Values.global.namespace
@gemini-code-assist
Copy link
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 namespace configuration within the Helm charts to establish a unified approach using a global namespace variable. This change centralizes the definition of the Kubernetes namespace, making deployments more consistent and easier to manage by removing redundant and potentially conflicting namespace declarations from individual sub-charts. The update also includes minor image version bumps for several components.

Highlights

  • Standardized Namespace Configuration: Refactored all Helm chart templates to consistently use .Values.global.namespace for Kubernetes resource namespaces, replacing previous references to .Values.metadata.namespace.
  • Removed Redundant Namespace Definitions: Eliminated metadata.namespace configurations from the values.yaml files across the parent chart and all sub-charts (api-service, controller, envhub, redis) to centralize namespace management.
  • Updated Service Address Generation: Modified _helpers.tpl files in api-service and envhub to ensure service addresses are generated using the new .Values.global.namespace variable.
  • Image Version Updates: Updated the image versions for controller, envhub, and api-service within the main deploy/values.yaml to 0.1.5.
  • Preserved Sandbox Namespace: Ensured that the sandboxNamespace configuration for controller pod templates remains intact, maintaining its specific functionality.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • deploy/Chart.lock
    • Updated the Helm chart lock file digest and generated timestamp.
  • deploy/api-service/templates/_helpers.tpl
    • Updated backend and schedule address helper functions to use .Values.global.namespace.
    • Removed .Values.metadata.namespace from scheduleType definition.
  • deploy/api-service/templates/deployment.yaml
    • Updated deployment namespace to use .Values.global.namespace.
  • deploy/api-service/templates/namespace.yaml
    • Updated namespace resource definition to use .Values.global.namespace.
  • deploy/api-service/templates/service.yaml
    • Updated service namespace to use .Values.global.namespace.
  • deploy/api-service/values.yaml
    • Removed metadata.namespace configuration.
  • deploy/controller/templates/configmap.yaml
    • Updated configmap namespace to use .Values.global.namespace.
  • deploy/controller/templates/deployment.yaml
    • Updated deployment namespace to use .Values.global.namespace.
  • deploy/controller/templates/namespace.yaml
    • Updated namespace resource definition to use .Values.global.namespace.
  • deploy/controller/templates/rbac.yaml
    • Updated RBAC role binding and role namespaces to use .Values.global.namespace.
  • deploy/controller/templates/rolebinding.yaml
    • Updated role binding and role namespaces to use .Values.global.namespace.
  • deploy/controller/templates/service.yaml
    • Updated service namespace to use .Values.global.namespace.
  • deploy/controller/templates/serviceaccount.yaml
    • Updated service account namespace to use .Values.global.namespace.
  • deploy/controller/values.yaml
    • Removed metadata.namespace configuration.
  • deploy/envhub/templates/_helpers.tpl
    • Updated Redis address generation to use .Values.global.namespace.
  • deploy/envhub/templates/deployment.yaml
    • Updated deployment namespace to use .Values.global.namespace.
  • deploy/envhub/templates/namespace.yaml
    • Updated namespace resource definition to use .Values.global.namespace.
  • deploy/envhub/templates/secret.yaml
    • Updated secret namespace to use .Values.global.namespace.
  • deploy/envhub/templates/service.yaml
    • Updated service namespace to use .Values.global.namespace.
  • deploy/envhub/values.yaml
    • Removed metadata.namespace configuration.
  • deploy/redis/templates/deployment.yaml
    • Updated deployment namespace to use .Values.global.namespace.
  • deploy/redis/templates/namespace.yaml
    • Updated namespace resource definition to use .Values.global.namespace.
  • deploy/redis/templates/persistentvolumeclaim.yaml
    • Updated persistent volume claim namespace to use .Values.global.namespace.
  • deploy/redis/templates/service.yaml
    • Updated service namespace to use .Values.global.namespace.
  • deploy/redis/values.yaml
    • Removed metadata.namespace configuration.
  • deploy/values.yaml
    • Removed metadata.namespace from controller, redis, envhub, and api-service sub-chart configurations.
    • Updated controller image version to 0.1.5.
    • Updated envhub image version to 0.1.5.
    • Updated api-service image version to 0.1.5.
Activity
  • No specific human activity (comments, reviews, or progress updates) has been recorded for this pull request yet.
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.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

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
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 successfully refactors the Helm charts to use a centralized global.namespace, which is a great improvement for maintainability. The changes are consistent across all sub-charts. However, I've found a critical issue in deploy/Chart.lock where the api-service dependency is duplicated, which needs to be fixed. Additionally, there appears to be an inconsistency with the PR description regarding the removal of the sandbox namespace OSS secret in the envhub chart; the logic seems to remain and references a potentially undefined value (.Values.global.sandboxNamespace). Please double-check this part of the implementation.

Comment on lines +14 to +16
- name: api-service
repository: file://./api-service
version: 0.0.1
Copy link
Contributor

Choose a reason for hiding this comment

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

critical

The api-service dependency is duplicated. This will likely cause issues with Helm. Please remove this duplicated block.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants