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

Add yorkie-analytics Helm chart with Starrocks and Kafka #1161

Merged
merged 6 commits into from
Feb 19, 2025

Conversation

emplam27
Copy link
Contributor

@emplam27 emplam27 commented Feb 18, 2025

What this PR does / why we need it:

Add yorkie-analytics Helm chart with Starrocks and Kafka

  • init-starrocks-database-job: starrocks instances are up and running, it will create DB, Table, Loutine load.
  • init-kafka-topic-job: kafka instances are up and running, it will create kafka Topic.

Which issue(s) this PR fixes:

Address #1130

Special notes for your reviewer:

Does this PR introduce a user-facing change?:


Additional documentation:


Checklist:

  • Added relevant tests or not required
  • Addressed and resolved all CodeRabbit review comments
  • Didn't break anything

Summary by CodeRabbit

  • New Features

    • Introduced a new Helm chart for the Yorkie Analytics application, streamlining deployment within Kubernetes.
    • Added automated initialization for Kafka topics and StarRocks database to enhance deployment efficiency.
    • Provided flexible configuration options for integrating StarRocks and Kafka services.
  • Documentation

    • Added a comprehensive README file outlining installation and usage instructions for the Yorkie Analytics Helm chart.
    • Included clear post-installation guidance to help users easily identify next steps.
    • Updated the main charts documentation to include the new Yorkie Analytics chart.

@emplam27 emplam27 self-assigned this Feb 18, 2025
Copy link

coderabbitai bot commented Feb 18, 2025

Walkthrough

This pull request introduces a new Helm chart for the yorkie-analytics application, including several configuration files and templates that define metadata, ignore rules, post-install messages, and deployment values. New Kubernetes resources (ConfigMaps and Jobs) are added for the conditional initialization of both Kafka and StarRocks components. Modifications to the yorkie container deployment streamline the inclusion of Kafka parameters, while the Docker Compose configuration is updated to utilize an environment variable for the StarRocks host and includes added delays to ensure service readiness.

Changes

File(s) Change Summary
build/charts/yorkie-analytics/.helmignore, Chart.yaml, templates/NOTES.txt, values.yaml Introduced a new Helm chart for yorkie-analytics with metadata, ignore patterns, installation notes, and deployment configuration for Kafka and StarRocks.
build/charts/yorkie-analytics/templates/kafka/configmap.yaml, .../kafka/job.yaml Added Kafka initialization resources: a ConfigMap with an init script and a Job to create topics, both conditionally deployed if Kafka is enabled.
build/charts/yorkie-analytics/templates/starrocks/configmap.yaml, .../starrocks/job.yaml Added StarRocks initialization resources: a ConfigMap containing SQL and shell scripts and a Job with readiness checks for StarRocks (and Kafka if enabled).
build/charts/yorkie-cluster/templates/yorkie/deployment.yaml Updated command-line argument construction for the yorkie container, streamlining the inclusion of Kafka addresses, topic, and write timeout parameters.
build/docker/analytics/docker-compose.yml Updated to use the STARROCKS_MYSQL_HOST environment variable and added sleep delays to ensure proper service startup during the initialization process.
build/charts/yorkie-analytics/README.md Added documentation for the yorkie-analytics Helm chart, outlining installation and usage instructions.
build/charts/README.md Added an entry for the yorkie-analytics Helm chart, describing its purpose and functionality.

Possibly related PRs

  • Add Kafka options to yorkie-cluster and missing WriteTimeout #1149: The changes in the main PR, which focus on the introduction of a new Helm chart for yorkie-analytics, are related to the retrieved PR as both involve modifications to the configuration and deployment of Kafka within the Yorkie ecosystem, specifically through the addition of command-line arguments for Kafka in the yorkie container.
  • Add Docker Compose for Analytics Stack #1139: The changes in the main PR, which involve the introduction of a new Helm chart and related configuration files for the yorkie-analytics application, are related to the retrieved PR that adds a Docker Compose configuration for the same analytics stack, as both involve setting up components for Kafka and StarRocks, including initialization scripts for the database and topics.

Suggested labels

enhancement 🌟

Suggested reviewers

  • hackerwins

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.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

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

codecov bot commented Feb 18, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 38.56%. Comparing base (44e7632) to head (4b2673f).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1161   +/-   ##
=======================================
  Coverage   38.56%   38.56%           
=======================================
  Files         170      170           
  Lines       25441    25441           
=======================================
  Hits         9812     9812           
  Misses      14808    14808           
  Partials      821      821           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@hackerwins hackerwins marked this pull request as ready for review February 19, 2025 01:53
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

🧹 Nitpick comments (6)
build/charts/yorkie-analytics/templates/kafka/configmap.yaml (1)

14-16: Remove Trailing Spaces
There appears to be trailing whitespace on line 15. Removing these extraneous spaces will help ensure YAML lint compliance.

Proposed Diff:

-    KAFKA_HOST={{ .Values.name }}-kafka.{{ .Values.namespace }}.svc.cluster.local:9092 
+    KAFKA_HOST={{ .Values.name }}-kafka.{{ .Values.namespace }}.svc.cluster.local:9092
🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 15-15: trailing spaces

(trailing-spaces)

build/charts/yorkie-analytics/templates/kafka/job.yaml (1)

29-32: Correct Volumes Indentation
The YAML linter warns that the indentation under the volumes key is off (expected indent of 8 spaces for the list items under volumes). Adjust the indentation of the volume list to improve YAML readability and prevent potential parsing issues.

Proposed Diff:

-      volumes:
-      - name: init-kafka-topics-script
-        configMap:
-          name: {{ .Values.name }}-init-kafka-topics-script
+      volumes:
+        - name: init-kafka-topics-script
+          configMap:
+            name: {{ .Values.name }}-init-kafka-topics-script
🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 30-30: wrong indentation: expected 8 but found 6

(indentation)

build/charts/yorkie-analytics/values.yaml (1)

1-66: Optional: Enhance Documentation in Values File
While the configuration is clear, consider adding inline comments or descriptions for key sections (such as routine-load, kube-starrocks, and Kafka’s specifications). This can help future maintainers understand the purpose of each configuration block more quickly.

build/charts/yorkie-analytics/templates/starrocks/configmap.yaml (3)

11-28: SQL script for database and table creation.
The init-user-events-db.sql section creates the database and table with the intended schema. Please remove any trailing whitespace (as flagged by static analysis) to avoid formatting issues.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 22-22: trailing spaces

(trailing-spaces)


[error] 23-23: trailing spaces

(trailing-spaces)


[error] 25-25: trailing spaces

(trailing-spaces)


[error] 26-26: trailing spaces

(trailing-spaces)


29-41: Routine load SQL configuration is defined properly.
The init-routine-load.sql section correctly sets up the routine load with templated Kafka configuration values. Again, address any trailing space issues as reported by YAMLlint.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 37-37: trailing spaces

(trailing-spaces)


43-73: Shell script for StarRocks initialization is comprehensive.
The init-starrocks-database.sh script uses a series of sleep commands and status checks to ensure services are ready before executing SQL scripts. Consider adding set -e at the top of the script so that any command failure aborts the process—this can improve error handling in critical initialization steps.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 47-47: trailing spaces

(trailing-spaces)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 44e7632 and c179aab.

⛔ Files ignored due to path filters (1)
  • build/charts/yorkie-analytics/Chart.lock is excluded by !**/*.lock
📒 Files selected for processing (10)
  • build/charts/yorkie-analytics/.helmignore (1 hunks)
  • build/charts/yorkie-analytics/Chart.yaml (1 hunks)
  • build/charts/yorkie-analytics/templates/NOTES.txt (1 hunks)
  • build/charts/yorkie-analytics/templates/kafka/configmap.yaml (1 hunks)
  • build/charts/yorkie-analytics/templates/kafka/job.yaml (1 hunks)
  • build/charts/yorkie-analytics/templates/starrocks/configmap.yaml (1 hunks)
  • build/charts/yorkie-analytics/templates/starrocks/job.yaml (1 hunks)
  • build/charts/yorkie-analytics/values.yaml (1 hunks)
  • build/charts/yorkie-cluster/templates/yorkie/deployment.yaml (1 hunks)
  • build/docker/analytics/docker-compose.yml (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • build/charts/yorkie-analytics/.helmignore
🧰 Additional context used
🪛 YAMLlint (1.35.1)
build/charts/yorkie-analytics/templates/starrocks/configmap.yaml

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)


[error] 22-22: trailing spaces

(trailing-spaces)


[error] 23-23: trailing spaces

(trailing-spaces)


[error] 25-25: trailing spaces

(trailing-spaces)


[error] 26-26: trailing spaces

(trailing-spaces)


[error] 37-37: trailing spaces

(trailing-spaces)


[error] 47-47: trailing spaces

(trailing-spaces)

build/charts/yorkie-analytics/templates/kafka/configmap.yaml

[error] 15-15: trailing spaces

(trailing-spaces)


[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)

build/charts/yorkie-analytics/templates/kafka/job.yaml

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)


[warning] 30-30: wrong indentation: expected 8 but found 6

(indentation)

build/charts/yorkie-analytics/templates/starrocks/job.yaml

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)

🔇 Additional comments (18)
build/charts/yorkie-analytics/templates/NOTES.txt (1)

1-10: Clear Installation and Next Steps Message
The installation message and subsequent next steps instructions are clear and helpful. The usage of the Helm templating variable ({{ .Release.Name }}) is correct for dynamically displaying the release name.

build/charts/yorkie-analytics/templates/kafka/configmap.yaml (1)

1-24: Well-Structured Conditional ConfigMap for Kafka Topics
The ConfigMap is correctly wrapped in a conditional block that checks if Kafka is enabled. The embedded shell script correctly constructs and uses the Kafka host and runs the topic initialization commands.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 15-15: trailing spaces

(trailing-spaces)


[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)

build/charts/yorkie-analytics/Chart.yaml (1)

1-35: Comprehensive Helm Chart Metadata
The Chart.yaml file is well populated with all the necessary metadata, maintainers’ details, sources, and dependency definitions. The use of conditions for enabling StarRocks and Kafka dependencies is clear and appropriate.

build/charts/yorkie-analytics/templates/kafka/job.yaml (3)

1-35: Solid Definition of Kafka Initialization Job
The Job resource is well defined and conditionally deployed based on the Kafka enabled flag. The use of an init container to wait for the Kafka controller’s readiness, proper annotation for Helm hooks, and the defined backoff limit are all implemented effectively.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)


[warning] 30-30: wrong indentation: expected 8 but found 6

(indentation)


16-17: Verify Service Account Usage
The Job specifies serviceAccountName: starrocks (line 16). Please confirm that using the StarRocks service account for a Kafka initialization job is intentional. If this was meant to use a Kafka-specific service account, then adjust accordingly.


1-1: Helm Templating Directive Note
The leading templating directive ({{- if ... }}) on line 1 can sometimes trigger static analysis syntax errors in plain YAML linters. This is a known false positive due to Helm’s templating syntax and can be safely ignored.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)

build/charts/yorkie-analytics/values.yaml (1)

1-66: Comprehensive Configuration for Yorkie Analytics Deployment
The values.yaml file neatly organizes configuration for both the yorkie-analytics application and its dependent components (StarRocks and Kafka). The use of YAML anchors for the StarRocks image repository and tag is an excellent way to avoid redundancy. All critical parameters—including enabled flags, image repositories/tags, and resource settings—are provided and clearly structured.

build/charts/yorkie-analytics/templates/starrocks/job.yaml (4)

1-12: Helm templating condition & metadata annotations check.
The conditional block using {{- if index .Values "yorkie-analytics" "starrocks" "enabled" }} ensures that the Job resource is only created when StarRocks is enabled. The metadata (name, namespace, labels, and Helm hook annotations) are correctly set. Note that YAML lint errors on the leading dash in templating (as reported by YAMLlint) are common false positives in such files.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)


18-29: Init containers for service readiness are well configured.
The use of multiple init containers to wait for the StarRocks front-end (wait-for-starrocks-fe) and back-end (wait-for-starrocks-be), plus conditionally waiting on Kafka (via wait-for-kafka), helps ensure that all dependent services are ready before running the database initialization script.


31-37: Main database initialization container & volume mounts.
The primary container (init-starrocks-database) runs the initialization script from /etc/config/init-starrocks-database.sh with its associated volume mount. This separation of concerns is clear and maintainable.


38-41: Volume declaration and retry policy are appropriate.
Defining the volume with the ConfigMap and setting a backoffLimit of 10 ensures that transient failures can be retried appropriately.

build/charts/yorkie-analytics/templates/starrocks/configmap.yaml (1)

1-10: ConfigMap metadata and conditional creation.
The ConfigMap is conditionally created based on the StarRocks enablement flag and includes well-defined metadata. Ensure that any YAML lint warnings (often related to templating syntax or trailing spaces) are handled by your CI/CD tooling.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)

build/charts/yorkie-cluster/templates/yorkie/deployment.yaml (1)

84-95: Streamlined Kafka CLI arguments construction.
The conditional inclusion of --kafka-addresses, --kafka-topic, and --kafka-write-timeout using nested if statements simplifies the command-line argument assembly for the yorkie container. Ensure that these values are populated correctly in the corresponding values.yaml file so that the absence of one does not inadvertently remove another necessary parameter.

build/docker/analytics/docker-compose.yml (5)

119-121: Centralizing StarRocks host configuration.
Defining STARROCKS_MYSQL_HOST=starrocks-fe at the beginning of the command block enhances maintainability by avoiding hardcoded hostnames across multiple commands.


123-124: Consistent usage of the environment variable in MySQL checks.
Replacing the hardcoded hostname with $STARROCKS_MYSQL_HOST in the MySQL commands for checking both the frontend and backend status ensures consistency. The use of double backslashes (e.g., 'show frontends\\G') appears correctly escaped within the YAML context.


128-132: SQL initialization and database check updates.
The commands that load the init-user-events-db.sql and check for the presence of the newly created database now refer to the centralized environment variable. This change improves consistency across the initialization process.


135-136: Table existence check command update.
Verifying the user_events table using the environment variable in the MySQL command is correctly implemented.


141-146: Routine load creation and verification commands.
The commands executing the init-routine-load.sql and checking the routine load status are updated with consistent use of $STARROCKS_MYSQL_HOST and include additional sleep delays to allow the routine load to initialize properly.

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: 1

🧹 Nitpick comments (2)
build/charts/yorkie-analytics/README.md (2)

1-3: Article and Spelling Correction in Introduction

The introduction text on line 3 could be improved for clarity. Consider inserting the article "an" before "analytics system" and correcting the spelling of "analyizing" to "analyzing". For instance, modify the line as follows:

-Installs the yorkie-analytics, which provides analytics system with analyz**i**ing usage of yorkie cluster.
+Installs the yorkie-analytics, which provides an analytics system with StarRocks and Grafana for analyzing usage of the Yorkie cluster.
🧰 Tools
🪛 LanguageTool

[uncategorized] ~3-~3: You might be missing the article “an” here.
Context: ...ls the yorkie-analytics, which provides analytics system with StarRocks and Grafana for a...

(AI_EN_LECTOR_MISSING_DETERMINER_AN)


32-32: Punctuation Suggestion in Dependencies Section

Consider adding a comma after "By default" to improve the readability of the sentence on line 32. For example:

-By default this chart installs additional, dependent charts:
+By default, this chart installs additional, dependent charts:
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c179aab and 3d5c6e3.

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

[uncategorized] ~3-~3: You might be missing the article “an” here.
Context: ...ls the yorkie-analytics, which provides analytics system with StarRocks and Grafana for a...

(AI_EN_LECTOR_MISSING_DETERMINER_AN)


[uncategorized] ~31-~31: Did you mean: “By default,”?
Context: ...mmand documentation._ ## Dependencies By default this chart installs additional, depende...

(BY_DEFAULT_COMMA)

🪛 markdownlint-cli2 (0.17.2)
build/charts/yorkie-analytics/README.md

62-62: Link fragments should be valid
null

(MD051, link-fragments)

⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: build

Comment on lines +62 to +66
See [Customizing the Chart Before Installing](#customizing-the-chart-before-installing) below for configuration options. To see all configurable options with detailed comments:

```console
helm show values yorkie-team/yorkie-analytics
```
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Link Fragment Verification in Configuration Section

The link "Customizing the Chart Before Installing" on line 62 does not seem to reference any header within the document. Please verify that the corresponding section exists or update the link to point to a valid header.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

62-62: Link fragments should be valid
null

(MD051, link-fragments)

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

🧹 Nitpick comments (1)
build/charts/yorkie-analytics/README.md (1)

3-3: Refine Language for Clarity and Correct Spelling
The current sentence on line 3 can benefit from improved grammar and spelling. Consider updating it as shown below to enhance clarity and professionalism:

-Installs the yorkie-analytics, which provides analytics system with Kafka and StarRocks for analyizing usage of yorkie cluster.
+Installs the yorkie-analytics Helm chart, which provides an analytics system with Kafka and StarRocks for analyzing the usage of the Yorkie cluster.
🧰 Tools
🪛 LanguageTool

[uncategorized] ~3-~3: You might be missing the article “an” here.
Context: ...ls the yorkie-analytics, which provides analytics system with Kafka and StarRocks for ana...

(AI_EN_LECTOR_MISSING_DETERMINER_AN)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2368ed2 and 89424fd.

⛔ Files ignored due to path filters (1)
  • build/charts/yorkie-analytics/Chart.lock is excluded by !**/*.lock
📒 Files selected for processing (4)
  • build/charts/README.md (1 hunks)
  • build/charts/yorkie-analytics/Chart.yaml (1 hunks)
  • build/charts/yorkie-analytics/README.md (1 hunks)
  • build/charts/yorkie-analytics/values.yaml (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • build/charts/yorkie-analytics/Chart.yaml
  • build/charts/yorkie-analytics/values.yaml
🧰 Additional context used
🪛 LanguageTool
build/charts/yorkie-analytics/README.md

[uncategorized] ~3-~3: You might be missing the article “an” here.
Context: ...ls the yorkie-analytics, which provides analytics system with Kafka and StarRocks for ana...

(AI_EN_LECTOR_MISSING_DETERMINER_AN)


[uncategorized] ~31-~31: Did you mean: “By default,”?
Context: ...mmand documentation._ ## Dependencies By default this chart installs additional, depende...

(BY_DEFAULT_COMMA)

🪛 markdownlint-cli2 (0.17.2)
build/charts/yorkie-analytics/README.md

62-62: Link fragments should be valid
null

(MD051, link-fragments)

⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: build
🔇 Additional comments (2)
build/charts/README.md (1)

10-10: New Chart Entry Added
The addition of the yorkie-analytics Helm chart entry with its clear description is well done. Ensure that the linked documentation in the associated chart’s README continues to match this brief description.

build/charts/yorkie-analytics/README.md (1)

62-62: Verify Link Fragment for Customization Section
The link "Customizing the Chart Before Installing" on line 62 does not appear to correspond to any existing header in this document. Please either create a corresponding section or update the link to point to a valid header.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

62-62: Link fragments should be valid
null

(MD051, link-fragments)

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

🧹 Nitpick comments (3)
build/charts/yorkie-analytics/templates/kafka/configmap.yaml (3)

1-1: Helm Templating Directive & YAMLlint Compatibility
The templating directive on this line ({{- if index .Values "yorkie-analytics" "kafka" "enabled" }}) is standard for Helm charts but may trigger YAML parsing errors (as noted by YAMLlint). Consider adding a YAML lint ignore comment or configuring your linter to skip template directives to avoid false positives.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)


11-24: Embedded Bash Script Robustness and Best Practices
The embedded Bash script for initializing Kafka topics is clear and follows the intended flow:

  • It constructs the KAFKA_HOST using provided values.
  • It waits for Kafka to be accessible.
  • It creates the Kafka topic if it does not already exist.

Suggestions for Improvement:

  • Error Handling: Consider adding checks after executing critical commands (e.g., after listing topics or creating the topic) to handle any failures gracefully. For example, verify the exit status of kafka-topics.sh commands and exit with an error message if a step fails.
  • Logging & Verbosity: It might be helpful to redirect error outputs or add additional diagnostic messages for easier debugging during deployments.
🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 15-15: trailing spaces

(trailing-spaces)


15-15: Remove Trailing Whitespace
YAMLlint has flagged trailing whitespace on this line. Removing unnecessary spaces helps maintain a clean and consistent file format.

Suggested diff:

-    
+ 
🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 15-15: trailing spaces

(trailing-spaces)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 89424fd and 4b2673f.

📒 Files selected for processing (2)
  • build/charts/yorkie-analytics/templates/kafka/configmap.yaml (1 hunks)
  • build/charts/yorkie-analytics/values.yaml (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • build/charts/yorkie-analytics/values.yaml
🧰 Additional context used
🪛 YAMLlint (1.35.1)
build/charts/yorkie-analytics/templates/kafka/configmap.yaml

[error] 15-15: trailing spaces

(trailing-spaces)


[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)

⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: build
🔇 Additional comments (1)
build/charts/yorkie-analytics/templates/kafka/configmap.yaml (1)

4-10: Metadata & Label Validation
The metadata block correctly uses template expressions for the resource name, namespace, and labels. Please verify that .Values.name and .Values.namespace are defined in your values file, ensuring that the resource naming conventions and label assignments are as intended.

Copy link
Member

@hackerwins hackerwins left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution.

@hackerwins hackerwins merged commit e59014d into main Feb 19, 2025
5 checks passed
@hackerwins hackerwins deleted the helm-kafka-chart branch February 19, 2025 07:20
hackerwins added a commit that referenced this pull request Feb 19, 2025
* Add yorkie-analytics Helm chart with Starrocks

* Add Kafka yorkie-analytics Helm chart

* Enhance Yorkie deployment and Docker Compose for Starrocks integration

* Update yorkie-analytics chart to adjust CPU resource requests

* Add Kafka topic configuration for partitions and replication factor

---------

Co-authored-by: Youngteac Hong <[email protected]>
hackerwins added a commit that referenced this pull request Feb 19, 2025
* Add yorkie-analytics Helm chart with Starrocks

* Add Kafka yorkie-analytics Helm chart

* Enhance Yorkie deployment and Docker Compose for Starrocks integration

* Update yorkie-analytics chart to adjust CPU resource requests

* Add Kafka topic configuration for partitions and replication factor

---------

Co-authored-by: Youngteac Hong <[email protected]>
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