{"id":18250518,"url":"https://github.com/dropwizard/dropwizard-kubernetes","last_synced_at":"2025-04-04T16:31:24.933Z","repository":{"id":39664968,"uuid":"198499374","full_name":"dropwizard/dropwizard-kubernetes","owner":"dropwizard","description":"A convenience library for the integration of the Fabric8 Kubernetes client in a Dropwizard service.","archived":false,"fork":false,"pushed_at":"2025-02-17T11:03:18.000Z","size":450,"stargazers_count":7,"open_issues_count":10,"forks_count":2,"subscribers_count":6,"default_branch":"release/4.0.x","last_synced_at":"2025-03-20T15:12:24.414Z","etag":null,"topics":["dropwizard-kubernetes","k8s","kubernetes","kubernetes-client"],"latest_commit_sha":null,"homepage":"","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/dropwizard.png","metadata":{"files":{"readme":"README.md","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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-07-23T19:56:13.000Z","updated_at":"2025-02-17T11:01:42.000Z","dependencies_parsed_at":"2023-12-30T00:31:01.547Z","dependency_job_id":"e454d6fa-b980-438a-9dc6-00d8d7a30320","html_url":"https://github.com/dropwizard/dropwizard-kubernetes","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dropwizard%2Fdropwizard-kubernetes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dropwizard%2Fdropwizard-kubernetes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dropwizard%2Fdropwizard-kubernetes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dropwizard%2Fdropwizard-kubernetes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dropwizard","download_url":"https://codeload.github.com/dropwizard/dropwizard-kubernetes/tar.gz/refs/heads/release/4.0.x","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247209359,"owners_count":20901762,"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":["dropwizard-kubernetes","k8s","kubernetes","kubernetes-client"],"created_at":"2024-11-05T09:44:57.791Z","updated_at":"2025-04-04T16:31:24.557Z","avatar_url":"https://github.com/dropwizard.png","language":"Java","readme":"# dropwizard-kubernetes\n[![Build Status](https://travis-ci.org/dropwizard/dropwizard-kubernetes.svg?branch=master)](https://travis-ci.org/dropwizard/dropwizard-kubernetes)\n[![Coverage Status](https://img.shields.io/coveralls/dropwizard/dropwizard-kubernetes.svg)](https://coveralls.io/r/dropwizard/dropwizard-kubernetes)\n[![Maven Central](https://img.shields.io/maven-central/v/io.dropwizard.modules/dropwizard-kubernetes.svg)](http://mvnrepository.com/artifact/io.dropwizard.modules/dropwizard-kubernetes)\n\nProvides easy integration for Dropwizard applications with [the Fabric8 Kubernetes API client](https://github.com/fabric8io/kubernetes-client).\n\nThis bundle comes with out-of-the-box support for:\n* Configuration (providing YAML as an option [on top of the existing ways to configure the fabric8 client](https://github.com/fabric8io/kubernetes-client#configuring-the-client))\n* Kubernetes client connection lifecycle management\n* Kubernetes API health checks\n* Metrics instrumentation for the OKHttpClient underpinning the kubernetes-client.\n* Distributed tracing integration using [Brave](https://github.com/openzipkin/brave)\n\nFor more information on the Kubernetes API, take a look at the official documentation here: https://kubernetes.io/docs/reference/#api-reference\n\n## Dropwizard Version Support Matrix\n| dropwizard-kubernetes | Dropwizard v1.3.x  | Dropwizard v2.0.x  | Dropwizard v2.1.x  | Dropwizard v3.0.x  | Dropwizard v4.0.x  |\n|-----------------------|--------------------|--------------------|--------------------|--------------------|--------------------|\n| v1.3.x                | :white_check_mark: | :white_check_mark: | :x:                | :x:                | :x:                |\n| v1.4.x                | :white_check_mark: | :white_check_mark: | :x:                | :x:                | :x:                |\n| v1.5.x                | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x:                | :x:                |\n| v3.0.x                | :x:                | :x:                | :x:                | :white_check_mark: | :x:                |\n| v4.0.x                | :x:                | :x:                | :x:                | :x:                | :white_check_mark: |\n\n## Usage\nAdd dependency on library.\n\nMaven:\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003eio.dropwizard.modules\u003c/groupId\u003e\n  \u003cartifactId\u003edropwizard-kubernetes\u003c/artifactId\u003e\n  \u003cversion\u003e${dropwizard-kubernetes.version}\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\nGradle:\n```groovy\ncompile \"io.dropwizard.modules:dropwizard-kubernetes:$dropwizardKubernetesVersion\"\n```\n\n## Usage\nIn your application's `Configuration` class, add a `KubernetesClientFactory` object:\n```java\npublic class ExampleConfiguration extends Configuration {\n    ...\n\n    @Valid\n    @NotNull\n    @JsonProperty(\"kubernetes-client\")\n    private KubernetesClientFactory kubernetesClientFactory;\n\n    public KubernetesClientFactory getKubernetesClientFactory() {\n        return kubernetesClientFactory;\n    }\n\n    public void setKubernetesClientFactory(final KubernetesClientFactory kubernetesClientFactory) {\n        this.kubernetesClientFactory = kubernetesClientFactory;\n    }\n}\n```\n\nAdd a `KubernetesClientBundle` to the `Boostrap` object in your `initialize` method:\n```java\nprivate final KubernetesClientBundle\u003cExampleConfiguration\u003e kubernetesClient = new KubernetesClientBundle\u003cExampleConfiguration\u003e() {\n    @Override\n    public KubernetesClientFactory getKubernetesClientFactory(ExampleConfiguration configuration) {\n        return configuration.getKubernetesClientFactory();\n    }\n};\n\n@Override\npublic void initialize(Bootstrap\u003cExampleConfiguration\u003e bootstrap) {\n    bootstrap.addBundle(kubernetesClient);\n}\n\n@Override\npublic void run(ExampleConfiguration config, Environment environment) {\n    final KubernetesAPIThing kubernetesAPIThing = new KubernetesAPIThing(kubernetesClient.getKubernetesClient());\n    environment.jersey().register(new KubernetesAPIThingResource(kubernetesAPIThing));\n}\n```\n\nConfigure your factory in your `config.yml` file:\n\n```yaml\nkubernetes-client:\n  name: my-k8s-usecase\n  config:\n    masterUrl: https://localhost:443\n    apiVersion: v1\n    namespace: default\n    currentContext: my-context\n    userAgent: generic-crud-app\n  requestConfig:\n    watchReconnectInterval: 3s\n    watchReconnectLimit: 25\n    connectionTimeout: 10s\n    requestTimeout: 4s\n    rollingTimeout: 5s\n    scaleTimeout: 6s\n    webSocketTimeout: 3s\n    webSocketPingInterval: 10s\n    loggingInterval: 20s\n  httpClient:\n    followRedirects: false\n    followSslRedirects: false\n    proxy:\n      url: \"https://127.0.0.1:6379\"\n      username: admin\n      password: hunter2\n    security:\n      trustCerts: true\n      caCert:\n        type: string\n        caCert: abc123def456\n      trustStore: src/test/resources/truststore.p12\n      trustStorePassword: changeit\n    interceptors:\n      - type: backwards-compatibility\n      - type: oauth\n        oAuthToken:\n          type: string\n          token: 123abc456def\n```\n\n\n## Support\nPlease file bug reports and feature requests in [GitHub issues](https://github.com/dropwizard/dropwizard-kubernetes/issues).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdropwizard%2Fdropwizard-kubernetes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdropwizard%2Fdropwizard-kubernetes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdropwizard%2Fdropwizard-kubernetes/lists"}