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

fix: helm chart is rendering invalid fields in some situations #38947

Closed
wants to merge 2 commits into from

Conversation

wyattwalter
Copy link
Contributor

@wyattwalter wyattwalter commented Jan 31, 2025

Description

Fixing a few situations where the Helm chart can output manifests with invalid manifests. It seems that helm install is fine with them and they're being corrected on the server side. But some clients like Terraform's kubernetes_manifest is seeing diffs from the local version vs what's on the server.

deployment.yaml:

  • if mongodb, redis, and postgres subcharts are all disabled, the manifest results in an empty initContainers: line

persistentVolume.yaml:

service.yaml:

  • when service.type is set to "ClusterIP" we add a nodePort: null which is wiped server-side when applying.

Fixes #Issue Number
or
Fixes Issue URL

Warning

If no issue exists, please create an issue first, and check with the maintainers if the issue is valid.

Automation

/ok-to-test tags=""

🔍 Cypress test results

Warning

Tests have not run on the HEAD d0d2bfb yet


Fri, 31 Jan 2025 21:51:51 UTC

Communication

Should the DevRel and Marketing teams inform users about this change?

  • Yes
  • No

Summary by CodeRabbit

  • New Features

    • Enhanced database initialization with conditional container setup for Redis, MongoDB, and PostgreSQL
    • Updated Helm chart configuration for improved storage management using EFS
  • Chores

    • Incremented application version from 3.6.1 to 3.6.2
    • Simplified service configuration for ClusterIP type

Copy link
Contributor

coderabbitai bot commented Jan 31, 2025

Walkthrough

This pull request introduces updates to Helm chart configurations across multiple template files. The changes include a version increment in Chart.yaml, modifications to deployment initialization containers for database readiness checks, removal of NFS configuration in persistent volume templates, and adjustments to service configuration. The updates appear to be focused on improving deployment flexibility and configuration management.

Changes

File Change Summary
deploy/helm/Chart.yaml Version bumped from 3.6.1 to 3.6.2
deploy/helm/templates/deployment.yaml Added conditional initContainers for Redis, MongoDB, and PostgreSQL readiness checks
deploy/helm/templates/persistentVolume.yaml Removed nfs: configuration, maintaining CSI driver setup
deploy/helm/templates/service.yaml Deleted conditional nodePort null setting for ClusterIP service type

Possibly related PRs

Suggested labels

ok-to-test

Suggested reviewers

  • sharat87
  • pratapaprasanna
  • mohanarpit

Poem

🚢 Helm charts sailing smooth and bright,
Configurations dancing with delight,
Version bumped, containers prepared,
Storage shifts, services declared,
Code's symphony, a technical might! 🌟


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions github-actions bot added the Bug Something isn't working label Jan 31, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
deploy/helm/templates/deployment.yaml (1)

Line range hint 66-82: Consider adding resource limits and configurable timeouts.

While the init containers are correctly implemented, consider the following improvements:

  1. Add resource limits to prevent potential resource exhaustion
  2. Make health check timeouts configurable via values
  3. Consider parameterizing the hardcoded image versions

Example addition to values.yaml:

initContainer:
  redis:
    resources:
      limits:
        memory: "128Mi"
        cpu: "100m"
    timeoutSeconds: 300
  mongodb:
    resources:
      limits:
        memory: "128Mi"
        cpu: "100m"
    timeoutSeconds: 300
  postgresql:
    resources:
      limits:
        memory: "128Mi"
        cpu: "100m"
    timeoutSeconds: 300

Also applies to: 83-93, 94-105

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b7c06d6 and d0d2bfb.

📒 Files selected for processing (4)
  • deploy/helm/Chart.yaml (1 hunks)
  • deploy/helm/templates/deployment.yaml (1 hunks)
  • deploy/helm/templates/persistentVolume.yaml (0 hunks)
  • deploy/helm/templates/service.yaml (0 hunks)
💤 Files with no reviewable changes (2)
  • deploy/helm/templates/service.yaml
  • deploy/helm/templates/persistentVolume.yaml
✅ Files skipped from review due to trivial changes (1)
  • deploy/helm/Chart.yaml
🔇 Additional comments (1)
deploy/helm/templates/deployment.yaml (1)

62-64: LGTM! Fix for empty initContainers issue.

The conditional block correctly prevents the inclusion of an empty initContainers section when all databases are disabled.

Copy link

github-actions bot commented Feb 8, 2025

This PR has not seen activitiy for a while. It will be closed in 7 days unless further activity is detected.

@github-actions github-actions bot added the Stale label Feb 8, 2025
Copy link

This PR has been closed because of inactivity.

@github-actions github-actions bot closed this Feb 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Stale
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant