diff --git a/pkg/controller/template/render.go b/pkg/controller/template/render.go index 21cf498c82..ee4e8bcc22 100644 --- a/pkg/controller/template/render.go +++ b/pkg/controller/template/render.go @@ -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: @@ -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 @@ -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 @@ -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: @@ -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 diff --git a/pkg/operator/bootstrap.go b/pkg/operator/bootstrap.go index cd482bcff7..d762ece552 100644 --- a/pkg/operator/bootstrap.go +++ b/pkg/operator/bootstrap.go @@ -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{ diff --git a/pkg/operator/render.go b/pkg/operator/render.go index de5de5bd30..9da56ea615 100644 --- a/pkg/operator/render.go +++ b/pkg/operator/render.go @@ -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: @@ -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 @@ -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: @@ -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: diff --git a/templates/common/kubevirt/files/kubevirt-coredns-db.yaml b/templates/common/kubevirt/files/kubevirt-coredns-db.yaml deleted file mode 100644 index ae17bfb0c6..0000000000 --- a/templates/common/kubevirt/files/kubevirt-coredns-db.yaml +++ /dev/null @@ -1,16 +0,0 @@ -mode: 0644 -path: "/etc/coredns/node-dns-db" -contents: - inline: | - $ORIGIN {{ .Infra.Status.EtcdDiscoveryDomain }}. - @ 3600 IN SOA host.{{ .Infra.Status.EtcdDiscoveryDomain }}. hostmaster ( - 2017042752 ; serial - 7200 ; refresh (2 hours) - 3600 ; retry (1 hour) - 1209600 ; expire (2 weeks) - 3600 ; minimum (1 hour) - ) - api-int IN A {{ .Infra.Status.PlatformStatus.Kubevirt.APIServerInternalIP }} - api IN A {{ .Infra.Status.PlatformStatus.Kubevirt.APIServerInternalIP }} - - *.apps IN A {{ .Infra.Status.PlatformStatus.Kubevirt.IngressIP }}