Giter Club home page Giter Club logo

Comments (5)

jspaleta avatar jspaleta commented on July 19, 2024

Also i would LOVE to be able to provide an annotation that suggested necessary dependency assets

  annotations:
    sensio.io.bonsai.url: "https://bonsai.sensu.io/assets/jspaleta/sensu-plugins-cpu-checks"
    sensio.io.bonsai.tier: "Community"
    sensio.io.bonsai.version: "4.0.0-pre"
    sensio.io.bonsai.suggested_runtime_asset: "https://bonsai.sensu.io/assets/sensu/sensu-ruby-runtime"
    sensio.io.bonsai.suggested_runtime_asset_version: "0.0.5"
    sensio.io.bonsai.tags: "experimental, ruby-runtime"

Now in this example i'm treating runtime as a very special case and one that exists right now to make the ruby plugins work as assets. I explicitly state is a suggestion as a breadcrumb for users.

The more general case is that assets can depend on an array of other assets, which is a bit harder.. we'd have to encode that list as a json string packed into a single annotation. That get's complicated and messy.

from bonsai.

pzupan avatar pzupan commented on July 19, 2024

I've added what I've called common annotations that can be generated from the data. If you add any key value pair to the bonsai.yml annotations key, it will be incorporated into the annotations generated on download.

from bonsai.

jspaleta avatar jspaleta commented on July 19, 2024

Just pulled the asset config from:
https://bonsai-asset-index-staging.herokuapp.com/assets/sensu-plugins/sensu-plugins-cpu-checks

A few problems in the metadata section

  1. the sensu.io.bonsai.tags must be a string or null or it won't parse correctly into sensuctl
the sensu.io.bonsai.tags: []   

should read as

the sensu.io.bonsai.tags: null   

when there are no tags.

  1. labels/annotations should read as null if no labels/annotions are defined
labels: []

should read as

labels: null
  1. version is not valid

  2. namespace should always be default, the sensu concept of namespace isn't the same as the github user namespace.

Problems with the spec section

  1. asset_url key should not exist, value there should be reported in the url key

  2. last_modified should be an annotation perhaps sensu.io.bonsai.last_modified

from bonsai.

jspaleta avatar jspaleta commented on July 19, 2024

Here's a version of the config with corrections. Original lines are prefixed with ##

---
type: Asset
api_version: core/v2
metadata:
  name: sensu-plugins-cpu-checks
  ##namespace: sensu-plugins
  namespace: default 
  ##labels: []
  labels: null 
  ##version: 4.0.0
  annotations:
    sensio.io.bonsai.url: https://s3.us-west-2.amazonaws.com/staging.assets.bonsai.sensu.io/68546e739d96fd695655b77b35b5aabfbabeb056/sensu-plugins-cpu-checks_4.0.0_alpine_linux_amd64.tar.gz
    sensio.io.bonsai.tier: Community
    sensio.io.bonsai.version: 4.0.0
    ##sensio.io.bonsai.tags: []
    sensio.io.bonsai.tags: null

spec:
  url: https://github.com/sensu-plugins/sensu-plugins-cpu-checks/releases/download/4.0.0/sensu-plugins-cpu-checks_4.0.0_alpine_linux_amd64.tar.gz
  sha512: b2da25ecd7642e6de41fde37d674fe19dcb6ee3d680e145e32289f7cfc352e6b5f9413ee9b701d61faeaa47b399aa30b25885dbc1ca432c4061c8823774c28f3
  ##asset_url: https://s3.us-west-2.amazonaws.com/staging.assets.bonsai.sensu.io/68546e739d96fd695655b77b35b5aabfbabeb056/sensu-plugins-cpu-checks_4.0.0_alpine_linux_amd64.tar.gz
  ##last_modified: '2019-05-14T17:11:12.000Z'
  filters:
  - entity.system.os == 'linux'
  - entity.system.arch == 'amd64'
  - entity.system.platform == 'alpine'

from bonsai.

pzupan avatar pzupan commented on July 19, 2024

url should point to base url of asset on bonsai

from bonsai.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.