{"id":16885111,"url":"https://github.com/ericchiang/kube-rollback-controller","last_synced_at":"2026-04-11T20:38:26.292Z","repository":{"id":145910052,"uuid":"82159150","full_name":"ericchiang/kube-rollback-controller","owner":"ericchiang","description":"Example Kubernetes controller","archived":false,"fork":false,"pushed_at":"2017-02-16T20:33:21.000Z","size":1395,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-25T07:24:07.668Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ericchiang.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":"2017-02-16T08:45:04.000Z","updated_at":"2022-11-21T03:24:45.000Z","dependencies_parsed_at":null,"dependency_job_id":"0fd6e3cb-0368-490e-8466-1953f5e55408","html_url":"https://github.com/ericchiang/kube-rollback-controller","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/ericchiang%2Fkube-rollback-controller","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericchiang%2Fkube-rollback-controller/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericchiang%2Fkube-rollback-controller/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericchiang%2Fkube-rollback-controller/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ericchiang","download_url":"https://codeload.github.com/ericchiang/kube-rollback-controller/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244560374,"owners_count":20472218,"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":[],"created_at":"2024-10-13T16:33:24.832Z","updated_at":"2025-10-17T23:57:25.939Z","avatar_url":"https://github.com/ericchiang.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Auto Rollback Controller\n\nA Kubernetes controller example\n\nIn v1.5 Kubernetes added a new field to the `Deployments` spec, [`progressDeadlineSeconds`][rollback-config]. As of `v1.5` a `Deployment` will be marked as failed if it fails to make progress within the allotted time. However, it won't automatically roll back.\n\nThis means the following deployment:\n\n```\napiVersion: extensions/v1beta1\nkind: Deployment\nmetadata:\n  name: hello\nspec:\n  progressDeadlineSeconds: 5\n  replicas: 3\n  template:\n    metadata:\n      labels:\n        app: hello\n    spec:\n      containers:\n      - name: hello\n        image: alpine:3.5\n        command:\n        - /bin/sh\n        - -c\n        - \"while :; do echo 'Goodbye'; exit 1; sleep 1; done\"\n```\n\ndoesn't roll back in v1.5.\n\nThe `kube-rollback-controller` loops, looking for failed deployments, then automatically does this rollback.\n\n## Example\n\nIn one terminal, start the rollback controller:\n\n```\n$ go get github.com/ericchiang/kube-rollback-controller\n$ kube-rollback-controller --client=kubectl\n```\n\nIn another create a deployment, then roll to a bad version of the deployment:\n\n```\n$ kubectl create -f examples/good.yaml\n$ # Wait a bit for the deployment to succeed...\n$ kubectl replace -f examples/bad.yaml\n```\n\nThe second deployment should roll back to the first.\n\n[rollback-config]: https://github.com/kubernetes/kubernetes/blob/v1.5.0/pkg/apis/extensions/v1beta1/types.go#L292-L303\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fericchiang%2Fkube-rollback-controller","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fericchiang%2Fkube-rollback-controller","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fericchiang%2Fkube-rollback-controller/lists"}