Skip to content

Commit

Permalink
Kubevirt platform infrastructure and node network specific configurat…
Browse files Browse the repository at this point in the history
…ions (multus network)

* Set APIVIP for ignition access
* Set mcscertkey for APIVIP
  • Loading branch information
nirarg committed Dec 4, 2020
1 parent 01e1ca8 commit 9285275
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/asset/ignition/machine/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (
"github.com/openshift/installer/pkg/asset/ignition"
"github.com/openshift/installer/pkg/types"
baremetaltypes "github.com/openshift/installer/pkg/types/baremetal"
kubevirttypes "github.com/openshift/installer/pkg/types/kubevirt"
openstacktypes "github.com/openshift/installer/pkg/types/openstack"
ovirttypes "github.com/openshift/installer/pkg/types/ovirt"
vspheretypes "github.com/openshift/installer/pkg/types/vsphere"
Expand Down Expand Up @@ -41,6 +42,8 @@ func pointerIgnitionConfig(installConfig *types.InstallConfig, rootCA []byte, ro
if installConfig.VSphere.APIVIP != "" {
ignitionHost = net.JoinHostPort(installConfig.VSphere.APIVIP, "22623")
}
case kubevirttypes.Name:
ignitionHost = net.JoinHostPort(installConfig.Kubevirt.APIVIP, "22623")
}
return &igntypes.Config{
Ignition: igntypes.Ignition{
Expand Down
7 changes: 7 additions & 0 deletions pkg/asset/manifests/infrastructure.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import (
"github.com/openshift/installer/pkg/types/azure"
"github.com/openshift/installer/pkg/types/baremetal"
"github.com/openshift/installer/pkg/types/gcp"
"github.com/openshift/installer/pkg/types/kubevirt"
"github.com/openshift/installer/pkg/types/libvirt"
"github.com/openshift/installer/pkg/types/none"
"github.com/openshift/installer/pkg/types/openstack"
Expand Down Expand Up @@ -158,6 +159,12 @@ func (i *Infrastructure) Generate(dependencies asset.Parents) error {
APIServerInternalIP: installConfig.Config.Ovirt.APIVIP,
IngressIP: installConfig.Config.Ovirt.IngressVIP,
}
case kubevirt.Name:
config.Spec.PlatformSpec.Type = configv1.KubevirtPlatformType
config.Status.PlatformStatus.Kubevirt = &configv1.KubevirtPlatformStatus{
APIServerInternalIP: installConfig.Config.Kubevirt.APIVIP,
IngressIP: installConfig.Config.Kubevirt.IngressVIP,
}
default:
config.Spec.PlatformSpec.Type = configv1.NonePlatformType
}
Expand Down
4 changes: 4 additions & 0 deletions pkg/asset/tls/mcscertkey.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"github.com/openshift/installer/pkg/asset"
"github.com/openshift/installer/pkg/asset/installconfig"
baremetaltypes "github.com/openshift/installer/pkg/types/baremetal"
kubevirttypes "github.com/openshift/installer/pkg/types/kubevirt"
openstacktypes "github.com/openshift/installer/pkg/types/openstack"
ovirttypes "github.com/openshift/installer/pkg/types/ovirt"
vspheretypes "github.com/openshift/installer/pkg/types/vsphere"
Expand Down Expand Up @@ -60,6 +61,9 @@ func (a *MCSCertKey) Generate(dependencies asset.Parents) error {
cfg.IPAddresses = []net.IP{net.ParseIP(installConfig.Config.VSphere.APIVIP)}
cfg.DNSNames = append(cfg.DNSNames, installConfig.Config.VSphere.APIVIP)
}
case kubevirttypes.Name:
cfg.IPAddresses = []net.IP{net.ParseIP(installConfig.Config.Kubevirt.APIVIP)}
cfg.DNSNames = []string{hostname, installConfig.Config.Kubevirt.APIVIP}
default:
cfg.DNSNames = []string{hostname}
}
Expand Down

0 comments on commit 9285275

Please sign in to comment.