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 broken links in the document files #2611

Merged
merged 3 commits into from
Sep 11, 2024

Conversation

vankichi
Copy link
Contributor

@vankichi vankichi commented Sep 11, 2024

Description

I have fixed the broken links in the document files.

According to fixing, I realized k8s/gateway/mirror is missing even though their links are written in the document file.
So, I have updated Makefile.d/k8s.mk to generate k8s/gateway/mirror.

Related Issue

Versions

  • Vald Version: v1.7.13
  • Go Version: v1.23.0
  • Rust Version: v1.80.0
  • Docker Version: v27.1.1
  • Kubernetes Version: v1.30.3
  • Helm Version: v3.15.3
  • NGT Version: v2.2.4
  • Faiss Version: v1.8.0

Checklist

Special notes for your reviewer

Summary by CodeRabbit

  • New Features

    • Introduced a new configuration option to enable the gateway mirror feature in Kubernetes.
    • Added Kubernetes resources including ClusterRole, ClusterRoleBinding, ConfigMap, Deployment, Horizontal Pod Autoscaler, and ServiceAccount for the vald-mirror-gateway.
    • Implemented a Pod Disruption Budget to maintain availability during disruptions.
    • Established a PriorityClass for scheduling the vald-mirror-gateway.
  • Documentation

    • Updated hyperlinks in various documentation files to improve navigation and accuracy.
    • Corrected URLs in tutorials and user guides to point to stable resources.
  • Style

    • Enhanced formatting for improved readability in performance documentation.

@vankichi vankichi requested review from a team, kpango and datelier and removed request for a team September 11, 2024 07:14
This commit fixes the style issues introduced in 07bb715 according to the output
from Gofumpt and Prettier.

Details: #2611
Copy link
Contributor

coderabbitai bot commented Sep 11, 2024

Walkthrough

Walkthrough

This pull request introduces several changes across multiple files, primarily focusing on enhancing the Kubernetes configuration for the Vald mirror gateway. Key updates include the addition of a new configuration option to enable the gateway mirror feature, updates to documentation hyperlinks for improved navigation, and the introduction of various Kubernetes resources such as ClusterRole, ClusterRoleBinding, ConfigMap, Deployment, HPA, PDB, PriorityClass, ServiceAccount, and Service. These changes collectively aim to improve the management and functionality of the Vald mirror gateway within a Kubernetes environment.

Changes

Files Change Summary
Makefile.d/k8s.mk Added: --set gateway.mirror.enabled=true in the Kubernetes manifest update command.
docs/api/*.md Updated link reference from ./status.md to ../status.md in multiple files.
docs/contributing/coding-style.md Updated: Reference from ./unit-test-guideline.md to ../unit-test-guideline.md.
docs/performance/continuous-benchmark.md Minor formatting updates to the properties table for improved readability.
docs/troubleshooting/client-side.md Updated: Link for FAQ section from ../support/FAQ.md to /docs/support/faq.
docs/tutorial/get-started-with-faiss-agent.md Updated: Hyperlink to use a relative path instead of an absolute one.
docs/tutorial/vald-multicluster-on-k8s.md Updated URLs to point to the main branch instead of a feature branch for various deployment configurations.
docs/user-guides/cluster-role-binding.md Corrected hyperlink path from k8s/gatewat/mirror/clusterrole.yaml to k8s/gateway/mirror/clusterrole.yaml.
k8s/gateway/gateway/mirror/*.yaml Added: ClusterRole, ClusterRoleBinding, ConfigMap, Deployment, HPA, PDB, PriorityClass, ServiceAccount, Service.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Kubernetes
    participant ValdGateway

    User->>Kubernetes: Deploy Vald Mirror Gateway
    Kubernetes->>ValdGateway: Create ClusterRole
    Kubernetes->>ValdGateway: Create ClusterRoleBinding
    Kubernetes->>ValdGateway: Create ConfigMap
    Kubernetes->>ValdGateway: Create Deployment
    Kubernetes->>ValdGateway: Create HPA
    Kubernetes->>ValdGateway: Create PodDisruptionBudget
    Kubernetes->>ValdGateway: Create PriorityClass
    Kubernetes->>ValdGateway: Create ServiceAccount
    Kubernetes->>ValdGateway: Create Service
    ValdGateway-->>User: Gateway is ready
Loading

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>.
    • 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 generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @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.

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

cloudflare-workers-and-pages bot commented Sep 11, 2024

Deploying vald with  Cloudflare Pages  Cloudflare Pages

Latest commit: c37f4c3
Status: ✅  Deploy successful!
Preview URL: https://1c86de1c.vald.pages.dev
Branch Preview URL: https://documentation-docs-k8s-fix-b.vald.pages.dev

View logs

@vdaas-ci
Copy link
Collaborator

[CHATOPS:HELP] ChatOps commands.

  • 🙆‍♀️ /approve - approve
  • 🍱 /format - format codes and add licenses
  • /gen-test - generate test codes
  • 🏷️ /label - add labels
  • 🔚 2️⃣ 🔚 /label actions/e2e-deploy - run E2E deploy & integration test

Copy link
Collaborator

@kpango kpango left a comment

Choose a reason for hiding this comment

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

LGTM

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

Outside diff range and nitpick comments (1)
docs/performance/continuous-benchmark.md (1)

64-65: LanguageTool nitpicks (optional)

LanguageTool highlighted two minor nitpicks:

  • Line 64: Use "cannot" instead of "can not"
  • Line 65: Use "cannot" instead of "can not"

Using "cannot" would be more grammatically correct in this context. However, these are very minor documentation nitpicks. Feel free to ignore them or incorporate them at your discretion.

If you'd like, I can submit a small PR to make these fixes. Let me know if that would be helpful!

Tools
LanguageTool

[style] ~64-~64: Unless you want to emphasize “not”, use “cannot” which is more common.
Context: ...ig for running benchmark job
Tune if can not getting the expected performance with d...

(CAN_NOT_PREMIUM)


[style] ~65-~65: Unless you want to emphasize “not”, use “cannot” which is more common.
Context: ...config for benchmark job pod
Tune if can not getting the expected performance with d...

(CAN_NOT_PREMIUM)

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between c3c5765 and e2811ce.

Files selected for processing (22)
  • Makefile.d/k8s.mk (1 hunks)
  • docs/api/insert.md (3 hunks)
  • docs/api/object.md (3 hunks)
  • docs/api/remove.md (4 hunks)
  • docs/api/search.md (12 hunks)
  • docs/api/update.md (3 hunks)
  • docs/api/upsert.md (3 hunks)
  • docs/contributing/coding-style.md (1 hunks)
  • docs/performance/continuous-benchmark.md (1 hunks)
  • docs/troubleshooting/client-side.md (1 hunks)
  • docs/tutorial/get-started-with-faiss-agent.md (1 hunks)
  • docs/tutorial/vald-multicluster-on-k8s.md (5 hunks)
  • docs/user-guides/cluster-role-binding.md (1 hunks)
  • k8s/gateway/gateway/mirror/clusterrole.yaml (1 hunks)
  • k8s/gateway/gateway/mirror/clusterrolebinding.yaml (1 hunks)
  • k8s/gateway/gateway/mirror/configmap.yaml (1 hunks)
  • k8s/gateway/gateway/mirror/deployment.yaml (1 hunks)
  • k8s/gateway/gateway/mirror/hpa.yaml (1 hunks)
  • k8s/gateway/gateway/mirror/pdb.yaml (1 hunks)
  • k8s/gateway/gateway/mirror/priorityclass.yaml (1 hunks)
  • k8s/gateway/gateway/mirror/serviceaccount.yaml (1 hunks)
  • k8s/gateway/gateway/mirror/svc.yaml (1 hunks)
Files skipped from review due to trivial changes (14)
  • docs/api/insert.md
  • docs/api/object.md
  • docs/api/remove.md
  • docs/api/search.md
  • docs/api/update.md
  • docs/api/upsert.md
  • docs/contributing/coding-style.md
  • docs/troubleshooting/client-side.md
  • docs/tutorial/get-started-with-faiss-agent.md
  • docs/tutorial/vald-multicluster-on-k8s.md
  • docs/user-guides/cluster-role-binding.md
  • k8s/gateway/gateway/mirror/clusterrolebinding.yaml
  • k8s/gateway/gateway/mirror/priorityclass.yaml
  • k8s/gateway/gateway/mirror/serviceaccount.yaml
Additional context used
LanguageTool
docs/performance/continuous-benchmark.md

[style] ~64-~64: Unless you want to emphasize “not”, use “cannot” which is more common.
Context: ...ig for running benchmark job
Tune if can not getting the expected performance with d...

(CAN_NOT_PREMIUM)


[style] ~65-~65: Unless you want to emphasize “not”, use “cannot” which is more common.
Context: ...config for benchmark job pod
Tune if can not getting the expected performance with d...

(CAN_NOT_PREMIUM)

Additional comments not posted (8)
k8s/gateway/gateway/mirror/pdb.yaml (1)

1-31: LGTM!

The PodDisruptionBudget resource for the vald-mirror-gateway is well-defined:

  • The file includes the standard Apache 2.0 license header.
  • The Helm chart labels follow the recommended Kubernetes labels.
  • The maxUnavailable is set to 50%, which allows some disruption but ensures that not all pods are unavailable at the same time.

The code changes are approved.

k8s/gateway/gateway/mirror/hpa.yaml (1)

1-35: LGTM!

The HorizontalPodAutoscaler resource for the vald-mirror-gateway is well-defined:

  • The file includes the standard Apache 2.0 license header.
  • The Helm chart labels follow the recommended Kubernetes labels.
  • The minReplicas and maxReplicas are set to 3 and 9 respectively, which allows the deployment to scale based on CPU utilization.
  • The targetCPUUtilizationPercentage is set to 80%, which is a good default value.

The code changes are approved.

k8s/gateway/gateway/mirror/svc.yaml (1)

1-45: LGTM!

The Service resource for the vald-mirror-gateway is well-defined:

  • The file includes the standard Apache 2.0 license header.
  • The Helm chart labels follow the recommended Kubernetes labels.
  • The exposed ports grpc, readiness, and pprof are well-defined and follow a consistent naming convention.
  • The clusterIP is set to None, making it a headless service, which is appropriate for a stateful application like vald-mirror-gateway.

The code changes are approved.

k8s/gateway/gateway/mirror/clusterrole.yaml (1)

1-55: LGTM!

The ClusterRole configuration looks good and follows best practices:

  • The metadata labels are properly set, including the Helm chart version and component name.
  • The rules grant the necessary permissions for the gateway-mirror component to manage valdmirrortargets resources.
k8s/gateway/gateway/mirror/deployment.yaml (1)

1-184: LGTM!

The Deployment configuration looks good and follows best practices:

  • The metadata labels are properly set, including the Helm chart version and component name.
  • The spec defines a rolling update strategy with reasonable maxSurge and maxUnavailable values.
  • The template spec includes proper security context settings, such as running as a non-root user and dropping all capabilities.
  • Liveness, readiness, and startup probes are configured to ensure the health of the container.
  • Resource limits and requests are set to ensure proper resource allocation.
  • The container is configured to use a read-only root filesystem and runs with a non-root user for enhanced security.
  • Environment variables are set to provide pod-specific information to the container.
  • The container is configured to mount a config map volume for configuration.
k8s/gateway/gateway/mirror/configmap.yaml (1)

1-28: LGTM!

The ConfigMap configuration looks good and follows best practices:

  • The metadata labels are properly set, including the Helm chart version and component name.
  • The data section contains the configuration in a config.yaml key, which can be mounted as a file in the container.
  • The configuration includes various settings for the server, health check, metrics, observability, and gateway components.
Makefile.d/k8s.mk (1)

44-44: LGTM, but verify the k8s/gateway/mirror directory generation.

The change looks good and enables the gateway mirror feature.

To ensure the mirror gateway is correctly deployed, please verify that:

  1. The k8s/gateway/mirror directory is generated by this Makefile target.
  2. The directory contains the necessary Kubernetes resources (e.g., Deployment, Service) for the mirror gateway.

You can run the following commands to check:

docs/performance/continuous-benchmark.md (1)

48-65: Formatting changes LGTM!

The formatting updates to the properties table headers and content alignment enhance the readability without altering the underlying information.

Tools
LanguageTool

[style] ~64-~64: Unless you want to emphasize “not”, use “cannot” which is more common.
Context: ...ig for running benchmark job
Tune if can not getting the expected performance with d...

(CAN_NOT_PREMIUM)


[style] ~65-~65: Unless you want to emphasize “not”, use “cannot” which is more common.
Context: ...config for benchmark job pod
Tune if can not getting the expected performance with d...

(CAN_NOT_PREMIUM)

@datelier datelier merged commit 52925b6 into main Sep 11, 2024
120 of 121 checks passed
@datelier datelier deleted the documentation/docs-k8s/fix-broken-links branch September 11, 2024 07:38
vdaas-ci pushed a commit that referenced this pull request Sep 11, 2024
* 🐛 📝 Fix broken links in document files

Signed-off-by: vankichi <[email protected]>

* style: format code with Gofumpt and Prettier

This commit fixes the style issues introduced in 07bb715 according to the output
from Gofumpt and Prettier.

Details: #2611

---------

Signed-off-by: vankichi <[email protected]>
Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
vankichi added a commit that referenced this pull request Sep 12, 2024
* 🐛 📝 Fix broken links in document files



* style: format code with Gofumpt and Prettier

This commit fixes the style issues introduced in 07bb715 according to the output
from Gofumpt and Prettier.

Details: #2611

---------

Signed-off-by: vankichi <[email protected]>
Co-authored-by: Kiichiro YUKAWA <[email protected]>
Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
@coderabbitai coderabbitai bot mentioned this pull request Sep 23, 2024
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants