{"id":16119649,"url":"https://github.com/piomin/spring-boot-istio","last_synced_at":"2026-01-06T11:17:30.467Z","repository":{"id":40918419,"uuid":"271280264","full_name":"piomin/spring-boot-istio","owner":"piomin","description":"Spring Boot Library for integration with Istio on Kubernetes","archived":false,"fork":false,"pushed_at":"2025-03-21T11:02:00.000Z","size":76,"stargazers_count":50,"open_issues_count":2,"forks_count":20,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-02T21:39:34.720Z","etag":null,"topics":["istio","kubernetes","library","service-mesh","spring-boot","springframework"],"latest_commit_sha":null,"homepage":"https://piotrminkowski.com","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/piomin.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-06-10T13:10:05.000Z","updated_at":"2025-03-21T11:02:03.000Z","dependencies_parsed_at":"2023-12-04T01:24:11.053Z","dependency_job_id":"6e4a1a84-e5b4-47f2-a8bd-bd55b72d87cb","html_url":"https://github.com/piomin/spring-boot-istio","commit_stats":{"total_commits":105,"total_committers":2,"mean_commits":52.5,"dds":"0.21904761904761905","last_synced_commit":"84cf579e92f4ad0b0b25bd6e6d7ca5efec39da56"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piomin%2Fspring-boot-istio","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piomin%2Fspring-boot-istio/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piomin%2Fspring-boot-istio/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piomin%2Fspring-boot-istio/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/piomin","download_url":"https://codeload.github.com/piomin/spring-boot-istio/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246927839,"owners_count":20856198,"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":["istio","kubernetes","library","service-mesh","spring-boot","springframework"],"created_at":"2024-10-09T20:54:41.884Z","updated_at":"2026-01-06T11:17:30.462Z","avatar_url":"https://github.com/piomin.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Spring Boot Library for integration with Istio on Kubernetes [![Twitter](https://img.shields.io/twitter/follow/piotr_minkowski.svg?style=social\u0026logo=twitter\u0026label=Follow%20Me)](https://twitter.com/piotr_minkowski)\n\n![Maven Central Version](https://img.shields.io/maven-central/v/com.github.piomin/istio-spring-boot-starter)\n[![CircleCI](https://circleci.com/gh/piomin/spring-boot-istio.svg?style=svg)](https://circleci.com/gh/piomin/spring-boot-istio)\n\n[![SonarCloud](https://sonarcloud.io/images/project_badges/sonarcloud-black.svg)](https://sonarcloud.io/dashboard?id=piomin_spring-boot-istio)\n[![Bugs](https://sonarcloud.io/api/project_badges/measure?project=piomin_spring-boot-istio\u0026metric=bugs)](https://sonarcloud.io/dashboard?id=piomin_spring-boot-istio)\n[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=piomin_spring-boot-istio\u0026metric=coverage)](https://sonarcloud.io/dashboard?id=piomin_spring-boot-istio)\n[![Lines of Code](https://sonarcloud.io/api/project_badges/measure?project=piomin_spring-boot-istio\u0026metric=ncloc)](https://sonarcloud.io/dashboard?id=piomin_spring-boot-istio)\n\n## Main Purpose\n\nThis library is dedicated for Spring Boot application. Once it is included and enabled it is creating Istio resources on the current Kubernetes cluster basing on the code and annotation fields `@EnableIstio`.\n\n## Getting Started\n\n### Prerequisites\n\n- Java 17 or higher\n- Kubernetes cluster with Istio installed\n- kubectl configured to access your cluster\n\n### Installation\n\nAdd the dependency to your Maven `pom.xml`:\n\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003ecom.github.piomin\u003c/groupId\u003e\n  \u003cartifactId\u003eistio-spring-boot-starter\u003c/artifactId\u003e\n  \u003cversion\u003e1.2.2\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n## Usage\n\nThe library provides autoconfigured support for creating Istio resources on Kubernetes basing on annotation `@EnableIstio`.\n```java\n@SpringBootApplication\n@EnableIstio(version = \"v1\")\npublic class CallmeApplication {\n\n\tpublic static void main(String[] args) {\n\t\tSpringApplication.run(CallmeApplication.class, args);\n\t}\n\t\n}\n```\n\nWe can enable additional things. For example, we can enable `Gateway` and `VirtualService` with fault injection or matches in `VirtualService`.\n```java\n@SpringBootApplication\n@EnableIstio(enableGateway = true,\n        fault = @Fault(type = FaultType.ABORT, percentage = 50),\n        matches = { @Match(\"/hello\"), @Match(\"/hello2\") })\npublic class SampleAppWithIstio {\n    public static void main(String[] args) {\n        SpringApplication.run(SampleAppWithIstio.class, args);\n    }\n}\n```\n\nThe `@EnableIstio` annotation provides the following configuration options:\n\n| Parameter              | Type    | Default | Description                                            |\n|------------------------|---------|---------|--------------------------------------------------------|\n| `version`              | String  | -       | (Required) Version label for the service               |\n| `numberOfRetries`      | int     | 3       | Number of retries for failed requests                  |\n| `timeout`              | int     | 6000    | Request timeout in milliseconds (0 means no timeout)   |\n| `circuitBreakerErrors` | String  | -       | Number of errors in row to trip the circuit breaker    |\n| `weight`               | String  | 100     | A weight ot path in load balancing                     |\n| `enableGateway`        | boolean | false   | Enable Istio `Gateway` generation                      |\n| `fault`                | Fault   | @Fault  | Enable Istio fault (delay. abort) injection            |\n| `matches`              | Match[] | {}      | Enable multiple matches (e.g. uri, headers) generation |\n| `domain`               | String  | ext     | The name of domain used host                           |\n\n### How It Works\n\nThe library automatically creates the following Istio resources during application startup:\n\n`DestinationRule`: Defines policies for traffic routing, including load balancing and connection pool settings.\\\n`VirtualService`: Configures request routing, retries, timeouts, matches, and fault injection.\n`Gateway`: Exposes the service to external traffic.\n\nHere's the architecture of presented solution. Spring Boot Istio Library is included to the target application. It uses Java Istio Client to communication with istiod. During application startup the library is communicating with Istio API in order to create `DestinationRule` and `VirtualService` objects.\n\n\u003cimg src=\"https://piotrminkowski.files.wordpress.com/2020/06/spring-boot-istio-arch-2.png\" title=\"Architecture\"\u003e\u003cbr/\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpiomin%2Fspring-boot-istio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpiomin%2Fspring-boot-istio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpiomin%2Fspring-boot-istio/lists"}