{"id":13740430,"url":"https://github.com/joa/jawlb","last_synced_at":"2026-01-14T14:56:14.386Z","repository":{"id":46232473,"uuid":"159570857","full_name":"joa/jawlb","owner":"joa","description":"Just add water load balancer for gRPC","archived":false,"fork":false,"pushed_at":"2023-08-30T14:07:36.000Z","size":136,"stargazers_count":14,"open_issues_count":2,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-08T20:43:18.715Z","etag":null,"topics":["go","grpc","grpclb","kubernetes"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/joa.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":"2018-11-28T21:59:10.000Z","updated_at":"2023-08-21T11:25:10.000Z","dependencies_parsed_at":"2024-06-19T01:48:58.414Z","dependency_job_id":"50507341-6bd7-49d1-ab92-a283b08f3c3c","html_url":"https://github.com/joa/jawlb","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/joa/jawlb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joa%2Fjawlb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joa%2Fjawlb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joa%2Fjawlb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joa%2Fjawlb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joa","download_url":"https://codeload.github.com/joa/jawlb/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joa%2Fjawlb/sbom","scorecard":{"id":525424,"data":{"date":"2025-08-11","repo":{"name":"github.com/joa/jawlb","commit":"8f3c5ef1a8bdfa4d1de2dda7ca9c8607436aad2c"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.1,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Code-Review","score":0,"reason":"Found 1/13 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Pinned-Dependencies","score":5,"reason":"dependency not pinned by hash detected -- score normalized to 5","details":["Warn: containerImage not pinned by hash: Dockerfile:1","Info:   0 out of   1 containerImage dependencies pinned","Info:   1 out of   1 goCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 2 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":1,"reason":"9 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GO-2023-1988 / GHSA-2wrh-6pvc-2jm9","Warn: Project is vulnerable to: GO-2023-2102 / GHSA-4374-p667-p6c8","Warn: Project is vulnerable to: GO-2023-2153 / GHSA-m425-mq94-257g / GHSA-qppj-fm5r-hxr3","Warn: Project is vulnerable to: GO-2024-2687 / GHSA-4v7x-pqxf-cx7m","Warn: Project is vulnerable to: GO-2024-3333","Warn: Project is vulnerable to: GO-2025-3503 / GHSA-qxp5-gwg8-xv66","Warn: Project is vulnerable to: GO-2025-3595 / GHSA-vvgc-356p-c3xw","Warn: Project is vulnerable to: GO-2025-3488 / GHSA-6v2p-p543-phr9","Warn: Project is vulnerable to: GO-2022-0603 / GHSA-hp87-p4gw-j4gq"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-20T04:13:30.136Z","repository_id":46232473,"created_at":"2025-08-20T04:13:30.136Z","updated_at":"2025-08-20T04:13:30.136Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28424019,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T13:30:50.153Z","status":"ssl_error","status_checked_at":"2026-01-14T13:29:08.907Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["go","grpc","grpclb","kubernetes"],"created_at":"2024-08-03T04:00:47.729Z","updated_at":"2026-01-14T14:56:14.366Z","avatar_url":"https://github.com/joa.png","language":"Go","funding_links":[],"categories":["Tools"],"sub_categories":["Other"],"readme":"### Jawlb\nJawlb (pronounced jolp) is an unsophisticated grpclb implementation for things running in Kubernetes talking to gRPC \nservices within that same Kubernetes cluster.\n\nThis load balancer performs  service discovery via the Kubernetes API and announces any changes it sees\nvia the grpclb protocol to its clients.\n\n### Building\nYou'll want to push the result of `docker build -f Dockerfile .` into your registry.\n\n### grpclb\nThe grpclb Go implementation (others maybe too) requires you to define a SRV record for the loadbalancer. \nThe easy solution is to define a Kubernetes service with a port named `grpclb` and you're all set.\n\n### Example\nThe example shows a load balancer setup that'll forward requests to `myservice:grpc`. \nWe assume that RBAC isn't required.\n\n#### Load Balancer Deployment\n```yaml\napiVersion: apps/v1\nkind: Deployment\nmetadata:\n  name: myservice-lb\nspec:\n  selector:\n    matchLabels:\n      app: jawlb\n      service: myservice\n  replicas: 3\n  template:\n    metadata:\n      labels:\n        app: jawlb\n        service: myservice\n    spec:\n      restartPolicy: Always\n      containers:\n      - image: \"your.regist.ry/jawlb:yolo\"\n        name: jawlb\n        ports:\n        - containerPort: 8000\n          name: grpclb\n        readinessProbe:\n          tcpSocket:\n            port: grpclb\n          initialDelaySeconds: 5\n          periodSeconds: 10\n        livenessProbe:\n          tcpSocket:\n            port: grpclb\n          initialDelaySeconds: 15\n          periodSeconds: 60\n        env:\n        # The name of the upstream service we want\n        # to balance\n        - name: JAWLB_SERVICE\n          value: \"myservice\"\n        # The name of the port exposed by this service\n        # which we want to forward to\n        - name: JAWLB_TARGETPORT\n          value: \"grpc\"\n        # The namespace in which jawlb performs the lookup\n        # and we use the current one simply\n        - name: JAWLB_NAMESPACE\n          valueFrom:\n            fieldRef:\n              fieldPath: metadata.namespace\n```\n\n#### Load Balancer Service\n```yaml\napiVersion: v1\nkind: Service\nmetadata:\n  name: myservice-lb\n  labels:\n    app: jawlb\n    service: myservice\nspec:\n  # Make this a headless service because we'll have to use\n  # the dns:// resolver in the Go client\n  clusterIP: None\n  ports:\n  # The port MUST be named grpclb in order to create\n  # the proper DNS SRV entry\n  - name: grpclb\n    port: 8000\n    targetPort: grpclb\n  selector:\n    app: jawlb\n    service: myservice\n```\n\n#### gRPC Client\n```go\nimport \t_ \"google.golang.org/grpc/balancer/grpclb\"\n\n// When dialing, gRPC's DNS resolver will issue a SRV lookup and\n// because we're so nice to provide the grpclb entry, everything\n// works as expected\n//\n// If no SRV record exists, gRPC will fall back to a vanilla connection\n// without the loadbalancer.\n\nconn, err := grpc.Dial(\n\t\"dns:///myservice-lb\",        // must use the dns resolver\n\tgrpc.WithInsecure())\n\n// ... magic 🧙‍♀️\n```\n\n### Configuration\nEverything is passed via environment variables.\n\n- `JAWLB_NAMESPACE` in which namespace service lookup is performed, default `\"default\"`\n- `JAWLB_SERVICE` the name of the Kubernetes service to balance, required\n- `JAWLB_TARGETPORT` the name(!) of the target port on that service, default `\"grpc\"`\n- `JAWLB_LABELSELECTOR` an additional label selector, default `\"\"`\n- `JAWLB_HOST` the hostname to listen on, default`\"\"`\n- `JAWLB_PORT` port to listen on, default `8000`\n- `JAWLB_SHUTDOWNGRACEPERIOD` Grace period for open connections during shutdown, default `\"25s\"`\n\n### What's missing\n- Potentially some actual load balancing\n- Implementation of [LoadReporter](https://github.com/grpc/grpc/blob/master/src/proto/grpc/lb/v1/load_reporter.proto) service\n- Readiness Probe \n- Health Check\n\n### Resources\n- [grpclb spec](https://github.com/grpc/grpc/tree/master/src/proto/grpc/lb/v1)\n- [Load Balancing in gRPC](https://github.com/grpc/grpc/blob/master/doc/load-balancing.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoa%2Fjawlb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoa%2Fjawlb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoa%2Fjawlb/lists"}