From 43dd96ead053743734ae6b5a3d83dcd339707507 Mon Sep 17 00:00:00 2001 From: Jesse Haka Date: Sun, 12 Feb 2023 16:39:31 +0200 Subject: [PATCH 1/2] add clustername to ccm opts --- upup/pkg/fi/cloudup/new_cluster.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/upup/pkg/fi/cloudup/new_cluster.go b/upup/pkg/fi/cloudup/new_cluster.go index 8eead5066a..267adc738d 100644 --- a/upup/pkg/fi/cloudup/new_cluster.go +++ b/upup/pkg/fi/cloudup/new_cluster.go @@ -1438,6 +1438,11 @@ func initializeOpenstack(opt *NewClusterOptions, cluster *api.Cluster) { cluster.Spec.Networking.Topology.DNS = api.DNSTypeNone } } + + if cluster.Spec.ExternalCloudControllerManager == nil { + cluster.Spec.ExternalCloudControllerManager = &api.CloudControllerManagerConfig{} + } + cluster.Spec.ExternalCloudControllerManager.ClusterName = opt.ClusterName } func createEtcdCluster(etcdCluster string, controlPlanes []*api.InstanceGroup, encryptEtcdStorage bool, etcdStorageType string) api.EtcdClusterSpec { From dca3b8c83276f9d346988428ff311575f2250fe9 Mon Sep 17 00:00:00 2001 From: Jesse Haka Date: Sun, 12 Feb 2023 17:24:00 +0200 Subject: [PATCH 2/2] ./hack/update-expected.sh --- .../create_cluster/ha_openstack/expected-v1alpha2.yaml | 2 ++ .../create_cluster/ha_openstack_nodns/expected-v1alpha2.yaml | 2 ++ .../create_cluster/ha_openstack_octavia/expected-v1alpha2.yaml | 2 ++ 3 files changed, 6 insertions(+) diff --git a/tests/integration/create_cluster/ha_openstack/expected-v1alpha2.yaml b/tests/integration/create_cluster/ha_openstack/expected-v1alpha2.yaml index c64a7d3ab7..c9e0eac712 100644 --- a/tests/integration/create_cluster/ha_openstack/expected-v1alpha2.yaml +++ b/tests/integration/create_cluster/ha_openstack/expected-v1alpha2.yaml @@ -21,6 +21,8 @@ spec: timeout: 10s router: externalNetwork: "" + cloudControllerManager: + clusterName: minimal.k8s.local cloudProvider: openstack configBase: memfs://tests/minimal.k8s.local etcdClusters: diff --git a/tests/integration/create_cluster/ha_openstack_nodns/expected-v1alpha2.yaml b/tests/integration/create_cluster/ha_openstack_nodns/expected-v1alpha2.yaml index e27554adcc..c54eaaf1c4 100644 --- a/tests/integration/create_cluster/ha_openstack_nodns/expected-v1alpha2.yaml +++ b/tests/integration/create_cluster/ha_openstack_nodns/expected-v1alpha2.yaml @@ -29,6 +29,8 @@ spec: dnsServers: 1.1.1.1 externalNetwork: vlan1 externalSubnet: vlan1subnet + cloudControllerManager: + clusterName: ha.example.com cloudProvider: openstack configBase: memfs://tests/ha.example.com etcdClusters: diff --git a/tests/integration/create_cluster/ha_openstack_octavia/expected-v1alpha2.yaml b/tests/integration/create_cluster/ha_openstack_octavia/expected-v1alpha2.yaml index 4b40f59c16..b341bff70e 100644 --- a/tests/integration/create_cluster/ha_openstack_octavia/expected-v1alpha2.yaml +++ b/tests/integration/create_cluster/ha_openstack_octavia/expected-v1alpha2.yaml @@ -27,6 +27,8 @@ spec: router: dnsServers: 1.1.1.1 externalNetwork: vlan1 + cloudControllerManager: + clusterName: minimal.k8s.local cloudProvider: openstack configBase: memfs://tests/minimal.k8s.local etcdClusters: