{"id":37445435,"url":"https://github.com/ncsa/checks","last_synced_at":"2026-01-16T06:49:32.814Z","repository":{"id":70034782,"uuid":"285814555","full_name":"ncsa/checks","owner":"ncsa","description":"Single container to be used as init containers. This can be used to check if the service is up and running and ready to be used.","archived":false,"fork":false,"pushed_at":"2025-08-19T04:07:25.000Z","size":26,"stargazers_count":0,"open_issues_count":2,"forks_count":1,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-10-02T01:57:03.781Z","etag":null,"topics":["init-containers","kubernetes"],"latest_commit_sha":null,"homepage":"","language":"Python","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/ncsa.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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-08-07T11:38:10.000Z","updated_at":"2025-08-19T04:07:22.000Z","dependencies_parsed_at":null,"dependency_job_id":"d68b6f75-add2-469b-963f-51e425995bff","html_url":"https://github.com/ncsa/checks","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/ncsa/checks","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ncsa%2Fchecks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ncsa%2Fchecks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ncsa%2Fchecks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ncsa%2Fchecks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ncsa","download_url":"https://codeload.github.com/ncsa/checks/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ncsa%2Fchecks/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28477954,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T06:30:42.265Z","status":"ssl_error","status_checked_at":"2026-01-16T06:30:16.248Z","response_time":107,"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":["init-containers","kubernetes"],"created_at":"2026-01-16T06:49:30.617Z","updated_at":"2026-01-16T06:49:32.804Z","avatar_url":"https://github.com/ncsa.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NCSA CHECKS\n\nThe goal of this project is to have a simple set of functions that\ncan be used as init containers in your kubernetes deployment. Each\nof the checks will see if the service is ready to accept\nconnections.\n\nFor example the following snippet will wait for rabbitmq and \npostgresql to be ready before starting the actual container:\n\n```yaml\napiVersion: apps/v1\nkind: Deployment\nmetadata:\n  name: mywebapp\nspec:\n  replicas: 1\n  selector:\n    matchLabels:\n      app: mywebapp\n  template:\n    metadata:\n      labels:\n        app: mywebapp\n    spec:\n      initContainers:\n        - name: check-rabbitmq\n          image: \"ncsa/checks:1.0.0\"\n          env:\n            - name: RABBITMQ_URI\n              value: \"amqp://user:pass@rabbitmq/%2F\"\n        - name: check-postgresql\n          image: \"ncsa/checks:1.0.0\"\n          env:\n            - name: PGURI\n              value: \"postgresql://postgres:secret@postgresql:5432/mydb\"\n            - name: PGTABLE\n              value: \"users\"\n      containers:\n        - name: mywebapp\n          image: mywebapp:1.0\n          ports:\n            - containerPort: 80\n          env:\n            - name: RABBITMQ_URI\n              value: \"amqp://user:pass@rabbitmq/%2F\"\n            - name: PGHOST\n              value: \"postgres\"\n            - name: PGUSER\n              value: \"postgres\"\n```\n\n## Tests Supported\n\nRabbitMQ\n- description : checks to see if can connect to RabbitMQ Server\n- exit code : 1\n- parameters\n  - RABBITMQ_URI [required] : URI for RabbitMQ server \n\nMongo\n- description : checks to see if can connect to MongoDB Server\n- exit code : 2\n- parameters\n  - MONGO_URI [required] : URI for MongoDB server \n\nURL\n- description : checks to see if URL is reachable and returns status \n  code of 200. If optional text is given the text needs to be in the\n  returned body.\n- exit code : 3\n- parameters\n  - URL [required] : URL to check\n  - URL_TEXT [optional] : text to be found in body returned \n  \nPostgreSQL\n- description : checks to see if database is up. Will check to see\n  if the optional table exists\n- exit code : 4\n- parameters\n  - PGURI [required*] : URI to connect to postgresql.\n  - PGUSER [required*] : \n  - PGPASSWORD [required*] : \n  - PGHOST [required*] : \n  - PGPORT [required*] : \n  - PGDATABASE [required*] : \n  - PGTABLE [optional] : table that should exist \n\n* either PG_URI or on of the PG* should be provided. \n\n## TODO:\n\n- check_service: check if host:port is reachable\n- create simple tests for each check\n- add db/collection for mongo to test access\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fncsa%2Fchecks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fncsa%2Fchecks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fncsa%2Fchecks/lists"}