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

Improve documentation of required non-standard components #29

Open
lindhe opened this issue Sep 14, 2023 · 8 comments
Open

Improve documentation of required non-standard components #29

lindhe opened this issue Sep 14, 2023 · 8 comments

Comments

@lindhe
Copy link

lindhe commented Sep 14, 2023

Since there is no documentation available on Rancher's website regarding RKE2 cluster templates, I think this repo should do a better job of documenting the special features.

I'm mainly thinking of questions.yaml, which is a very important file for this project. I find no reference at all as to how it works, so it's currently all trail and error to figure it out. That's no fun.

Furthermore, it should be clarified exactly what Rancher is looking for when a cluster template repo is added to it. As mentioned in #17, the tgz file and index.yaml files are just decoys. But what about the (oddly named) charts/ directory, does it have to have exactly that name for things to work? It's unclear. I continue to poke and prod my way forward to figure out that too eventually, but it would be better if it was documented.

If I've just missed the documentation, please correct me here! :)

Standard components of Helm charts (like the standard fields in the Chart.yaml file and the templates/ directory) need not to be documented here, since they are described in Helm's documentation.

Rancher-specific CRD's like VmwarevsphereConfig or ManagedChart should ideally be documented somewhere, but I don't think this repo is the right place for those objects. Also, one can find information about their specification via kubectl explain, so Rancher's lacking documentation for them is not such a big issue.

@lindhe
Copy link
Author

lindhe commented Sep 14, 2023

But what about the (#23) charts/ directory, does it have to have exactly that name for things to work?

I tried renaming it to foo and it seems like Rancher still detects it just fine.

@lindhe
Copy link
Author

lindhe commented Sep 14, 2023

Another thing that should be documented: are the chart annotations required?

annotations:
catalog.cattle.io/type: cluster-template
catalog.cattle.io/namespace: fleet-default

@lindhe
Copy link
Author

lindhe commented Sep 15, 2023

@lindhe
Copy link
Author

lindhe commented Sep 15, 2023

I ran into the following error when deploying a custom chart:

Secret "helm-operation-ncddt" is invalid:
[
  data[foo cluster template-0.35.0.tgz]:
    Invalid value:
      "foo cluster template-0.35.0.tgz":
        a valid config key must consist of alphanumeric characters, '-', '_' or '.'
        (e.g. 'key.name', or 'KEY_NAME', or 'key-name', regex used for validation is '[-._a-zA-Z0-9]+'),

  data[values-foo cluster template-0.35.0.yaml]:
    Invalid value:
      "values-foo cluster template-0.35.0.yaml":
        a valid config key must consist of alphanumeric characters, '-', '_' or '.'
        (e.g. 'key.name', or 'KEY_NAME', or 'key-name', regex used for validation is '[-._a-zA-Z0-9]+')
]

This makes it look like Rancher requires there to be files with certain names. WHY ARE THESE REQUIREMENTS NOT DOCUMENTED? 😠

Relates to #17 and #18.

EDIT: I stand to be corrected. This error is completely my fault. My chart had a name that did not conform to the Helm chart naming standards (see Helm documentation or just run helm lint).

@lindhe
Copy link
Author

lindhe commented Sep 15, 2023

Please clarify if this is a "Rancher chart".

@lindhe
Copy link
Author

lindhe commented Sep 15, 2023

Found some details regarding the Helm annotations:

In order to show in the form for creating new clusters, the cluster template's Helm chart must have the catalog.cattle.io/type: cluster-template annotation.

https://ranchermanager.docs.rancher.com/v2.7/how-to-guides/new-user-guides/manage-clusters/manage-cluster-templates#creating-a-cluster-from-a-cluster-template

@lindhe
Copy link
Author

lindhe commented Sep 15, 2023

The README says this:

helm install --namespace fleet-default --values ./charts/your-own-values.yaml do-cluster ./charts

So I'm no wiser as to whether it requires a specific naming scheme or not for the values files.

@k-laughman
Copy link

Is this repo still maintained and supported or has SUSE deprecated or given up on this feature? I agree with the items above and I am currently struggling with deciphering the lack of documentation to make this work with vsphere. It is seemingly a cool feature but I have wasted too much time trying to make the examples work and there is a lack of documentation out there that make this consumable by most. I appreciate the links above that were found by @lindhe but I am still unable to spin up a cluster with a template file at the moment.

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

No branches or pull requests

2 participants