Skip to content

Upate the cloud-config generating content#1063

Open
w13915984028 wants to merge 1 commit into
harvester:mainfrom
w13915984028:cloud-config-api
Open

Upate the cloud-config generating content#1063
w13915984028 wants to merge 1 commit into
harvester:mainfrom
w13915984028:cloud-config-api

Conversation

@w13915984028

@w13915984028 w13915984028 commented Jun 18, 2026

Copy link
Copy Markdown
Member

Problem:

  1. API endpoint to generate the cloud-config is not mentioned.
  2. Same content occurs several times.

Solution:

  1. Update the document with API endpoint
  2. Remove the duplicated parts.

Related Issue(s):

harvester/harvester#10870
harvester/harvester#10876

Test plan:

Additional documentation or context

Copilot AI review requested due to automatic review settings June 18, 2026 12:44

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Not ready to approve

The new GET request example includes an incorrect URL with a double slash that would break copy/paste usage.

Pull request overview

Updates the Rancher “Harvester Cloud Provider” documentation to centralize cloud-config generation instructions, reduce duplicated content, and document the /v1/harvester/kubeconfig API endpoint for generating cloud-config/cloud-init content.

Changes:

  • Replaces repeated “generate_addon.sh” instructions with links to a single “Generate the cloud-config…” section.
  • Adds a new section documenting POST/GET usage of the /v1/harvester/kubeconfig endpoint (v1.9.0+).
  • Keeps the bash-script-based generation path as an alternative under the centralized section.
File summaries
File Description
docs/rancher/cloud-provider.md Deduplicates cloud-config generation instructions and adds API endpoint guidance for generating cloud-config content.

Copilot's findings

  • Files reviewed: 1/1 changed files
  • Comments generated: 1

Note

Your feedback helps us improve the quality of this feature.
Please use 👍 or 👎 to tell us whether this assessment is correct.


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

Comment thread docs/rancher/cloud-provider.md Outdated
@github-actions

github-actions Bot commented Jun 18, 2026

Copy link
Copy Markdown
Name Link
🔨 Latest commit b854af4
😎 Deploy Preview https://6a33f25ada8a4e00bde88f9d--harvester-preview.netlify.app

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Not ready to approve

The new API documentation contains a couple of accuracy/security-doc issues (output format clarification, GET-vs-POST note, and curl -k guidance) that should be corrected before merging.

Copilot's findings
  • Files reviewed: 1/1 changed files
  • Comments generated: 4

Note

Your feedback helps us improve the quality of this feature.
Please use 👍 or 👎 to tell us whether this assessment is correct.


_Available as of v1.9.0_

You can `POST` and `GET` the cloud-config via the Harvester API endpoint `/v1/harvester/kubeconfig` using an admin bearer token.
Comment on lines +242 to +246
curl -k -X POST \
-H "Authorization: Bearer token-abcde:..." \
-H "Content-Type: application/json" \
-d '{"namespace": "gc-test", "serviceAccountName": "gc4", "outputFormat": "yaml"}' \
"https://<vip>/v1/harvester/kubeconfig"
Comment on lines +271 to +273
curl -k -X GET \
-H "Authorization: Bearer token-abcde:..." \
"https://<vip>/v1/harvester/kubeconfig?namespace=gc-test&serviceAccountName=gc4&outputFormat=yaml"

:::note

The `GET` response contains the cloud-init configuration for both the legacy and new paths. Make sure to remove the section that does not apply to your environment.
Signed-off-by: Jian Wang <jian.wang@suse.com>
:::


#### Via BASH Script

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

i think we should just deprecate and remove this. maybe just add a note saying "for <1.9.0, refer to the respective versioned documentation".

Comment on lines +366 to +372
:::note

In newer RKE2 versions (e.g. v1.33.11), the cloud-config path defaults to `/var/lib/rancher/rke2/etc/config-files/cloud-provider-config`. Ensure `cloudConfigPath` matches the file location you write to:

- If you use the RKE2 default path, change the `write_files` entry above to `path: /var/lib/rancher/rke2/etc/config-files/cloud-provider-config`.

- If you keep `path: /etc/kubernetes/cloud-config`, set `.spec.rkeConfig.chartValues.harvester-cloud-provider.cloudConfigPath` to `/etc/kubernetes/cloud-config` in the Rancher UI.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

i think this note section is only relevant to the "Deploying to the RKE2 custom cluster (experimental)" section.

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