Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions manifests/cloud-platform-alt-dns/coredns-corefile.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,9 @@
match ^api-int.{{ .ControllerConfig.DNS.Spec.BaseDomain }}
fallthrough
}
hosts /etc/hosts {
127.0.0.1 localhost localhost.localdomain
::1 localhost localhost.localdomain
fallthrough
}
}
10 changes: 10 additions & 0 deletions manifests/cloud-platform-alt-dns/coredns.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ spec:
- name: manifests
hostPath:
path: "/opt/openshift/manifests"
- name: hosts-dir
hostPath:
path: "/etc/hosts"
initContainers:
- name: render-config
image: {{ .Images.BaremetalRuntimeCfgBootstrap }}
Expand Down Expand Up @@ -55,6 +58,10 @@ spec:
- name: manifests
mountPath: "/opt/openshift/manifests"
mountPropagation: HostToContainer
- name: hosts-dir
mountPath: "/etc/hosts"
mountPropagation: HostToContainer
Comment thread
coderabbitai[bot] marked this conversation as resolved.
readOnly: true
imagePullPolicy: IfNotPresent
containers:
- name: coredns
Expand All @@ -71,6 +78,9 @@ spec:
volumeMounts:
- name: conf-dir
mountPath: "/etc/coredns"
- name: hosts-dir
mountPath: "/etc/hosts"
readOnly: true
livenessProbe:
httpGet:
path: /health
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ contents:
match ^api-int.{{ .DNS.Spec.BaseDomain }}
fallthrough
}
hosts {
hosts /etc/hosts {
127.0.0.1 localhost localhost.localdomain
::1 localhost localhost.localdomain
{{`{{- range .Cluster.NodeAddresses }}
{{ .Address }} {{ .Name }} {{ .Name }}.{{ $.Cluster.Name }}.{{ $.Cluster.Domain }}
{{- end }}`}}
Expand Down
18 changes: 16 additions & 2 deletions templates/common/cloud-platform-alt-dns/files/coredns.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ contents:
- name: nm-resolv
hostPath:
path: "/var/run/NetworkManager"
- name: hosts-dir
hostPath:
path: "/etc/hosts"
initContainers:
- name: render-config-coredns
image: {{ .Images.baremetalRuntimeCfgImage }}
Expand Down Expand Up @@ -59,6 +62,10 @@ contents:
- name: conf-dir
mountPath: "/etc/coredns"
mountPropagation: HostToContainer
- name: hosts-dir
mountPath: "/etc/hosts"
mountPropagation: HostToContainer
Comment thread
coderabbitai[bot] marked this conversation as resolved.
readOnly: true
imagePullPolicy: IfNotPresent
terminationMessagePolicy: FallbackToLogsOnError
containers:
Expand All @@ -74,6 +81,9 @@ contents:
volumeMounts:
- name: conf-dir
mountPath: "/etc/coredns"
- name: hosts-dir
mountPath: "/etc/hosts"
readOnly: true
livenessProbe:
httpGet:
path: /health
Expand Down Expand Up @@ -119,8 +129,12 @@ contents:
mountPropagation: HostToContainer
- name: nm-resolv
mountPath: "/var/run/NetworkManager"
mountPropagation: HostToContainer
imagePullPolicy: IfNotPresent
mountPropagation: HostToContainer
- name: hosts-dir
mountPath: "/etc/hosts"
mountPropagation: HostToContainer
readOnly: true
imagePullPolicy: IfNotPresent
hostNetwork: true
tolerations:
- operator: Exists
Expand Down