@@ -99,97 +99,109 @@ func TestGetResources(t *testing.T) {
9999 }{{
100100 name : "AWS resources returned as expected" ,
101101 testPlatform : platformsMap [string (configv1 .AWSPlatformType )],
102- expectedResourceCount : 2 ,
102+ expectedResourceCount : 3 ,
103103 expectedResourcesKindName : []string {
104104 "Deployment/aws-cloud-controller-manager" ,
105105 "PodDisruptionBudget/aws-cloud-controller-manager" ,
106+ "Service/aws-cloud-controller-manager" ,
106107 },
107108 }, {
108- name : "AWS resources returned as expected with single node cluster" ,
109- testPlatform : platformsMap [string (configv1 .AWSPlatformType )],
110- expectedResourceCount : 1 ,
111- singleReplica : true ,
112- expectedResourcesKindName : []string {"Deployment/aws-cloud-controller-manager" },
109+ name : "AWS resources returned as expected with single node cluster" ,
110+ testPlatform : platformsMap [string (configv1 .AWSPlatformType )],
111+ expectedResourceCount : 2 ,
112+ singleReplica : true ,
113+ expectedResourcesKindName : []string {
114+ "Deployment/aws-cloud-controller-manager" ,
115+ "Service/aws-cloud-controller-manager" ,
116+ },
113117 }, {
114118 name : "OpenStack resources returned as expected" ,
115119 testPlatform : platformsMap [string (configv1 .OpenStackPlatformType )],
116- expectedResourceCount : 2 ,
120+ expectedResourceCount : 3 ,
117121 expectedResourcesKindName : []string {
118122 "Deployment/openstack-cloud-controller-manager" ,
119123 "PodDisruptionBudget/openstack-cloud-controller-manager" ,
124+ "Service/openstack-cloud-controller-manager" ,
120125 },
121126 }, {
122127 name : "OpenStack resources returned as expected with signle node cluster" ,
123128 testPlatform : platformsMap [string (configv1 .OpenStackPlatformType )],
124- expectedResourceCount : 1 ,
129+ expectedResourceCount : 2 ,
125130 singleReplica : true ,
126131 expectedResourcesKindName : []string {
127132 "Deployment/openstack-cloud-controller-manager" ,
133+ "Service/openstack-cloud-controller-manager" ,
128134 },
129135 }, {
130136 name : "GCP resources returned as expected" ,
131137 testPlatform : platformsMap [string (configv1 .GCPPlatformType )],
132- expectedResourceCount : 4 ,
138+ expectedResourceCount : 5 ,
133139 expectedResourcesKindName : []string {
134140 "Deployment/gcp-cloud-controller-manager" ,
135141 "PodDisruptionBudget/gcp-cloud-controller-manager" ,
136142 "ClusterRole/gcp-cloud-controller-manager" ,
137143 "ClusterRoleBinding/gcp-cloud-controller-manager:cloud-provider" ,
144+ "Service/gcp-cloud-controller-manager" ,
138145 },
139146 }, {
140147 name : "GCP resources returned as expected with single node cluster" ,
141148 testPlatform : platformsMap [string (configv1 .GCPPlatformType )],
142- expectedResourceCount : 3 ,
149+ expectedResourceCount : 4 ,
143150 singleReplica : true ,
144151 expectedResourcesKindName : []string {
145152 "Deployment/gcp-cloud-controller-manager" ,
146153 "ClusterRole/gcp-cloud-controller-manager" ,
147154 "ClusterRoleBinding/gcp-cloud-controller-manager:cloud-provider" ,
155+ "Service/gcp-cloud-controller-manager" ,
148156 },
149157 }, {
150158 name : "Azure resources returned as expected" ,
151159 testPlatform : platformsMap [string (configv1 .AzurePlatformType )],
152- expectedResourceCount : 5 ,
160+ expectedResourceCount : 6 ,
153161 expectedResourcesKindName : []string {
154162 "Deployment/azure-cloud-controller-manager" ,
155163 "DaemonSet/azure-cloud-node-manager" ,
156164 "ClusterRole/azure-cloud-controller-manager" ,
157165 "ClusterRoleBinding/cloud-controller-manager:azure-cloud-controller-manager" ,
158166 "PodDisruptionBudget/azure-cloud-controller-manager" ,
167+ "Service/azure-cloud-controller-manager" ,
159168 },
160169 }, {
161170 name : "Azure resources returned as expected with single node cluster" ,
162171 testPlatform : platformsMap [string (configv1 .AzurePlatformType )],
163- expectedResourceCount : 4 ,
172+ expectedResourceCount : 5 ,
164173 singleReplica : true ,
165174 expectedResourcesKindName : []string {
166175 "Deployment/azure-cloud-controller-manager" ,
167176 "DaemonSet/azure-cloud-node-manager" ,
168177 "ClusterRole/azure-cloud-controller-manager" ,
169178 "ClusterRoleBinding/cloud-controller-manager:azure-cloud-controller-manager" ,
179+ "Service/azure-cloud-controller-manager" ,
170180 },
171181 }, {
172182 name : "Azure Stack resources returned as expected" ,
173183 testPlatform : platformsMap ["AzureStackHub" ],
174- expectedResourceCount : 3 ,
184+ expectedResourceCount : 4 ,
175185 expectedResourcesKindName : []string {
176186 "Deployment/azure-cloud-controller-manager" ,
177187 "DaemonSet/azure-cloud-node-manager" ,
178188 "PodDisruptionBudget/azure-cloud-controller-manager" ,
189+ "Service/azure-cloud-controller-manager" ,
179190 },
180191 }, {
181192 name : "Azure Stack resources returned as expected with single node" ,
182193 testPlatform : platformsMap ["AzureStackHub" ],
183- expectedResourceCount : 2 ,
194+ expectedResourceCount : 3 ,
184195 singleReplica : true ,
185196 expectedResourcesKindName : []string {
186197 "Deployment/azure-cloud-controller-manager" ,
187198 "DaemonSet/azure-cloud-node-manager" ,
199+ "Service/azure-cloud-controller-manager" ,
188200 },
189201 }, {
190202 name : "VSphere resources returned as expected" ,
191203 testPlatform : platformsMap [string (configv1 .VSpherePlatformType )],
192- expectedResourceCount : 8 ,
204+ expectedResourceCount : 9 ,
193205 expectedResourcesKindName : []string {
194206 "Deployment/vsphere-cloud-controller-manager" ,
195207 "PodDisruptionBudget/vsphere-cloud-controller-manager" ,
@@ -199,11 +211,12 @@ func TestGetResources(t *testing.T) {
199211 "ClusterRole/vsphere-cloud-controller-manager" ,
200212 "ClusterRoleBinding/vsphere-cloud-controller-manager:vsphere-cloud-controller-manager" ,
201213 "ClusterRoleBinding/vsphere-cloud-controller-manager:cloud-controller-manager" ,
214+ "Service/vsphere-cloud-controller-manager" ,
202215 },
203216 }, {
204217 name : "VSphere resources returned as expected with single node" ,
205218 testPlatform : platformsMap [string (configv1 .VSpherePlatformType )],
206- expectedResourceCount : 7 ,
219+ expectedResourceCount : 8 ,
207220 singleReplica : true ,
208221 expectedResourcesKindName : []string {
209222 "Deployment/vsphere-cloud-controller-manager" ,
@@ -213,39 +226,48 @@ func TestGetResources(t *testing.T) {
213226 "ClusterRole/vsphere-cloud-controller-manager" ,
214227 "ClusterRoleBinding/vsphere-cloud-controller-manager:vsphere-cloud-controller-manager" ,
215228 "ClusterRoleBinding/vsphere-cloud-controller-manager:cloud-controller-manager" ,
229+ "Service/vsphere-cloud-controller-manager" ,
216230 },
217231 }, {
218232 name : "OVirt resources are empty, as the platform is not yet supported" ,
219233 testPlatform : platformsMap [string (configv1 .OvirtPlatformType )],
220234 }, {
221235 name : "IBMCloud resources" ,
222236 testPlatform : platformsMap [string (configv1 .IBMCloudPlatformType )],
223- expectedResourceCount : 2 ,
237+ expectedResourceCount : 3 ,
224238 expectedResourcesKindName : []string {
225239 "Deployment/ibm-cloud-controller-manager" ,
226240 "PodDisruptionBudget/ibmcloud-cloud-controller-manager" ,
241+ "Service/ibmcloud-cloud-controller-manager" ,
227242 },
228243 }, {
229- name : "IBMCloud resources with single node cluster" ,
230- testPlatform : platformsMap [string (configv1 .IBMCloudPlatformType )],
231- expectedResourceCount : 1 ,
232- singleReplica : true ,
233- expectedResourcesKindName : []string {"Deployment/ibm-cloud-controller-manager" },
244+ name : "IBMCloud resources with single node cluster" ,
245+ testPlatform : platformsMap [string (configv1 .IBMCloudPlatformType )],
246+ expectedResourceCount : 2 ,
247+ singleReplica : true ,
248+ expectedResourcesKindName : []string {
249+ "Deployment/ibm-cloud-controller-manager" ,
250+ "Service/ibmcloud-cloud-controller-manager" ,
251+ },
234252 }, {
235253 name : "PowerVS resources" ,
236254 testPlatform : platformsMap [string (configv1 .PowerVSPlatformType )],
237- expectedResourceCount : 2 ,
255+ expectedResourceCount : 3 ,
238256 singleReplica : false ,
239257 expectedResourcesKindName : []string {
240258 "Deployment/powervs-cloud-controller-manager" ,
241259 "PodDisruptionBudget/powervs-cloud-controller-manager" ,
260+ "Service/powervs-cloud-controller-manager" ,
242261 },
243262 }, {
244- name : "PowerVS resources with single node cluster" ,
245- testPlatform : platformsMap [string (configv1 .PowerVSPlatformType )],
246- expectedResourceCount : 1 ,
247- singleReplica : true ,
248- expectedResourcesKindName : []string {"Deployment/powervs-cloud-controller-manager" },
263+ name : "PowerVS resources with single node cluster" ,
264+ testPlatform : platformsMap [string (configv1 .PowerVSPlatformType )],
265+ expectedResourceCount : 2 ,
266+ singleReplica : true ,
267+ expectedResourcesKindName : []string {
268+ "Deployment/powervs-cloud-controller-manager" ,
269+ "Service/powervs-cloud-controller-manager" ,
270+ },
249271 }, {
250272 name : "Libvirt resources are empty" ,
251273 testPlatform : platformsMap [string (configv1 .LibvirtPlatformType )],
0 commit comments