Skip to content

Added organisation-trait example #1358

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

Kolossi
Copy link

@Kolossi Kolossi commented May 7, 2025

Description of your changes

Added an example organisation trait, following a slack thread

I have:

  • Read and followed KubeVela's contribution process.
  • Update sidebar.js if adding a new page.
  • Run yarn start to ensure the changes has taken effect.

I don't have the ability to do the yarn start, please test as part of PR review.


Summary by mrge

Added a new example for an organisation trait that shows how to set default node affinity (os and arch) for components. Linked this example in the patch trait docs and updated the sidebar to include the new page.

Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

mrge found 2 issues across 3 files. Review them in mrge.io

Or to try it out locally first if we have the application as `app.yml` in a new dir and `myorgsetup.cue` in a subdir called kubevela:

- add the webservice definition from the cluster with `vela def get webservice > kubevela/webservice.cue`
- run the following command to see the rendered deployment : `vela dry-run -d kubevela -f app.yml --offline`
Copy link

Choose a reason for hiding this comment

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

The explanation about the dry-run command is misleading. Despite stating it's offline, it mentions needing a valid KUBECONFIG to a running cluster.

Copy link
Author

Choose a reason for hiding this comment

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

this is down to the vela command and not my decision :-)


But in our trait definition we've defaulted them to `linux` and `arm64`, so they do not have to be specified if this meets the requirements for the org.

Each `app.yml` does need to have the
Copy link

Choose a reason for hiding this comment

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

Incomplete sentence structure. The text states 'Each app.yml does need to have the' followed by a code block, which is grammatically awkward.

Copy link
Author

Choose a reason for hiding this comment

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

Happy to accept PR suggestion of how to improve.

Copy link
Member

@FogDong FogDong left a comment

Choose a reason for hiding this comment

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

Can you also run make update-version to make versioned docs?

@Kolossi
Copy link
Author

Kolossi commented May 8, 2025

Can you also run make update-version to make versioned docs?

Ok, will do. It will probably need to wait until Monday now though.

@Kolossi
Copy link
Author

Kolossi commented May 9, 2025

@FogDong

I tried, but got:

☸  docker in ~/repos/kubevela/kubevela.github.io on  main via 
#! ➜  make update-version version=v1.10
sh ./hack/version.sh v1.10
./hack/version.sh: 18: source: not found
./hack/version.sh: 23: [: 5: unexpected operator
./hack/version.sh: 32: success: not found
./hack/version.sh: 36: success: not found
./hack/version.sh: 41: success: not found
./hack/version.sh: 48: success: not found
./hack/version.sh: 51: yarn: not found
./hack/version.sh: 54: success: not found
./hack/version.sh: 59: success: not found
make: *** [Makefile:2: update-version] Error 127

It seems strange that the Makefile is invoking the ./hack/version.sh bash script using sh. But I didn't want to start messing with the documentation build system without knowing what I'm doing.

Looking at a later message, I also don't have yarn setup/installed locally.

I can try and look at this in a week's time, but if someone else could run the make update-version that would be great.

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