Skip to content

Commit 8a71aec

Browse files
Merge pull request openshift#8610 from r4f4/remove-terraform-libvirt
OCPBUGS-35523: remove terraform libvirt from the installer
2 parents c84151a + 9211013 commit 8a71aec

File tree

3,219 files changed

+15
-1010144
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

3,219 files changed

+15
-1010144
lines changed

cmd/openshift-install/destroy.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ import (
2222
_ "github.com/openshift/installer/pkg/destroy/baremetal"
2323
_ "github.com/openshift/installer/pkg/destroy/gcp"
2424
_ "github.com/openshift/installer/pkg/destroy/ibmcloud"
25-
_ "github.com/openshift/installer/pkg/destroy/libvirt"
2625
_ "github.com/openshift/installer/pkg/destroy/nutanix"
2726
_ "github.com/openshift/installer/pkg/destroy/openstack"
2827
_ "github.com/openshift/installer/pkg/destroy/ovirt"

data/data/install.openshift.io_installconfigs.yaml

Lines changed: 2 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -649,10 +649,6 @@ spec:
649649
type: string
650650
type: array
651651
type: object
652-
libvirt:
653-
description: Libvirt is the configuration used when installing
654-
on libvirt.
655-
type: object
656652
nutanix:
657653
description: Nutanix is the configuration used when installing
658654
on Nutanix.
@@ -1561,10 +1557,6 @@ spec:
15611557
type: string
15621558
type: array
15631559
type: object
1564-
libvirt:
1565-
description: Libvirt is the configuration used when installing
1566-
on libvirt.
1567-
type: object
15681560
nutanix:
15691561
description: Nutanix is the configuration used when installing
15701562
on Nutanix.
@@ -2099,8 +2091,8 @@ spec:
20992091
description: MachineNetwork is the list of IP address pools for machines.
21002092
This field replaces MachineCIDR, and if set MachineCIDR must be
21012093
empty or match the first entry in the list. Default is 10.0.0.0/16
2102-
for all platforms other than libvirt and Power VS. For libvirt,
2103-
the default is 192.168.126.0/24. For Power VS, the default is 192.168.0.0/24.
2094+
for all platforms other than Power VS. For Power VS, the default
2095+
is 192.168.0.0/24.
21042096
items:
21052097
description: MachineNetworkEntry is a single IP address block for
21062098
node IP blocks.
@@ -3385,51 +3377,6 @@ spec:
33853377
required:
33863378
- region
33873379
type: object
3388-
libvirt:
3389-
description: Libvirt is the configuration used when installing on
3390-
libvirt.
3391-
properties:
3392-
URI:
3393-
default: qemu+tcp://192.168.122.1/system
3394-
description: URI is the identifier for the libvirtd connection. It
3395-
must be reachable from both the host (where the installer is
3396-
run) and the cluster (where the cluster-API controller pod will
3397-
be running). Default is qemu+tcp://192.168.122.1/system
3398-
type: string
3399-
defaultMachinePlatform:
3400-
description: DefaultMachinePlatform is the default configuration
3401-
used when installing on libvirt for machine pools which do not
3402-
define their own platform configuration. Default will set the
3403-
image field to the latest RHCOS image.
3404-
type: object
3405-
network:
3406-
description: Network
3407-
properties:
3408-
dnsmasqOptions:
3409-
description: DnsmasqOptions is the dnsmasq options to be used
3410-
when installing on libvirt.
3411-
items:
3412-
description: DnsmasqOption contains the name and value of
3413-
the option to configure in the libvirt network.
3414-
properties:
3415-
name:
3416-
description: The dnsmasq option name. A full list of
3417-
options and an explanation for each can be found in
3418-
/etc/dnsmasq.conf
3419-
type: string
3420-
value:
3421-
description: The value that is being set for the particular
3422-
option.
3423-
type: string
3424-
type: object
3425-
type: array
3426-
if:
3427-
default: tt0
3428-
description: The interface make used for the network. Default
3429-
is tt0.
3430-
type: string
3431-
type: object
3432-
type: object
34333380
none:
34343381
description: None is the empty configuration used when installing
34353382
on an unsupported platform.

pkg/asset/cluster/libvirt/OWNERS

Lines changed: 0 additions & 7 deletions
This file was deleted.

pkg/asset/cluster/libvirt/libvirt.go

Lines changed: 0 additions & 14 deletions
This file was deleted.

pkg/asset/cluster/metadata.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import (
1212
"github.com/openshift/installer/pkg/asset/cluster/baremetal"
1313
"github.com/openshift/installer/pkg/asset/cluster/gcp"
1414
"github.com/openshift/installer/pkg/asset/cluster/ibmcloud"
15-
"github.com/openshift/installer/pkg/asset/cluster/libvirt"
1615
clustermetadata "github.com/openshift/installer/pkg/asset/cluster/metadata"
1716
"github.com/openshift/installer/pkg/asset/cluster/nutanix"
1817
"github.com/openshift/installer/pkg/asset/cluster/openstack"
@@ -29,7 +28,6 @@ import (
2928
"github.com/openshift/installer/pkg/types/featuregates"
3029
gcptypes "github.com/openshift/installer/pkg/types/gcp"
3130
ibmcloudtypes "github.com/openshift/installer/pkg/types/ibmcloud"
32-
libvirttypes "github.com/openshift/installer/pkg/types/libvirt"
3331
nonetypes "github.com/openshift/installer/pkg/types/none"
3432
nutanixtypes "github.com/openshift/installer/pkg/types/nutanix"
3533
openstacktypes "github.com/openshift/installer/pkg/types/openstack"
@@ -83,8 +81,6 @@ func (m *Metadata) Generate(parents asset.Parents) (err error) {
8381
switch installConfig.Config.Platform.Name() {
8482
case awstypes.Name:
8583
metadata.ClusterPlatformMetadata.AWS = aws.Metadata(clusterID.UUID, clusterID.InfraID, installConfig.Config)
86-
case libvirttypes.Name:
87-
metadata.ClusterPlatformMetadata.Libvirt = libvirt.Metadata(installConfig.Config)
8884
case openstacktypes.Name:
8985
metadata.ClusterPlatformMetadata.OpenStack = openstack.Metadata(clusterID.InfraID, installConfig.Config)
9086
case azuretypes.Name:

pkg/asset/cluster/tfvars/tfvars.go

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import (
2121
configv1 "github.com/openshift/api/config/v1"
2222
machinev1 "github.com/openshift/api/machine/v1"
2323
machinev1beta1 "github.com/openshift/api/machine/v1beta1"
24-
libvirtprovider "github.com/openshift/cluster-api-provider-libvirt/pkg/apis/libvirtproviderconfig/v1beta1"
2524
ovirtprovider "github.com/openshift/cluster-api-provider-ovirt/pkg/apis/ovirtprovider/v1beta1"
2625
"github.com/openshift/installer/pkg/asset"
2726
"github.com/openshift/installer/pkg/asset/ignition"
@@ -47,7 +46,6 @@ import (
4746
baremetaltfvars "github.com/openshift/installer/pkg/tfvars/baremetal"
4847
gcptfvars "github.com/openshift/installer/pkg/tfvars/gcp"
4948
ibmcloudtfvars "github.com/openshift/installer/pkg/tfvars/ibmcloud"
50-
libvirttfvars "github.com/openshift/installer/pkg/tfvars/libvirt"
5149
nutanixtfvars "github.com/openshift/installer/pkg/tfvars/nutanix"
5250
openstacktfvars "github.com/openshift/installer/pkg/tfvars/openstack"
5351
ovirttfvars "github.com/openshift/installer/pkg/tfvars/ovirt"
@@ -59,7 +57,6 @@ import (
5957
"github.com/openshift/installer/pkg/types/external"
6058
"github.com/openshift/installer/pkg/types/gcp"
6159
"github.com/openshift/installer/pkg/types/ibmcloud"
62-
"github.com/openshift/installer/pkg/types/libvirt"
6360
"github.com/openshift/installer/pkg/types/none"
6461
"github.com/openshift/installer/pkg/types/nutanix"
6562
"github.com/openshift/installer/pkg/types/openstack"
@@ -754,38 +751,6 @@ func (t *TerraformVariables) Generate(parents asset.Parents) error {
754751
Filename: TfPlatformVarsFileName,
755752
Data: data,
756753
})
757-
case libvirt.Name:
758-
masters, err := mastersAsset.Machines()
759-
if err != nil {
760-
return err
761-
}
762-
// convert options list to a list of mappings which can be consumed by terraform
763-
var dnsmasqoptions []map[string]string
764-
for _, option := range installConfig.Config.Platform.Libvirt.Network.DnsmasqOptions {
765-
dnsmasqoptions = append(dnsmasqoptions,
766-
map[string]string{
767-
"option_name": option.Name,
768-
"option_value": option.Value})
769-
}
770-
771-
data, err = libvirttfvars.TFVars(
772-
libvirttfvars.TFVarsSources{
773-
MasterConfig: masters[0].Spec.ProviderSpec.Value.Object.(*libvirtprovider.LibvirtMachineProviderConfig),
774-
OsImage: string(*rhcosImage),
775-
MachineCIDR: &installConfig.Config.Networking.MachineNetwork[0].CIDR.IPNet,
776-
Bridge: installConfig.Config.Platform.Libvirt.Network.IfName,
777-
MasterCount: masterCount,
778-
Architecture: installConfig.Config.ControlPlane.Architecture,
779-
DnsmasqOptions: dnsmasqoptions,
780-
},
781-
)
782-
if err != nil {
783-
return errors.Wrapf(err, "failed to get %s Terraform variables", platform)
784-
}
785-
t.FileList = append(t.FileList, &asset.File{
786-
Filename: TfPlatformVarsFileName,
787-
Data: data,
788-
})
789754
case openstack.Name:
790755
data, err = openstacktfvars.TFVars(
791756
installConfig,

pkg/asset/installconfig/installconfig.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ func (a *InstallConfig) Generate(parents asset.Parents) error {
8989
}
9090

9191
a.Config.AWS = platform.AWS
92-
a.Config.Libvirt = platform.Libvirt
9392
a.Config.None = platform.None
9493
a.Config.OpenStack = platform.OpenStack
9594
a.Config.VSphere = platform.VSphere

pkg/asset/installconfig/libvirt/OWNERS

Lines changed: 0 additions & 7 deletions
This file was deleted.

pkg/asset/installconfig/libvirt/libvirt.go

Lines changed: 0 additions & 39 deletions
This file was deleted.

pkg/asset/installconfig/platform.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import (
1414
baremetalconfig "github.com/openshift/installer/pkg/asset/installconfig/baremetal"
1515
gcpconfig "github.com/openshift/installer/pkg/asset/installconfig/gcp"
1616
ibmcloudconfig "github.com/openshift/installer/pkg/asset/installconfig/ibmcloud"
17-
libvirtconfig "github.com/openshift/installer/pkg/asset/installconfig/libvirt"
1817
nutanixconfig "github.com/openshift/installer/pkg/asset/installconfig/nutanix"
1918
openstackconfig "github.com/openshift/installer/pkg/asset/installconfig/openstack"
2019
powervsconfig "github.com/openshift/installer/pkg/asset/installconfig/powervs"
@@ -26,7 +25,6 @@ import (
2625
"github.com/openshift/installer/pkg/types/external"
2726
"github.com/openshift/installer/pkg/types/gcp"
2827
"github.com/openshift/installer/pkg/types/ibmcloud"
29-
"github.com/openshift/installer/pkg/types/libvirt"
3028
"github.com/openshift/installer/pkg/types/none"
3129
"github.com/openshift/installer/pkg/types/nutanix"
3230
"github.com/openshift/installer/pkg/types/openstack"
@@ -81,11 +79,6 @@ func (a *platform) Generate(asset.Parents) error {
8179
if err != nil {
8280
return err
8381
}
84-
case libvirt.Name:
85-
a.Libvirt, err = libvirtconfig.Platform()
86-
if err != nil {
87-
return err
88-
}
8982
case external.Name:
9083
a.External = &external.Platform{}
9184
case none.Name:

0 commit comments

Comments
 (0)