dunhanson opened a new issue, #183:
URL: https://github.com/apache/shardingsphere-elasticjob-ui/issues/183

   
   The registry configuration will be lost when Pod restarts
   
   
   ## 1、kubernetes deployment
   
   ```yml
   apiVersion: apps/v1
   kind: Deployment
   metadata:
     name: elasticjob-ui
     namespace: default
   spec:
     replicas: 1
     selector:
       matchLabels:
         app: elasticjob-ui
     template:
       metadata:
         labels:
           app: elasticjob-ui
       spec:
         containers:
         - image: apache/shardingsphere-elasticjob-lite-ui:3.0.2
           name: elasticjob-ui
           ports:
           - containerPort: 8088
             protocol: TCP
           volumeMounts:
           - name: elasticjob-ui
             subPath: data
             mountPath: /data
           - name: elasticjob-ui
             subPath: ext-lib
             mountPath: /opt/shardingsphere-elasticjob-lite-ui/ext-lib
           - name: elasticjob-ui-conf
             subPath: application.properties
             mountPath: 
/opt/shardingsphere-elasticjob-lite-ui/conf/application.properties              
  
         volumes:
         - name: elasticjob-ui
           persistentVolumeClaim:
             claimName: elasticjob-ui
         - name: elasticjob-ui-conf
           configMap:
             name: elasticjob-ui-conf    
   ```
   ## 2、application.properties
   
   ```application.properties
   #
   # 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.
   #
   
   server.port=8088
   
   auth.username=root
   auth.password=******
   auth.token_expires_after_seconds=3600
   
   spring.datasource.default.driver-class-name=com.mysql.jdbc.Driver
   
spring.datasource.default.url=jdbc:mysql://mysql.default.svc.cluster.local:3306/elastic_job_ui
   spring.datasource.default.username=develop
   spring.datasource.default.password=******
   spring.jpa.show-sql=true
   
   ## Uncomment the following property to allow adding DataSource dynamically.
   # 
dynamic.datasource.allowed-driver-classes={'org.h2.Driver','org.postgresql.Driver'}
   ```
   
   ## 3、registry center
   
   Before restarting Pod
   
   ![](https://s2.loli.net/2023/05/16/SIgsaT5eZXPio1h.png)
   
   After Pod restarts
   
   ![](https://s2.loli.net/2023/05/16/fTsWE7V968CYrP2.png)
   
   ## 4、MySQL
   
   All database tables are empty
   
   ![](https://s2.loli.net/2023/05/16/g9AVKtYG5IolLRv.png)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: 
[email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to