{"id":34831398,"url":"https://github.com/s0ders/k8s-depends","last_synced_at":"2026-04-25T10:36:56.249Z","repository":{"id":48178533,"uuid":"516686795","full_name":"s0ders/k8s-depends","owner":"s0ders","description":"Program meant to be used as an initContainers in K8S to provide a functionnality similar to the \"depends_on\" offered by Docker Compose.","archived":false,"fork":false,"pushed_at":"2024-12-11T09:33:05.000Z","size":14,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-25T10:36:52.320Z","etag":null,"topics":["dependson","kubernetes"],"latest_commit_sha":null,"homepage":"","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/s0ders.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":"2022-07-22T09:17:57.000Z","updated_at":"2024-12-11T09:33:09.000Z","dependencies_parsed_at":"2024-06-21T00:03:42.490Z","dependency_job_id":"181b5c44-393f-4653-9278-70bd276f1730","html_url":"https://github.com/s0ders/k8s-depends","commit_stats":null,"previous_names":["s0ders/depends"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/s0ders/k8s-depends","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s0ders%2Fk8s-depends","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s0ders%2Fk8s-depends/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s0ders%2Fk8s-depends/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s0ders%2Fk8s-depends/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/s0ders","download_url":"https://codeload.github.com/s0ders/k8s-depends/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s0ders%2Fk8s-depends/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32259472,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-25T09:15:33.318Z","status":"ssl_error","status_checked_at":"2026-04-25T09:15:31.997Z","response_time":59,"last_error":"SSL_read: 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":["dependson","kubernetes"],"created_at":"2025-12-25T15:51:27.267Z","updated_at":"2026-04-25T10:36:56.243Z","avatar_url":"https://github.com/s0ders.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# K8S Depends\n\n\u003cp\u003e\n  \u003ca href=\"https://img.shields.io/github/go-mod/go-version/s0ders/k8s-depends\"\u003e\u003cimg alt=\"GitHub go.mod Go version\" src=\"https://img.shields.io/github/go-mod/go-version/s0ders/k8s-depends\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://img.shields.io/github/actions/workflow/status/s0ders/k8s-depends/main.yaml?label=CI\"\u003e\u003cimg alt=\"GitHub Actions Workflow Status\" src=\"https://img.shields.io/github/actions/workflow/status/s0ders/k8s-depends/main.yaml?label=CI\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://goreportcard.com/report/github.com/s0ders/k8s-depends\"\u003e\u003cimg alt=\"Go Report Card\" src=\"https://goreportcard.com/badge/github.com/s0ders/k8s-depends\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/s0ders/k8s-depends/blob/main/LICENSE.md\"\u003e\u003cimg alt=\"GitHub License\" src=\"https://img.shields.io/github/license/s0ders/k8s-depends?label=License\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n## Motivations \n\nThis Go program aims to give Kubernetes a similar capability that Docker Compose offers : `depends_on`. In Docker \nCompose, this keyword allows to programmatically set the order in which the containers are to start.\n\nKubernetes does not propose this functionality as it is out of the tool's scope. Hence, this small Go program and its \nDocker image offers a simple solution to make sure that containers inside a Pod will not start until the specified \nKubernetes service are alive. \n\nThe program accepts the following flags:\n\n| Flag        | Option                                                                        | Default Value |\n|-------------|-------------------------------------------------------------------------------|---------------|\n| `--timeout` | Set the timeout in seconds for each service after which it is considered down | 60            |\n| `--sleep`   | Set the timeout in seconds between two consecutive polls of a given service   | 1             |\n\nThe rest of the arguments passed to the program are the services in form `SERVICE_NAME:SERVICE_PORT` you want to wait for.\n\n## Install\n\nThis program is available as a Docker image and is hosted on Docker Hub:\n```bash\n$ docker pull s0ders/k8s-depends\n```\n\n## Examples\n\n```yaml\napiVersion: v1\nkind: Pod\nmetadata:\n  name: hello_world\nspec:\n  # Image is used as an initContainers to prevent containers from starting\n  # before the given services are up and running.\n  initContainers:\n  - name: depends\n    image: s0ders/depends\n    args: [\"--timeout=120\", \"database-svc:5432\", \"cache-svc:6379\"]\n  containers:\n  - name: web_server\n    image: nginx\n```\n\nTo check the logs of your \"depends\" `initContainers` you can use the following `kubectl` command:\n\n```bash\nkubectl logs \u003cpod_name\u003e -c \u003cinit_container_name\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fs0ders%2Fk8s-depends","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fs0ders%2Fk8s-depends","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fs0ders%2Fk8s-depends/lists"}