networkservicemesh / fanout

Repository for the coredns fanout plugin used by Network Service Mesh
Apache License 2.0
19 stars 18 forks source link

关于except-file用法问题? #18

Closed snakwu closed 4 years ago

snakwu commented 4 years ago

关于except-file的用法,这个文件格式应该是怎么样写这个,用except写在配置里面,不是以except-file单独一个文件,那个效率更高? ps:如果except-file文件更新了,他对于reload有效吗?会重新加载吗?又或者可不可以做个检测,当except-file的文件改变时,重新reload coerdns?

denis-tingaikin commented 4 years ago

@snakwu could you please create issues in English? It can help to other people understand what happening :)

snakwu commented 4 years ago

@snakwu could you please create issues on English? It can help other people understand what happening :)

With regard to the use of except-file, how should this file format be written in this, written in the configuration with except, instead of except-file as a single file, which is more efficient? Ps: if the except-file file is updated, is it valid for reload? Will it be reloaded? Or can we do a test to re-reload coerdns? when the except-file file changes?

snakwu commented 4 years ago

@snakwu could you please create issues on English? It can help other people understand what happening :)

可不可以当except-file改变时,coerdns程序自动reload? Can the coerdns program automatically reload when the except-file changes?

denis-tingaikin commented 4 years ago

Can the coerdns program automatically reload when the except-file changes?

@snakwu No, it can't. To apply changes in this case you need to somehow reload your coredns.

snakwu commented 4 years ago

Can the coerdns program automatically reload when the except-file changes?

@snakwu No, it can't. To apply changes in this case you need to somehow reload your coredns.

需要怎么做才可以reload coredns?

snakwu commented 4 years ago

Can the coerdns program automatically reload when the except-file changes?

@snakwu No, it can't. To apply changes in this case you need to somehow reload your coredns.

我想要实现的时,用一个脚本定时更新except-file,然后except-file更新后,reload coerdns

denis-tingaikin commented 4 years ago

需要怎么做才可以reload coredns?

You can ask coredns guys about reloading. Also, you can try to use except + reload plugin. For example

fanout ... {
    except ....
}
reload 5s
snakwu commented 4 years ago

fanout ... { except .... } reload 5s

我就是这样配置的,但是这个 reload 只检查coredns,Corefile有没有变动! 如果,我用except-file指定列表文件,这个列表文件变动,他不检查!

denis-tingaikin commented 4 years ago

except-file is not supported by reload plugin. except-file should be used only for static initialization of excluding domains. For your case I see two ways:

  1. Use except-file and somehow reload coredns instance. (I think you need ask coredns guys about reloading coredns instance)
  2. Use except directive and reload plugin.
snakwu commented 4 years ago

except-file is not supported by reload plugin. except-file should be used only for static initialization of excluding domains. For your case I see two ways:

  1. Use except-file and somehow reload coredns instance. (I think you need ask coredns guys about reloading coredns instance)
  2. Use except directive and reload plugin.

ok,我明白了,兄弟,谢谢!