{"id":50477562,"url":"https://github.com/jimyag/logpilot","last_synced_at":"2026-06-01T14:31:21.867Z","repository":{"id":360260145,"uuid":"1220957391","full_name":"jimyag/logpilot","owner":"jimyag","description":"Kubernetes operator for collecting workload logs, Events, and object state snapshots","archived":false,"fork":false,"pushed_at":"2026-05-25T16:38:12.000Z","size":269,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-25T18:27:49.818Z","etag":null,"topics":["controller-runtime","golang","kind","kubebuilder","kubernetes","kubernetes-events","log-collection","logging","observability","operator"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jimyag.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-04-25T15:07:23.000Z","updated_at":"2026-05-25T16:38:16.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/jimyag/logpilot","commit_stats":null,"previous_names":["jimyag/logpilot"],"tags_count":null,"template":false,"template_full_name":"jimyag/template-repository","purl":"pkg:github/jimyag/logpilot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jimyag%2Flogpilot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jimyag%2Flogpilot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jimyag%2Flogpilot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jimyag%2Flogpilot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jimyag","download_url":"https://codeload.github.com/jimyag/logpilot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jimyag%2Flogpilot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33780085,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-01T02:00:06.963Z","response_time":115,"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":["controller-runtime","golang","kind","kubebuilder","kubernetes","kubernetes-events","log-collection","logging","observability","operator"],"created_at":"2026-06-01T14:31:20.862Z","updated_at":"2026-06-01T14:31:21.849Z","avatar_url":"https://github.com/jimyag.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LogPilot\n\nLogPilot is a Kubernetes operator for collecting workload logs, Kubernetes\nEvents, and Kubernetes object state snapshots. It deploys and manages:\n\n- `log-pilot-api`: admission webhook and runtime API service.\n- `log-pilot-agent`: DaemonSet that runs on each node and ships collected data.\n- `logpilot-controller-manager`: operator controller that reconciles LogPilot\n  resources into the runtime components.\n\n## What LogPilot Collects\n\n- Container stdout, stderr, and application file logs through\n  `LogPilotPolicy`.\n- Kubernetes Events through cluster-scoped `ClusterLogPilotPolicy` resources.\n- Kubernetes object state snapshots through cluster-scoped\n  `ClusterLogPilotPolicy` resources.\n\nObject state collection currently covers Pods, Nodes, Deployments, StatefulSets,\nDaemonSets, and Jobs. The emitted state includes fields useful for correlating\nlogs with runtime failures, such as Pod phase, conditions, container statuses,\nrestart counts, last termination state, exit code, node pressure conditions,\ncapacity, allocatable resources, workload replica status, and rollout\nconditions.\n\n## Requirements\n\n- Go\n- Docker\n- kubectl\n- kind\n- kubebuilder/controller-runtime toolchain installed through the project\n  `Makefile` targets\n\n## Quick Start With kind\n\nCreate a local cluster and load the LogPilot image into it:\n\n```bash\nkind create cluster --name logpilot-demo\nmake docker-build IMG=logpilot:dev\nkind load docker-image logpilot:dev --name logpilot-demo\n```\n\nDeploy the operator and CRDs:\n\n```bash\nmake deploy IMG=logpilot:dev API_IMG=logpilot:dev AGENT_IMG=logpilot:dev\nkubectl -n logpilot-system rollout status deployment/logpilot-controller-manager\n```\n\nCreate the LogPilot runtime:\n\n```bash\nkubectl apply -f config/samples/logpilot_v1alpha1_logpilot.yaml\nkubectl -n logpilot-system rollout status deployment/log-pilot-api\nkubectl -n logpilot-system rollout status daemonset/log-pilot-agent\n```\n\nThe sample runtime uses the images passed through `API_IMG` and `AGENT_IMG`\nduring deployment.\n\n## Collect Container Logs\n\nUse `LogPilotPolicy` for namespace-scoped workload log collection. A policy\nselects Pods, declares which containers and paths to collect, and configures\nwhere records are sent.\n\n```yaml\napiVersion: logpilot.logpilot.jimyag.com/v1alpha1\nkind: LogPilotPolicy\nmetadata:\n  name: app-logs\n  namespace: default\nspec:\n  selector:\n    matchLabels:\n      app: demo\n  containerSelector:\n    names:\n      - app\n  volume:\n    name: app-logs\n    mountPath: /var/log/app\n  paths:\n    - /var/log/app/*.log\n  transforms:\n    - type: json\n  outputs:\n    - name: collector\n      type: http\n      url: http://log-collector.default.svc.cluster.local:8080/ingest\n```\n\nApply the included sample:\n\n```bash\nkubectl apply -f config/samples/logpilot_v1alpha1_logpilotpolicy.yaml\n```\n\nPods created after a matching policy exists are mutated by the runtime API so\nthe agent can collect the configured log files reliably.\n\n## Collect Kubernetes Events\n\nUse a cluster-scoped `ClusterLogPilotPolicy` with the `k8sEvent` input:\n\n```yaml\napiVersion: logpilot.logpilot.jimyag.com/v1alpha1\nkind: ClusterLogPilotPolicy\nmetadata:\n  name: k8s-events\nspec:\n  input:\n    type: k8sEvent\n    config:\n      namespaces:\n        - default\n  outputs:\n    - name: collector\n      type: http\n      url: http://log-collector.default.svc.cluster.local:8080/ingest\n```\n\nApply the included sample:\n\n```bash\nkubectl apply -f config/samples/logpilot_v1alpha1_clusterlogpilotpolicy.yaml\n```\n\nThe agent performs an initial list and then watches Events from the Kubernetes\nAPI. Only one agent instance actively runs a cluster-scoped collector at a time.\n\n## Collect Kubernetes Object State\n\nUse a cluster-scoped `ClusterLogPilotPolicy` with the `k8sObjectState` input:\n\n```yaml\napiVersion: logpilot.logpilot.jimyag.com/v1alpha1\nkind: ClusterLogPilotPolicy\nmetadata:\n  name: k8s-object-state\nspec:\n  input:\n    type: k8sObjectState\n    config:\n      resources:\n        - pods\n        - nodes\n        - deployments\n        - statefulsets\n        - daemonsets\n        - jobs\n      namespaces:\n        - default\n        - logpilot-system\n  outputs:\n    - name: collector\n      type: http\n      url: http://log-collector.default.svc.cluster.local:8080/ingest\n```\n\nApply the included sample:\n\n```bash\nkubectl apply -f config/samples/logpilot_v1alpha1_clusterlogpilotpolicy_state.yaml\n```\n\nObject state records include the object kind, namespace, name, event action, and\na normalized state payload. This makes it possible to correlate logs with\nsignals such as `OOMKilled`, container restarts, node pressure, rollout\nprogress, unavailable replicas, and failed Jobs.\n\n## Outputs And Transforms\n\nSupported output types:\n\n- `http`: POST records to an HTTP endpoint.\n- `file`: append records to a file path on the agent.\n\nSupported transform types:\n\n- `json`: parse JSON log lines into structured fields.\n- `label`: add static labels to records.\n- `drop`: drop records matching the transform configuration.\n\n## Check The Deployment\n\nInspect runtime Pods:\n\n```bash\nkubectl -n logpilot-system get pods\nkubectl -n logpilot-system get deployment log-pilot-api\nkubectl -n logpilot-system get daemonset log-pilot-agent\n```\n\nCheck policy status:\n\n```bash\nkubectl get logpilotpolicies -A\nkubectl get clusterlogpilotpolicies\nkubectl describe clusterlogpilotpolicy k8s-events\nkubectl describe clusterlogpilotpolicy k8s-object-state\n```\n\nInspect agent logs:\n\n```bash\nkubectl -n logpilot-system logs daemonset/log-pilot-agent -f\n```\n\nFor local performance and end-to-end validation, use the dedicated kind helper:\n\n```bash\nPERF_CLUSTER_NAME=logpilot-perf PERF_KEEP_CLUSTER=false bash hack/perf-kind.sh\n```\n\n## Cleanup\n\nDelete sample resources:\n\n```bash\nkubectl delete -f config/samples/logpilot_v1alpha1_clusterlogpilotpolicy_state.yaml --ignore-not-found\nkubectl delete -f config/samples/logpilot_v1alpha1_clusterlogpilotpolicy.yaml --ignore-not-found\nkubectl delete -f config/samples/logpilot_v1alpha1_logpilotpolicy.yaml --ignore-not-found\nkubectl delete -f config/samples/logpilot_v1alpha1_logpilot.yaml --ignore-not-found\n```\n\nRemove the operator and CRDs:\n\n```bash\nmake undeploy\nmake uninstall\nkind delete cluster --name logpilot-demo\n```\n\n## Development\n\nRegenerate manifests and generated code after API or marker changes:\n\n```bash\nmake manifests\nmake generate\n```\n\nRun local checks:\n\n```bash\nmake test\nmake build\nCERT_MANAGER_INSTALL_SKIP=true KIND_CLUSTER=logpilot-e2e-state make test-e2e\n```\n\nE2E tests require an isolated kind cluster. Do not run them against a shared\ndevelopment or production cluster.\n\n## License\n\n[Apache 2.0](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjimyag%2Flogpilot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjimyag%2Flogpilot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjimyag%2Flogpilot/lists"}