Repository: dragonflyoss/Dragonfly2
Pull request #389 (2021-06-30 12:38:20)

Update kustomize default namespace and images
Signed-off-by: Jim Ma <majinjing3@gmail.com>

<!--- Provide a general summary of your changes in the Title above -->

## Description

Update kustomize default namespace and images

## Related Issue

<!--- This project only accepts pull requests related to open issues -->
<!--- If suggesting a new feature or change, please discuss it in an issue first -->
<!--- If fixing a bug, there should be an issue describing it with steps to reproduce -->
<!--- Please link to the issue here: -->

## Motivation and Context

<!--- Why is this change required? What problem does it solve? -->

## Screenshots (if appropriate):

## Types of changes

<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
- [x] Documentation Update (if none of the other choices apply)

## Checklist:

<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->

- [ ] Code compiles correctly.
- [ ] My code follows the code style of this project.
- [ ] My change requires a change to the documentation.
- [x] I have updated the documentation accordingly.
- [x] I have read the **CONTRIBUTING** document.
- [ ] I have added tests to cover my changes.
- [ ] All new and existing tests passed.


codecov-commenter: # [Codecov](https://codecov.io/gh/dragonflyoss/Dragonfly2/pull/389?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dragonflyoss) Report
> Merging [#389](https://codecov.io/gh/dragonflyoss/Dragonfly2/pull/389?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dragonflyoss) (d81dd7d) into [main](https://codecov.io/gh/dragonflyoss/Dragonfly2/commit/ce4c5cf830afbb35b7b3d02391ac6f570d59000a?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dragonflyoss) (ce4c5cf) will **decrease** coverage by `0.24%`.
> The diff coverage is `n/a`.

[![Impacted file tree graph](https://codecov.io/gh/dragonflyoss/Dragonfly2/pull/389/graphs/tree.svg?width=650&height=150&src=pr&token=PUICJYSAT7&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dragonflyoss)](https://codecov.io/gh/dragonflyoss/Dragonfly2/pull/389?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dragonflyoss)

```diff
@@            Coverage Diff             @@
##             main     #389      +/-   ##
==========================================
- Coverage   42.41%   42.16%   -0.25%     
==========================================
  Files          73       72       -1     
  Lines        5640     5637       -3     
==========================================
- Hits         2392     2377      -15     
- Misses       2900     2913      +13     
+ Partials      348      347       -1     
```

| Flag | Coverage Δ | |
|---|---|---|
| unittests | `42.16% <ø> (-0.25%)` | :arrow_down: |

Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dragonflyoss#carryforward-flags-in-the-pull-request-comment) to find out more.

| [Impacted Files](https://codecov.io/gh/dragonflyoss/Dragonfly2/pull/389?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dragonflyoss) | Coverage Δ | |
|---|---|---|
| [pkg/util/net/iputils/ip\_utils.go](https://codecov.io/gh/dragonflyoss/Dragonfly2/pull/389/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dragonflyoss#diff-cGtnL3V0aWwvbmV0L2lwdXRpbHMvaXBfdXRpbHMuZ28=) | `61.22% <0.00%> (-4.09%)` | :arrow_down: |
| [client/daemon/peer/peertask\_stream.go](https://codecov.io/gh/dragonflyoss/Dragonfly2/pull/389/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dragonflyoss#diff-Y2xpZW50L2RhZW1vbi9wZWVyL3BlZXJ0YXNrX3N0cmVhbS5nbw==) | `55.84% <0.00%> (-2.27%)` | :arrow_down: |
| [client/daemon/peer/peertask\_base.go](https://codecov.io/gh/dragonflyoss/Dragonfly2/pull/389/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dragonflyoss#diff-Y2xpZW50L2RhZW1vbi9wZWVyL3BlZXJ0YXNrX2Jhc2UuZ28=) | `32.76% <0.00%> (-1.70%)` | :arrow_down: |
| [client/daemon/peerhost\_stub.go](https://codecov.io/gh/dragonflyoss/Dragonfly2/pull/389/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dragonflyoss#diff-Y2xpZW50L2RhZW1vbi9wZWVyaG9zdF9zdHViLmdv) | | |


Patch:
diff --git a/build/package/nfpm/config/dfget.yaml b/build/package/nfpm/config/dfget.yaml
index 3398b2c9..ad2f1759 100644
--- a/build/package/nfpm/config/dfget.yaml
+++ b/build/package/nfpm/config/dfget.yaml
@@ -1,25 +1,18 @@
 # daemon alive time, when sets 0s, daemon will not auto exit
-alive_time: 0s
+aliveTime: 0s
 
 # daemon gc task running interval
-gc_interval: 1m0s
-
-# daemon pid location
-pid_file: /var/run/dfdaemon.pid
-
-# daemon lock file location
-# some lock file will only allow to run one daemon service
-lock_file: /var/run/dfdaemon.lock
+gcInterval: 1m0s
 
 # daemon data directory
-data_dir: /home/t4/dragonfly/
+dataDir: /home/t4/dragonfly/
 
 # daemon work directory, daemon will change current working directory to this
-work_home: /home/t4/dragonfly/
+workHome: /home/t4/dragonfly/
 
 # when daemon exit, keep peer task data or not
 # it is usefully when upgrade daemon service, all local cache will be saved
-keep_storage: false
+keepStorage: false
 
 # all addresses of all schedulers
 # the schedulers of all daemons should be same in one region or zone.
@@ -27,11 +20,11 @@ keep_storage: false
 # caution: only tcp is supported
 scheduler:
   # below example is a stand address
-  net_addrs:
+  netAddrs:
   - type: tcp
     addr: 127.0.0.1:8002
   # schedule timeout
-  schedule_timeout: 10s
+  scheduleTimeout: 10s
 
 # when enable, pprof will be enabled,
 verbose: true
@@ -41,44 +34,44 @@ console: false
 host:
   # tcp service listen address
   # port should be set by other options
-  listen_ip: 0.0.0.0
+  listenIP: 0.0.0.0
   # access ip for other peers
-  # when local ip is different with access ip, advertise_ip should be set
-  advertise_ip: 0.0.0.0
+  # when local ip is different with access ip, advertiseIP should be set
+  advertiseIP: 0.0.0.0
   # geographical location and network topology
   location: ""
   idc: ""
-  security_domain: ""
-  net_topology: ""
+  securityDomain: ""
+  netTopology: ""
 
 # download service option
 download:
   # total download limit per second
-  total_rate_limit: 200Mi
+  totalRateLimit: 200Mi
   # per peer task download limit per second
-  per_peer_rate_limit: 20Mi
+  perPeerRateLimit: 20Mi
   # download grpc option
-  download_grpc:
+  downloadGRPC:
     # security option
     security:
       insecure: true
       cacert: ""
       cert: ""
       key: ""
-      tls_config: null
+      tlsConfig: null
     # download service listen address
     # current, only support unix domain socket
-    unix_listen:
+    unixListen:
       socket: /var/run/dfdaemon.sock
   # peer grpc option
   # peer grpc service send pieces info to other peers
-  peer_grpc:
+  peerGRPC:
     security:
       insecure: true
       cacert: ""
       cert: ""
       key: ""
-    tcp_listen:
+    tcpListen:
       # listen address
       listen: 0.0.0.0
       # listen port, daemon will try to listen
@@ -95,13 +88,13 @@ download:
 # upload service option
 upload:
   # upload limit per second
-  rate_limit: 1024Mi
+  rateLimit: 1024Mi
   security:
     insecure: true
     cacert: ""
     cert: ""
     key: ""
-  tcp_listen:
+  tcpListen:
     # listen address
     listen: 0.0.0.0
     # listen port, daemon will try to listen
@@ -116,7 +109,7 @@ upload:
 storage:
   # task data expire time
   # when there is no access to a task data, this task will be gc.
-  task_expire_time: 1m0s
+  taskExpireTime: 1m0s
   # storage strategy when process task data
   # io.d7y.storage.v2.simple : download file to data directory first, then copy to output path, this is default action
   #                           the download file in date directory will be the peer data for uploading to other peers
@@ -133,7 +126,7 @@ proxy:
     cacert: ""
     cert: ""
     key: ""
-  tcp_listen:
+  tcpListen:
     # listen address
     listen: 0.0.0.0
     # listen port, daemon will try to listen
@@ -143,7 +136,7 @@ proxy:
   #   port:
   #     start: 65020
   #     end: 65029
-  registry_mirror:
+  registryMirror:
     # url for the registry mirror
     url: https://index.docker.io
     # whether to ignore https certificate errors
@@ -159,7 +152,7 @@ proxy:
   - regx: blobs/sha256.*
   # change http requests to some-registry to https and proxy them with dfget
   - regx: some-registry/
-    use_https: true
+    useHTTPS: true
   # proxy requests directly, without dfget
   - regx: no-proxy-reg
     direct: true
@@ -167,7 +160,7 @@ proxy:
   - regx: some-registry
     redirect: another-registry
 
-  hijack_https:
+  hijackHTTPS:
     # key pair used to hijack https requests
     cert: ""
     key: ""
diff --git a/client/config/dfget.go b/client/config/dfget.go
index 185febe4..77f8a583 100644
--- a/client/config/dfget.go
+++ b/client/config/dfget.go
@@ -53,23 +53,23 @@ type ClientOption struct {
 	// Timeout download timeout(second).
 	Timeout time.Duration `yaml:"timeout,omitempty" mapstructure:"timeout,omitempty"`
 
-	BenchmarkRate unit.Bytes `yaml:"benchmark-rate,omitempty" mapstructure:"benchmark-rate,omitempty"`
+	BenchmarkRate unit.Bytes `yaml:"benchmarkRate,omitempty" mapstructure:"benchmarkRate,omitempty"`
 
 	// Md5 expected file md5.
 	// Deprecated: Md5 is deprecated, use DigestMethod with DigestValue instead
 	Md5    string `yaml:"md5,omitempty" mapstructure:"md5,omitempty"`
 	Digest string `yaml:"digest,omitempty" mapstructure:"digest,omitempty"`
 	// DigestMethod indicates digest method, like md5, sha256
-	DigestMethod string `yaml:"digest_method,omitempty" mapstructure:"digest_method,omitempty"`
+	DigestMethod string `yaml:"digestMethod,omitempty" mapstructure:"digestMethod,omitempty"`
 
 	// DigestValue indicates digest value
-	DigestValue string `yaml:"digest_value,omitempty" mapstructure:"digest_value,omitempty"`
+	DigestValue string `yaml:"digestValue,omitempty" mapstructure:"digestValue,omitempty"`
 
 	// Identifier identify download task, it is available merely when md5 param not exist.
 	Identifier string `yaml:"identifier,omitempty" mapstructure:"identifier,omitempty"`
 
 	// CallSystem system name that executes dfget.
-	CallSystem string `yaml:"call_system,omitempty" mapstructure:"call_system,omitempty"`
+	CallSystem string `yaml:"callSystem,omitempty" mapstructure:"callSystem,omitempty"`
 
 	// Pattern download pattern, must be 'p2p' or 'cdn' or 'source',
 	// default:`p2p`.
@@ -88,15 +88,15 @@ type ClientOption struct {
 	Header []string `yaml:"header,omitempty" mapstructure:"header,omitempty"`
 
 	// DisableBackSource indicates whether to not back source to download when p2p fails.
-	DisableBackSource bool `yaml:"disable_back_source,omitempty" mapstructure:"disable_back_source,omitempty"`
+	DisableBackSource bool `yaml:"disableBackSource,omitempty" mapstructure:"disableBackSource,omitempty"`
 
 	// Insecure indicates whether skip secure verify when supernode interact with the source.
 	Insecure bool `yaml:"insecure,omitempty" mapstructure:"insecure,omitempty"`
 
 	// ShowBar shows progress bar, it's conflict with `--console`.
-	ShowBar bool `yaml:"show_bar,omitempty" mapstructure:"show_bar,omitempty"`
+	ShowBar bool `yaml:"showBar,omitempty" mapstructure:"showBar,omitempty"`
 
-	RateLimit rate.Limit `yaml:"rate-limit,omitempty" mapstructure:"rate-limit,omitempty"`
+	RateLimit rate.Limit `yaml:"rateLimit,omitempty" mapstructure:"rateLimit,omitempty"`
 
 	// Config file paths,
 	// default:["/etc/dragonfly/dfget.yaml","/etc/dragonfly.conf"].
@@ -106,7 +106,7 @@ type ClientOption struct {
 	//ConfigFiles []string `json:"-"`
 
 	// MoreDaemonOptions indicates more options passed to daemon by command line.
-	MoreDaemonOptions string `yaml:"more_daemon_options,omitempty" mapstructure:"more_daemon_options,omitempty"`
+	MoreDaemonOptions string `yaml:"moreDaemonOptions,omitempty" mapstructure:"moreDaemonOptions,omitempty"`
 }
 
 func NewDfgetConfig() *ClientOption {
diff --git a/client/config/peerhost.go b/client/config/peerhost.go
index 22719e9a..31166e55 100644
--- a/client/config/peerhost.go
+++ b/client/config/peerhost.go
@@ -47,12 +47,12 @@ type PeerHostOption struct {
 	// AliveTime indicates alive duration for which daemon keeps no accessing by any uploading and download requests,
 	// after this period daemon will automatically exit
 	// when AliveTime == 0, will run infinitely
-	AliveTime  clientutil.Duration `mapstructure:"alive_time" yaml:"alive_time"`
-	GCInterval clientutil.Duration `mapstructure:"gc_interval" yaml:"gc_interval"`
+	AliveTime  clientutil.Duration `mapstructure:"aliveTime" yaml:"aliveTime"`
+	GCInterval clientutil.Duration `mapstructure:"gcInterval" yaml:"gcInterval"`
 
-	DataDir     string `mapstructure:"data_dir" yaml:"data_dir"`
-	WorkHome    string `mapstructure:"work_home" yaml:"work_home"`
-	KeepStorage bool   `mapstructure:"keep_storage" yaml:"keep_storage"`
+	DataDir     string `mapstructure:"dataDir" yaml:"dataDir"`
+	WorkHome    string `mapstructure:"workHome" yaml:"workHome"`
+	KeepStorage bool   `mapstructure:"keepStorage" yaml:"keepStorage"`
 
 	Scheduler    SchedulerOption `mapstructure:"scheduler" yaml:"scheduler"`
 	Host         HostOption      `mapstructure:"host" yaml:"host"`
@@ -116,45 +116,45 @@ func (p *PeerHostOption) Validate() error {
 
 type SchedulerOption struct {
 	// NetAddrs is scheduler addresses.
-	NetAddrs []dfnet.NetAddr `mapstructure:"net_addrs" yaml:"net_addrs"`
+	NetAddrs []dfnet.NetAddr `mapstructure:"netAddrs" yaml:"netAddrs"`
 
 	// ScheduleTimeout is request timeout.
-	ScheduleTimeout clientutil.Duration `mapstructure:"schedule_timeout" yaml:"schedule_timeout"`
+	ScheduleTimeout clientutil.Duration `mapstructure:"scheduleTimeout" yaml:"scheduleTimeout"`
 }
 
 type HostOption struct {
 	// SecurityDomain is the security domain
-	SecurityDomain string `mapstructure:"security_domain" yaml:"security_domain"`
+	SecurityDomain string `mapstructure:"securityDomain" yaml:"securityDomain"`
 	// Peerhost location for scheduler
 	Location string `mapstructure:"location" yaml:"location"`
 	// Peerhost idc for scheduler
 	IDC string `mapstructure:"idc" yaml:"idc"`
 	// Peerhost net topology for scheduler
-	NetTopology string `mapstructure:"net_topology" yaml:"net_topology"`
+	NetTopology string `mapstructure:"netTopology" yaml:"netTopology"`
 	// The listen ip for all tcp services of daemon
-	ListenIP string `mapstructure:"listen_ip" yaml:"listen_ip"`
+	ListenIP string `mapstructure:"listenIP" yaml:"listenIP"`
 	// The ip report to scheduler, normal same with listen ip
-	AdvertiseIP string `mapstructure:"advertise_ip" yaml:"advertise_ip"`
+	AdvertiseIP string `mapstructure:"advertiseIP" yaml:"advertiseIP"`
 }
 
 type DownloadOption struct {
-	TotalRateLimit   clientutil.RateLimit `mapstructure:"total_rate_limit" yaml:"total_rate_limit"`
-	PerPeerRateLimit clientutil.RateLimit `mapstructure:"per_peer_rate_limit" yaml:"per_peer_rate_limit"`
-	DownloadGRPC     ListenOption         `mapstructure:"download_grpc" yaml:"download_grpc"`
-	PeerGRPC         ListenOption         `mapstructure:"peer_grpc" yaml:"peer_grpc"`
-	CalculateDigest  bool                 `mapstructure:"calculate_digest" yaml:"calculate_digest"`
+	TotalRateLimit   clientutil.RateLimit `mapstructure:"totalRateLimit" yaml:"totalRateLimit"`
+	PerPeerRateLimit clientutil.RateLimit `mapstructure:"perPeerRateLimit" yaml:"perPeerRateLimit"`
+	DownloadGRPC     ListenOption         `mapstructure:"downloadGRPC" yaml:"downloadGRPC"`
+	PeerGRPC         ListenOption         `mapstructure:"peerGRPC" yaml:"peerGRPC"`
+	CalculateDigest  bool                 `mapstructure:"calculateDigest" yaml:"calculateDigest"`
 }
 
 type ProxyOption struct {
 	// WARNING: when add more option, please update ProxyOption.unmarshal function
 	ListenOption   `mapstructure:",squash" yaml:",inline"`
-	BasicAuth      *BasicAuth      `mapstructure:"basic_auth" yaml:"basic_auth"`
-	DefaultFilter  string          `mapstructure:"default_filter" yaml:"default_filter"`
-	MaxConcurrency int64           `mapstructure:"max_concurrency" yaml:"max_concurrency"`
-	RegistryMirror *RegistryMirror `mapstructure:"registry_mirror" yaml:"registry_mirror"`
-	WhiteList      []*WhiteList    `mapstructure:"white_list" yaml:"white_list"`
+	BasicAuth      *BasicAuth      `mapstructure:"basicAuth" yaml:"basicAuth"`
+	DefaultFilter  string          `mapstructure:"defaultFilter" yaml:"defaultFilter"`
+	MaxConcurrency int64           `mapstructure:"maxConcurrency" yaml:"maxConcurrency"`
+	RegistryMirror *RegistryMirror `mapstructure:"registryMirror" yaml:"registryMirror"`
+	WhiteList      []*WhiteList    `mapstructure:"whiteList" yaml:"whiteList"`
 	Proxies        []*Proxy        `mapstructure:"proxies" yaml:"proxies"`
-	HijackHTTPS    *HijackConfig   `mapstructure:"hijack_https" yaml:"hijack_https"`
+	HijackHTTPS    *HijackConfig   `mapstructure:"hijackHTTPS" yaml:"hijackHTTPS"`
 }
 
 func (p *ProxyOption) UnmarshalJSON(b []byte) error {
@@ -231,14 +231,14 @@ func (p *ProxyOption) UnmarshalYAML(node *yaml.Node) error {
 
 func (p *ProxyOption) unmarshal(unmarshal func(in []byte, out interface{}) (err error), b []byte) error {
 	pt := struct {
-		ListenOption   `yaml:",inline"`
-		DefaultFilter  string          `json:"default_filter" yaml:"default_filter"`
-		MaxConcurrency int64           `json:"max_concurrency" yaml:"max_concurrency"`
-		RegistryMirror *RegistryMirror `json:"registry_mirror" yaml:"registry_mirror"`
-		Proxies        []*Proxy        `json:"proxies" yaml:"proxies"`
-		HijackHTTPS    *HijackConfig   `json:"hijack_https" yaml:"hijack_https"`
-		WhiteList      []*WhiteList    `json:"white_list" yaml:"white_list"`
-		BasicAuth      *BasicAuth      `json:"basic_auth" yaml:"basic_auth"`
+		ListenOption   `mapstructure:",squash" yaml:",inline"`
+		BasicAuth      *BasicAuth      `mapstructure:"basicAuth" yaml:"basicAuth"`
+		DefaultFilter  string          `mapstructure:"defaultFilter" yaml:"defaultFilter"`
+		MaxConcurrency int64           `mapstructure:"maxConcurrency" yaml:"maxConcurrency"`
+		RegistryMirror *RegistryMirror `mapstructure:"registryMirror" yaml:"registryMirror"`
+		WhiteList      []*WhiteList    `mapstructure:"whiteList" yaml:"whiteList"`
+		Proxies        []*Proxy        `mapstructure:"proxies" yaml:"proxies"`
+		HijackHTTPS    *HijackConfig   `mapstructure:"hijackHTTPS" yaml:"hijackHTTPS"`
 	}{}
 
 	if err := unmarshal(b, &pt); err != nil {
@@ -259,13 +259,13 @@ func (p *ProxyOption) unmarshal(unmarshal func(in []byte, out interface{}) (err
 
 type UploadOption struct {
 	ListenOption `yaml:",inline" mapstructure:",squash"`
-	RateLimit    clientutil.RateLimit `mapstructure:"rate_limit" yaml:"rate_limit"`
+	RateLimit    clientutil.RateLimit `mapstructure:"rateLimit" yaml:"rateLimit"`
 }
 
 type ListenOption struct {
 	Security   SecurityOption    `mapstructure:"security" yaml:"security"`
-	TCPListen  *TCPListenOption  `mapstructure:"tcp_listen,omitempty" yaml:"tcp_listen,omitempty"`
-	UnixListen *UnixListenOption `mapstructure:"unix_listen,omitempty" yaml:"unix_listen,omitempty"`
+	TCPListen  *TCPListenOption  `mapstructure:"tcpListen,omitempty" yaml:"tcpListen,omitempty"`
+	UnixListen *UnixListenOption `mapstructure:"unixListen,omitempty" yaml:"unixListen,omitempty"`
 }
 
 type TCPListenOption struct {
@@ -372,20 +372,20 @@ type UnixListenOption struct {
 type SecurityOption struct {
 	// Insecure indicate enable tls or not
 	Insecure  bool        `mapstructure:"insecure" yaml:"insecure"`
-	CACert    string      `mapstructure:"ca_cert" yaml:"ca_cert"`
+	CACert    string      `mapstructure:"caCert" yaml:"caCert"`
 	Cert      string      `mapstructure:"cert" yaml:"cert"`
 	Key       string      `mapstructure:"key" yaml:"key"`
-	TLSConfig *tls.Config `mapstructure:"tls_config" yaml:"tls_config"`
+	TLSConfig *tls.Config `mapstructure:"tlsConfig" yaml:"tlsConfig"`
 }
 
 type StorageOption struct {
 	// DataPath indicates directory which stores temporary files for p2p uploading
-	DataPath string `mapstructure:"data_path" yaml:"data_path"`
+	DataPath string `mapstructure:"dataPath" yaml:"dataPath"`
 	// TaskExpireTime indicates caching duration for which cached file keeps no accessed by any process,
 	// after this period cache file will be gc
-	TaskExpireTime clientutil.Duration `mapstructure:"task_expire_time" yaml:"task_expire_time"`
+	TaskExpireTime clientutil.Duration `mapstructure:"taskExpireTime" yaml:"taskExpireTime"`
 	// DiskGCThreshold indicates the threshold to gc the oldest tasks
-	DiskGCThreshold unit.Bytes `mapstructure:"disk_gc_threshold" yaml:"disk_gc_threshold"`
+	DiskGCThreshold unit.Bytes `mapstructure:"diskGCThreshold" yaml:"diskGCThreshold"`
 	// Multiplex indicates reusing underlying storage for same task id
 	Multiplex     bool          `mapstructure:"multiplex" yaml:"multiplex"`
 	StoreStrategy StoreStrategy `mapstructure:"strategy" yaml:"strategy"`
@@ -434,7 +434,7 @@ func (f *FileString) UnmarshalYAML(node *yaml.Node) error {
 type tlsConfigFiles struct {
 	Cert   string     `json:"cert"`
 	Key    string     `json:"key"`
-	CACert FileString `json:"ca_cert"`
+	CACert FileString `json:"caCert"`
 }
 
 type TLSConfig struct {
@@ -595,7 +595,7 @@ func certPoolFromFiles(files ...string) (*x509.CertPool, error) {
 // Proxy describes a regular expression matching rule for how to proxy a request.
 type Proxy struct {
 	Regx     *Regexp `yaml:"regx" mapstructure:"regx"`
-	UseHTTPS bool    `yaml:"use_https" mapstructure:"use_https"`
+	UseHTTPS bool    `yaml:"useHTTPS" mapstructure:"useHTTPS"`
 	Direct   bool    `yaml:"direct" mapstructure:"direct"`
 
 	// Redirect is the host to redirect to, if not empty
diff --git a/cmd/dependency/dependency.go b/cmd/dependency/dependency.go
index 9c4858df..6d3edfff 100644
--- a/cmd/dependency/dependency.go
+++ b/cmd/dependency/dependency.go
@@ -195,7 +195,7 @@ func initDecoderConfig(dc *mapstructure.DecoderConfig) {
 			reflect.TypeOf(dfnet.NetAddr{}),
 			reflect.TypeOf(clientutil.RateLimit{}),
 			reflect.TypeOf(clientutil.Duration{}),
-			reflect.TypeOf(config.ProxyOption{}),
+			reflect.TypeOf(&config.ProxyOption{}),
 			reflect.TypeOf(config.TCPListenPortRange{}),
 			reflect.TypeOf(config.FileString("")),
 			reflect.TypeOf(config.URL{}),
diff --git a/deploy/charts/dragonfly/templates/dfdaemon/dfdaemon-configmap.yaml b/deploy/charts/dragonfly/templates/dfdaemon/dfdaemon-configmap.yaml
index 5ffbcb08..c8ccf905 100644
--- a/deploy/charts/dragonfly/templates/dfdaemon/dfdaemon-configmap.yaml
+++ b/deploy/charts/dragonfly/templates/dfdaemon/dfdaemon-configmap.yaml
@@ -10,18 +10,18 @@ metadata:
     heritage: "{{ .Release.Service }}"
 data:
   dfget.yaml: |-
-    alive_time: {{ .Values.dfdaemon.config.alive_time }}
-    gc_interval: {{ .Values.dfdaemon.config.gc_interval }}
-    keep_storage: {{ .Values.dfdaemon.config.keep_storage }}
+    aliveTime: {{ .Values.dfdaemon.config.aliveTime }}
+    gcInterval: {{ .Values.dfdaemon.config.gcInterval }}
+    keepStorage: {{ .Values.dfdaemon.config.keepStorage }}
     verbose: {{ .Values.dfdaemon.config.verbose }}
     scheduler:
-      net_addrs:
+      netAddrs:
       {{- $count := .Values.scheduler.replicas | int}}
       {{- range $i, $x := until $count }}
       - type: tcp
         addr: {{template "dragonfly.scheduler.fullname" $ }}-{{$i}}.{{ $.Release.Namespace }}.svc{{ $.Values.installation.clusterDomain }}:{{ $.Values.scheduler.service.port }}
       {{- end }}
-      schedule_timeout: 5m
+      scheduleTimeout: 5m
     host:
 {{ toYaml .Values.dfdaemon.config.host | indent 6 }}
     download:
@@ -31,16 +31,16 @@ data:
     storage:
 {{ toYaml .Values.dfdaemon.config.storage | indent 6 }}
     proxy:
-      tcp_listen:
+      tcpListen:
     {{- if not .Values.dfdaemon.hostNetwork }}
         namespace: /host/ns/net
     {{- end }}
-        listen: {{ .Values.dfdaemon.config.proxy.tcp_listen.listen }}
-        port: {{ .Values.dfdaemon.config.proxy.tcp_listen.port }}
+        listen: {{ .Values.dfdaemon.config.proxy.tcpListen.listen }}
+        port: {{ .Values.dfdaemon.config.proxy.tcpListen.port }}
       security:
 {{ toYaml .Values.dfdaemon.config.proxy.security | indent 8 }}
-      registry_mirror:
-{{ toYaml .Values.dfdaemon.config.proxy.registry_mirror | indent 8 }}
+      registryMirror:
+{{ toYaml .Values.dfdaemon.config.proxy.registryMirror | indent 8 }}
       proxies:
 {{ toYaml .Values.dfdaemon.config.proxy.proxies | indent 8 }}
 
diff --git a/deploy/charts/dragonfly/values.yaml b/deploy/charts/dragonfly/values.yaml
index d3a02b3c..ea40b746 100644
--- a/deploy/charts/dragonfly/values.yaml
+++ b/deploy/charts/dragonfly/values.yaml
@@ -129,45 +129,45 @@ dfdaemon:
   containerPort: 65001
   hostNetwork: false
   config:
-    alive_time: 0s
-    gc_interval: 1m0s
-    keep_storage: false
+    aliveTime: 0s
+    gcInterval: 1m0s
+    keepStorage: false
     verbose: true
     host:
-      listen_ip: 0.0.0.0
-      advertise_ip: 0.0.0.0
+      listenIP: 0.0.0.0
+      advertiseIP: 0.0.0.0
     download:
-      rate_limit: 200Mi
-      download_grpc:
+      rateLimit: 200Mi
+      downloadGRPC:
         security:
           insecure: true
-        unix_listen:
+        unixListen:
           socket: /tmp/dfdamon.sock
-      peer_grpc:
+      peerGRPC:
         security:
           insecure: true
-        tcp_listen:
+        tcpListen:
           listen: 0.0.0.0
           port: 65000
     upload:
-      rate_limit: 100Mi
+      rateLimit: 100Mi
       security:
         insecure: true
-      tcp_listen:
+      tcpListen:
         listen: 0.0.0.0
         port: 65002
     storage:
-      task_expire_time: 3m0s
+      taskExpireTime: 3m0s
       strategy: io.d7y.storage.v2.simple
       multiplex: true
     proxy:
       security:
         insecure: true
-      tcp_listen:
+      tcpListen:
         namespace: /host/ns/net
         listen: 0.0.0.0
         port: 65001
-      registry_mirror:
+      registryMirror:
         url: https://index.docker.io
       proxies:
       - regx: blobs/sha256.*
diff --git a/deploy/kustomize/single-cluster-native/bases/cdn/statefulset.yaml b/deploy/kustomize/single-cluster-native/bases/cdn/statefulset.yaml
index 7ace5802..f77d4e69 100644
--- a/deploy/kustomize/single-cluster-native/bases/cdn/statefulset.yaml
+++ b/deploy/kustomize/single-cluster-native/bases/cdn/statefulset.yaml
@@ -10,7 +10,7 @@ spec:
     matchLabels:
       app: dragonfly
       component: cdn
-  replicas: 1
+  replicas: 3
   serviceName: cdn
   template:
     metadata:
diff --git a/deploy/kustomize/single-cluster-native/bases/dfdaemon/daemonset.yaml b/deploy/kustomize/single-cluster-native/bases/dfdaemon/daemonset.yaml
index 424a16e7..8834e225 100644
--- a/deploy/kustomize/single-cluster-native/bases/dfdaemon/daemonset.yaml
+++ b/deploy/kustomize/single-cluster-native/bases/dfdaemon/daemonset.yaml
@@ -28,7 +28,7 @@ spec:
         volumeMounts:
         - name: config
           mountPath: /etc/dragonfly
-        - name: netns # the mountPath is setting in proxy.tcp_listen.namespace
+        - name: netns # the mountPath is setting in proxy.tcpListen.namespace
           mountPath: /host/ns/net
         ports: # 65001 is in host network, no need here
         - containerPort: 65000
diff --git a/deploy/kustomize/single-cluster-native/bases/dfdaemon/dfget.yaml b/deploy/kustomize/single-cluster-native/bases/dfdaemon/dfget.yaml
index 5f9c3002..cafad232 100644
--- a/deploy/kustomize/single-cluster-native/bases/dfdaemon/dfget.yaml
+++ b/deploy/kustomize/single-cluster-native/bases/dfdaemon/dfget.yaml
@@ -1,12 +1,12 @@
 # daemon alive time, when sets 0s, daemon will not auto exit
-alive_time: 0s
+aliveTime: 0s
 
 # daemon gc task running interval
-gc_interval: 1m0s
+gcInterval: 1m0s
 
 # when daemon exit, keep peer task data or not
 # it is usefully when upgrade daemon service, all local cache will be saved
-keep_storage: true
+keepStorage: true
 
 # all addresses of all schedulers
 # the schedulers of all daemons should be same in one region or zone.
@@ -14,7 +14,7 @@ keep_storage: true
 # caution: only tcp is supported
 scheduler:
   # below example is a stand address
-  net_addrs:
+  netAddrs:
   - type: tcp
     addr: scheduler-0.dragonfly.svc:8002
   - type: tcp
@@ -22,7 +22,7 @@ scheduler:
   - type: tcp
     addr: scheduler-2.dragonfly.svc:8002
   # schedule timeout
-  schedule_timeout: 10s
+  scheduleTimeout: 10s
 
 # when enable, pprof will be enabled,
 verbose: true
@@ -32,43 +32,43 @@ console: false
 host:
   # tcp service listen address
   # port should be set by other options
-  listen_ip: 0.0.0.0
+  listenIP: 0.0.0.0
   # access ip for other peers
-  # when local ip is different with access ip, advertise_ip should be set
-  advertise_ip: 0.0.0.0
+  # when local ip is different with access ip, advertiseIP should be set
+  advertiseIP: 0.0.0.0
   # geographical location and network topology
   location: ""
   idc: ""
-  security_domain: ""
-  net_topology: ""
+  securityDomain: ""
+  netTopology: ""
 
 # download service option
 download:
   # download limit  per second
-  total_rate_limit: 1024Mi
-  per_peer_rate_limit: 1024Mi
+  totalRateLimit: 1024Mi
+  perPeerRateLimit: 1024Mi
   # download grpc option
-  download_grpc:
+  downloadGRPC:
     # security option
     security:
       insecure: true
       cacert: ""
       cert: ""
       key: ""
-      tls_config: null
+      tlsConfig: null
     # download service listen address
     # current, only support unix domain socket
-    unix_listen:
+    unixListen:
       socket: /var/run/dfdaemon.sock
   # peer grpc option
   # peer grpc service send pieces info to other peers
-  peer_grpc:
+  peerGRPC:
     security:
       insecure: true
       cacert: ""
       cert: ""
       key: ""
-    tcp_listen:
+    tcpListen:
       # listen address
       listen: 0.0.0.0
       # listen port, daemon will try to listen
@@ -85,13 +85,13 @@ download:
 # upload service option
 upload:
   # upload limit per second
-  rate_limit: 200Mi
+  rateLimit: 200Mi
   security:
     insecure: true
     cacert: ""
     cert: ""
     key: ""
-  tcp_listen:
+  tcpListen:
     # listen address
     listen: 0.0.0.0
     # listen port, daemon will try to listen
@@ -106,7 +106,7 @@ upload:
 storage:
   # task data expire time
   # when there is no access to a task data, this task will be gc.
-  task_expire_time: 3m0s
+  taskExpireTime: 3m0s
   multiplex: true
 
 # proxy service option
@@ -116,7 +116,7 @@ proxy:
     cacert: ""
     cert: ""
     key: ""
-  tcp_listen:
+  tcpListen:
     # Namespace stands the linux net namespace, like /proc/1/ns/net
     # It's useful for running daemon in pod with ip allocated and listen in host
     # Linux only
@@ -130,7 +130,7 @@ proxy:
   #   port:
   #     start: 65020
   #     end: 65029
-  registry_mirror:
+  registryMirror:
     # url for the registry mirror
     url: https://index.docker.io
     # whether to ignore https certificate errors
diff --git a/deploy/kustomize/single-cluster-native/bases/kustomization.yaml b/deploy/kustomize/single-cluster-native/bases/kustomization.yaml
index 0ef5712f..0769ebd2 100644
--- a/deploy/kustomize/single-cluster-native/bases/kustomization.yaml
+++ b/deploy/kustomize/single-cluster-native/bases/kustomization.yaml
@@ -1,4 +1,4 @@
-namespace: dragonfly
+namespace: dragonfly-system
 resources:
 - namespace.yaml
 - cdn/rabc.yaml
@@ -27,10 +27,10 @@ configMapGenerator:
   - cdn/cdn.yaml
 images:
 - name: dragonflyoss/cdn
-  newTag: latest
+  newTag: v0.1.0-beta
 - name: dragonflyoss/dfget
-  newTag: latest
+  newTag: v0.1.0-beta
 - name: dragonflyoss/scheduler
-  newTag: latest
+  newTag: v0.1.0-beta
 - name: bitnami/kubectl
-  newTag: latest
\ No newline at end of file
+  newTag: 1.20
\ No newline at end of file
diff --git a/deploy/kustomize/single-cluster-native/bases/namespace.yaml b/deploy/kustomize/single-cluster-native/bases/namespace.yaml
index 5763fa04..3023653f 100644
--- a/deploy/kustomize/single-cluster-native/bases/namespace.yaml
+++ b/deploy/kustomize/single-cluster-native/bases/namespace.yaml
@@ -1,4 +1,4 @@
 apiVersion: v1
 kind: Namespace
 metadata:
-  name: dragonfly
\ No newline at end of file
+  name: dragonfly-system
\ No newline at end of file
diff --git a/deploy/kustomize/single-cluster-native/overlays/sample/kustomization.yaml b/deploy/kustomize/single-cluster-native/overlays/sample/kustomization.yaml
index 0fa40282..8aa615e3 100644
--- a/deploy/kustomize/single-cluster-native/overlays/sample/kustomization.yaml
+++ b/deploy/kustomize/single-cluster-native/overlays/sample/kustomization.yaml
@@ -1,12 +1,10 @@
+namespace: dragonfly-system
 resources:
 - ../../bases
 images:
 - name: dragonflyoss/cdn
-  newName: sample.com/d7y/cdn
-  newTag: latest
+  newTag: v0.1.0-beta
 - name: dragonflyoss/dfget
-  newName: sample.com/d7y/dfget
-  newTag: latest
+  newTag: v0.1.0-beta
 - name: dragonflyoss/scheduler
-  newName: sample.com/d7y/scheduler
-  newTag: latest
+  newTag: v0.1.0-beta
diff --git a/deploy/kustomize/single-cluster-openkruise/bases/dfdaemon/daemonset.yaml b/deploy/kustomize/single-cluster-openkruise/bases/dfdaemon/daemonset.yaml
index e9fb1de5..7e379664 100644
--- a/deploy/kustomize/single-cluster-openkruise/bases/dfdaemon/daemonset.yaml
+++ b/deploy/kustomize/single-cluster-openkruise/bases/dfdaemon/daemonset.yaml
@@ -30,7 +30,7 @@ spec:
         volumeMounts:
         - name: config
           mountPath: /etc/dragonfly
-        - name: netns # the mountPath is setting in proxy.tcp_listen.namespace
+        - name: netns # the mountPath is setting in proxy.tcpListen.namespace
           mountPath: /host/ns/net
         ports: # 65001 is in host network, no need here
         - containerPort: 65000
diff --git a/deploy/kustomize/single-cluster-openkruise/bases/dfdaemon/dfget.yaml b/deploy/kustomize/single-cluster-openkruise/bases/dfdaemon/dfget.yaml
index 5f9c3002..cafad232 100644
--- a/deploy/kustomize/single-cluster-openkruise/bases/dfdaemon/dfget.yaml
+++ b/deploy/kustomize/single-cluster-openkruise/bases/dfdaemon/dfget.yaml
@@ -1,12 +1,12 @@
 # daemon alive time, when sets 0s, daemon will not auto exit
-alive_time: 0s
+aliveTime: 0s
 
 # daemon gc task running interval
-gc_interval: 1m0s
+gcInterval: 1m0s
 
 # when daemon exit, keep peer task data or not
 # it is usefully when upgrade daemon service, all local cache will be saved
-keep_storage: true
+keepStorage: true
 
 # all addresses of all schedulers
 # the schedulers of all daemons should be same in one region or zone.
@@ -14,7 +14,7 @@ keep_storage: true
 # caution: only tcp is supported
 scheduler:
   # below example is a stand address
-  net_addrs:
+  netAddrs:
   - type: tcp
     addr: scheduler-0.dragonfly.svc:8002
   - type: tcp
@@ -22,7 +22,7 @@ scheduler:
   - type: tcp
     addr: scheduler-2.dragonfly.svc:8002
   # schedule timeout
-  schedule_timeout: 10s
+  scheduleTimeout: 10s
 
 # when enable, pprof will be enabled,
 verbose: true
@@ -32,43 +32,43 @@ console: false
 host:
   # tcp service listen address
   # port should be set by other options
-  listen_ip: 0.0.0.0
+  listenIP: 0.0.0.0
   # access ip for other peers
-  # when local ip is different with access ip, advertise_ip should be set
-  advertise_ip: 0.0.0.0
+  # when local ip is different with access ip, advertiseIP should be set
+  advertiseIP: 0.0.0.0
   # geographical location and network topology
   location: ""
   idc: ""
-  security_domain: ""
-  net_topology: ""
+  securityDomain: ""
+  netTopology: ""
 
 # download service option
 download:
   # download limit  per second
-  total_rate_limit: 1024Mi
-  per_peer_rate_limit: 1024Mi
+  totalRateLimit: 1024Mi
+  perPeerRateLimit: 1024Mi
   # download grpc option
-  download_grpc:
+  downloadGRPC:
     # security option
     security:
       insecure: true
       cacert: ""
       cert: ""
       key: ""
-      tls_config: null
+      tlsConfig: null
     # download service listen address
     # current, only support unix domain socket
-    unix_listen:
+    unixListen:
       socket: /var/run/dfdaemon.sock
   # peer grpc option
   # peer grpc service send pieces info to other peers
-  peer_grpc:
+  peerGRPC:
     security:
       insecure: true
       cacert: ""
       cert: ""
       key: ""
-    tcp_listen:
+    tcpListen:
       # listen address
       listen: 0.0.0.0
       # listen port, daemon will try to listen
@@ -85,13 +85,13 @@ download:
 # upload service option
 upload:
   # upload limit per second
-  rate_limit: 200Mi
+  rateLimit: 200Mi
   security:
     insecure: true
     cacert: ""
     cert: ""
     key: ""
-  tcp_listen:
+  tcpListen:
     # listen address
     listen: 0.0.0.0
     # listen port, daemon will try to listen
@@ -106,7 +106,7 @@ upload:
 storage:
   # task data expire time
   # when there is no access to a task data, this task will be gc.
-  task_expire_time: 3m0s
+  taskExpireTime: 3m0s
   multiplex: true
 
 # proxy service option
@@ -116,7 +116,7 @@ proxy:
     cacert: ""
     cert: ""
     key: ""
-  tcp_listen:
+  tcpListen:
     # Namespace stands the linux net namespace, like /proc/1/ns/net
     # It's useful for running daemon in pod with ip allocated and listen in host
     # Linux only
@@ -130,7 +130,7 @@ proxy:
   #   port:
   #     start: 65020
   #     end: 65029
-  registry_mirror:
+  registryMirror:
     # url for the registry mirror
     url: https://index.docker.io
     # whether to ignore https certificate errors
diff --git a/deploy/kustomize/single-cluster-openkruise/bases/kustomization.yaml b/deploy/kustomize/single-cluster-openkruise/bases/kustomization.yaml
index 0ef5712f..09f5d83b 100644
--- a/deploy/kustomize/single-cluster-openkruise/bases/kustomization.yaml
+++ b/deploy/kustomize/single-cluster-openkruise/bases/kustomization.yaml
@@ -1,4 +1,4 @@
-namespace: dragonfly
+namespace: dragonfly-system
 resources:
 - namespace.yaml
 - cdn/rabc.yaml
@@ -27,10 +27,10 @@ configMapGenerator:
   - cdn/cdn.yaml
 images:
 - name: dragonflyoss/cdn
-  newTag: latest
+  newTag: v0.1.0-beta
 - name: dragonflyoss/dfget
-  newTag: latest
+  newTag: v0.1.0-beta
 - name: dragonflyoss/scheduler
-  newTag: latest
+  newTag: v0.1.0-beta
 - name: bitnami/kubectl
-  newTag: latest
\ No newline at end of file
+  newTag: "1.20"
\ No newline at end of file
diff --git a/deploy/kustomize/single-cluster-openkruise/bases/namespace.yaml b/deploy/kustomize/single-cluster-openkruise/bases/namespace.yaml
index 5763fa04..3023653f 100644
--- a/deploy/kustomize/single-cluster-openkruise/bases/namespace.yaml
+++ b/deploy/kustomize/single-cluster-openkruise/bases/namespace.yaml
@@ -1,4 +1,4 @@
 apiVersion: v1
 kind: Namespace
 metadata:
-  name: dragonfly
\ No newline at end of file
+  name: dragonfly-system
\ No newline at end of file
diff --git a/deploy/kustomize/single-cluster-openkruise/overlays/sample/kustomization.yaml b/deploy/kustomize/single-cluster-openkruise/overlays/sample/kustomization.yaml
index 0fa40282..8aa615e3 100644
--- a/deploy/kustomize/single-cluster-openkruise/overlays/sample/kustomization.yaml
+++ b/deploy/kustomize/single-cluster-openkruise/overlays/sample/kustomization.yaml
@@ -1,12 +1,10 @@
+namespace: dragonfly-system
 resources:
 - ../../bases
 images:
 - name: dragonflyoss/cdn
-  newName: sample.com/d7y/cdn
-  newTag: latest
+  newTag: v0.1.0-beta
 - name: dragonflyoss/dfget
-  newName: sample.com/d7y/dfget
-  newTag: latest
+  newTag: v0.1.0-beta
 - name: dragonflyoss/scheduler
-  newName: sample.com/d7y/scheduler
-  newTag: latest
+  newTag: v0.1.0-beta
diff --git a/docs/en/config/dfget.yaml b/docs/en/config/dfget.yaml
index b8134b27..39241e4c 100644
--- a/docs/en/config/dfget.yaml
+++ b/docs/en/config/dfget.yaml
@@ -1,24 +1,24 @@
 # daemon alive time, when sets 0s, daemon will not auto exit
 # it is useful for longtime running
-alive_time: 0s
+aliveTime: 0s
 
 # daemon gc task running interval
-gc_interval: 1m0s
+gcInterval: 1m0s
 
 # daemon data directory
 # in linux, default value is $HOME/.dragonfly/dfget-daemon/
 # in macos(just for testing), default value is /Users/$USER/.dragonfly/dfdaemon/
-data_dir: /var/lib/dragonfly
+dataDir: /var/lib/dragonfly
 
 # daemon work directory, daemon will change current working directory to this
 # in linux, default value is $HOME/.dragonfly/dfget-daemon/
 # in macos(just for testing), default value is /Users/$USER/.dragonfly/dfdaemon/
-work_home: /var/lib/dragonfly
+workHome: /var/lib/dragonfly
 
 # when daemon exit, keep peer task data or not
 # it is usefully when upgrade daemon service, all local cache will be saved
 # default is false
-keep_storage: true
+keepStorage: true
 
 # all addresses of all schedulers
 # the schedulers of all daemons should be same in one region or zone.
@@ -26,9 +26,9 @@ keep_storage: true
 # caution: only tcp is supported
 scheduler:
   # schedule timeout
-  schedule_timeout: 30s
+  scheduleTimeout: 30s
   # below example is a stand address
-  net_addrs:
+  netAddrs:
     - type: tcp
       addr: 127.0.0.1:8002
 
@@ -43,46 +43,46 @@ telemetry:
 host:
   # tcp service listen address
   # port should be set by other options
-  listen_ip: 0.0.0.0
+  listenIP: 0.0.0.0
   # access ip for other peers
-  # when local ip is different with access ip, advertise_ip should be set
-  advertise_ip: 0.0.0.0
+  # when local ip is different with access ip, advertiseIP should be set
+  advertiseIP: 0.0.0.0
   # geographical location and network topology
   location: ""
   idc: ""
-  security_domain: ""
-  net_topology: ""
+  securityDomain: ""
+  netTopology: ""
 
 # download service option
 download:
   # total download limit per second
-  total_rate_limit: 200Mi
+  totalRateLimit: 200Mi
   # per peer task download limit per second
-  per_peer_rate_limit: 100Mi
+  perPeerRateLimit: 100Mi
   # download grpc option
-  download_grpc:
+  downloadGRPC:
     # security option
     security:
       insecure: true
       cacert: ""
       cert: ""
       key: ""
-      tls_config: null
+      tlsConfig: null
     # download service listen address
     # current, only support unix domain socket
-    unix_listen:
+    unixListen:
       # in linux, default value is /var/run/dfdaemon.sock
       # in macos(just for testing), default value is /tmp/dfdaemon.sock
       socket: /var/run/dfdaemon.sock
   # peer grpc option
   # peer grpc service send pieces info to other peers
-  peer_grpc:
+  peerGRPC:
     security:
       insecure: true
       cacert: ""
       cert: ""
       key: ""
-    tcp_listen:
+    tcpListen:
       # listen address
       listen: 0.0.0.0
       # listen port, daemon will try to listen
@@ -96,13 +96,13 @@ download:
 # upload service option
 upload:
   # upload limit per second
-  rate_limit: 100Mi
+  rateLimit: 100Mi
   security:
     insecure: true
     cacert: ""
     cert: ""
     key: ""
-  tcp_listen:
+  tcpListen:
     # listen address
     listen: 0.0.0.0
     # listen port, daemon will try to listen
@@ -117,7 +117,7 @@ upload:
 storage:
   # task data expire time
   # when there is no access to a task data, this task will be gc.
-  task_expire_time: 3m0s
+  taskExpireTime: 3m0s
   # storage strategy when process task data
   # io.d7y.storage.v2.simple : download file to data directory first, then copy to output path, this is default action
   #                           the download file in date directory will be the peer data for uploading to other peers
@@ -128,7 +128,7 @@ storage:
   # default is io.d7y.storage.v2.advance
   strategy: io.d7y.storage.v2.advance
   # disk quota gc threshold, when the quota of all tasks exceeds the gc threshold, oldest tasks will be reclaimed.
-  disk_gc_threshold: 50Gi
+  diskGCThreshold: 50Gi
   # set to ture for reusing underlying storage for same task id
   multiplex: true
 
@@ -142,7 +142,7 @@ proxy:
     cacert: ""
     cert: ""
     key: ""
-  tcp_listen:
+  tcpListen:
     # namespace stands the linux net namespace, like /proc/1/ns/net
     # it's useful for running daemon in pod with ip allocated and listening the special port in host net namespace
     # Linux only
@@ -156,7 +156,7 @@ proxy:
   #   port:
   #     start: 65020
   #     end: 65029
-  registry_mirror:
+  registryMirror:
     # url for the registry mirror
     url: https://index.docker.io
     # whether to ignore https certificate errors
@@ -171,7 +171,7 @@ proxy:
     - regx: blobs/sha256.*
     # change http requests to some-registry to https and proxy them with dfget
     - regx: some-registry/
-      use_https: true
+      useHTTPS: true
     # proxy requests directly, without dfget
     - regx: no-proxy-reg
       direct: true
@@ -179,7 +179,7 @@ proxy:
     - regx: some-registry
       redirect: another-registry
 
-  hijack_https:
+  hijackHTTPS:
     # key pair used to hijack https requests
     cert: ""
     key: ""
@@ -190,7 +190,7 @@ proxy:
         # optional certificates if the host uses self-signed certificates
         certs: []
 
-  white_list:
+  whiteList:
     # the host of the whitelist
     - host: ""
       # match whitelist hosts
diff --git a/docs/en/user-guide/proxy/containerd.md b/docs/en/user-guide/proxy/containerd.md
index a74e2af8..987be559 100644
--- a/docs/en/user-guide/proxy/containerd.md
+++ b/docs/en/user-guide/proxy/containerd.md
@@ -63,12 +63,12 @@ To use dfget daemon as HTTP proxy, first you need to append a proxy rule in
 proxy:
   security:
     insecure: true
-  tcp_listen:
+  tcpListen:
     listen: 0.0.0.0
     port: 65001
   proxies:
     - regx: blobs/sha256.*
-  hijack_https:
+  hijackHTTPS:
     # CA certificate's path used to hijack https requests
     cert: ca.crt
     key: ca.key
@@ -108,12 +108,12 @@ ignore the certificate error with:
 proxy:
   security:
     insecure: true
-  tcp_listen:
+  tcpListen:
     listen: 0.0.0.0
     port: 65001
   proxies:
     - regx: blobs/sha256.*
-  hijack_https:
+  hijackHTTPS:
     # CA certificate's path used to hijack https requests
     cert: ca.crt
     key: ca.key
@@ -128,12 +128,12 @@ Or provide a certificate with:
 proxy:
   security:
     insecure: true
-  tcp_listen:
+  tcpListen:
     listen: 0.0.0.0
     port: 65001
   proxies:
     - regx: blobs/sha256.*
-  hijack_https:
+  hijackHTTPS:
     # CA certificate's path used to hijack https requests
     cert: ca.crt
     key: ca.key
diff --git a/docs/en/user-guide/proxy/docker.md b/docs/en/user-guide/proxy/docker.md
index 3be588d1..d1be4a08 100644
--- a/docs/en/user-guide/proxy/docker.md
+++ b/docs/en/user-guide/proxy/docker.md
@@ -60,12 +60,12 @@ To use dfget daemon as HTTP proxy, first you need to append a proxy rule in
 proxy:
   security:
     insecure: true
-  tcp_listen:
+  tcpListen:
     listen: 0.0.0.0
     port: 65001
   proxies:
     - regx: blobs/sha256.*
-  hijack_https:
+  hijackHTTPS:
     # CA certificate's path used to hijack https requests
     cert: ca.crt
     key: ca.key
@@ -116,12 +116,12 @@ ignore the certificate error with:
 proxy:
   security:
     insecure: true
-  tcp_listen:
+  tcpListen:
     listen: 0.0.0.0
     port: 65001
   proxies:
     - regx: blobs/sha256.*
-  hijack_https:
+  hijackHTTPS:
     # CA certificate's path used to hijack https requests
     cert: ca.crt
     key: ca.key
@@ -136,12 +136,12 @@ Or provide a certificate with:
 proxy:
   security:
     insecure: true
-  tcp_listen:
+  tcpListen:
     listen: 0.0.0.0
     port: 65001
   proxies:
     - regx: blobs/sha256.*
-  hijack_https:
+  hijackHTTPS:
     # CA certificate's path used to hijack https requests
     cert: ca.crt
     key: ca.key
diff --git a/docs/en/user-guide/registry-mirror/cri-containerd.md b/docs/en/user-guide/registry-mirror/cri-containerd.md
index 8f3e3ac9..fc081699 100644
--- a/docs/en/user-guide/registry-mirror/cri-containerd.md
+++ b/docs/en/user-guide/registry-mirror/cri-containerd.md
@@ -12,10 +12,10 @@ To use dfget daemon as registry mirror, first you need to ensure configuration i
 proxy:
   security:
     insecure: true
-  tcp_listen:
+  tcpListen:
     listen: 0.0.0.0
     port: 65001
-  registry_mirror:
+  registryMirror:
     url: https://index.docker.io
   proxies:
     - regx: blobs/sha256.*
diff --git a/docs/en/user-guide/registry-mirror/cri-o.md b/docs/en/user-guide/registry-mirror/cri-o.md
index d5465ff0..0fd823b9 100644
--- a/docs/en/user-guide/registry-mirror/cri-o.md
+++ b/docs/en/user-guide/registry-mirror/cri-o.md
@@ -8,10 +8,10 @@ To use dfget daemon as registry mirror, first you need to ensure configuration i
 proxy:
   security:
     insecure: true
-  tcp_listen:
+  tcpListen:
     listen: 0.0.0.0
     port: 65001
-  registry_mirror:
+  registryMirror:
     url: https://index.docker.io
   proxies:
     - regx: blobs/sha256.*
diff --git a/go.mod b/go.mod
index 5a8386c4..feb031bb 100644
--- a/go.mod
+++ b/go.mod
@@ -47,6 +47,7 @@ require (
 	go.opentelemetry.io/otel/trace v0.20.0
 	go.uber.org/atomic v1.6.0
 	go.uber.org/zap v1.16.0
+	golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2
 	golang.org/x/sync v0.0.0-20210220032951-036812b2e83c
 	golang.org/x/sys v0.0.0-20210510120138-977fb7262007
 	golang.org/x/term v0.0.0-20201210144234-2321bbc49cbf
diff --git a/hack/migrate-config.sh b/hack/migrate-config.sh
new file mode 100755
index 00000000..8e51b1f2
--- /dev/null
+++ b/hack/migrate-config.sh
@@ -0,0 +1,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/charts/dragonfly/templates/dfdaemon/dfdaemon-configmap.yaml \
+deploy/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
diff --git a/manager/config/config.go b/manager/config/config.go
index bb5a0ff4..946e0407 100644
--- a/manager/config/config.go
+++ b/manager/config/config.go
@@ -34,7 +34,7 @@ type MysqlConfig struct {
 
 type RedisConfig struct {
 	Host     string `yaml:"host" mapstructure:"host"`
-	Port     string `yaml:"port" mapstructure:"port"`
+	Port     int    `yaml:"port" mapstructure:"port"`
 	Password string `yaml:"password" mapstructure:"password"`
 	DB       int    `yaml:"db" mapstructure:"db"`
 }
diff --git a/manager/database/database.go b/manager/database/database.go
index ea8a97db..29caae2b 100644
--- a/manager/database/database.go
+++ b/manager/database/database.go
@@ -30,7 +30,7 @@ func New(cfg *config.Config) (*Database, error) {
 
 func NewRedis(cfg *config.RedisConfig) *redis.Client {
 	return redis.NewClient(&redis.Options{
-		Addr:     fmt.Sprintf("%s:%s", cfg.Host, cfg.Port),
+		Addr:     fmt.Sprintf("%s:%d", cfg.Host, cfg.Port),
 		Password: cfg.Password,
 		DB:       cfg.DB,
 	})


Test patch:
diff --git a/client/config/peerhost_test.go b/client/config/peerhost_test.go
index 62f96b7a..b22a24f7 100644
--- a/client/config/peerhost_test.go
+++ b/client/config/peerhost_test.go
@@ -17,7 +17,6 @@
 package config
 
 import (
-	"encoding/json"
 	"net/url"
 	"reflect"
 	"testing"
@@ -143,10 +142,10 @@ listen:
 		},
 		{
 			text: `
-disk_gc_threshold: 1Ki
+diskGCThreshold: 1Ki
 `,
 			target: &struct {
-				Size unit.Bytes `yaml:"disk_gc_threshold"`
+				Size unit.Bytes `yaml:"diskGCThreshold"`
 			}{
 				Size: unit.Bytes(1024),
 			},
@@ -160,73 +159,12 @@ disk_gc_threshold: 1Ki
 	}
 }
 
-func TestUnmarshalJSON(t *testing.T) {
-	bytes := []byte(`{
-		"tls": {
-			"key": "./testdata/certs/sca.key",
-			"cert": "./testdata/certs/sca.crt",
-			"ca_cert": "./testdata/certs/ca.crt"
-		},
-		"url": "https://d7y.io",
-    "certs": [
-			"./testdata/certs/ca.crt",
-			"./testdata/certs/sca.crt"
-    ],
-		"regx": "blobs/sha256.*",
-		"port1": 1001,
-		"port2": {
-			"start": 1002,
-			"end": 1003
-		},
-		"timeout": "3m",
-		"limit": "2Mib",
-		"type": "tcp",
-		"proxy1": "./testdata/config/proxy.json",
-		"proxy2": {
-			"registry_mirror": {
-				"url": "https://index.docker.io"
-			}
-		},
-		"schedulers1": {
-			"net_addrs": [ "0.0.0.0", "0.0.0.1" ],
-			"schedule_timeout": "3m"
-		},
-		"schedulers2": {
-			"net_addrs": [{
-				"type": "tcp",
-				"addr": "0.0.0.0"
-			}],
-			"schedule_timeout": "3m"
-		}
-}`)
-
-	var s = struct {
-		TLSConfig   *TLSConfig           `json:"tls"`
-		URL         *URL                 `json:"url"`
-		Certs       *CertPool            `json:"certs"`
-		Regx        *Regexp              `json:"regx"`
-		Port1       TCPListenPortRange   `json:"port1"`
-		Port2       TCPListenPortRange   `json:"port2"`
-		Timeout     clientutil.Duration  `json:"timeout"`
-		Limit       clientutil.RateLimit `json:"limit"`
-		Type        dfnet.NetworkType    `json:"type"`
-		Proxy1      ProxyOption          `json:"proxy1"`
-		Proxy2      ProxyOption          `json:"proxy2"`
-		Schedulers1 SchedulerOption      `json:"schedulers1" yaml:"schedulers1"`
-		Schedulers2 SchedulerOption      `json:"schedulers2" yaml:"schedulers2"`
-	}{}
-
-	if err := json.Unmarshal(bytes, &s); err != nil {
-		t.Fatal(err)
-	}
-}
-
 func TestUnmarshalYAML(t *testing.T) {
 	bytes := []byte(`
 tls:
   key: ./testdata/certs/sca.key
   cert: ./testdata/certs/sca.crt
-  ca_cert: ./testdata/certs/ca.crt
+  caCert: ./testdata/certs/ca.crt
 url: https://d7y.io
 certs: ["./testdata/certs/ca.crt", "./testdata/certs/sca.crt"]
 regx: blobs/sha256.*
@@ -239,18 +177,18 @@ limit: 2Mib
 type: tcp
 proxy1: ./testdata/config/proxy.yaml
 proxy2: 
-  registry_mirror:
+  registryMirror:
     url: https://index.docker.io
 schedulers1:
-  net_addrs:
+  netAddrs:
     - 0.0.0.0
     - 0.0.0.1
-  schedule_timeout: 0
+  scheduleTimeout: 0
 schedulers2:
-  net_addrs:
+  netAddrs:
     - type: tcp
       addr: 0.0.0.0
-  schedule_timeout: 0
+  scheduleTimeout: 0
 `)
 
 	var s = struct {
@@ -265,8 +203,8 @@ schedulers2:
 		Type        dfnet.NetworkType    `yaml:"type"`
 		Proxy1      ProxyOption          `yaml:"proxy1"`
 		Proxy2      ProxyOption          `yaml:"proxy2"`
-		Schedulers1 SchedulerOption      `json:"schedulers1" yaml:"schedulers1"`
-		Schedulers2 SchedulerOption      `json:"schedulers2" yaml:"schedulers2"`
+		Schedulers1 SchedulerOption      `yaml:"schedulers1"`
+		Schedulers2 SchedulerOption      `yaml:"schedulers2"`
 	}{}
 
 	if err := yaml.Unmarshal(bytes, &s); err != nil {
@@ -319,7 +257,7 @@ func TestPeerHostOption_Load(t *testing.T) {
 			DownloadGRPC: ListenOption{
 				Security: SecurityOption{
 					Insecure: true,
-					CACert:   "ca_cert",
+					CACert:   "caCert",
 					Cert:     "cert",
 					Key:      "key",
 				},
@@ -330,7 +268,7 @@ func TestPeerHostOption_Load(t *testing.T) {
 			PeerGRPC: ListenOption{
 				Security: SecurityOption{
 					Insecure: true,
-					CACert:   "ca_cert",
+					CACert:   "caCert",
 					Cert:     "cert",
 					Key:      "key",
 				},
@@ -350,7 +288,7 @@ func TestPeerHostOption_Load(t *testing.T) {
 			ListenOption: ListenOption{
 				Security: SecurityOption{
 					Insecure: true,
-					CACert:   "ca_cert",
+					CACert:   "caCert",
 					Cert:     "cert",
 					Key:      "key",
 				},
@@ -374,7 +312,7 @@ func TestPeerHostOption_Load(t *testing.T) {
 			ListenOption: ListenOption{
 				Security: SecurityOption{
 					Insecure: true,
-					CACert:   "ca_cert",
+					CACert:   "caCert",
 					Cert:     "cert",
 					Key:      "key",
 				},
@@ -423,5 +361,4 @@ func TestPeerHostOption_Load(t *testing.T) {
 	}
 
 	assert.EqualValues(peerHostOption, peerHostOptionYAML)
-
 }
diff --git a/client/config/testdata/config/daemon.json b/client/config/testdata/config/daemon.json
deleted file mode 100644
index 7c2147f2..00000000
--- a/client/config/testdata/config/daemon.json
+++ /dev/null
@@ -1,110 +0,0 @@
-{
-  "alive_time": "0s",
-  "gc_interval": "1m0s",
-  "pid_file": "/tmp/dfdaemon.pid",
-  "lock_file": "/tmp/dfdaemon.lock",
-  "data_dir": "/tmp/dragonfly/dfdaemon/",
-  "work_home": "/tmp/dragonfly/dfdaemon/",
-  "keep_storage": false,
-  "scheduler": {
-    "net_addrs": [
-      {
-        "type": "tcp",
-        "addr": "127.0.0.1:8002"
-      }
-    ],
-    "schedule_timeout": 0
-  },
-  "verbose": true,
-  "host": {
-    "listen_ip": "0.0.0.0",
-    "advertise_ip": "0.0.0.0",
-    "location": "0.0.0.0",
-    "idc": "d7y",
-    "security_domain": "d7y.io",
-    "net_topology": "d7y"
-  },
-  "download": {
-    "total_rate_limit": "200Mi",
-    "per_peer_rate_limit": "20Mi",
-    "download_grpc": {
-      "security": {
-        "insecure": true,
-        "ca_cert": "ca_cert",
-        "cert": "cert",
-        "key": "key",
-        "tls_config": null
-      },
-      "unix_listen": {
-        "socket": "/tmp/dfdaemon.sock"
-      }
-    },
-    "peer_grpc": {
-      "security": {
-        "insecure": true,
-        "ca_cert": "ca_cert",
-        "cert": "cert",
-        "key": "key",
-        "tls_config": null
-      },
-      "tcp_listen": {
-        "listen": "0.0.0.0",
-        "port": 65000
-      }
-    }
-  },
-  "upload": {
-    "rate_limit": "100Mi",
-    "security": {
-      "insecure": true,
-      "ca_cert": "ca_cert",
-      "cert": "cert",
-      "key": "key"
-    },
-    "tcp_listen": {
-      "listen": "0.0.0.0",
-      "port": 65002
-    }
-  },
-  "storage": {
-    "data_path": "/tmp/storage/data",
-    "task_expire_time": "3m0s",
-    "strategy": "io.d7y.storage.v2.simple"
-  },
-  "proxy": {
-    "security": {
-      "insecure": true,
-      "ca_cert": "ca_cert",
-      "cert": "cert",
-      "key": "key",
-      "tls_config": null
-    },
-    "tcp_listen": {
-      "listen": "0.0.0.0",
-      "port": 65001
-    },
-    "registry_mirror": {
-      "url": "https://index.docker.io",
-      "insecure": true,
-      "direct": false
-    },
-    "proxies": [
-      {
-        "regx": "blobs/sha256.*",
-        "use_https": false,
-        "direct": false,
-        "redirect": "d7y.io"
-      }
-    ],
-    "hijack_https": {
-      "cert": "cert",
-      "key": "key",
-      "hosts": [
-        {
-          "regx": "mirror.aliyuncs.com:443",
-          "insecure": true
-        }
-      ]
-    }
-  }
-}
diff --git a/client/config/testdata/config/daemon.yaml b/client/config/testdata/config/daemon.yaml
index 08eea513..6194f7ff 100644
--- a/client/config/testdata/config/daemon.yaml
+++ b/client/config/testdata/config/daemon.yaml
@@ -1,83 +1,81 @@
-alive_time: 0s
-gc_interval: 1m0s
-pid_file: /tmp/dfdaemon.pid
-lock_file: /tmp/dfdaemon.lock
-data_dir: /tmp/dragonfly/dfdaemon/
-work_home: /tmp/dragonfly/dfdaemon/
-keep_storage: false
+aliveTime: 0s
+gcInterval: 1m0s
+dataDir: /tmp/dragonfly/dfdaemon/
+workHome: /tmp/dragonfly/dfdaemon/
+keepStorage: false
 scheduler:
-  net_addrs:
+  netAddrs:
     - type: tcp
       addr: 127.0.0.1:8002
-  schedule_timeout: 0
+  scheduleTimeout: 0
 
 host:
-  listen_ip: 0.0.0.0
-  advertise_ip: 0.0.0.0
+  listenIP: 0.0.0.0
+  advertiseIP: 0.0.0.0
   location: 0.0.0.0
   idc: d7y
-  security_domain: d7y.io
-  net_topology: d7y
+  securityDomain: d7y.io
+  netTopology: d7y
 
 download:
-  total_rate_limit: 200Mi
-  per_peer_rate_limit: 20Mi
-  download_grpc:
+  totalRateLimit: 200Mi
+  perPeerRateLimit: 20Mi
+  downloadGRPC:
     security:
       insecure: true
-      ca_cert: ca_cert
+      caCert: caCert
       cert: cert
       key: key
-      tls_config: null
-    unix_listen:
+      tlsConfig: null
+    unixListen:
       socket: /tmp/dfdaemon.sock
-  peer_grpc:
+  peerGRPC:
     security:
       insecure: true
-      ca_cert: ca_cert
+      caCert: caCert
       cert: cert
       key: key
-      tls_config: null
-    tcp_listen:
+      tlsConfig: null
+    tcpListen:
       listen: 0.0.0.0
       port: 65000
 
 upload:
-  rate_limit: 100Mi
+  rateLimit: 100Mi
   security:
     insecure: true
-    ca_cert: ca_cert
+    caCert: caCert
     cert: cert
     key: key
-  tcp_listen:
+  tcpListen:
     listen: 0.0.0.0
     port: 65002
 
 storage:
-  data_path: /tmp/storage/data
-  task_expire_time: 3m0s
+  dataPath: /tmp/storage/data
+  taskExpireTime: 3m0s
   strategy: io.d7y.storage.v2.simple
 
 proxy:
   security:
     insecure: true
-    ca_cert: ca_cert
+    caCert: caCert
     cert: cert
     key: key
-    tls_config: null
-  tcp_listen:
+    tlsConfig: null
+  tcpListen:
     listen: 0.0.0.0
     port: 65001
-  registry_mirror:
+  registryMirror:
     url: https://index.docker.io
     insecure: true
     direct: false
   proxies:
     - regx: blobs/sha256.*
-      use_https: false
+      useHTTPS: false
       direct: false
       redirect: d7y.io
-  hijack_https:
+  hijackHTTPS:
     cert: cert
     key: key
     hosts:
diff --git a/client/config/testdata/config/proxy.json b/client/config/testdata/config/proxy.json
deleted file mode 100644
index 0e92c0ac..00000000
--- a/client/config/testdata/config/proxy.json
+++ /dev/null
@@ -1,115 +0,0 @@
-{
-  "alive_time": "0s",
-  "gc_interval": "1m0s",
-  "pid_file": "/tmp/dfdaemon.pid",
-  "lock_file": "/tmp/dfdaemon.lock",
-  "data_dir": "/tmp/dragonfly/dfdaemon/",
-  "work_home": "/tmp/dragonfly/dfdaemon/",
-  "keep_storage": false,
-  "scheduler": {
-    "net_addrs": [
-      {
-        "type": "tcp",
-        "addr": "127.0.0.1:8002"
-      }
-    ],
-    "schedule_timeout": 0
-  },
-  "verbose": true,
-  "host": {
-    "listen_ip": "0.0.0.0",
-    "advertise_ip": "0.0.0.0",
-    "location": "0.0.0.0",
-    "idc": "d7y",
-    "security_domain": "d7y.io",
-    "net_topology": "d7y"
-  },
-  "download": {
-    "rate_limit": "200Mi",
-    "download_grpc": {
-      "security": {
-        "insecure": true,
-        "ca_cert": "ca_cert",
-        "cert": "cert",
-        "key": "key",
-        "tls_config": null
-      },
-      "unix_listen": {
-        "socket": "/tmp/dfdaemon.sock"
-      }
-    },
-    "peer_grpc": {
-      "security": {
-        "insecure": true,
-        "ca_cert": "ca_cert",
-        "cert": "cert",
-        "key": "key",
-        "tls_config": null
-      },
-      "tcp_listen": {
-        "listen": "0.0.0.0",
-        "port": 65000
-      }
-    }
-  },
-  "upload": {
-    "rate_limit": "100Mi",
-    "security": {
-      "insecure": true,
-      "ca_cert": "ca_cert",
-      "cert": "cert",
-      "key": "key"
-    },
-    "tcp_listen": {
-      "listen": "0.0.0.0",
-      "port": 65002
-    }
-  },
-  "storage": {
-    "data_path": "/tmp/storage/data",
-    "task_expire_time": "3m0s",
-    "strategy": "io.d7y.storage.v2.simple"
-  },
-  "proxy": {
-    "security": {
-      "insecure": true,
-      "ca_cert": "ca_cert",
-      "cert": "cert",
-      "key": "key",
-      "tls_config": null
-    },
-    "tcp_listen": {
-      "listen": "0.0.0.0",
-      "port": 65001
-    },
-    "registry_mirror": {
-      "url": "https://index.docker.io",
-      "insecure": true,
-      "certs": [
-        "./testdata/certs/sca.crt"
-      ],
-      "direct": false
-    },
-    "proxies": [
-      {
-        "regx": "blobs/sha256.*",
-        "use_https": false,
-        "direct": false,
-        "redirect": "d7y.io"
-      }
-    ],
-    "hijack_https": {
-      "cert": "cert",
-      "key": "key",
-      "hosts": [
-        {
-          "regx": "mirror.aliyuncs.com:443",
-          "insecure": true,
-          "certs": [
-            "./testdata/certs/sca.crt"
-          ]
-        }
-      ]
-    }
-  }
-}
diff --git a/client/config/testdata/config/proxy.yaml b/client/config/testdata/config/proxy.yaml
index 51cec0d5..acb23702 100644
--- a/client/config/testdata/config/proxy.yaml
+++ b/client/config/testdata/config/proxy.yaml
@@ -1,4 +1,4 @@
-registry_mirror:
+registryMirror:
   # url for the registry mirror
   url: https://index.docker.io
   # whether to ignore https certificate errors
@@ -13,7 +13,7 @@ proxies:
   - regx: blobs/sha256.*
   # change http requests to some-registry to https and proxy them with dfget
   - regx: some-registry/
-    use_https: true
+    useHTTPS: true
   # proxy requests directly, without dfget
   - regx: no-proxy-reg
     direct: true
@@ -21,7 +21,7 @@ proxies:
   - regx: some-registry
     redirect: another-registry
 
-hijack_https:
+hijackHTTPS:
   # key pair used to hijack https requests
   cert: ./testdata/certs/sca.crt
   key: ./testdata/certs/sca.key
diff --git a/manager/config/config_test.go b/manager/config/config_test.go
new file mode 100644
index 00000000..0e7754d0
--- /dev/null
+++ b/manager/config/config_test.go
@@ -0,0 +1,76 @@
+/*
+ *     Copyright 2020 The Dragonfly Authors
+ *
+ * Licensed 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.
+ */
+
+package config
+
+import (
+	"io/ioutil"
+	"testing"
+
+	"github.com/mitchellh/mapstructure"
+	testifyassert "github.com/stretchr/testify/assert"
+	"gopkg.in/yaml.v3"
+)
+
+func TestManagerConfig_Load(t *testing.T) {
+	assert := testifyassert.New(t)
+
+	config := &Config{
+		Server: &ServerConfig{
+			GRPC: &TCPListenConfig{
+				Listen: "127.0.0.1",
+				PortRange: TCPListenPortRange{
+					Start: 65003,
+					End:   65003,
+				},
+			},
+			REST: &RestConfig{
+				Addr: ":8080",
+			},
+		},
+		Database: &DatabaseConfig{
+			Mysql: &MysqlConfig{
+				User:     "foo",
+				Password: "foo",
+				Host:     "foo",
+				Port:     3306,
+				DBName:   "foo",
+			},
+			Redis: &RedisConfig{
+				Host:     "bar",
+				Password: "bar",
+				Port:     6379,
+				DB:       0,
+			},
+		},
+		Cache: &CacheConfig{
+			Redis: &RedisCacheConfig{
+				TTL: 1000,
+			},
+			Local: &LocalCacheConfig{
+				Size: 10000,
+				TTL:  1000,
+			},
+		},
+	}
+
+	managerConfigYAML := &Config{}
+	contentYAML, _ := ioutil.ReadFile("./testdata/manager.yaml")
+	var dataYAML map[string]interface{}
+	yaml.Unmarshal(contentYAML, &dataYAML)
+	mapstructure.Decode(dataYAML, &managerConfigYAML)
+	assert.EqualValues(config, managerConfigYAML)
+}
diff --git a/manager/config/testdata/manager.yaml b/manager/config/testdata/manager.yaml
new file mode 100644
index 00000000..69aa1efe
--- /dev/null
+++ b/manager/config/testdata/manager.yaml
@@ -0,0 +1,28 @@
+server:
+  grpc:
+    listen: 127.0.0.1
+    port:
+      start: 65003
+      end: 65003
+  rest:
+    addr: :8080
+
+database:
+  mysql:
+    user: foo
+    password: foo
+    host: foo
+    port: 3306
+    dbname: foo
+  redis:
+    password: bar
+    host: bar
+    port: 6379
+    db: 0
+
+cache:
+  redis:
+    ttl: 1000
+  local:
+    size: 10000
+    ttl: 1000
diff --git a/scheduler/config/config_test.go b/scheduler/config/config_test.go
index 5a1c17be..dbec5ba0 100644
--- a/scheduler/config/config_test.go
+++ b/scheduler/config/config_test.go
@@ -47,6 +47,7 @@ func TestSchedulerConfig_Load(t *testing.T) {
 			CachePath:  "bar",
 			ExpireTime: 1000,
 			Addr:       "127.0.0.1:8002",
+			CDNDirPath: "tmp",
 		},
 		Scheduler: SchedulerConfig{
 			ABTest:     true,
diff --git a/scheduler/config/testdata/scheduler.yaml b/scheduler/config/testdata/scheduler.yaml
index 727c161f..54a4838b 100644
--- a/scheduler/config/testdata/scheduler.yaml
+++ b/scheduler/config/testdata/scheduler.yaml
@@ -4,6 +4,7 @@ dynconfig:
   path: foo
   cachePath: bar
   addr: 127.0.0.1:8002
+  cdnDirPath: tmp
 scheduler:
   abtest: true
   ascheduler: "a-scheduler"