-
Notifications
You must be signed in to change notification settings - Fork 410
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
oVirt is similar to baremetal platform, and needs the network setup which is described in this doc https://github.com/openshift/installer/blob/master/docs/design/baremetal/networking-infrastructure.md Fixes: #766 Signed-off-by: Roy Golan <rgolan@redhat.com>
- Loading branch information
Showing
24 changed files
with
1,364 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.Ovirt.APIServerInternalIP }} api-int.{{ .ControllerConfig.EtcdDiscoveryDomain }} api.{{ .ControllerConfig.EtcdDiscoveryDomain }} | ||
fallthrough | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
--- | ||
kind: Pod | ||
apiVersion: v1 | ||
metadata: | ||
name: coredns | ||
namespace: openshift-kni-infra | ||
creationTimestamp: | ||
deletionGracePeriodSeconds: 65 | ||
labels: | ||
app: kni-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.Ovirt.APIServerInternalIP }}" | ||
- "--dns-vip" | ||
- "{{ .ControllerConfig.Infra.Status.PlatformStatus.Ovirt.NodeDNSIP }}" | ||
- "--ingress-vip" | ||
- "{{ .ControllerConfig.Infra.Status.PlatformStatus.Ovirt.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" | ||
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: {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }}`}} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
--- | ||
kind: Pod | ||
apiVersion: v1 | ||
metadata: | ||
name: keepalived | ||
namespace: openshift-kni-infra | ||
creationTimestamp: | ||
deletionGracePeriodSeconds: 65 | ||
labels: | ||
app: kni-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.Ovirt.APIServerInternalIP }}" | ||
- "--dns-vip" | ||
- "{{ .ControllerConfig.Infra.Status.PlatformStatus.Ovirt.NodeDNSIP }}" | ||
- "--ingress-vip" | ||
- "{{ .ControllerConfig.Infra.Status.PlatformStatus.Ovirt.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" | ||
volumeMounts: | ||
- name: conf-dir | ||
mountPath: "/etc/keepalived" | ||
terminationMessagePolicy: FallbackToLogsOnError | ||
imagePullPolicy: IfNotPresent | ||
hostNetwork: true | ||
tolerations: | ||
- operator: Exists | ||
priorityClassName: system-node-critical | ||
status: {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
pkg/controller/template/test_data/controller_config_ovirt.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
apiVersion: "machineconfigurations.openshift.io/v1" | ||
kind: "ControllerConfig" | ||
spec: | ||
clusterDNSIP: "10.3.0.10" | ||
cloudProviderConfig: | | ||
testing | ||
multi-line cloud config | ||
[test] | ||
option = dummy | ||
etcdDiscoveryDomain: "my-test-cluster.example.org" | ||
etcdInitialCount: 3 | ||
platform: "ovirt" | ||
etcdCAData: OHVtbXkgZXRjZC1jYQo= | ||
rootCAData: OHVtbXkgcm9vdC1jYQo= | ||
pullSecret: | ||
data: OHVtbXkgZXRjZC1jYQo= | ||
images: | ||
etcd: image/etcd:1 | ||
setupEtcdEnv: image/setupEtcdEnv:1 | ||
infraImage: image/infraImage:1 | ||
kubeClientAgentImage: image/kubeClientAgentImage:1 |
Oops, something went wrong.