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

Plane CE live service #47

Merged
merged 5 commits into from
Oct 7, 2024
Merged

Plane CE live service #47

merged 5 commits into from
Oct 7, 2024

Conversation

akshat5302
Copy link
Collaborator

@akshat5302 akshat5302 commented Oct 3, 2024

Add live service to Plane CE Helm chart

Summary by CodeRabbit

  • New Features

    • Introduced a new "Live Docker Image" configuration with enhanced settings for the live environment.
    • Added a new path for /live/ in the Ingress resource to route traffic to the live service.
    • Created a new Service and Deployment for the live application, including resource specifications and environment variables.
    • Updated the configuration file to support the new live component with specific resource allocations.
    • Added a new section in the README for "Live Service Deployment" with detailed configuration settings.
  • Bug Fixes

    • Adjusted the default value for admin.assign_cluster_ip from false to true.
  • Version Update

    • Incremented application version from 1.0.24 to 1.0.25.

Copy link

coderabbitai bot commented Oct 3, 2024

Walkthrough

The changes in this pull request primarily involve updates to the plane-ce Helm chart configuration. The Chart.yaml file has been modified to increment the version from 1.0.24 to 1.0.25. Additionally, a new section for a "Live Docker Image" has been introduced in questions.yml, along with several new variables and modifications to existing ones. New Kubernetes resources, including a ConfigMap, Service, and Deployment for the live application, have been added in corresponding template files. The values.yaml file has also been updated to include specifications for the new live service.

Changes

File Path Change Summary
charts/plane-ce/Chart.yaml Version updated from 1.0.24 to 1.0.25.
charts/plane-ce/questions.yml New section for "Live Docker Image" with multiple new variables; admin.assign_cluster_ip updated from false to true.
charts/plane-ce/templates/config-secrets/live-env.yaml New ConfigMap added for live environment with several Sentry-related configurations and conditional Redis URL.
charts/plane-ce/templates/ingress.yaml New path /live/ added to Ingress routing to service {{ .Release.Name }}-live on port 3000.
charts/plane-ce/templates/workloads/live.deployment.yaml New Service and Deployment for live application defined, including resource specifications and environment variables.
charts/plane-ce/values.yaml New section for live component added with resource limits and environment variables for monitoring.

Possibly related PRs

  • chore: Plane-CE customisations #22: This PR modifies the questions.yml file, which is also updated in the main PR, indicating a potential overlap in configuration changes related to the plane-ce application.
  • Promoting develop to master #34: This PR includes a version update in the Chart.yaml file for the Plane application, which is relevant as the main PR also updates the version in the same file.
  • feat: modified environment variables for monitor service #36: Although this PR focuses on environment variables for the monitor service, it is part of the broader context of configuration changes within the charts/plane-ce directory, which aligns with the changes made in the main PR.

🐰 In the garden, changes bloom,
A version up, dispelling gloom.
With live images, we take flight,
New paths and services, shining bright.
In the code, our dreams take shape,
A hop, a skip, a joyful escape! 🌼


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 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.

Copy link

@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: 2

🧹 Outside diff range and nitpick comments (8)
charts/plane-ce/templates/config-secrets/live-env.yaml (1)

18-18: Remove unnecessary document separator

The triple dash (---) at the end of the file is typically used to separate multiple YAML documents in a single file. Since this file contains only one document (the ConfigMap), the separator is unnecessary and can be removed.

You can simply delete line 18:

-  {{- end }}
- ---
+  {{- end }}
charts/plane-ce/templates/workloads/live.deployment.yaml (2)

2-19: Service configuration looks good, with a minor suggestion.

The Service resource is well-defined and follows Helm best practices. The conditional clusterIP setting provides flexibility, and the port configuration is correct. The selector properly matches the pod labels in the Deployment.

Consider adding a app.kubernetes.io/name label to both the Service and the selector for better Kubernetes standard label practices:

metadata:
  labels:
    app.kubernetes.io/name: {{ .Release.Name }}-live
    app.name: {{ .Release.Namespace }}-{{ .Release.Name }}-live
spec:
  selector:
    app.kubernetes.io/name: {{ .Release.Name }}-live
    app.name: {{ .Release.Namespace }}-{{ .Release.Name }}-live
🧰 Tools
🪛 yamllint

[warning] 11-11: wrong indentation: expected 0 but found 2

(indentation)


[error] 6-6: syntax error: expected , but found ''

(syntax)


23-63: Deployment configuration is well-structured, with suggestions for improvement.

The Deployment resource is well-defined and follows Helm best practices. It includes configurable replicas, appropriate metadata, and a comprehensive container configuration with resource management.

Consider the following improvements:

  1. Add readiness and liveness probes to ensure proper health checking:
containers:
  - name: {{ .Release.Name }}-live
    # ... existing configuration ...
    readinessProbe:
      httpGet:
        path: /healthz
        port: 3000
      initialDelaySeconds: 10
      periodSeconds: 10
    livenessProbe:
      httpGet:
        path: /healthz
        port: 3000
      initialDelaySeconds: 15
      periodSeconds: 20
  1. Use more specific Kubernetes labels:
metadata:
  labels:
    app.kubernetes.io/name: {{ .Release.Name }}-live
    app.kubernetes.io/instance: {{ .Release.Name }}
    app.kubernetes.io/version: {{ .Values.planeVersion }}
  1. Consider using a PodDisruptionBudget to ensure high availability during voluntary disruptions:
---
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
  name: {{ .Release.Name }}-live-pdb
  namespace: {{ .Release.Namespace }}
spec:
  minAvailable: 1
  selector:
    matchLabels:
      app.kubernetes.io/name: {{ .Release.Name }}-live
  1. Add an imagePullSecrets field if the image is stored in a private registry:
spec:
  # ... existing configuration ...
  template:
    spec:
      imagePullSecrets:
        - name: {{ .Values.imagePullSecret }}

These suggestions will enhance the reliability and maintainability of your Deployment.

charts/plane-ce/templates/ingress.yaml (1)

41-47: LGTM! Consider adding a comment for clarity.

The new path configuration for the "live" service is correctly implemented and consistent with the existing structure. It aligns well with the PR objective of adding a "live service" feature to the Plane CE Helm chart.

Consider adding a brief comment above this block to explain the purpose of the "live" service, which could be helpful for future maintenance. For example:

          # Route for the live service (real-time updates)
          - backend:
              service:
                port:
                  number: 3000
                name: {{ .Release.Name }}-live
            path: /live/
            pathType: Prefix
charts/plane-ce/values.yaml (2)

153-155: LGTM! Consider adding a default value or comment for live_sentry_traces_sample_rate.

The addition of Sentry configuration variables for the live service is good and aligns with the PR objective. Empty string values allow for user configuration, which is fine.

However, for the live_sentry_traces_sample_rate variable, consider adding a default value or a comment explaining the expected range of values. This can help users understand how to configure it properly.

You could add a comment like this:

  # Sentry configuration for live service
  live_sentry_dsn: ""
  live_sentry_environment: ""
  live_sentry_traces_sample_rate: "" # Expected value range: 0.0 to 1.0

156-156: Remove extra blank lines for consistent formatting.

There are too many blank lines at the end of the file. To maintain consistent formatting throughout the YAML file, please remove the extra blank lines, leaving only one blank line at the end of the file.

Apply this change:

  live_sentry_traces_sample_rate: ""

-
🧰 Tools
🪛 yamllint

[warning] 156-156: too many blank lines

(1 > 0) (empty-lines)

charts/plane-ce/questions.yml (2)

123-154: LGTM! New "Live Docker Image" configuration added successfully.

The new configuration section for the live environment is well-structured and comprehensive. It aligns with the PR objective of adding a "live service" feature to the Plane CE Helm chart.

There's a minor indentation issue on line 135. Consider adjusting it for consistency:

    options:
-      - "Always"
+    - "Always"
🧰 Tools
🪛 yamllint

[warning] 135-135: wrong indentation: expected 4 but found 6

(indentation)


156-167: LGTM! Sentry configuration for live environment added.

The new Sentry configuration section for the live environment is well-structured and consistent with other parts of the application. It provides flexibility for users to configure Sentry optionally.

There's a trailing space on line 155. Consider removing it for cleanliness:

-  
+
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 70c7664 and bc133d9.

📒 Files selected for processing (6)
  • charts/plane-ce/Chart.yaml (1 hunks)
  • charts/plane-ce/questions.yml (1 hunks)
  • charts/plane-ce/templates/config-secrets/live-env.yaml (1 hunks)
  • charts/plane-ce/templates/ingress.yaml (1 hunks)
  • charts/plane-ce/templates/workloads/live.deployment.yaml (1 hunks)
  • charts/plane-ce/values.yaml (2 hunks)
✅ Files skipped from review due to trivial changes (1)
  • charts/plane-ce/Chart.yaml
🧰 Additional context used
🪛 yamllint
charts/plane-ce/questions.yml

[warning] 135-135: wrong indentation: expected 4 but found 6

(indentation)


[error] 155-155: trailing spaces

(trailing-spaces)

charts/plane-ce/templates/config-secrets/live-env.yaml

[error] 5-5: syntax error: expected , but found ''

(syntax)

charts/plane-ce/templates/workloads/live.deployment.yaml

[warning] 1-1: too many blank lines

(1 > 0) (empty-lines)


[warning] 11-11: wrong indentation: expected 0 but found 2

(indentation)


[error] 6-6: syntax error: expected , but found ''

(syntax)

charts/plane-ce/values.yaml

[warning] 156-156: too many blank lines

(1 > 0) (empty-lines)

🔇 Additional comments (7)
charts/plane-ce/templates/config-secrets/live-env.yaml (2)

1-5: LGTM: Metadata section is well-structured.

The metadata section correctly defines the ConfigMap resource and uses Helm release context for naming, which is a good practice for maintaining consistency across deployments.

🧰 Tools
🪛 yamllint

[error] 5-5: syntax error: expected , but found ''

(syntax)


13-17: LGTM: Flexible Redis URL configuration

The conditional logic for Redis URL configuration is well-implemented. It allows for both local and remote setups, which is excellent for supporting different deployment environments.

charts/plane-ce/templates/workloads/live.deployment.yaml (1)

1-65: Minor formatting suggestions and static analysis clarifications.

  1. Consider removing the blank line at the beginning of the file to adhere to YAML best practices.

  2. The static analysis tool reported indentation issues and a syntax error, but these appear to be false positives:

    • The indentation in the file is correct for Kubernetes manifests.
    • The syntax on line 6 (name: {{ .Release.Name }}-live) is valid Helm template syntax.

These false positives are likely due to the static analysis tool not being fully compatible with Helm templating syntax. The overall structure of the file is correct and follows Kubernetes and Helm best practices.

🧰 Tools
🪛 yamllint

[warning] 1-1: too many blank lines

(1 > 0) (empty-lines)


[warning] 11-11: wrong indentation: expected 0 but found 2

(indentation)


[error] 6-6: syntax error: expected , but found ''

(syntax)

charts/plane-ce/templates/ingress.yaml (1)

Line range hint 1-93: Overall structure and consistency look good.

The new path for the "live" service has been seamlessly integrated into the existing Ingress resource. The overall structure of the file remains consistent and well-organized. No other unintended changes or issues are apparent.

charts/plane-ce/values.yaml (1)

94-100: LGTM! Verify the assign_cluster_ip setting.

The new live service configuration looks good and consistent with other services in the file. The resource limits are properly set, which is a good practice for managing cluster resources.

However, please verify if setting assign_cluster_ip: false is intentional for this service. This setting might affect service discovery within the cluster. If the live service needs to be accessible by other services, consider setting it to true.

To check how assign_cluster_ip is used in the chart, run:

✅ Verification successful

Verified assign_cluster_ip setting.

The usage of assign_cluster_ip: false in the live service is consistent with other services within the chart. This configuration is intentional and correctly manages service discovery as designed.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check usage of assign_cluster_ip in the chart templates

# Test: Search for assign_cluster_ip usage in template files
rg --type yaml 'assign_cluster_ip' charts/plane-ce/templates

Length of output: 1008

charts/plane-ce/questions.yml (2)

Line range hint 1-1: Summary of changes and recommendations

  1. The new "Live Docker Image" configuration has been successfully added, aligning with the PR objective.
  2. Sentry configuration for the live environment has been properly integrated.
  3. Minor formatting issues (indentation and trailing space) have been identified and can be easily addressed.
  4. The change in the default value of admin.assign_cluster_ip requires further clarification.

Overall, the changes enhance the Helm chart by adding support for the live service feature. Please address the minor formatting issues and provide clarification on the admin service configuration change. Once these are resolved, the PR should be ready for merging.

🧰 Tools
🪛 yamllint

[warning] 135-135: wrong indentation: expected 4 but found 6

(indentation)


[error] 155-155: trailing spaces

(trailing-spaces)


Line range hint 1-1: Please clarify the change in admin.assign_cluster_ip default value.

The AI summary mentions that the default value for admin.assign_cluster_ip has been changed from false to true. This change might have implications for the network setup of the admin service.

Could you please provide more context on why this change was made and what impact it might have on the existing deployments? This will help ensure that the change aligns with the intended architecture and doesn't introduce unexpected behavior.

To verify the change and its potential impact, you can run the following script:

🧰 Tools
🪛 yamllint

[warning] 135-135: wrong indentation: expected 4 but found 6

(indentation)


[error] 155-155: trailing spaces

(trailing-spaces)

Copy link

@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

🧹 Outside diff range and nitpick comments (1)
charts/plane-ce/README.md (1)

153-153: Minor grammatical improvement suggested.

There's a small grammatical issue in the description for live.replicas.

Consider updating the description to improve clarity:

- This key helps you setting up number of replicas you want to run for this deployment.
+ This key helps you set up the number of replicas you want to run for this deployment.
🧰 Tools
🪛 LanguageTool

[grammar] ~153-~153: The verb ‘helps’ is used with an infinitive.
Context: ...for each deployment. This key helps you setting up number of replicas you want to run f...

(ADVISE_VBG)

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between bc133d9 and 6b12e97.

📒 Files selected for processing (1)
  • charts/plane-ce/README.md (1 hunks)
🧰 Additional context used
🪛 LanguageTool
charts/plane-ce/README.md

[grammar] ~153-~153: The verb ‘helps’ is used with an infinitive.
Context: ...for each deployment. This key helps you setting up number of replicas you want to run f...

(ADVISE_VBG)

🔇 Additional comments (1)
charts/plane-ce/README.md (1)

149-161: LGTM! New "Live Service Deployment" section added successfully.

The new section for Live Service Deployment has been added successfully, following the structure and format of other deployment sections. The settings and descriptions are clear and informative, providing users with the necessary information to configure the live service deployment.

🧰 Tools
🪛 LanguageTool

[grammar] ~153-~153: The verb ‘helps’ is used with an infinitive.
Context: ...for each deployment. This key helps you setting up number of replicas you want to run f...

(ADVISE_VBG)

@makeplane makeplane deleted a comment from coderabbitai bot Oct 7, 2024
@makeplane makeplane deleted a comment from coderabbitai bot Oct 7, 2024
@mguptahub mguptahub merged commit 8bc9b47 into develop Oct 7, 2024
1 check passed
@mguptahub mguptahub deleted the live-server branch October 7, 2024 10:26
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