Giter VIP home page Giter VIP logo

Comments (5)

onedr0p avatar onedr0p commented on May 31, 2024

While this is a great idea it's not a easy task to do, it would require merging in the Flux HelmRelease jsonschema into the app-template schema. Even if that was done, you would have to specify the JSONSchema different in HelmReleases vs app-template or not. I don't know if the juice is worth the squeeze here just to have our editors be happy.

from helm-charts.

budimanjojo avatar budimanjojo commented on May 31, 2024

funny because I just had the same idea about this, but I don't know how do u achieve that using VSCode. In neovim, I can't put the inline schema before --- because that means it's a new file. And I also tried putting the inline schema below spec.values of the HelmRelease and it didn't work too. That means I can't put 2 schemas (HR and app-template values) and expect it to work together.

from helm-charts.

MrMarble avatar MrMarble commented on May 31, 2024

While this is a great idea it's not a easy task to do, it would require merging in the Flux HelmRelease jsonschema into the app-template schema. Even if that was done, you would have to specify the JSONSchema different in HelmReleases vs app-template or not. I don't know if the juice is worth the squeeze here just to have our editors be happy.

Maybe just including the schema for the values, without megin it with the HelmRelase jsonschema, that gives the option of having the values.yaml file validated by helm and then copy-pase it to the HelmRelease or use Kustomize to create a configMap and use the valuesFrom to load it.

It's not only for the editors, but it may be included in CI, to check if the update of the chart breaks any of the implementations

from helm-charts.

MrMarble avatar MrMarble commented on May 31, 2024

funny because I just had the same idea about this, but I don't know how do u achieve that using VSCode. In neovim, I can't put the inline schema before --- because that means it's a new file. And I also tried putting the inline schema below spec.values of the HelmRelease and it didn't work too. That means I can't put 2 schemas (HR and app-template values) and expect it to work together.

I don't know about neovim but in vscode you can configure the schema globally in the yaml config using glob patterns:

yaml.schemas: {
    "https://json.schemastore.org/chart.json": "~/home-ops/charts/**/chart.yml",
    "kubernetes": "~/home-ops/cluster/**/*",
	"~/home-ops/cluster/common/app-template/values.schema.json": "~/home-ops/cluster/**/helmrelease.yaml"
}

docs: https://marketplace.visualstudio.com/items?itemName=redhat.vscode-yaml#associating-schemas

from helm-charts.

bjw-s avatar bjw-s commented on May 31, 2024

I am open to doing something like this, but maybe (also) as a base to generate documentation off of, instead of the current helm-docs approach. I'll give it some more thought and see if I can work it in to an upcoming version.

from helm-charts.

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.