Describe your changes. 1.Add the watch mechanism to listen for changes in k8s statefulSet and update nodes in time. 2.For broker, there is only one name by default when using deployManager 3.Refactoring code makes it easier to understand and maintain 4.Fix jar package conflicts between okhttp-ws and okhttp Previously, the logic of k8sDeployManager.getGroupHostInfos was to call the endpoints () interface of k8s, which would cause if the pod was unexpectedly restarted, k8sDeployManager would delete the pod before the restart from the fe or be list and add the pod after the restart to the fe or be list, which obviously does not meet our expectations. Now, after fqdn is enabled, we call the statefulSets() interface of k8s to listen for the number of copies to determine whether we need to be online or offline. In addition, the watch mechanism is added to avoid the possible A-B-A problem caused by timed polling. For the sake of stability, when the watch mechanism does not receive messages for a period of time, it will be degraded to the polling mode. Now several environment variables have been added,ENV_FE_STATEFULSET,ENV_FE_OBSERVER_STATEFULSET,ENV_BE_STATEFULSET,ENV_BROKER_STATEFULSET,ENV_CN_STATEFULSET For statefulsetName,One-to-one correspondence with ENV_FE_SERVICE,ENV_FE_OBSERVER_SERVICE,ENV_BE_SERVICE,ENV_BROKER_SERVICE,ENV_CN_SERVICE,If a serviceName is configured, the corresponding statefulsetName must be configured, otherwise the program cannot be started.
# 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. # fe-common This module is used to store some common classes of other modules. # spark-dpp This module is Spark DPP program, used for Spark Load function. Depends: fe-common # fe-core This module is the main process module of FE. Depends: fe-common, spark-dpp