forked from dragonflyoss/dragonfly
-
Notifications
You must be signed in to change notification settings - Fork 0
/
migrate-config.sh
executable file
·71 lines (61 loc) · 2.65 KB
/
migrate-config.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#!/bin/bash
files="build/package/nfpm/config/dfget.yaml \
client/config/peerhost.go \
client/config/peerhost_test.go
client/config/dfget.go \
client/config/testdata/config/daemon.yaml \
client/config/testdata/config/proxy.yaml \
docs/en/config/dfget.yaml \
docs/en/user-guide/proxy/containerd.md \
docs/en/user-guide/proxy/docker.md \
docs/en/user-guide/registry-mirror/cri-containerd.md \
docs/en/user-guide/registry-mirror/cri-o.md
deploy/helm-charts/charts/dragonfly/templates/dfdaemon/dfdaemon-configmap.yaml \
deploy/helm-charts/charts/dragonfly/values.yaml \
deploy/kustomize/single-cluster-native/bases/dfdaemon/daemonset.yaml \
deploy/kustomize/single-cluster-native/bases/dfdaemon/dfget.yaml \
deploy/kustomize/single-cluster-openkruise/bases/dfdaemon/dfget.yaml \
deploy/kustomize/single-cluster-openkruise/bases/dfdaemon/daemonset.yaml
"
for file in $files; do
echo update $file
sed -i 's/alive_time/aliveTime/g' $file
sed -i 's/gc_interval/gcInterval/g' $file
sed -i 's/data_dir/dataDir/g' $file
sed -i 's/work_home/workHome/g' $file
sed -i 's/keep_storage/keepStorage/g' $file
sed -i 's/net_addrs/netAddrs/g' $file
sed -i 's/schedule_timeout/scheduleTimeout/g' $file
sed -i 's/security_domain/securityDomain/g' $file
sed -i 's/net_topology/netTopology/g' $file
sed -i 's/listen_ip/listenIP/g' $file
sed -i 's/advertise_ip/advertiseIP/g' $file
sed -i 's/total_rate_limit/totalRateLimit/g' $file
sed -i 's/per_peer_rate_limit/perPeerRateLimit/g' $file
sed -i 's/download_grpc/downloadGRPC/g' $file
sed -i 's/peer_grpc/peerGRPC/g' $file
sed -i 's/calculate_digest/calculateDigest/g' $file
sed -i 's/basic_auth/basicAuth/g' $file
sed -i 's/default_filter/defaultFilter/g' $file
sed -i 's/max_concurrency/maxConcurrency/g' $file
sed -i 's/registry_mirror/registryMirror/g' $file
sed -i 's/white_list/whiteList/g' $file
sed -i 's/hijack_https/hijackHTTPS/g' $file
sed -i 's/rate_limit/rateLimit/g' $file
sed -i 's/tcp_listen/tcpListen/g' $file
sed -i 's/unix_listen/unixListen/g' $file
sed -i 's/ca_cert/caCert/g' $file
sed -i 's/tls_config/tlsConfig/g' $file
sed -i 's/data_path/dataPath/g' $file
sed -i 's/task_expire_time/taskExpireTime/g' $file
sed -i 's/disk_gc_threshold/diskGCThreshold/g' $file
sed -i 's/use_https/useHTTPS/g' $file
sed -i 's/benchmark-rate/benchmarkRate/g' $file
sed -i 's/digest_method/digestMethod/g' $file
sed -i 's/digest_value/digestValue/g' $file
sed -i 's/call_system/callSystem/g' $file
sed -i 's/disable_back_source/disableBackSource/g' $file
sed -i 's/show_bar/showBar/g' $file
sed -i 's/rate-limit/rateLimit/g' $file
sed -i 's/more_daemon_options/moreDaemonOptions/g' $file
done