convox/pkg/atom
David Dollar 282b4ee88e
k8s: use patch to add annotations to avoid race (#106)
* upgrade kubernetes client

* cleanup provider helpers

* use kubernetes patch to avoid update races
2020-01-31 10:12:26 -05:00
..
pkg k8s: use patch to add annotations to avoid race (#106) 2020-01-31 10:12:26 -05:00
templates fix atom crd definition 2019-08-20 16:22:56 -04:00
atom.go k8s: use patch to add annotations to avoid race (#106) 2020-01-31 10:12:26 -05:00
controller.go atom: tighten up and document state machine (#45) 2019-12-06 13:44:30 -05:00
interface.go atom: tighten up and document state machine (#45) 2019-12-06 13:44:30 -05:00
Makefile k8s: use patch to add annotations to avoid race (#106) 2020-01-31 10:12:26 -05:00
mock_Interface.go cli: terraform rack management (#79) 2020-01-24 13:23:08 -05:00
README.md atom: tighten up and document state machine (#45) 2019-12-06 13:44:30 -05:00

atom

Transactional updates and rollbacks of Kubernetes objects

State Machine

                                        ┌ ─ ─ ─ updating  ─ ─ ┐

                                        │  ┌───────────────┐  │
                                           │    Pending    │◀───────────────────────────────┐
                                        │  └───────┬───────┘  │                             │
                                                   ▼                                        │
                                        │  ┌───────────────┐  │                             │
                                           │   Updating    ├──────────────────┐             │
                                        │  └───────┬───────┘  │               │             │
                                                   │                          │             │
                                        └ ─ ─ ─ ─ ─│─ ─ ─ ─ ─ ┘               │             │
                                                   │                          │             │
           ┌───────────────────┬───────────────────┤                          │             │
┌ ─ ─ ─ ─ ─│─ ─ ─ ─ ─ ─ ─ ─ ─ ─│─ ─ ─ ─ ─ ─ ─ ─ ─ ─│─ ─ ─ ─ ─ ┐    ┌ ─ ─ ─ ─ ─│─ ─ ─ ─ ─ ┐  │
           ▼                   ▼                   ▼                          ▼             │
│  ┌───────────────┐   ┌───────────────┐   ┌───────────────┐  │    │  ┌───────────────┐  │  │
   │   Cancelled   │   │   Deadline    │   │     Error     │          │    Running    ├─────┤
│  └───────┬───────┘   └───────┬───────┘   └───────┬───────┘  │    │  └───────────────┘  │  │
           │                   │                   │                                        │
│          └───────────────────┼───────────────────┘          │    │  ┌───────────────┐  │  │
                               ▼                                 ┌───▶│   Reverted    ├─────┤
│                      ┌───────────────┐                      │  │ │  └───────────────┘  │  │
                       │   Rollback    ├─────────────────────────┤                          │
│                      └───────────────┘                      │  │ │  ┌───────────────┐  │  │
                                                                 └───▶│    Failure    ├─────┘
└ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ rollback  ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┘    │  └───────────────┘  │

                                                                   └ ─ ─ ─ running ─ ─ ─ ┘