This message was deleted.
# extensions
a
This message was deleted.
d
@busy-ability-54059 could you please help
yarn build-pkgs is working fine and I am able to do the developer load too
I am however building this extension for rancher version <2.9 (2.8.5 to be exact)
b
Gm @damp-agent-26487 I only saw your PM this morning… 😬 What is the name of the folder of the extension you are trying to build and what tag are you generating to trigger the build?
d
the tag name I am using is kubearmor-0.1.0
The folder name is kubearmorRUI
b
https://extensions.rancher.io/extensions/publishing#proper-tagged-release-naming-scheme-to-build-extension-charts As per docs, you need the tag to match that pkg folder
./pkg/<-YOUR-EXT-DIR->/package.json
with
version
1.3.2 (as an example) Tag needs to be
<-YOUR-EXT-DIR->-1.3.2
In this case
kubearmorRUI-0.1.0
d
PKG folder name is kubearmor
b
it’s without the v
it’s without the v
d
Ok I will try making a tag with the v
b
no v
ah, what is the
name
property in
./pkg/kubearmor/package.json
?
d
its kubearmor
b
then
kubearmor-0.1.0
should do it… 🤔
that’s the tag you used and it did not work, right?
d
yes
b
thanks for sharing the repo 🙏 easier to look into
d
I am sorry should have shared this in the beginning
b
https://github.com/KrishAryan/kubearmorRUI/blob/main/.github/workflows/build-extension-charts.yml#L15 can you change this
v2.8.5
to
release-2.8
and try with that same tag
kubearmor-0.1.0
?
d
there is no v in release-2.8 right?
b
correct. That the name of the branch
d
its working but now the build script is giving an error
before that there were some warnings here
b
Well, I’ve tried to do a local build of your extension and it works…. 🤔 Looking at

https://rancher-users.slack.com/files/U049LH50K9C/F07U9T1F5CP/image.png

there’s a
request to cancel workflow 11661611899
on the
parse extensions name
step Did you trigger a cancel to the workflow?
d
no i didnt
I will try it again then
b
yep
let’s check it
ok, it failed
d
mine too
b
this is difficult because we don’t have any context of the error
let me create a fork and play around with this for a bit
d
Thank you Alex
b
d
should I run yarn install and yarn build-pkgs after changing package.json?
b
no, no need
d
ok
b
you’re just changing some “text” properties, not changing dependencies
it worked in your fork
🦜 1
🦜
d
Thank you so much Alex
now I just need to test it in my rancher instance
b
now, for the root causes: I don’t know how did that worflow point to a non-existant branch like
v2.8.5
but it should point to
release-2.9
. https://github.com/KrishAryan/kubearmorRUI/blob/main/.github/workflows/build-extension-charts.yml#L15 I think we’ve got a problem on
release-2.8
but that’s not too bad as
release-2.9
branch workflow is compatible and works just fine. I am still weirded out about that cancelation of the workflow that the
parse extension name
step was creating, but my head tells that it might have to do with the
build-extensions-catalog
workflow. That’s for airgapped solutions where we create a catalog image to serve your UI extensions locally in those systems. That workflow is for the creation of that catalog image and is triggered by creating a tag that matches https://github.com/KrishAryan/kubearmorRUI/blob/main/package.json#L2-L3 of the root
package.json
. I’ll need to run more tests, but it seems they might be conflicting so we shouldn’t trigger them at the same time
🤔 1
d
Everything is working fine now. Tested on my rancher instance. Thank you so much for the help Alex. I couldn't have completed this project if you and @billions-vase-14972 were not there to help me.
👍 1
b
@damp-agent-26487 some other recommendations: • I would delete the
dist-pkg
folder from your
main
branch and add it to the .gitignore file so it doesn’t get commited again. It’s just “polluting” your repo and won’t be useful for anything since they are just locally built assets • I would add the annotation
"<http://catalog.cattle.io/kube-version|catalog.cattle.io/kube-version>": ">= 1.16.0-0"
, much like it’s done in Elemental extension so that you remove that upper limit of the kube version as you’ll hit some restrictions when building for Rancher 2.9.x and 2.10.x later in time. This will save you some headache with debugging https://github.com/rancher/elemental-ui/blob/main/pkg/elemental/package.json#L8 will change https://github.com/KrishAryan/kubearmorRUI/blob/gh-pages/index.yaml#L6
d
@busy-ability-54059 what should I do in my case to for a new release like 0.1.1?
change package.json version, then make the changes, yarn build-pkgs and make a new release?
b
The flow I always recommend to extension developers: • do your code changes locally • change
pkg/kubearmor/package.json
version
locally • do
yarn build-pkg kubearmor
to see if you didn’t break your build with those code changes, locally • do a developer load of those locally built assets by doing
yarn serve-pkgs
https://extensions.rancher.io/extensions/extensions-getting-started#test-built-extension-by-doing-a-developer-load (this is the mechanism that mimics the actual loading procedure when you’re using a published extension and I recommend it to do it after all code changes) and check that your extension works fine If all the above is good, then create a new tag, wait for the build + publish procedure to end and test it again
d
Thank you again Alex😄
🫡 1
I should also make the changes in package.json outside the pkg folder?
b
that version there is just the ECI https://extensions.rancher.io/extensions/publishing#manually-publishing-an-extension-catalog-image if you aren’t planning on supporting airgapped environments any time soon, don’t worry about it.
🙏 1