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: 2 additions & 8 deletions pkg/controller/template/render.go
Original file line number Diff line number Diff line change
Expand Up @@ -414,8 +414,6 @@ func onPremPlatformShortName(cfg RenderConfig) interface{} {
return "openstack"
case configv1.VSpherePlatformType:
return "vsphere"
case configv1.KubevirtPlatformType:
return "kubevirt"
case configv1.NutanixPlatformType:
return "nutanix"
default:
Expand All @@ -429,7 +427,7 @@ func onPremPlatformShortName(cfg RenderConfig) interface{} {
func onPremPlatformKeepalivedEnableUnicast(cfg RenderConfig) (interface{}, error) {
if cfg.Infra.Status.PlatformStatus != nil {
switch cfg.Infra.Status.PlatformStatus.Type {
case configv1.BareMetalPlatformType, configv1.KubevirtPlatformType:
case configv1.BareMetalPlatformType:
return "yes", nil
default:
return "no", nil
Expand All @@ -449,8 +447,6 @@ func onPremPlatformIngressIP(cfg RenderConfig) (interface{}, error) {
return cfg.Infra.Status.PlatformStatus.Ovirt.IngressIP, nil
case configv1.OpenStackPlatformType:
return cfg.Infra.Status.PlatformStatus.OpenStack.IngressIP, nil
case configv1.KubevirtPlatformType:
return cfg.Infra.Status.PlatformStatus.Kubevirt.IngressIP, nil
case configv1.VSpherePlatformType:
if cfg.Infra.Status.PlatformStatus.VSphere != nil {
return cfg.Infra.Status.PlatformStatus.VSphere.IngressIP, nil
Expand Down Expand Up @@ -485,8 +481,6 @@ func onPremPlatformAPIServerInternalIP(cfg RenderConfig) (interface{}, error) {
// VSphere UPI doesn't populate VSphere field. So it's not an error,
// and there is also no data
return nil, nil
case configv1.KubevirtPlatformType:
return cfg.Infra.Status.PlatformStatus.Kubevirt.APIServerInternalIP, nil
case configv1.NutanixPlatformType:
return cfg.Infra.Status.PlatformStatus.Nutanix.APIServerInternalIP, nil
default:
Expand Down Expand Up @@ -515,7 +509,7 @@ func existsDir(path string) (bool, error) {

func onPremPlatform(platformString configv1.PlatformType) bool {
switch platformString {
case configv1.BareMetalPlatformType, configv1.OvirtPlatformType, configv1.OpenStackPlatformType, configv1.VSpherePlatformType, configv1.KubevirtPlatformType, configv1.NutanixPlatformType:
case configv1.BareMetalPlatformType, configv1.OvirtPlatformType, configv1.OpenStackPlatformType, configv1.VSpherePlatformType, configv1.NutanixPlatformType:
return true
default:
return false
Expand Down
21 changes: 0 additions & 21 deletions pkg/operator/bootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -275,27 +275,6 @@ func appendManifestsByPlatform(manifests []manifest, infra configv1.Infrastructu
)
}

if infra.Status.PlatformStatus.Kubevirt != nil {
manifests = append(manifests,
manifest{
name: "manifests/on-prem/coredns.yaml",
filename: "kubevirt/manifests/coredns.yaml",
},
manifest{
name: "manifests/on-prem/coredns-corefile.tmpl",
filename: "kubevirt/static-pod-resources/coredns/Corefile.tmpl",
},
manifest{
name: "manifests/on-prem/keepalived.yaml",
filename: "kubevirt/manifests/keepalived.yaml",
},
manifest{
name: "manifests/on-prem/keepalived.conf.tmpl",
filename: "kubevirt/static-pod-resources/keepalived/keepalived.conf.tmpl",
},
)
}

if infra.Status.PlatformStatus.VSphere != nil && infra.Status.PlatformStatus.VSphere.APIServerInternalIP != "" {
manifests = append(manifests,
manifest{
Expand Down
8 changes: 1 addition & 7 deletions pkg/operator/render.go
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,6 @@ func onPremPlatformShortName(cfg mcfgv1.ControllerConfigSpec) interface{} {
return "openstack"
case configv1.VSpherePlatformType:
return "vsphere"
case configv1.KubevirtPlatformType:
return "kubevirt"
case configv1.NutanixPlatformType:
return "nutanix"
default:
Expand All @@ -247,7 +245,7 @@ func onPremPlatformShortName(cfg mcfgv1.ControllerConfigSpec) interface{} {
func onPremPlatformKeepalivedEnableUnicast(cfg mcfgv1.ControllerConfigSpec) (interface{}, error) {
if cfg.Infra.Status.PlatformStatus != nil {
switch cfg.Infra.Status.PlatformStatus.Type {
case configv1.BareMetalPlatformType, configv1.KubevirtPlatformType:
case configv1.BareMetalPlatformType:
return "yes", nil
default:
return "no", nil
Expand All @@ -269,8 +267,6 @@ func onPremPlatformIngressIP(cfg mcfgv1.ControllerConfigSpec) (interface{}, erro
return cfg.Infra.Status.PlatformStatus.OpenStack.IngressIP, nil
case configv1.VSpherePlatformType:
return cfg.Infra.Status.PlatformStatus.VSphere.IngressIP, nil
case configv1.KubevirtPlatformType:
return cfg.Infra.Status.PlatformStatus.Kubevirt.IngressIP, nil
case configv1.NutanixPlatformType:
return cfg.Infra.Status.PlatformStatus.Nutanix.IngressIP, nil
default:
Expand All @@ -293,8 +289,6 @@ func onPremPlatformAPIServerInternalIP(cfg mcfgv1.ControllerConfigSpec) (interfa
return cfg.Infra.Status.PlatformStatus.OpenStack.APIServerInternalIP, nil
case configv1.VSpherePlatformType:
return cfg.Infra.Status.PlatformStatus.VSphere.APIServerInternalIP, nil
case configv1.KubevirtPlatformType:
return cfg.Infra.Status.PlatformStatus.Kubevirt.APIServerInternalIP, nil
case configv1.NutanixPlatformType:
return cfg.Infra.Status.PlatformStatus.Nutanix.APIServerInternalIP, nil
default:
Expand Down
16 changes: 0 additions & 16 deletions templates/common/kubevirt/files/kubevirt-coredns-db.yaml

This file was deleted.