{"id":15870944,"url":"https://github.com/int128/spot-handler","last_synced_at":"2025-03-16T04:30:28.035Z","repository":{"id":247950576,"uuid":"825210140","full_name":"int128/spot-handler","owner":"int128","description":"Kubernetes controller for observability of Amazon EC2 Spot Interruption","archived":false,"fork":false,"pushed_at":"2025-03-14T15:22:04.000Z","size":501,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-14T16:29:45.075Z","etag":null,"topics":["aws","kubebuilder","kubernetes","kubernetes-controller","observability","spot-instances"],"latest_commit_sha":null,"homepage":"","language":"Go","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/int128.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":"2024-07-07T05:59:54.000Z","updated_at":"2025-03-14T15:22:08.000Z","dependencies_parsed_at":"2024-09-18T05:01:57.606Z","dependency_job_id":"def00692-2777-4b20-9d7e-0500244d7901","html_url":"https://github.com/int128/spot-handler","commit_stats":{"total_commits":106,"total_committers":2,"mean_commits":53.0,"dds":"0.49056603773584906","last_synced_commit":"ded68875727c86f406f7023f227dadbd028414eb"},"previous_names":["int128/spot-terminator","int128/spot-handler"],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/int128%2Fspot-handler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/int128%2Fspot-handler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/int128%2Fspot-handler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/int128%2Fspot-handler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/int128","download_url":"https://codeload.github.com/int128/spot-handler/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243801679,"owners_count":20350108,"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","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":["aws","kubebuilder","kubernetes","kubernetes-controller","observability","spot-instances"],"created_at":"2024-10-06T00:41:00.440Z","updated_at":"2025-03-16T04:30:28.024Z","avatar_url":"https://github.com/int128.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# spot-handler [![go](https://github.com/int128/spot-handler/actions/workflows/go.yaml/badge.svg)](https://github.com/int128/spot-handler/actions/workflows/go.yaml)\n\nThis is a Kubernetes controller for the observability of spot interruptions.\nIt provides the Kubernetes events for the [Amazon EC2 Spot Instance interruption notices](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-instance-termination-notices.html).\n\n## Features\n\n### Observability of spot interruptions\n\nWhen a spot interruption occurs, it may cause a problem such as network error.\nIt is very important to measure the number of affected nodes or pods.\n\nThis controller provides the following events in Kubernetes:\n\n- `SpotInterrupted` event on `Node` resource\n- `SpotInterrupted` event on `Pod` resource\n\n### Pod termination handler\n\nWhen a spot interruption occurs, possibly a pod is not gracefully terminated.\nFor example, a pod disruption budget (PDB) may prevent the pod from being deleted.\n\nThis controller can delete the affected pods to initiate the graceful termination.\n\n## Getting Started\n\nYou need to set up an EventBridge rule and an SQS queue to receive the spot interruption messages.\n\n```mermaid\ngraph LR\n  EventBridge --\u003e SQS --\u003e Controller --\u003e Event --\u003e Datadog\n  subgraph AWS\n    EventBridge\n    SQS\n  end\n  subgraph Kubernetes cluster\n    Controller\n    Event\n  end\n```\n\nDeploy the manifest from the GitHub Releases.\n\nConfigure the Queue resource with the SQS URL.\n\n```yaml\napiVersion: spothandler.int128.github.io/v1\nkind: Queue\nmetadata:\n  name: eks-spot-handler\nspec:\n  url: https://sqs.us-east-2.amazonaws.com/123456789012/eks-spot-handler\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fint128%2Fspot-handler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fint128%2Fspot-handler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fint128%2Fspot-handler/lists"}