{"id":22998250,"url":"https://github.com/uswitch/surtr","last_synced_at":"2025-08-14T00:31:55.051Z","repository":{"id":49972717,"uuid":"146903634","full_name":"uswitch/surtr","owner":"uswitch","description":"AWS Kubernetes Node Terminator","archived":false,"fork":false,"pushed_at":"2023-07-05T08:20:22.000Z","size":3063,"stargazers_count":22,"open_issues_count":1,"forks_count":1,"subscribers_count":10,"default_branch":"master","last_synced_at":"2024-06-20T13:29:42.909Z","etag":null,"topics":["aws","kubernetes"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/uswitch.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}},"created_at":"2018-08-31T14:37:05.000Z","updated_at":"2022-09-12T12:56:16.000Z","dependencies_parsed_at":"2024-06-20T12:58:48.097Z","dependency_job_id":"cb95fff4-0f61-4f5a-aad5-cc14ea89ec86","html_url":"https://github.com/uswitch/surtr","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uswitch%2Fsurtr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uswitch%2Fsurtr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uswitch%2Fsurtr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uswitch%2Fsurtr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/uswitch","download_url":"https://codeload.github.com/uswitch/surtr/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229786999,"owners_count":18124014,"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","kubernetes"],"created_at":"2024-12-15T06:12:24.313Z","updated_at":"2024-12-15T06:12:24.863Z","avatar_url":"https://github.com/uswitch.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Surtr\n\nSurtr is a cron job that will terminate the oldest node in your kubernetes cluster.\nHaving really old nodes in your cluster isn't ideal, it can make you vulnerable to malicious attacks and can sometimes hide failure states in your applications.\nBy making sure no node ever lives too long you both remove the potential security risk and expose flaws in your cluster/application design, if taking out one node causes a load of errors you know you need to improve the resilience of your services.\n\n# Usage\nSurtr is intended to be ran as cron-job, see the [examples](examples) directory for the cron and rbac definitions.\nSurtr needs to be able to query the Kubernetes api for a list of the nodes, it finds the oldest node, checks it's older than the min age specified and then sends an ec2 termination request for that node.\n\n# AWS Permissions\nSurtr just needs `ec2:TerminateInstances`\n\n```\n{\n    \"Version\": \"2012-10-17\",\n    \"Statement\": [\n        {\n            \"Sid\": \"\",\n            \"Action\": [\n                \"ec2:TerminateInstances\"\n            ],\n            \"Effect\": \"Allow\",\n            \"Resource\": [\n                \"*\"\n            ]\n        }\n    ]\n}\n\n```\n\n# Flags\n```\n--help                   Show context-sensitive help (also try --help-long and --help-man).\n--kubeconfig=KUBECONFIG  Path to kubeconfig.\n--older-than=OLDER-THAN  age of nodes to terminate\n--debug                  Debug mode\n ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuswitch%2Fsurtr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fuswitch%2Fsurtr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuswitch%2Fsurtr/lists"}