I was asked to post my Rancher UI Extensions quest...
# extensions
r
I was asked to post my Rancher UI Extensions questions here so bear with me. The goal is to create Oxide Rancher UI Extensions to customize the Oxide Node Driver in the Rancher UI. 1. Looking at https://github.com/rancher/ui-plugin-examples I see there's a top-level
package.json
and also
pkg/<EXTENSION>/package.json
. I understand that the nested
pkg/<EXTENSION>/package.json
has some significance since its contents are read via
plugin.metadata = require('./package.json');
in the respective extension. a. Does the top-level
packge.json
have any significance when creating Rancher UI Extensions? b. Are the nested
pkg/<EXTENSION>/package.json
locations treated as different extensions or some "sub" extension under the top-level extension? 2. I know how to set the node driver icon via these instructions but I have no idea how to change the casing of the node driver name (e.g., from
oxide
to
Oxide
). I've tried updating the
name
within
package.json
, deleting and creating the
NodeDriver
Kubernetes resource with the updated
Oxide
name, and reading through the documentation for Rancher UI Extensions. I'm sure I'm missing something simple but I can't seem to change that name. See the attached screenshot. a. How do I change the node driver name from
oxide
to
Oxide
?
c
Hey Matthew, about the 2. question , the following should work: • Create a directory
I10n
under your
pkg/<EXTENSION>
• Inside that directory create a
en-us.yaml
with the following content:
Copy code
cluster:
  provider:
    oxide: Oxide
Short explanation: • The name you see appear here comes from the internationalization mappings (these can be language-specifc), and BTW, you might need internationalization for field names inside your
cloud-credentials
part of the extension. • Why does it show
oxide
out-of-the-box ? That’s actually your Node Driver’s unique name for Rancher.
r
Thank you! I received similar information in https://rancher-users.slack.com/archives/C04PPGWAWNR/p1741114487535009 and I updated our extension repository with this here: https://github.com/oxidecomputer/rancher-ui-extensions-oxide/blob/main/pkg/oxide/l10n/en-us.yaml However it was mentioned this may change in the future. Is that true? At first I tried to update the information in the
NodeDriver
CRD but that was unsuccessful so I appreciate that it can be done with translations. Just for my curiosity is the out-of-the-box ID determined via the CRD or something else?
Also pleasure meeting you and others at SUSECON!
c
About a possible change in the future, I cannot say for sure! Maybe @stocky-account-63046 can help. As for ID, it comes actually from the binary name, NOT the CRD (which is a bit weird…). It is a pleasure for me too to have met you guys at SUSECON, you guys are doing very exciting stuff!
❤️ 1
r
Perfect! Thank you so much. This is really helpful.
c
👍
s
RE localisation of provider name, i don't think we have plans to change and it's documented publicly https://extensions.rancher.io/extensions/next/advanced/provisioning#localisation
❤️ 1