@@ -99,61 +99,69 @@ 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 : 6 ,
138+ expectedResourceCount : 7 ,
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" ,
138144 "ValidatingAdmissionPolicyBinding/network-tier-annotation-binding" ,
139145 "ValidatingAdmissionPolicy/network-tier-annotation-validation-policy" ,
146+ "Service/gcp-cloud-controller-manager" ,
140147 },
141148 }, {
142149 name : "GCP resources returned as expected with single node cluster" ,
143150 testPlatform : platformsMap [string (configv1 .GCPPlatformType )],
144- expectedResourceCount : 5 ,
151+ expectedResourceCount : 6 ,
145152 singleReplica : true ,
146153 expectedResourcesKindName : []string {
147154 "Deployment/gcp-cloud-controller-manager" ,
148155 "ClusterRole/gcp-cloud-controller-manager" ,
149156 "ClusterRoleBinding/gcp-cloud-controller-manager:cloud-provider" ,
150157 "ValidatingAdmissionPolicyBinding/network-tier-annotation-binding" ,
151158 "ValidatingAdmissionPolicy/network-tier-annotation-validation-policy" ,
159+ "Service/gcp-cloud-controller-manager" ,
152160 },
153161 }, {
154162 name : "Azure resources returned as expected" ,
155163 testPlatform : platformsMap [string (configv1 .AzurePlatformType )],
156- expectedResourceCount : 11 ,
164+ expectedResourceCount : 12 ,
157165 expectedResourcesKindName : []string {
158166 "Deployment/azure-cloud-controller-manager" ,
159167 "DaemonSet/azure-cloud-node-manager" ,
@@ -166,11 +174,12 @@ func TestGetResources(t *testing.T) {
166174 "ValidatingAdmissionPolicyBinding/azure-load-balancer-tcp-idle-timeout-validation-annotation-binding" ,
167175 "ValidatingAdmissionPolicy/azure-load-balancer-tcp-idle-timeout-annotation-validation-policy" ,
168176 "PodDisruptionBudget/azure-cloud-controller-manager" ,
177+ "Service/azure-cloud-controller-manager" ,
169178 },
170179 }, {
171180 name : "Azure resources returned as expected with single node cluster" ,
172181 testPlatform : platformsMap [string (configv1 .AzurePlatformType )],
173- expectedResourceCount : 10 ,
182+ expectedResourceCount : 11 ,
174183 singleReplica : true ,
175184 expectedResourcesKindName : []string {
176185 "Deployment/azure-cloud-controller-manager" ,
@@ -183,33 +192,36 @@ func TestGetResources(t *testing.T) {
183192 "ValidatingAdmissionPolicyBinding/openshift-cloud-controller-manager-cloud-provider-azure-node-admission" ,
184193 "ValidatingAdmissionPolicyBinding/azure-load-balancer-tcp-idle-timeout-validation-annotation-binding" ,
185194 "ValidatingAdmissionPolicy/azure-load-balancer-tcp-idle-timeout-annotation-validation-policy" ,
195+ "Service/azure-cloud-controller-manager" ,
186196 },
187197 }, {
188198 name : "Azure Stack resources returned as expected" ,
189199 testPlatform : platformsMap ["AzureStackHub" ],
190- expectedResourceCount : 5 ,
200+ expectedResourceCount : 6 ,
191201 expectedResourcesKindName : []string {
192202 "Deployment/azure-cloud-controller-manager" ,
193203 "DaemonSet/azure-cloud-node-manager" ,
194204 "Role/azure-cloud-provider" ,
195205 "RoleBinding/azure-cloud-provider:azure-cloud-provider" ,
196206 "PodDisruptionBudget/azure-cloud-controller-manager" ,
207+ "Service/azure-cloud-controller-manager" ,
197208 },
198209 }, {
199210 name : "Azure Stack resources returned as expected with single node" ,
200211 testPlatform : platformsMap ["AzureStackHub" ],
201- expectedResourceCount : 4 ,
212+ expectedResourceCount : 5 ,
202213 singleReplica : true ,
203214 expectedResourcesKindName : []string {
204215 "Deployment/azure-cloud-controller-manager" ,
205216 "DaemonSet/azure-cloud-node-manager" ,
206217 "Role/azure-cloud-provider" ,
207218 "RoleBinding/azure-cloud-provider:azure-cloud-provider" ,
219+ "Service/azure-cloud-controller-manager" ,
208220 },
209221 }, {
210222 name : "VSphere resources returned as expected" ,
211223 testPlatform : platformsMap [string (configv1 .VSpherePlatformType )],
212- expectedResourceCount : 8 ,
224+ expectedResourceCount : 9 ,
213225 expectedResourcesKindName : []string {
214226 "Deployment/vsphere-cloud-controller-manager" ,
215227 "PodDisruptionBudget/vsphere-cloud-controller-manager" ,
@@ -219,11 +231,12 @@ func TestGetResources(t *testing.T) {
219231 "ClusterRole/vsphere-cloud-controller-manager" ,
220232 "ClusterRoleBinding/vsphere-cloud-controller-manager:vsphere-cloud-controller-manager" ,
221233 "ClusterRoleBinding/vsphere-cloud-controller-manager:cloud-controller-manager" ,
234+ "Service/vsphere-cloud-controller-manager" ,
222235 },
223236 }, {
224237 name : "VSphere resources returned as expected with single node" ,
225238 testPlatform : platformsMap [string (configv1 .VSpherePlatformType )],
226- expectedResourceCount : 7 ,
239+ expectedResourceCount : 8 ,
227240 singleReplica : true ,
228241 expectedResourcesKindName : []string {
229242 "Deployment/vsphere-cloud-controller-manager" ,
@@ -233,39 +246,48 @@ func TestGetResources(t *testing.T) {
233246 "ClusterRole/vsphere-cloud-controller-manager" ,
234247 "ClusterRoleBinding/vsphere-cloud-controller-manager:vsphere-cloud-controller-manager" ,
235248 "ClusterRoleBinding/vsphere-cloud-controller-manager:cloud-controller-manager" ,
249+ "Service/vsphere-cloud-controller-manager" ,
236250 },
237251 }, {
238252 name : "OVirt resources are empty, as the platform is not yet supported" ,
239253 testPlatform : platformsMap [string (configv1 .OvirtPlatformType )],
240254 }, {
241255 name : "IBMCloud resources" ,
242256 testPlatform : platformsMap [string (configv1 .IBMCloudPlatformType )],
243- expectedResourceCount : 2 ,
257+ expectedResourceCount : 3 ,
244258 expectedResourcesKindName : []string {
245259 "Deployment/ibm-cloud-controller-manager" ,
246260 "PodDisruptionBudget/ibmcloud-cloud-controller-manager" ,
261+ "Service/ibmcloud-cloud-controller-manager" ,
247262 },
248263 }, {
249- name : "IBMCloud resources with single node cluster" ,
250- testPlatform : platformsMap [string (configv1 .IBMCloudPlatformType )],
251- expectedResourceCount : 1 ,
252- singleReplica : true ,
253- expectedResourcesKindName : []string {"Deployment/ibm-cloud-controller-manager" },
264+ name : "IBMCloud resources with single node cluster" ,
265+ testPlatform : platformsMap [string (configv1 .IBMCloudPlatformType )],
266+ expectedResourceCount : 2 ,
267+ singleReplica : true ,
268+ expectedResourcesKindName : []string {
269+ "Deployment/ibm-cloud-controller-manager" ,
270+ "Service/ibmcloud-cloud-controller-manager" ,
271+ },
254272 }, {
255273 name : "PowerVS resources" ,
256274 testPlatform : platformsMap [string (configv1 .PowerVSPlatformType )],
257- expectedResourceCount : 2 ,
275+ expectedResourceCount : 3 ,
258276 singleReplica : false ,
259277 expectedResourcesKindName : []string {
260278 "Deployment/powervs-cloud-controller-manager" ,
261279 "PodDisruptionBudget/powervs-cloud-controller-manager" ,
280+ "Service/powervs-cloud-controller-manager" ,
262281 },
263282 }, {
264- name : "PowerVS resources with single node cluster" ,
265- testPlatform : platformsMap [string (configv1 .PowerVSPlatformType )],
266- expectedResourceCount : 1 ,
267- singleReplica : true ,
268- expectedResourcesKindName : []string {"Deployment/powervs-cloud-controller-manager" },
283+ name : "PowerVS resources with single node cluster" ,
284+ testPlatform : platformsMap [string (configv1 .PowerVSPlatformType )],
285+ expectedResourceCount : 2 ,
286+ singleReplica : true ,
287+ expectedResourcesKindName : []string {
288+ "Deployment/powervs-cloud-controller-manager" ,
289+ "Service/powervs-cloud-controller-manager" ,
290+ },
269291 }, {
270292 name : "Libvirt resources are empty" ,
271293 testPlatform : platformsMap [string (configv1 .LibvirtPlatformType )],
0 commit comments