Skip to content
Merged
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
10 changes: 10 additions & 0 deletions install/0000_80_machine-config-operator_00_namespace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,13 @@ metadata:
labels:
name: openshift-ovirt-infra
openshift.io/run-level: "1"
---
apiVersion: v1
kind: Namespace
metadata:
name: openshift-vsphere-infra
annotations:
openshift.io/node-selector: ""
labels:
name: openshift-vsphere-infra
openshift.io/run-level: "1"
12 changes: 12 additions & 0 deletions manifests/vsphere/coredns-corefile.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
. {
errors
health :18080
mdns {{ .ControllerConfig.EtcdDiscoveryDomain }} {{`{{.Cluster.MasterAmount}}`}} {{`{{.Cluster.Name}}`}}
forward . {{`{{- range $upstream := .DNSUpstreams}} {{$upstream}}{{- end}}`}}
cache 30
reload
hosts /etc/coredns/api-int.hosts {{ .ControllerConfig.EtcdDiscoveryDomain }} {
{{ .ControllerConfig.Infra.Status.PlatformStatus.VSphere.APIServerInternalIP }} api-int.{{ .ControllerConfig.EtcdDiscoveryDomain }} api.{{ .ControllerConfig.EtcdDiscoveryDomain }}
fallthrough
}
}
92 changes: 92 additions & 0 deletions manifests/vsphere/coredns.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
---
kind: Pod
apiVersion: v1
metadata:
name: coredns
namespace: openshift-vsphere-infra
creationTimestamp:
deletionGracePeriodSeconds: 65
labels:
app: vsphere-infra-mdns
spec:
volumes:
- name: resource-dir
hostPath:
path: "/etc/kubernetes/static-pod-resources/coredns"
- name: kubeconfig
hostPath:
path: "/etc/kubernetes/kubeconfig"
- name: conf-dir
empty-dir: {}
- name: manifests
hostPath:
path: "/opt/openshift/manifests"
initContainers:
- name: render-config
image: {{ .Images.BaremetalRuntimeCfgBootstrap }}
command:
- runtimecfg
- render
- "/etc/kubernetes/kubeconfig"
- "--api-vip"
- "{{ .ControllerConfig.Infra.Status.PlatformStatus.VSphere.APIServerInternalIP }}"
- "--dns-vip"
- "{{ .ControllerConfig.Infra.Status.PlatformStatus.VSphere.NodeDNSIP }}"
- "--ingress-vip"
- "{{ .ControllerConfig.Infra.Status.PlatformStatus.VSphere.IngressIP }}"
- "/config"
- "--out-dir"
- "/etc/coredns"
- "--cluster-config"
- "/opt/openshift/manifests/cluster-config.yaml"
resources: {}
volumeMounts:
- name: kubeconfig
mountPath: "/etc/kubernetes/kubeconfig"
- name: resource-dir
mountPath: "/config"
- name: conf-dir
mountPath: "/etc/coredns"
- name: manifests
mountPath: "/opt/openshift/manifests"
imagePullPolicy: IfNotPresent
containers:
- name: coredns
securityContext:
privileged: true
image: {{ .Images.CorednsBootstrap }}
args:
- "--conf"
- "/etc/coredns/Corefile"
resources:
requests:
cpu: 100m
memory: 200Mi
volumeMounts:
- name: conf-dir
mountPath: "/etc/coredns"
readinessProbe:
httpGet:
path: /health
port: 18080
scheme: HTTP
initialDelaySeconds: 10
periodSeconds: 10
successThreshold: 1
failureThreshold: 3
timeoutSeconds: 10
livenessProbe:
httpGet:
path: /health
port: 18080
scheme: HTTP
initialDelaySeconds: 60
timeoutSeconds: 5
successThreshold: 1
failureThreshold: 5
terminationMessagePolicy: FallbackToLogsOnError
hostNetwork: true
tolerations:
- operator: Exists
priorityClassName: system-node-critical
status: {}
35 changes: 35 additions & 0 deletions manifests/vsphere/keepalived.conf.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Configuration template for Keepalived, which is used to manage the DNS and
# API VIPs.
#
# For more information, see installer/data/data/bootstrap/baremetal/README.md
# in the installer repo.

vrrp_instance {{`{{.Cluster.Name}}`}}_API {
state BACKUP
interface {{`{{.VRRPInterface}}`}}
virtual_router_id {{`{{.Cluster.APIVirtualRouterID }}`}}
priority 50
advert_int 1
authentication {
auth_type PASS
auth_pass {{`{{.Cluster.Name}}`}}_api_vip
}
virtual_ipaddress {
{{`{{ .Cluster.APIVIP }}`}}/{{`{{ .Cluster.VIPNetmask }}`}}
}
}

vrrp_instance {{`{{.Cluster.Name}}`}}_DNS {
state MASTER
interface {{`{{.VRRPInterface}}`}}
virtual_router_id {{`{{.Cluster.DNSVirtualRouterID }}`}}
priority 140
advert_int 1
authentication {
auth_type PASS
auth_pass {{`{{.Cluster.Name}}`}}_dns_vip
}
virtual_ipaddress {
{{`{{ .Cluster.DNSVIP }}`}}/{{`{{ .Cluster.VIPNetmask }}`}}
}
}
83 changes: 83 additions & 0 deletions manifests/vsphere/keepalived.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
---
kind: Pod
apiVersion: v1
metadata:
name: keepalived
namespace: openshift-vsphere-infra
creationTimestamp:
deletionGracePeriodSeconds: 65
labels:
app: vsphere-infra-vrrp
spec:
volumes:
- name: resource-dir
hostPath:
path: "/etc/kubernetes/static-pod-resources/keepalived"
- name: kubeconfig
hostPath:
path: "/etc/kubernetes/kubeconfig"
- name: conf-dir
empty-dir: {}
- name: manifests
hostPath:
path: "/opt/openshift/manifests"
initContainers:
- name: render-config
image: {{ .Images.BaremetalRuntimeCfgBootstrap }}
command:
- runtimecfg
- render
- "/etc/kubernetes/kubeconfig"
- "--api-vip"
- "{{ .ControllerConfig.Infra.Status.PlatformStatus.VSphere.APIServerInternalIP }}"
- "--dns-vip"
- "{{ .ControllerConfig.Infra.Status.PlatformStatus.VSphere.NodeDNSIP }}"
- "--ingress-vip"
- "{{ .ControllerConfig.Infra.Status.PlatformStatus.VSphere.IngressIP }}"
- "/config"
- "--out-dir"
- "/etc/keepalived"
- "--cluster-config"
- "/opt/openshift/manifests/cluster-config.yaml"
resources: {}
volumeMounts:
- name: resource-dir
mountPath: "/config"
- name: kubeconfig
mountPath: "/etc/kubernetes/kubeconfig"
- name: conf-dir
mountPath: "/etc/keepalived"
- name: manifests
mountPath: "/opt/openshift/manifests"
imagePullPolicy: IfNotPresent
containers:
- name: keepalived
securityContext:
privileged: true
image: {{ .Images.KeepalivedBootstrap }}
env:
- name: NSS_SDB_USE_CACHE
value: "no"
command:
- /usr/sbin/keepalived
args:
- "-f"
- "/etc/keepalived/keepalived.conf"
- "--dont-fork"
- "--vrrp"
- "--log-detail"
- "--log-console"
resources:
requests:
cpu: 100m
memory: 200Mi
volumeMounts:
- name: conf-dir
mountPath: "/etc/keepalived"
terminationMessagePolicy: FallbackToLogsOnError
imagePullPolicy: IfNotPresent
hostNetwork: true
tolerations:
- operator: Exists
priorityClassName: system-node-critical
status: {}
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,10 @@ spec:
setupEtcdEnv: image/setupEtcdEnv:1
infraImage: image/infraImage:1
kubeClientAgentImage: image/kubeClientAgentImage:1
infra:
status:
platformStatus:
vsphere:
apiServerInternalIP: 10.0.0.1
ingressIP: 10.0.0.2
nodeDNSIP: 10.0.0.3
Loading