@@ -158,9 +158,11 @@ var _ = BeforeSuite(func() {
158
158
// Wait for CertManager to be available before continuing
159
159
common .WaitDeployment (kindClient , "cert-manager" , "cert-manager-webhook" )
160
160
161
- // Deploy the CAPI components
161
+ // Deploy the CAPI, CABPK, and KCP components from Cluster API repository,
162
162
// workaround since there isn't a v1alpha3 capi release yet
163
163
deployCAPIComponents (kindCluster )
164
+ deployCABPKComponents (kindCluster )
165
+ deployKCPComponents (kindCluster )
164
166
165
167
// Deploy the CAPA components
166
168
deployCAPAComponents (kindCluster )
@@ -310,6 +312,46 @@ func deployCAPIComponents(kindCluster kind.Cluster) {
310
312
applyManifests (kindCluster , & manifestFile )
311
313
}
312
314
315
+ func deployCABPKComponents (kindCluster kind.Cluster ) {
316
+ fmt .Fprintf (GinkgoWriter , "Generating CABPK manifests\n " )
317
+
318
+ // Build the manifests using kustomize
319
+ cabpkManifests , err := exec .Command (* kustomizeBinary , "build" , "https://github.com/kubernetes-sigs/cluster-api//bootstrap/kubeadm/config/default" ).Output ()
320
+ if err != nil {
321
+ if exitError , ok := err .(* exec.ExitError ); ok {
322
+ fmt .Fprintf (GinkgoWriter , "Error: %s\n " , string (exitError .Stderr ))
323
+ }
324
+ }
325
+ Expect (err ).NotTo (HaveOccurred ())
326
+
327
+ // write out the manifests
328
+ manifestFile := path .Join (suiteTmpDir , "bootstrap-components.yaml" )
329
+ Expect (ioutil .WriteFile (manifestFile , cabpkManifests , 0644 )).To (Succeed ())
330
+
331
+ // apply generated manifests
332
+ applyManifests (kindCluster , & manifestFile )
333
+ }
334
+
335
+ func deployKCPComponents (kindCluster kind.Cluster ) {
336
+ fmt .Fprintf (GinkgoWriter , "Generating KCP manifests\n " )
337
+
338
+ // Build the manifests using kustomize
339
+ kcpManifests , err := exec .Command (* kustomizeBinary , "build" , "https://github.com/kubernetes-sigs/cluster-api//controlplane/kubeadm/config/default" ).Output ()
340
+ if err != nil {
341
+ if exitError , ok := err .(* exec.ExitError ); ok {
342
+ fmt .Fprintf (GinkgoWriter , "Error: %s\n " , string (exitError .Stderr ))
343
+ }
344
+ }
345
+ Expect (err ).NotTo (HaveOccurred ())
346
+
347
+ // write out the manifests
348
+ manifestFile := path .Join (suiteTmpDir , "control-plane-components.yaml" )
349
+ Expect (ioutil .WriteFile (manifestFile , kcpManifests , 0644 )).To (Succeed ())
350
+
351
+ // apply generated manifests
352
+ applyManifests (kindCluster , & manifestFile )
353
+ }
354
+
313
355
func deployCAPAComponents (kindCluster kind.Cluster ) {
314
356
if capaComponents != nil && * capaComponents != "" {
315
357
applyManifests (kindCluster , capaComponents )
0 commit comments