diff --git a/docs/service-mesh/ca/README.md b/docs/service-mesh/ca/README.md index 2a3d14d637..cd63244ee2 100644 --- a/docs/service-mesh/ca/README.md +++ b/docs/service-mesh/ca/README.md @@ -101,3 +101,14 @@ Periodic (or background) opeartions are started automatically by the Consul lead ####TODO: - sequence diagram for leaf signing - sequence diagram for CA cert rotation + +## CAManager states + +This section is a work in progress + +TODO: style the diagram to match the others, and add some narative text to describe the +diagram. + +![CA Mananger states](./state-machine.svg) + + diff --git a/docs/service-mesh/ca/state-machine.mmd b/docs/service-mesh/ca/state-machine.mmd new file mode 100644 index 0000000000..214e311679 --- /dev/null +++ b/docs/service-mesh/ca/state-machine.mmd @@ -0,0 +1,23 @@ +stateDiagram-v2 + + [*] --> Uninitialized + Uninitialized --> Initializing : InitializeCA + Uninitialized --> Reconfig : UpdateConfiguration + Reconfig --> Uninitialized : return + + # Initialized can transition to any state + Initialized --> Renew : RenewIntermediate + Initialized --> Uninitialized : Stop + Initialized --> Reconfig : UpdateConfiguration + Initialized --> Initializing : INVALID + + # Initialized is set using validate=false + Uninitialized --> Initialized : INVALID + Reconfig --> Initialized : return + Initializing --> Initialized : InitializeCA complete + Renew --> Initialized : return + + # Uninitialized is set using validate=false + Renew --> Uninitialized : Stop + Reconfig --> Uninitialized : Stop + Initializing --> Uninitialized : Stop diff --git a/docs/service-mesh/ca/state-machine.svg b/docs/service-mesh/ca/state-machine.svg new file mode 100644 index 0000000000..f63e880e08 --- /dev/null +++ b/docs/service-mesh/ca/state-machine.svg @@ -0,0 +1 @@ +
InitializeCA
UpdateConfiguration
return
RenewIntermediate
Stop
UpdateConfiguration
INVALID
INVALID
return
InitializeCA complete
return
Stop
Stop
Stop
Uninitialized
Initializing
Reconfig
Initialized
Renew
\ No newline at end of file