{"id":18581888,"url":"https://github.com/coder/coder-logstream-kube","last_synced_at":"2025-07-28T05:04:48.696Z","repository":{"id":168372827,"uuid":"642955114","full_name":"coder/coder-logstream-kube","owner":"coder","description":"Stream Kubernetes Pod events to the Coder startup logs","archived":false,"fork":false,"pushed_at":"2025-06-30T12:11:00.000Z","size":40790,"stargazers_count":23,"open_issues_count":10,"forks_count":7,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-07-26T15:36:35.027Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/coder.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,"zenodo":null}},"created_at":"2023-05-19T18:26:21.000Z","updated_at":"2025-06-23T14:50:47.000Z","dependencies_parsed_at":"2024-02-15T02:24:43.524Z","dependency_job_id":"64f1460d-1631-4338-8ce6-63997b539015","html_url":"https://github.com/coder/coder-logstream-kube","commit_stats":null,"previous_names":["coder/coder-logstream-kube"],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/coder/coder-logstream-kube","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coder%2Fcoder-logstream-kube","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coder%2Fcoder-logstream-kube/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coder%2Fcoder-logstream-kube/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coder%2Fcoder-logstream-kube/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coder","download_url":"https://codeload.github.com/coder/coder-logstream-kube/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coder%2Fcoder-logstream-kube/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267464522,"owners_count":24091505,"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","status":"online","status_checked_at":"2025-07-28T02:00:09.689Z","response_time":68,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-11-07T00:08:04.651Z","updated_at":"2025-07-28T05:04:48.671Z","avatar_url":"https://github.com/coder.png","language":"Go","readme":"# coder-logstream-kube\n\n[![discord](https://img.shields.io/discord/747933592273027093?label=discord)](https://discord.gg/coder)\n[![release](https://img.shields.io/github/v/tag/coder/coder-logstream-kube)](https://github.com/coder/envbuilder/pkgs/container/coder-logstream-kube)\n[![godoc](https://pkg.go.dev/badge/github.com/coder/coder-logstream-kube.svg)](https://pkg.go.dev/github.com/coder/coder-logstream-kube)\n[![license](https://img.shields.io/github/license/coder/coder-logstream-kube)](./LICENSE)\n\nStream Kubernetes Pod events to the Coder startup logs.\n\n- Easily determine the reason for a pod provision failure, or why a pod is stuck in a pending state.\n- Visibility into when pods are OOMKilled, or when they are evicted.\n- Filter by namespace, field selector, and label selector to reduce Kubernetes API load.\n\n![Log Stream](./scripts/demo.png)\n\n## Usage\n\nApply the Helm chart to start streaming logs into your Coder instance:\n\n```console\nhelm repo add coder-logstream-kube https://helm.coder.com/logstream-kube\nhelm install coder-logstream-kube coder-logstream-kube/coder-logstream-kube \\\n    --namespace coder \\\n    --set url=\u003cyour-coder-url-including-http-or-https\u003e\n```\n\n\u003e **Note**\n\u003e For additional customization (such as customizing the image, pull secrets, annotations, etc.), you can use the\n\u003e [values.yaml](helm/values.yaml) file directly.\n\nYour Coder template should be using a `kubernetes_deployment` resource with `wait_for_rollout` set to `false`.\n\n```hcl\nresource \"kubernetes_deployment\" \"hello_world\" {\n  count = data.coder_workspace.me.start_count\n  wait_for_rollout = false\n  ...\n}\n```\n\nThis ensures all pod events will be sent during initialization and startup.\n\n## How?\n\nKubernetes provides an [informers](https://pkg.go.dev/k8s.io/client-go/informers) API that streams pod and event data from the API server.\n\n`coder-logstream-kube` listens for pod creation events with containers that have the `CODER_AGENT_TOKEN` environment variable set. All pod events are streamed as logs to the Coder API using the agent token for authentication.\n\n## Custom Certificates\n\n- [`SSL_CERT_FILE`](https://go.dev/src/crypto/x509/root_unix.go#L19): Specifies the path to an SSL certificate.\n- [`SSL_CERT_DIR`](https://go.dev/src/crypto/x509/root_unix.go#L25): Identifies which directory to check for SSL certificate files.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoder%2Fcoder-logstream-kube","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoder%2Fcoder-logstream-kube","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoder%2Fcoder-logstream-kube/lists"}