All Projects → snowdrop → istio-java-api

snowdrop / istio-java-api

Licence: Apache-2.0 License
A Java API to generate Istio descriptors, inspired by Fabric8's kubernetes-model.

Programming Languages

java
68154 projects - #9 most used programming language
go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to istio-java-api

code-generator
Web Application to generate your training scripts with PyTorch Ignite
Stars: ✭ 30 (-74.36%)
Mutual labels:  code-generator
ShaderBoiler
Aimed to eliminate preprocessor hell in shaders and kernels.
Stars: ✭ 30 (-74.36%)
Mutual labels:  code-generator
xgen
XSD (XML Schema Definition) parser and Go/C/Java/Rust/TypeScript code generator
Stars: ✭ 153 (+30.77%)
Mutual labels:  code-generator
terraform-google-kubernetes-istio
Creates a kubernetes cluster with istio enabled on GKE
Stars: ✭ 27 (-76.92%)
Mutual labels:  istio
python-autoclass
A python 3 library providing functions and decorators to automatically generate class code, such as constructor body or properties getters/setters along with optional support of validation contracts on the generated setters. Its objective is to reduce the amount of copy/paste code in your classes - and hence to help reducing human mistakes :).
Stars: ✭ 30 (-74.36%)
Mutual labels:  code-generator
copygen
Go generator to copy values from type to type and fields from struct to struct (copier without reflection). Generate any code based on types.
Stars: ✭ 121 (+3.42%)
Mutual labels:  code-generator
ardielle-tools
No description or website provided.
Stars: ✭ 17 (-85.47%)
Mutual labels:  code-generator
azure-container-labs
Azure Container Labs - AKS, ACR, ACI, Web App for Containers, etc under frequent update
Stars: ✭ 24 (-79.49%)
Mutual labels:  istio
GraphQL.Tools
GraphQL.Tools is a GraphQL to C# compiler (code-generator) which turns your GraphQL schema into a set of C# classes, interfaces, and enums.
Stars: ✭ 49 (-58.12%)
Mutual labels:  code-generator
Kodgen
C++17 parser and code generator
Stars: ✭ 19 (-83.76%)
Mutual labels:  code-generator
xsdata
Naive XML & JSON Bindings for python
Stars: ✭ 144 (+23.08%)
Mutual labels:  code-generator
VuetiForm
Interactive Vuetify Form Generator with Validation & Input Styling 🎉
Stars: ✭ 60 (-48.72%)
Mutual labels:  code-generator
hubi
Humanitarian ubiquitous language helper
Stars: ✭ 17 (-85.47%)
Mutual labels:  code-generator
SketchGen
A Swift command line tool for generating source code from sketch files
Stars: ✭ 27 (-76.92%)
Mutual labels:  code-generator
k8s-istio-demo
Demo showing the capabilities of Istio
Stars: ✭ 22 (-81.2%)
Mutual labels:  istio
framework
Cygnite PHP Framework- A Modern Toolkit For Web Developers
Stars: ✭ 43 (-63.25%)
Mutual labels:  code-generator
php-json-schema-model-generator
Creates (immutable) PHP model classes from JSON-Schema files including all validation rules as PHP code
Stars: ✭ 36 (-69.23%)
Mutual labels:  code-generator
GENERIS
Versatile Go code generator.
Stars: ✭ 32 (-72.65%)
Mutual labels:  code-generator
vamp2setup
Vamp Lamia Alpha Setup Guide
Stars: ✭ 33 (-71.79%)
Mutual labels:  istio
kubernetes-examples
Kubernetes 经典示例
Stars: ✭ 142 (+21.37%)
Mutual labels:  istio

Note

This project is now deprecated. Please use the Istio client in the https://github.com/fabric8io/kubernetes-client project starting with version 5.11.0.

istio-java-api

A project to generate a Java API for Istio's domain allowing, in particular, the generation of Istio deployment descriptors.This project is inspired by Fabric8’s kubernetes-model and relies on the same approach: a Go program uses Go reflection to generate a JSON Schema which is then used by jsonschema2pojo to generate Java classes. jsonschema2pojo is configured to use a custom annotator, IstioTypeAnnotator (found in the istio-model-annotator module), to add (Jackson, Bean Validation - JSR 380 and sundrio annotations.Sundrio is used generate idiomatic builder and DSL Java classes. Jackson is used to output JSON or YAML representation of the Java objects when needed.

Usage

Please take a look at the tests in istio-model/src/test/java to see how the API can be used. You can also take a look at the https://github.com/metacosm/istio-test-dsl project which demonstrates an end-to-end scenario using the Fabric8 OpenShift adapter and this API to send Istio artifacts to a running OpenShift cluster configured on which Istio is set up.

Starting with the 1.7.7 of this API, the bundled version of the Fabric8 Kubernetes client has been upgraded to use the non-backwards compatible 5.x versions. While this might not be an issue for most users of this API, it’s still worth noting.

Building instructions

If you only want to build the current version of the API and don’t intend on modifying how the JSON Schema is generated, you can build simply using mvn clean install as the project contains a pre-generated version of the schema.If you need to re-generate the classes from a newer version of the API, since the build relies on Go introspection, you will need to set up a Go programming environment.

Building the Java API

You will need to install Go and make. Run make. This will build the generate command line tool from Go and then run it to generate a JSON Schema in istio-model/src/main/resources/schema/istio-schema.json. A Maven build is then issued using the jsonschema2pojo Maven plugin to generate Java classes in istio-model/target/generated-sources and generate a Jar file containing the compiled version of these classes along with the JSON schema, ready to be used.

You can clean everything using make clean, only generate the schema using make schema or only generate the Java classes from an already generated schema such as the provided one using mvn clean install.

Updating the Java API when Istio is updated

Note
The process is not completely reproducible at this time. :(
# update to the latest istio version, rebuild crd list and packages
make metadata
# build using strict mode
make strict
# fix any issue, iterate… :)

You can also re-generate the properties files that are used to determine which Kubernetes Custom Resource Definitions (CRDs) are specified by Istio. These files are located in istio-common/src/main/resources/, one for each kind of supported CRDs and can be generated using make metadata. You can also re-generate the CSV file that is used to map Istio Go packages to Java packages. The file is located at istio-common/src/main/resources/packages.csv and can be generated using make metadata.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].