Skip to content

Commit

Permalink
feat(wanda): add dns config into pod's template (#243)
Browse files Browse the repository at this point in the history
  • Loading branch information
hezhizhen authored Nov 24, 2020
1 parent 6b2e3a8 commit c1e3767
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,9 @@ hostname: string("") # 主机名
subdomain: string("") # 子域名
termination: uint(30) # 优雅退出时间
serviceAccountName: string("") # ServiceAccount
nameservers: # poddns 配置
- 114.114.114.114
- 8.8.8.8
priorityClassName: string("") # PriorityClassName
host:
network: bool(false) # 与主机共享 network namespace
Expand Down Expand Up @@ -603,6 +606,9 @@ _config:
- heavy
- midium
pod:
nameservers:
- 114.114.114.114
- 8.8.8.8
host:
network: true
initContainers:
Expand Down
5 changes: 5 additions & 0 deletions templates/1.0.0/templates/_pod.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
{{- with $controller.pod }}
restartPolicy: {{ .restart | quote }}
dnsPolicy: {{ .dns | quote }}
dnsConfig:
nameservers:
{{- range .nameservers }}
- {{ . }}
{{- end }}
hostname: {{ .hostname | quote }}
subdomain: {{ .subdomain | quote }}
terminationGracePeriodSeconds: {{ .termination }}
Expand Down
3 changes: 3 additions & 0 deletions templates/1.0.0/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ _config:
effect: NoExecute
tolerationSeconds: 60
pod:
nameservers:
- 114.114.114.114
- 8.8.8.8
host:
network: true
annotations:
Expand Down

0 comments on commit c1e3767

Please sign in to comment.