Skip to content

docs: update Device CRDs documentation and fix broken link#728

Open
sachin21212121 wants to merge 1 commit intokubeedge:masterfrom
sachin21212121:docs/device-crd-update
Open

docs: update Device CRDs documentation and fix broken link#728
sachin21212121 wants to merge 1 commit intokubeedge:masterfrom
sachin21212121:docs/device-crd-update

Conversation

@sachin21212121
Copy link

  • Fixed the broken link to the device-crd-v1beta1 proposal.
  • Improved clarity and formatting of Device CRDs documentation.
  • Added explanations for YAML fields and usage steps.
  • Documentation-only update; no functional changes.

Signed-off-by: sachin21212121 <jhasachin0115@gmail.com>
@kubeedge-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To complete the pull request process, please assign shelley-baoyue after the PR has been reviewed.
You can assign the PR to them by writing /assign @shelley-baoyue in a comment when ready.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@gemini-code-assist
Copy link

Summary of Changes

Hello @sachin21212121, 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 focuses on enhancing the documentation for KubeEdge Device CRDs, specifically for the v1beta1 version. The changes aim to improve user understanding by clarifying core concepts, providing more detailed explanations for YAML configurations, and offering explicit step-by-step usage instructions. This update is purely documentation-focused, with no functional code changes.

Highlights

  • Broken Link Fixed: The broken link to the device-crd-v1beta1 proposal has been corrected, ensuring users can access the accurate migration details.
  • Documentation Clarity and Formatting: The overall clarity and formatting of the Device CRDs documentation have been significantly improved, making it more readable and easier to understand.
  • Enhanced YAML Field Explanations: Comprehensive explanations have been added for various YAML fields within both Device Model and Device Instance samples, detailing their purpose and usage.
  • Detailed Usage Steps: The usage instructions for Device CRDs have been expanded to include explicit, step-by-step guidance and kubectl commands for creating and verifying Device Models and Instances.
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.

@kubeedge-bot kubeedge-bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Sep 25, 2025
Copy link

@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 significantly improves the documentation for Device CRDs by clarifying concepts, fixing a broken link, and providing better examples and usage instructions. The changes enhance readability and make the documentation more user-friendly. I've provided a couple of suggestions to further improve the markdown structure and formatting for better consistency and semantic correctness.

KubeEdge supports device management with the help of Kubernetes [CRDs](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/#customresourcedefinitions) and Device Mapper corresponding to the device being used.
We currently use Device Model and Device Instance to define the device.

# **Device CRDs**

Choose a reason for hiding this comment

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

medium

The use of bold markdown (**...**) inside a level-1 heading is unconventional and may not render as expected across all markdown parsers. It's generally better to keep headings clean for semantic correctness and consistent rendering. Please remove the bold formatting from the heading.

Suggested change
# **Device CRDs**
# Device CRDs

Copy link
Contributor

Choose a reason for hiding this comment

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

i second this.

Comment on lines +130 to +156
1. ### Create a Device Model

1. Create a device model, execute in the cloud node.
Apply the Device Model YAML file to the cluster:

```shell
kubectl apply -f <path to device model yaml>
```bash
kubectl apply -f <path-to-device-model-yaml>
```

2. Create a device instance, execute in the cloud node.
```shell
kubectl apply -f <path to device instance yaml>
Verify the Device Model creation:

```bash
kubectl get devicemodels
```

2. ### Create a Device Instance

Apply the Device Instance YAML file to the cluster:

```bash
kubectl apply -f <path-to-device-instance-yaml>
```

Verify the Device Instance creation:

```bash
kubectl get devices
```

Choose a reason for hiding this comment

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

medium

Using headings within a numbered list is unconventional and can lead to inconsistent rendering or awkward formatting. For better document structure and readability, it's recommended to use headings for each step directly, rather than nesting them inside a list. This makes the steps clearer and easier to navigate.

### 1. Create a Device Model

Apply the Device Model YAML file to the cluster:

```bash
kubectl apply -f <path-to-device-model-yaml>

Verify the Device Model creation:

kubectl get devicemodels

2. Create a Device Instance

Apply the Device Instance YAML file to the cluster:

kubectl apply -f <path-to-device-instance-yaml>

Verify the Device Instance creation:

kubectl get devices

@github-actions
Copy link

Hello 👋 Looks like there was no activity on this amazing PR for last 90 days.

Do you mind updating us on the status? Is there anything we can help with? If you plan to still work on it, just comment on this PR or push a commit. Thanks! 🤗

If there will be no activity for 60 days, this PR will be closed (we can always reopen a PR if you get back to this!).

Copy link
Contributor

@fujitatomoya fujitatomoya left a comment

Choose a reason for hiding this comment

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

overall lgtm, comments need to be resolved.


We define devices using two primary resources: **Device Model** and **Device Instance**.

---
Copy link
Contributor

Choose a reason for hiding this comment

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

why do we want to add the separator in the description?

KubeEdge supports device management with the help of Kubernetes [CRDs](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/#customresourcedefinitions) and Device Mapper corresponding to the device being used.
We currently use Device Model and Device Instance to define the device.

# **Device CRDs**
Copy link
Contributor

Choose a reason for hiding this comment

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

i second this.

properties:
- name: temp
description: beta1-model
description: Temperature attribute
Copy link
Contributor

Choose a reason for hiding this comment

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

good catch, this aligns with the example DeviceModel description 👍

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

Labels

size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants