dyrnq / docker-canal

docker-canal
https://github.com/alibaba/canal
0 stars 0 forks source link

inotifywait canal.properties or ${instance}/instance.properties then restart canal-server #21

Open dyrnq opened 1 month ago

dyrnq commented 1 month ago

In k8s, if conf/canal.properties or conf/${instance}/instance.properties changed, then restart canal-server pod.

dyrnq commented 1 month ago
          volumeMounts:
            - name: canal-config
              mountPath: /home/admin/canal-server/conf/canal.properties
              subPath: canal.properties
              readOnly: true
            - name: canal-instance-config
              mountPath: /home/admin/canal-server/conf/example/instance.properties
              subPath: instance.properties
              readOnly: true
            - name: canal-logback
              mountPath: /home/admin/canal-server/conf/logback.xml
              subPath: logback.xml
              readOnly: true

在 Kubernetes 中,使用 ConfigMap 作为 subPath 卷挂载时,容器不会自动接收到 ConfigMap 的更新。这意味着,如果你编辑了 ConfigMap,已挂载的 Pod 不会自动反映这些更改。

inotifywait -m -r -e delete_self -e create -e modify -e delete /home/admin/canal-server/conf 不灵

dyrnq commented 1 month ago