{"id":15292906,"url":"https://github.com/snowdrop/istio-java-api","last_synced_at":"2025-10-07T06:30:31.352Z","repository":{"id":27523707,"uuid":"113231746","full_name":"snowdrop/istio-java-api","owner":"snowdrop","description":"A Java API to generate Istio descriptors, inspired by Fabric8's kubernetes-model.","archived":true,"fork":false,"pushed_at":"2022-03-29T21:06:30.000Z","size":18650,"stargazers_count":111,"open_issues_count":17,"forks_count":33,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-01-06T22:02:45.458Z","etag":null,"topics":["api","code-generator","golang","istio","java","kubernetes"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/snowdrop.png","metadata":{"files":{"readme":"README.adoc","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-12-05T20:52:34.000Z","updated_at":"2024-12-03T09:07:01.000Z","dependencies_parsed_at":"2022-08-07T13:00:23.477Z","dependency_job_id":null,"html_url":"https://github.com/snowdrop/istio-java-api","commit_stats":null,"previous_names":[],"tags_count":44,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snowdrop%2Fistio-java-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snowdrop%2Fistio-java-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snowdrop%2Fistio-java-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snowdrop%2Fistio-java-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/snowdrop","download_url":"https://codeload.github.com/snowdrop/istio-java-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235599556,"owners_count":19016190,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","code-generator","golang","istio","java","kubernetes"],"created_at":"2024-09-30T16:31:37.754Z","updated_at":"2025-10-07T06:30:25.932Z","avatar_url":"https://github.com/snowdrop.png","language":"Java","readme":"**Note**\n\n= 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.\n\n\n\n\n\n\n\n\n\n\n= istio-java-api\n\nA project to generate a Java API for https://istio.io[Istio]'s domain allowing, in particular, the generation of Istio deployment\ndescriptors.This project is inspired by https://github.com/fabric8io/kubernetes-model[Fabric8's kubernetes-model] and relies on\nthe same approach: a Go program uses Go reflection to generate a http://json-schema.org[JSON Schema] which is then used by\nhttps://github.com/joelittlejohn/jsonschema2pojo[jsonschema2pojo] to generate Java classes. jsonschema2pojo is configured to use\na custom annotator, `IstioTypeAnnotator` (found in the `istio-model-annotator` module), to add\n(https://github.com/fasterxml/jackson[Jackson], https://jcp.org/en/jsr/detail?id=380[Bean Validation - JSR 380] and\nhttps://github.com/sundrio/sundrio[sundrio] annotations.Sundrio is used generate idiomatic builder and DSL Java classes.\nJackson is used to output JSON or YAML representation of the Java objects when needed.\n\n== Usage\n\nPlease take a look at the tests in `istio-model/src/test/java` to see how the API can be used.\nYou can also take a look at the\nhttps://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.\n\n[Note]\n====\nStarting 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.\nWhile this might not be an issue for most users of this API, it's still worth noting.\n====\n\n== Building instructions\n\nIf 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.\n\n=== Building the Java API\n\nYou will need to https://golang.org/doc/install[install Go] and `make`.\nRun `make`.\nThis will build the `generate` command line tool from Go and then run it to generate a JSON Schema in\n`istio-model/src/main/resources/schema/istio-schema.json`.\nA 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.\n\nYou 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`.\n\n=== Updating the Java API when Istio is updated\n\nNOTE: The process is not completely reproducible at this time.\n:(\n\n[source,bash]\n----\n# update to the latest istio version, rebuild crd list and packages\nmake metadata\n# build using strict mode\nmake strict\n# fix any issue, iterate… :)\n----\n\nYou can also re-generate the properties files that are used to determine which\nhttps://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/[Kubernetes Custom Resource Definitions (CRDs)]\nare specified by Istio.\nThese files are located in `istio-common/src/main/resources/`, one for each kind of supported CRDs and can be generated using `make metadata`.\nYou can also re-generate the CSV file that is used to map Istio Go packages to Java packages.\nThe file is located at\n`istio-common/src/main/resources/packages.csv` and can be generated using `make metadata`.\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsnowdrop%2Fistio-java-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsnowdrop%2Fistio-java-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsnowdrop%2Fistio-java-api/lists"}