Skip to content
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

ksonnet style guide #403

Closed
jlewi opened this issue Mar 9, 2018 · 5 comments
Closed

ksonnet style guide #403

jlewi opened this issue Mar 9, 2018 · 5 comments
Labels

Comments

@jlewi
Copy link
Contributor

jlewi commented Mar 9, 2018

We should start a ksonnet style guide to begin capturing best practices and conventions.

Some initial things to document

  1. Use camelCase for parameters (option naming inconsistencies #303)
  2. Minimize logic in prototype files

A PR creating a markdown doc with the above would be a great starting point. So this would make a good first issue for anyone looking to contribute.

@bhack
Copy link

bhack commented Mar 10, 2018

google/jsonnet#118

@jlewi
Copy link
Contributor Author

jlewi commented Mar 29, 2018

Here is a good tutorial on mixins
https://github.com/ksonnet/ksonnet-lib/blob/master/docs/TUTORIAL.md

This could be a pattern we want to make use of.

@ankushagarwal
Copy link
Contributor

Databricks has a very good jsonnet style guide here https://github.com/databricks/jsonnet-style-guide
We should probably stick to that

@jlewi
Copy link
Contributor Author

jlewi commented Apr 27, 2018

Thinking about this more and based on
https://github.com/kubernetes/community/blob/master/contributors/design-proposals/architecture/declarative-application-management.md

I think there are a class of components specifically

  • TfJob
  • Argo Workflows
  • TFServing images
  • Seldon models

Where I think it might make more sense to for an existing template/example and then let users modify it. I think this ultimately leads to more readable config than doing complicated things like overrding environment variables and requests limit.

We can support this by using ksonnet prototypes. When we generate a component from a prototype ksonnet copies that prototype into components directory.

So if our prototype defines a complete manifest (as opposed to relying on imports) then ks generate gives users an example which they can then easily customize for their use case.

So for models and jobs I think we should add more prototypes to cover more use cases and rely less on imports.

/cc @lluunn @elsonrodriguez

@jlewi
Copy link
Contributor Author

jlewi commented Apr 27, 2018

Duplicate of #376

@jlewi jlewi marked this as a duplicate of #376 Apr 27, 2018
@jlewi jlewi closed this as completed Apr 27, 2018
@jlewi jlewi added the area/ksonnet Bugs related to ksonnet and prototypes label Sep 5, 2018
yanniszark pushed a commit to arrikto/kubeflow that referenced this issue Nov 1, 2019
* Uodate to seldon 0.4.1

* update tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants