# Configure Containers DNS Search Logic
修改目标*namespace*的 pods 中的**所有Container**的 DNS, 从而实现在 *dowdownstreamNamespace* 中发现下游服务.

Configure the DNS of **all** containers of pods in the *namespace* to search services in *downstreamNamespace* first. 

需要事先安装好**kubectl**.

Require the **kubectl** to be installed in advance.

# inputs
|名称 |是否必须 |描述 |
|-----|---------|------------|
|namespce|true |需要被修改 DNS 的目标 k8s namespace.|
|downstreamNamespace|false |希望被发现服务的 k8s namespace.|

|name |required |description |
|-----|---------|------------|
|namespce|true |The k8s namespace whose DNS will be modified.|
|downstreamNamespace|false |The k8s namespace whose services will be searched for.|

# outputs

# steps
## Configure Containers DNS Search Logic
1. 从 *namespace* 中获得 Pod 中的所有 Container.
1. Fetch all containers of pods in *namespace* using kubectl.
2. 将 '{{ inputs.downstreamNamespace }}' 插入到 *resolv.conf* 文件中的 'search' 后面.
2. Append '{{ inputs.downstreamNamespace }}' after 'search' in the *resolv.conf* file.

