Upate the cloud-config generating content#1063
Conversation
There was a problem hiding this comment.
⚠️ 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/kubeconfigendpoint (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.
|
d1f8238 to
9a3967e
Compare
There was a problem hiding this comment.
⚠️ 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. |
| 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" |
| 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>
9a3967e to
b854af4
Compare
| ::: | ||
|
|
||
|
|
||
| #### Via BASH Script |
There was a problem hiding this comment.
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".
| :::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. |
There was a problem hiding this comment.
i think this note section is only relevant to the "Deploying to the RKE2 custom cluster (experimental)" section.
Problem:
Solution:
Related Issue(s):
harvester/harvester#10870
harvester/harvester#10876
Test plan:
Additional documentation or context