Skip to content

add k8s rbac & project api#320

Merged
mysekai7 merged 3 commits intomasterfrom
cherry-pick-AIT-62790-to-master
May 6, 2026
Merged

add k8s rbac & project api#320
mysekai7 merged 3 commits intomasterfrom
cherry-pick-AIT-62790-to-master

Conversation

@mysekai7
Copy link
Copy Markdown
Contributor

@mysekai7 mysekai7 commented Nov 10, 2025

Summary by CodeRabbit

  • Documentation
    • Added API reference docs for Connector, Project, RBAC (ClusterRole, ClusterRoleBinding, Role, RoleBinding), ServiceAccount, and User resources.
    • Added top-level overview pages for each API group and endpoint reference entries for collection and individual resource routes.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Nov 10, 2025

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: d63a78d0-b648-423c-9eb8-f9f73e7023be

📥 Commits

Reviewing files that changed from the base of the PR and between e4f5541 and 0a85e67.

📒 Files selected for processing (11)
  • docs/en/apis/kubernetes_apis/connector/connector.mdx
  • docs/en/apis/kubernetes_apis/connector/index.mdx
  • docs/en/apis/kubernetes_apis/project/index.mdx
  • docs/en/apis/kubernetes_apis/rbac/clusterrole.mdx
  • docs/en/apis/kubernetes_apis/rbac/clusterrolebinding.mdx
  • docs/en/apis/kubernetes_apis/rbac/index.mdx
  • docs/en/apis/kubernetes_apis/rbac/role.mdx
  • docs/en/apis/kubernetes_apis/rbac/rolebinding.mdx
  • docs/en/apis/kubernetes_apis/serviceaccount/index.mdx
  • docs/en/apis/kubernetes_apis/serviceaccount/serviceaccount.mdx
  • docs/en/apis/kubernetes_apis/user/index.mdx
🚧 Files skipped from review as they are similar to previous changes (2)
  • docs/en/apis/kubernetes_apis/user/index.mdx
  • docs/en/apis/kubernetes_apis/connector/connector.mdx

Walkthrough

Adds new MDX documentation pages under docs/en/apis/kubernetes_apis for Connector, Project, multiple RBAC resources, ServiceAccount, and User, each declaring API headings and OpenAPIPath entries (some with K8sCrd tags and pathPrefix attributes).

Changes

Kubernetes API documentation additions

Layer / File(s) Summary
Index pages
docs/en/apis/kubernetes_apis/*/index.mdx
New category index pages added for Connector, Project, RBAC, ServiceAccount, and User with top-level headings and <Overview overviewHeaders={[]} />.
Resource headings & OpenAPIPath
docs/en/apis/kubernetes_apis/connector/connector.mdx, docs/en/apis/kubernetes_apis/project/project.mdx, docs/en/apis/kubernetes_apis/user/user.mdx, docs/en/apis/kubernetes_apis/rbac/{clusterrole,clusterrolebinding,role,rolebinding}.mdx, docs/en/apis/kubernetes_apis/serviceaccount/serviceaccount.mdx
New MDX resource files with # <Name> [group/version] headings and OpenAPIPath blocks listing collection and individual resource endpoints.
Path prefixes & combined paths
docs/en/apis/kubernetes_apis/rbac/*.mdx, docs/en/apis/kubernetes_apis/serviceaccount/serviceaccount.mdx, docs/en/apis/kubernetes_apis/connector/connector.mdx, docs/en/apis/kubernetes_apis/user/user.mdx, docs/en/apis/kubernetes_apis/project/project.mdx
Several OpenAPIPath entries include pathPrefix="/kubernetes/{cluster}". Some files use combined path arrays for collection and resource endpoints.
K8s CRD references
docs/en/apis/kubernetes_apis/project/project.mdx, docs/en/apis/kubernetes_apis/user/user.mdx
Added <K8sCrd name="projects.auth.alauda.io" /> and <K8sCrd name="users.auth.alauda.io" /> declarations.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested reviewers

  • chinameok

Poem

🐰 New docs hop into view, paths all neat and true,
Connector, Project, RBAC, and more in queue.
CRDs and endpoints lined so fine,
A tiny rabbit cheers this doc design. ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'add k8s rbac & project api' clearly identifies the main change: adding Kubernetes RBAC and Project API documentation, which aligns with the bulk of files added (RBAC, Project, and related API documentation pages).
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)

❌ Error committing Unit Tests locally.

  • Create PR with unit tests
  • Commit unit tests in branch cherry-pick-AIT-62790-to-master

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
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: 3

🧹 Nitpick comments (1)
docs/shared/crds/auth.alauda.io_users.yaml (1)

107-107: Inconsistent timestamp field format.

Line 107: last_login_time is typed as string with no format specification. For consistency and validation, consider specifying format: date-time to ensure proper timestamp validation and serialization, aligning with the expired field structure (lines 71-76).

Apply this diff for consistency:

                last_login_time:
+                 format: date-time
                  type: string
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 548d110 and 6594ef3.

📒 Files selected for processing (14)
  • docs/en/apis/kubernetes_apis/connector/connector.mdx (1 hunks)
  • docs/en/apis/kubernetes_apis/connector/index.mdx (1 hunks)
  • docs/en/apis/kubernetes_apis/project/index.mdx (1 hunks)
  • docs/en/apis/kubernetes_apis/project/project.mdx (1 hunks)
  • docs/en/apis/kubernetes_apis/rbac/clusterrole.mdx (1 hunks)
  • docs/en/apis/kubernetes_apis/rbac/clusterrolebinding.mdx (1 hunks)
  • docs/en/apis/kubernetes_apis/rbac/index.mdx (1 hunks)
  • docs/en/apis/kubernetes_apis/rbac/role.mdx (1 hunks)
  • docs/en/apis/kubernetes_apis/rbac/rolebinding.mdx (1 hunks)
  • docs/en/apis/kubernetes_apis/serviceaccount/index.mdx (1 hunks)
  • docs/en/apis/kubernetes_apis/serviceaccount/serviceaccount.mdx (1 hunks)
  • docs/en/apis/kubernetes_apis/user/index.mdx (1 hunks)
  • docs/en/apis/kubernetes_apis/user/user.mdx (1 hunks)
  • docs/shared/crds/auth.alauda.io_users.yaml (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Cloudflare Pages
🔇 Additional comments (12)
docs/en/apis/kubernetes_apis/connector/index.mdx (1)

1-6: Empty YAML front matter may omit necessary metadata.

The file has empty front matter delimiters (lines 1-2). Typically, MDX pages include metadata such as title, sidebar_label, or custom fields. Verify if this is intentional per your documentation template standards or if metadata should be populated.

docs/en/apis/kubernetes_apis/connector/connector.mdx (1)

1-5: LGTM!

The Connector API documentation is well-structured with appropriate OpenAPIPath entries for listing and retrieving individual connectors.

docs/en/apis/kubernetes_apis/rbac/rolebinding.mdx (1)

1-5: LGTM!

The RoleBinding documentation correctly uses namespace-scoped paths with pathPrefix for cluster context. The API endpoints are accurate for the resource type.

docs/en/apis/kubernetes_apis/rbac/clusterrole.mdx (1)

1-5: LGTM!

The ClusterRole documentation correctly uses cluster-scoped paths (no namespace segment) with appropriate pathPrefix. The API endpoints are accurate.

docs/en/apis/kubernetes_apis/project/index.mdx (1)

1-6: Empty YAML front matter may omit necessary metadata.

Similar to other index files, this page has empty front matter. Verify if metadata (e.g., title, sidebar_label) should be populated per your documentation standards.

docs/en/apis/kubernetes_apis/user/index.mdx (1)

1-6: Empty YAML front matter may omit necessary metadata.

This file follows the same pattern as other index files with empty front matter. Confirm whether metadata should be populated per your documentation template standards.

docs/en/apis/kubernetes_apis/serviceaccount/index.mdx (1)

1-6: Empty YAML front matter may omit necessary metadata.

Consistent with other index pages in this PR, this file has empty front matter. Verify if metadata should be included per your documentation standards.

docs/en/apis/kubernetes_apis/rbac/clusterrolebinding.mdx (1)

1-5: Fix incorrect API paths for cluster-scoped resource.

ClusterRoleBinding is a cluster-scoped Kubernetes resource and should not include /namespaces/{namespace}/ in its API paths. The current paths are incompatible with Kubernetes API conventions. Correct paths should omit the namespace segment, matching the structure used in clusterrole.mdx.

Apply this diff to correct the API paths:

 # ClusterRoleBinding [rbac.authorization.k8s.io/v1]
 
-<OpenAPIPath path="/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/clusterrolebindings" pathPrefix="/kubernetes/{cluster}" />
+<OpenAPIPath path="/apis/rbac.authorization.k8s.io/v1/clusterrolebindings" pathPrefix="/kubernetes/{cluster}" />
 
-<OpenAPIPath path="/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/clusterrolebindings/{name}" pathPrefix="/kubernetes/{cluster}" />
+<OpenAPIPath path="/apis/rbac.authorization.k8s.io/v1/clusterrolebindings/{name}" pathPrefix="/kubernetes/{cluster}" />

Likely an incorrect or invalid review comment.

docs/en/apis/kubernetes_apis/rbac/index.mdx (1)

1-2: Empty YAML front matter with no metadata.

The front matter contains only delimiters (---\n---) with no key-value pairs. If metadata (e.g., sidebar labels, description) is needed, populate it; otherwise, consider removing the front matter entirely for clarity.

docs/en/apis/kubernetes_apis/serviceaccount/serviceaccount.mdx (1)

1-5: Documentation structure looks good.

Consistent with standard Kubernetes API documentation pattern. ServiceAccount entries are properly namespaced with the /kubernetes/{cluster} path prefix, and no custom CRD declaration is needed.

docs/en/apis/kubernetes_apis/rbac/role.mdx (1)

1-5: Documentation structure is consistent and well-formed.

Standard Kubernetes RBAC Role endpoints are properly documented with cluster path prefix. No issues identified.

docs/en/apis/kubernetes_apis/user/user.mdx (1)

1-6: Documentation structure is consistent with custom API pattern.

User API documentation follows the established pattern for custom APIs under the auth.alauda.io group. OpenAPI paths and CRD declaration are properly configured.

Comment thread docs/en/apis/kubernetes_apis/project/project.mdx
Comment thread docs/shared/crds/auth.alauda.io_users.yaml Outdated
Comment thread docs/shared/crds/auth.alauda.io_users.yaml
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Nov 10, 2025

Deploying alauda-container-platform with  Cloudflare Pages  Cloudflare Pages

Latest commit: 0a85e67
Status: ✅  Deploy successful!
Preview URL: https://6570a893.alauda-container-platform.pages.dev
Branch Preview URL: https://cherry-pick-ait-62790-to-mas.alauda-container-platform.pages.dev

View logs

@JounQin
Copy link
Copy Markdown
Member

JounQin commented Mar 30, 2026

/doc-pr-build

@JounQin JounQin force-pushed the cherry-pick-AIT-62790-to-master branch from 6594ef3 to 5d43da8 Compare March 30, 2026 08:55
@JounQin JounQin force-pushed the cherry-pick-AIT-62790-to-master branch from 5d43da8 to 186749b Compare April 20, 2026 05:29
Copilot AI review requested due to automatic review settings April 20, 2026 05:29
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds documentation pages for several Kubernetes APIs/resources (RBAC, ServiceAccount, Connector, Project, User) and includes a CRD reference for API consumers.

Changes:

  • Added MDX API docs pages for RBAC (ClusterRole/ClusterRoleBinding/Role/RoleBinding) and ServiceAccount endpoints.
  • Added MDX API docs pages for Connector, Project, and User resources (with CRD embeds for User/Project).
  • Added a User CustomResourceDefinition YAML reference under docs/shared/crds/.

Reviewed changes

Copilot reviewed 14 out of 17 changed files in this pull request and generated 12 comments.

Show a summary per file
File Description
docs/shared/crds/auth.alauda.io_users.yaml Adds the User CRD reference YAML used by docs; needs minor cleanup/normalization.
docs/en/apis/kubernetes_apis/user/user.mdx Adds User API endpoint docs + CRD embed; missing cluster path prefix.
docs/en/apis/kubernetes_apis/user/index.mdx Adds User API section index; contains empty frontmatter block.
docs/en/apis/kubernetes_apis/serviceaccount/serviceaccount.mdx Adds ServiceAccount endpoint docs (with cluster path prefix).
docs/en/apis/kubernetes_apis/serviceaccount/index.mdx Adds ServiceAccount API section index; contains empty frontmatter block.
docs/en/apis/kubernetes_apis/rbac/clusterrole.mdx Adds ClusterRole endpoint docs (with cluster path prefix).
docs/en/apis/kubernetes_apis/rbac/clusterrolebinding.mdx Adds ClusterRoleBinding endpoint docs (with cluster path prefix).
docs/en/apis/kubernetes_apis/rbac/role.mdx Adds Role endpoint docs (with cluster path prefix).
docs/en/apis/kubernetes_apis/rbac/rolebinding.mdx Adds RoleBinding endpoint docs (with cluster path prefix).
docs/en/apis/kubernetes_apis/rbac/index.mdx Adds RBAC API section index; contains empty frontmatter block.
docs/en/apis/kubernetes_apis/project/project.mdx Adds Project endpoint docs + CRD embed; missing cluster path prefix and CRD reference appears missing.
docs/en/apis/kubernetes_apis/project/index.mdx Adds Project API section index; contains empty frontmatter block.
docs/en/apis/kubernetes_apis/connector/connector.mdx Adds Connector endpoint docs; missing cluster path prefix.
docs/en/apis/kubernetes_apis/connector/index.mdx Adds Connector API section index; contains empty frontmatter block.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/en/apis/kubernetes_apis/serviceaccount/index.mdx Outdated
Comment thread docs/shared/crds/auth.alauda.io_users.yaml
Comment thread docs/shared/crds/auth.alauda.io_users.yaml Outdated
Comment thread docs/shared/crds/auth.alauda.io_users.yaml Outdated
Comment thread docs/en/apis/kubernetes_apis/project/project.mdx Outdated
Comment thread docs/en/apis/kubernetes_apis/connector/index.mdx Outdated
Comment thread docs/shared/crds/auth.alauda.io_users.yaml Outdated
Comment thread docs/en/apis/kubernetes_apis/user/user.mdx Outdated
Comment thread docs/en/apis/kubernetes_apis/connector/connector.mdx Outdated
Comment thread docs/en/apis/kubernetes_apis/user/index.mdx Outdated
@mysekai7 mysekai7 force-pushed the cherry-pick-AIT-62790-to-master branch from 186749b to 248be23 Compare May 6, 2026 09:14
Copy link
Copy Markdown
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.

🧹 Nitpick comments (1)
docs/en/apis/kubernetes_apis/user/user.mdx (1)

1-2: 💤 Low value

Nit: missing blank line after heading.

All other files in this PR include a blank line between the heading and the first <OpenAPIPath>. Consider adding one here for consistency.

✏️ Proposed fix
 # User [auth.alauda.io/v1]
+
 <OpenAPIPath path="/apis/auth.alauda.io/v1/users" />
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/en/apis/kubernetes_apis/user/user.mdx` around lines 1 - 2, Add a blank
line after the heading "# User [auth.alauda.io/v1]" so there is an empty line
between that heading and the following OpenAPIPath element (<OpenAPIPath
path="/apis/auth.alauda.io/v1/users" />), matching the formatting used in the
other files.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@docs/en/apis/kubernetes_apis/user/user.mdx`:
- Around line 1-2: Add a blank line after the heading "# User
[auth.alauda.io/v1]" so there is an empty line between that heading and the
following OpenAPIPath element (<OpenAPIPath path="/apis/auth.alauda.io/v1/users"
/>), matching the formatting used in the other files.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: ac977138-9c20-4f4c-85ac-81d7a23aa284

📥 Commits

Reviewing files that changed from the base of the PR and between 5d43da8 and 248be23.

📒 Files selected for processing (16)
  • docs/en/apis/kubernetes_apis/connector/connector.mdx
  • docs/en/apis/kubernetes_apis/connector/index.mdx
  • docs/en/apis/kubernetes_apis/project/index.mdx
  • docs/en/apis/kubernetes_apis/project/project.mdx
  • docs/en/apis/kubernetes_apis/rbac/clusterrole.mdx
  • docs/en/apis/kubernetes_apis/rbac/clusterrolebinding.mdx
  • docs/en/apis/kubernetes_apis/rbac/index.mdx
  • docs/en/apis/kubernetes_apis/rbac/role.mdx
  • docs/en/apis/kubernetes_apis/rbac/rolebinding.mdx
  • docs/en/apis/kubernetes_apis/serviceaccount/index.mdx
  • docs/en/apis/kubernetes_apis/serviceaccount/serviceaccount.mdx
  • docs/en/apis/kubernetes_apis/user/index.mdx
  • docs/en/apis/kubernetes_apis/user/user.mdx
  • docs/shared/openapis/auth.alauda.io.v1.json
  • docs/shared/openapis/dex.coreos.com.v1.json
  • docs/shared/openapis/rbac.authorization.k8s.io.v1.json
✅ Files skipped from review due to trivial changes (1)
  • docs/en/apis/kubernetes_apis/connector/connector.mdx

Comment thread docs/en/apis/kubernetes_apis/connector/connector.mdx Outdated
@mysekai7 mysekai7 enabled auto-merge (squash) May 6, 2026 11:29
@mysekai7 mysekai7 requested a review from JounQin May 6, 2026 11:30
@JounQin
Copy link
Copy Markdown
Member

JounQin commented May 6, 2026

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 6, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 6, 2026

Note

Unit test generation is a public access feature. Expect some limitations and changes as we gather feedback and continue to improve it.


Generating unit tests... This may take up to 20 minutes.

1 similar comment
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 6, 2026

Note

Unit test generation is a public access feature. Expect some limitations and changes as we gather feedback and continue to improve it.


Generating unit tests... This may take up to 20 minutes.

@mysekai7 mysekai7 merged commit ad8b4e4 into master May 6, 2026
3 checks passed
@mysekai7 mysekai7 deleted the cherry-pick-AIT-62790-to-master branch May 6, 2026 12:43
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 6, 2026

✅ Created PR with unit tests: #730

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 6, 2026

❌ Failed to commit unit tests locally: An unexpected error occurred while creating a commit: Not Found - https://docs.github.com/rest/git/refs#get-a-reference

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.

3 participants