You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by gy...@apache.org on 2022/03/27 14:54:12 UTC

[flink-kubernetes-operator] branch main updated: [FLINK-26825] Document State Machine Graph for JM Deployment

This is an automated email from the ASF dual-hosted git repository.

gyfora pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/flink-kubernetes-operator.git


The following commit(s) were added to refs/heads/main by this push:
     new 191aea8  [FLINK-26825] Document State Machine Graph for JM Deployment
191aea8 is described below

commit 191aea81d3665361a27dec01a15f8b7096422f05
Author: Biao Geng <gb...@gmail.com>
AuthorDate: Fri Mar 25 18:18:00 2022 +0800

    [FLINK-26825] Document State Machine Graph for JM Deployment
---
 docs/content/docs/concepts/architecture.md          | 19 +++++++++++++++++++
 .../img/concepts/JM_deployment_state_machine.svg    | 21 +++++++++++++++++++++
 2 files changed, 40 insertions(+)

diff --git a/docs/content/docs/concepts/architecture.md b/docs/content/docs/concepts/architecture.md
index 3480c32..bd871aa 100644
--- a/docs/content/docs/concepts/architecture.md
+++ b/docs/content/docs/concepts/architecture.md
@@ -45,6 +45,25 @@ The CR can be (re)applied on the cluster any time. The Operator makes continuous
 
 The Operator is built with the [Java Operator SDK](https://github.com/java-operator-sdk/java-operator-sdk) and uses the [Native Kubernetes Integration](https://nightlies.apache.org/flink/flink-docs-master/docs/deployment/resource-providers/native_kubernetes/) for launching Flink deployments and submitting jobs under the hood. The Java Operator SDK is a higher level framework and related tooling to support writing Kubernetes Operators in Java. Both the Java Operator SDK and Flink's native [...]
 
+## State Machine of JobManager Deployment
+The Operator manages the lifecycle of the JobManager Deployment. Its state machine is as follows:
+
+{{< img src="/img/concepts/JM_deployment_state_machine.svg" alt="State Machine of JobManager Deployment" >}}
+
+The possible transitions usually indicate that there are some underlying changes:
+
+1. `MISSING` -> `DEPLOYING`: A new JM deployment exists and is being created
+2. `DEPLOYING` -> `DEPLOYED_NOT_READY`: The JM deployment exists and passes checks of the availability of replicas and JM port connectivity. Now, it is waiting the REST service to be ready.
+3. `DEPLOYED_NOT_READY` -> `READY`: JM can serve requests.
+4. `READY` -> `READY`: JM works fine.
+5. `READY` -> `DEPLOYED_NOT_READY`: JM REST service becomes unavailable.
+6. `READY` -> `ERROR`: REST service is unavailable and JM deployment failed(e.g. in CrashLoopBackoff state).
+7. `READY` -> `MISSING`: JM deployment does not exist(e.g. deleted by kubectl or by `SUSPEND` action).
+8. `ERROR` -> `ERROR`: JM deployment failed.
+9. `DEPLOYING` -> `DEPLOYING`: The JM deployment exists and is still being created.
+10. `DEPLOYING` -> `ERROR`: JM deployment failed.
+11. `MISSING` -> `MISSING`: JM deployment does not exist.
+
 
 
 
diff --git a/docs/static/img/concepts/JM_deployment_state_machine.svg b/docs/static/img/concepts/JM_deployment_state_machine.svg
new file mode 100644
index 0000000..bbfd1c3
--- /dev/null
+++ b/docs/static/img/concepts/JM_deployment_state_machine.svg
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg version="1.1" viewBox="0.0 0.0 960.0 540.0" fill="none" stroke="none" stroke-linecap="square" stroke-miterlimit="10" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg"><clipPath id="p.0"><path d="m0 0l960.0 0l0 540.0l-960.0 0l0 -540.0z" clip-rule="nonzero"/></clipPath><g clip-path="url(#p.0)"><path fill="#ffffff" d="m0 0l960.0 0l0 540.0l-960.0 0z" fill-rule="evenodd"/><path fill="#cfe2f3" d="m516.15485 97.97128l0 0c0 -4.3632812 3.5371704 -7.9004135 7.90045 [...]
\ No newline at end of file