Repository: shipwright-io/build
Pull request #649 (2021-03-09 10:45:02)

Make Burst and QPS of the Kube API client configurable
# Changes

While testing with higher MaxConcurrentReconciles values for the build controller, I noticed that going beyond 5 did not further improve the throughput. The next bottleneck is the QPS of the API client. Making it configurable together with its Burst setting. Here are some measured numbers:

System contains around 1150 builds that nearly all use git repository validation. I am always measuring the time between the message that there is a new leader, for example:

```
Mar 9 11:31:57 shipwright-build-controller-5597b7f655-xxpdr shipwright-build debug shipwright-build-controller-5597b7f655-xxpdr_0f7d673f-676e-4dd7-976b-828fab7ba7c4 became leader
```

And the last debug message stating that a build has been reconciled, for example:

```
Mar 9 11:32:05 shipwright-build-controller-5597b7f655-xxpdr shipwright-build debug {"level":"debug","ts":1615285924.2161481,"logger":"controller-runtime.controller","msg":"Successfully Reconciled","controller":"build-controller","name":"test-kaniko-medium-144","namespace":"sascha-test"}
```

| MaxConcurrentReconciles | QPS | Burst | Result |
| -- | -- |  -- | -- |
| Not set (1) | Not set | Not set | 3min24s |
| 5 | Not set | Not set | 54s |
| 10 | Not set | Not set | 53s |
| 50 | Not set | Not set | 53s |
| 10 | 100 | 100 | 22s |
| 20 | 100 | 100 | 11s |
| 40 | 100 | 100 | 11s |
| 40 | 200 | 200 | 8s |

# Submitter Checklist

- [X] Includes tests if functionality changed/was added
- [X] Includes docs if changes are user-facing
- [X] [Set a kind label on this PR](https://prow.k8s.io/command-help#kind)  
- [X] Release notes block has been filled in, or marked NONE

# Release Notes

```release-note
Expose configuration for the Burst and QPS settings of the kube-api client
```


openshift-ci-robot: [APPROVALNOTIFIER] This PR is **NOT APPROVED**

This pull-request has been approved by:
To complete the [pull request process](https://git.k8s.io/community/contributors/guide/owners.md#the-code-review-process), please assign **saschaschwarze0** after the PR has been reviewed.
You can assign the PR to them by writing `/assign @saschaschwarze0` in a comment when ready.

The full list of commands accepted by this bot can be found [here](https://go.k8s.io/bot-commands?repo=shipwright-io%2Fbuild).

<details open>
Needs approval from an approver in each of these files:

- **[OWNERS](https://github.com/shipwright-io/build/blob/master/OWNERS)**

Approvers can indicate their approval by writing `/approve` in a comment
Approvers can cancel approval by writing `/approve cancel` in a comment
</details>
<!-- META={"approvers":["saschaschwarze0"]} -->

Patch:
diff --git a/docs/build.md b/docs/build.md
index 1a9cb493..7da92e23 100644
--- a/docs/build.md
+++ b/docs/build.md
@@ -99,8 +99,8 @@ metadata:
     build.shipwright.io/verify.repository: "false"
 spec:
   source:
-    url: https://github.com/shipwright-io/sample-go
-    contextDir: docker-build
+    url: https://github.com/qu1queee/taxi
+    revision: master
 ```
 
 _Note_: The Build controller only validates two scenarios. The first one where the endpoint uses an `http/https` protocol, the second one when a `ssh` protocol (_e.g. `git@`_) is defined and none referenced secret was provided(_e.g. source.credentials.name_).
@@ -141,8 +141,8 @@ metadata:
   name: buildah-golang-build
 spec:
   source:
-    url: https://github.com/shipwright-io/sample-go
-    contextDir: docker-build
+    url: https://github.com/qu1queee/taxi
+    revision: master
 ```
 
 ### Defining the Strategy
@@ -179,8 +179,8 @@ metadata:
   name: buildah-golang-build
 spec:
   source:
-    url: https://github.com/shipwright-io/sample-go
-    contextDir: docker-build
+    url: https://github.com/qu1queee/taxi
+    revision: master
   strategy:
     name: buildah
     kind: ClusterBuildStrategy
diff --git a/docs/buildstrategies.md b/docs/buildstrategies.md
index e6b6f8ed..7c649e25 100644
--- a/docs/buildstrategies.md
+++ b/docs/buildstrategies.md
@@ -293,8 +293,7 @@ metadata:
   name: kaniko-medium
 spec:
   source:
-    url: https://github.com/shipwright-io/sample-go
-    contextDir: docker-build
+    url: https://github.com/qu1queee/taxi
   strategy:
     name: kaniko
     kind: ClusterBuildStrategy
diff --git a/docs/configuration.md b/docs/configuration.md
index eb82d185..66d5725f 100644
--- a/docs/configuration.md
+++ b/docs/configuration.md
@@ -22,3 +22,5 @@ The following environment variables are available:
 | `BUILDRUN_MAX_CONCURRENT_RECONCILES` | The number of concurrent reconciles by the buildrun controller. A value of 0 or lower will use the default from the [controller-runtime controller Options](https://pkg.go.dev/sigs.k8s.io/controller-runtime/pkg/controller#Options). Default is 0. |
 | `BUILDSTRATEGY_MAX_CONCURRENT_RECONCILES` | The number of concurrent reconciles by the buildstrategy controller. A value of 0 or lower will use the default from the [controller-runtime controller Options](https://pkg.go.dev/sigs.k8s.io/controller-runtime/pkg/controller#Options). Default is 0. |
 | `CLUSTERBUILDSTRATEGY_MAX_CONCURRENT_RECONCILES` | The number of concurrent reconciles by the clusterbuildstrategy controller. A value of 0 or lower will use the default from the [controller-runtime controller Options](https://pkg.go.dev/sigs.k8s.io/controller-runtime/pkg/controller#Options). Default is 0. |
+| `KUBE_API_BURST` | Burst to use for the Kubernetes API client. See [Config.Burst](https://pkg.go.dev/k8s.io/client-go/rest#Config.Burst). A value of 0 or lower will use the default from client-go, which currently is 10. Default is 0. |
+| `KUBE_API_QPS` | QPS to use for the Kubernetes API client. See [Config.QPS](https://pkg.go.dev/k8s.io/client-go/rest#Config.QPS). A value of 0 or lower will use the default from client-go, which currently is 5. Default is 0. |
diff --git a/pkg/config/config.go b/pkg/config/config.go
index 98e30b3b..1a932fa7 100644
--- a/pkg/config/config.go
+++ b/pkg/config/config.go
@@ -37,11 +37,15 @@ const (
 	renewDeadlineEnvVar = "BUILD_CONTROLLER_RENEW_DEADLINE"
 	retryPeriodEnvVar   = "BUILD_CONTROLLER_RETRY_PERIOD"
 
-	// environment variable for the controllers
+	// environment variables for the controllers
 	controllerBuildMaxConcurrentReconciles                = "BUILD_MAX_CONCURRENT_RECONCILES"
 	controllerBuildRunMaxConcurrentReconciles             = "BUILDRUN_MAX_CONCURRENT_RECONCILES"
 	controllerBuildStrategyMaxConcurrentReconciles        = "BUILDSTRATEGY_MAX_CONCURRENT_RECONCILES"
 	controllerClusterBuildStrategyMaxConcurrentReconciles = "CLUSTERBUILDSTRATEGY_MAX_CONCURRENT_RECONCILES"
+
+	// environment variables for the kube API
+	kubeAPIBurst = "KUBE_API_BURST"
+	kubeAPIQPS   = "KUBE_API_QPS"
 )
 
 var (
@@ -59,6 +63,7 @@ type Config struct {
 	Prometheus           PrometheusConfig
 	ManagerOptions       ManagerOptions
 	Controllers          Controllers
+	KubeAPIOptions       KubeAPIOptions
 }
 
 // PrometheusConfig contains the specific configuration for the
@@ -90,6 +95,12 @@ type ControllerOptions struct {
 	MaxConcurrentReconciles int
 }
 
+// KubeAPIOptions contains configrable options for the kube API client
+type KubeAPIOptions struct {
+	QPS   int
+	Burst int
+}
+
 // NewDefaultConfig returns a new Config, with context timeout and default Kaniko image.
 func NewDefaultConfig() *Config {
 	return &Config{
@@ -117,6 +128,10 @@ func NewDefaultConfig() *Config {
 				MaxConcurrentReconciles: 0,
 			},
 		},
+		KubeAPIOptions: KubeAPIOptions{
+			QPS:   0,
+			Burst: 0,
+		},
 	}
 }
 
@@ -164,6 +179,7 @@ func (c *Config) SetConfigFromEnv() error {
 		return err
 	}
 
+	// controller settings
 	if err := updateIntOption(&c.Controllers.Build.MaxConcurrentReconciles, controllerBuildMaxConcurrentReconciles); err != nil {
 		return err
 	}
@@ -177,6 +193,14 @@ func (c *Config) SetConfigFromEnv() error {
 		return err
 	}
 
+	// kube API settings
+	if err := updateIntOption(&c.KubeAPIOptions.Burst, kubeAPIBurst); err != nil {
+		return err
+	}
+	if err := updateIntOption(&c.KubeAPIOptions.QPS, kubeAPIQPS); err != nil {
+		return err
+	}
+
 	return nil
 }
 
diff --git a/pkg/controller/controller.go b/pkg/controller/controller.go
index 35531a61..de361056 100644
--- a/pkg/controller/controller.go
+++ b/pkg/controller/controller.go
@@ -41,6 +41,13 @@ func NewManager(ctx context.Context, config *config.Config, cfg *rest.Config, op
 		return nil, err
 	}
 
+	if config.KubeAPIOptions.Burst > 0 {
+		mgr.GetConfig().Burst = config.KubeAPIOptions.Burst
+	}
+	if config.KubeAPIOptions.QPS > 0 {
+		mgr.GetConfig().QPS = float32(config.KubeAPIOptions.QPS)
+	}
+
 	ctxlog.Info(ctx, "Registering Components.")
 
 	if err := pipelinev1beta1.AddToScheme(mgr.GetScheme()); err != nil {
diff --git a/samples/build/build_buildah_cr.yaml b/samples/build/build_buildah_cr.yaml
index 4456963c..0218ce8d 100644
--- a/samples/build/build_buildah_cr.yaml
+++ b/samples/build/build_buildah_cr.yaml
@@ -5,8 +5,8 @@ metadata:
   name: buildah-golang-build
 spec:
   source:
-    url: https://github.com/shipwright-io/sample-go
-    contextDir: docker-build
+    url: https://github.com/qu1queee/taxi
+    revision: master
   strategy:
     name: buildah
     kind: ClusterBuildStrategy
diff --git a/samples/build/build_buildpacks-v3-heroku_cr.yaml b/samples/build/build_buildpacks-v3-heroku_cr.yaml
index 7bd4d824..bb4eb766 100644
--- a/samples/build/build_buildpacks-v3-heroku_cr.yaml
+++ b/samples/build/build_buildpacks-v3-heroku_cr.yaml
@@ -5,8 +5,7 @@ metadata:
   name: buildpack-nodejs-build-heroku
 spec:
   source:
-    url: https://github.com/shipwright-io/sample-nodejs
-    contextDir: source-build
+    url: https://github.com/sclorg/nodejs-ex
   strategy:
     name: buildpacks-v3-heroku
     kind: ClusterBuildStrategy
diff --git a/samples/build/build_buildpacks-v3-heroku_namespaced_cr.yaml b/samples/build/build_buildpacks-v3-heroku_namespaced_cr.yaml
index 62568ba3..2c2ca9a8 100644
--- a/samples/build/build_buildpacks-v3-heroku_namespaced_cr.yaml
+++ b/samples/build/build_buildpacks-v3-heroku_namespaced_cr.yaml
@@ -5,8 +5,7 @@ metadata:
   name: buildpack-nodejs-build-namespaced-heroku
 spec:
   source:
-    url: https://github.com/shipwright-io/sample-nodejs
-    contextDir: source-build
+    url: https://github.com/sclorg/nodejs-ex
   strategy:
     name: buildpacks-v3-heroku
     kind: BuildStrategy
diff --git a/samples/build/build_buildpacks-v3_cr.yaml b/samples/build/build_buildpacks-v3_cr.yaml
index fef649e1..d5be0782 100644
--- a/samples/build/build_buildpacks-v3_cr.yaml
+++ b/samples/build/build_buildpacks-v3_cr.yaml
@@ -7,8 +7,7 @@ metadata:
     build.shipwright.io/build-run-deletion: "false"
 spec:
   source:
-    url: https://github.com/shipwright-io/sample-nodejs
-    contextDir: source-build
+    url: https://github.com/sclorg/nodejs-ex
   strategy:
     name: buildpacks-v3
     kind: ClusterBuildStrategy
diff --git a/samples/build/build_buildpacks-v3_namespaced_cr.yaml b/samples/build/build_buildpacks-v3_namespaced_cr.yaml
index 670efe11..3ca932e6 100644
--- a/samples/build/build_buildpacks-v3_namespaced_cr.yaml
+++ b/samples/build/build_buildpacks-v3_namespaced_cr.yaml
@@ -5,8 +5,7 @@ metadata:
   name: buildpack-nodejs-build-namespaced
 spec:
   source:
-    url: https://github.com/shipwright-io/sample-nodejs
-    contextDir: source-build
+    url: https://github.com/sclorg/nodejs-ex
   strategy:
     name: buildpacks-v3
     kind: BuildStrategy
diff --git a/samples/build/build_kaniko_cr.yaml b/samples/build/build_kaniko_cr.yaml
index 01494088..175cfa01 100644
--- a/samples/build/build_kaniko_cr.yaml
+++ b/samples/build/build_kaniko_cr.yaml
@@ -7,8 +7,7 @@ metadata:
     build.shipwright.io/build-run-deletion: "true"
 spec:
   source:
-    url: https://github.com/shipwright-io/sample-go
-    contextDir: docker-build
+    url: https://github.com/qu1queee/taxi
   strategy:
     name: kaniko
     kind: ClusterBuildStrategy
diff --git a/samples/build/build_source-to-image_cr.yaml b/samples/build/build_source-to-image_cr.yaml
index 7f4c1e96..6ee3ad69 100644
--- a/samples/build/build_source-to-image_cr.yaml
+++ b/samples/build/build_source-to-image_cr.yaml
@@ -1,7 +1,4 @@
 ---
-# TODO: The source-to-image Strategy does not support contextDir, therefore
-# we are not adding a reference to https://github.com/shipwright-io/sample-nodejs
-# with the /source-build contextDir in this sample.
 apiVersion: shipwright.io/v1alpha1
 kind: Build
 metadata:


Test patch:
diff --git a/pkg/config/config_test.go b/pkg/config/config_test.go
index e0fe9b4a..b49e8483 100644
--- a/pkg/config/config_test.go
+++ b/pkg/config/config_test.go
@@ -92,6 +92,18 @@ var _ = Describe("Config", func() {
 				Expect(config.Controllers.ClusterBuildStrategy.MaxConcurrentReconciles).To(Equal(5))
 			})
 		})
+
+		It("should allow for an override of kube API client configuration", func() {
+			var overrides = map[string]string{
+				"KUBE_API_BURST": "200",
+				"KUBE_API_QPS":   "300",
+			}
+
+			configWithEnvVariableOverrides(overrides, func(config *Config) {
+				Expect(config.KubeAPIOptions.Burst).To(Equal(200))
+				Expect(config.KubeAPIOptions.QPS).To(Equal(300))
+			})
+		})
 	})
 })
 
diff --git a/pkg/reconciler/build/build_test.go b/pkg/reconciler/build/build_test.go
index 16893f5f..e22eda0d 100644
--- a/pkg/reconciler/build/build_test.go
+++ b/pkg/reconciler/build/build_test.go
@@ -384,7 +384,7 @@ var _ = Describe("Reconcile Build", func() {
 
 			// validate https protocol
 			It("fails when public source URL is unreachable", func() {
-				buildSample.Spec.Source.URL = "https://github.com/shipwright-io/sample-go-fake"
+				buildSample.Spec.Source.URL = "https://github.com/qu1queee/taxi-fake"
 
 				statusCall := ctl.StubFunc(corev1.ConditionFalse, build.RemoteRepositoryUnreachable, "remote repository unreachable")
 				statusWriter.UpdateCalls(statusCall)
diff --git a/pkg/reconciler/buildrun/resources/taskrun_test.go b/pkg/reconciler/buildrun/resources/taskrun_test.go
index 0b2b5f1a..9b60f232 100644
--- a/pkg/reconciler/buildrun/resources/taskrun_test.go
+++ b/pkg/reconciler/buildrun/resources/taskrun_test.go
@@ -36,7 +36,7 @@ var _ = Describe("GenerateTaskrun", func() {
 
 	BeforeEach(func() {
 		buildpacks = "buildpacks-v3"
-		url = "https://github.com/shipwright-io/sample-go"
+		url = "https://github.com/qu1queee/taxi"
 		dockerfile = "Dockerfile"
 	})
 
@@ -120,7 +120,7 @@ var _ = Describe("GenerateTaskrun", func() {
 			}
 
 			namespace = "build-test"
-			contextDir = "docker-build"
+			contextDir = "src"
 			revision = ""
 			builderImage = &buildv1alpha1.Image{
 				ImageURL: "heroku/buildpacks:18",
diff --git a/test/build_samples.go b/test/build_samples.go
index b86cdf8c..c29a1d67 100644
--- a/test/build_samples.go
+++ b/test/build_samples.go
@@ -13,7 +13,7 @@ metadata:
   name: buildah
 spec:
   source:
-    url: "https://github.com/shipwright-io/sample-go"
+    url: "https://github.com/qu1queee/taxi"
   strategy:
     name: buildah
     kind: ClusterBuildStrategy
@@ -30,7 +30,7 @@ metadata:
   namespace: build-test
 spec:
   source:
-    url: "https://github.com/shipwright-io/sample-go"
+    url: "https://github.com/qu1queee/taxi"
   strategy:
     name: buildah
   output:
@@ -48,8 +48,9 @@ metadata:
   namespace: build-test
 spec:
   source:
-    url: "https://github.com/shipwright-io/sample-go"
-    contextDir: docker-build
+    url: "https://github.com/qu1queee/taxi"
+    revision: master
+    contextDir: src
   strategy:
     name: buildpacks-v3
     kind: ClusterBuildStrategy
@@ -72,7 +73,7 @@ metadata:
   namespace: build-test
 spec:
   source:
-    url: "https://github.com/shipwright-io/sample-go"
+    url: "https://github.com/qu1queee/taxi"
   strategy:
     name: buildah
   output:
@@ -86,7 +87,7 @@ apiVersion: shipwright.io/v1alpha1
 kind: Build
 spec:
   source:
-    url: "https://github.com/shipwright-io/sample-go"
+    url: "https://github.com/qu1queee/taxi"
   strategy:
     kind: BuildStrategy
   output:
@@ -100,8 +101,7 @@ apiVersion: shipwright.io/v1alpha1
 kind: Build
 spec:
   source:
-    url: "https://github.com/shipwright-io/sample-go"
-    contextDir: docker-build
+    url: "https://github.com/qu1queee/taxi"
   strategy:
     kind: ClusterBuildStrategy
   output:
@@ -115,7 +115,7 @@ apiVersion: shipwright.io/v1alpha1
 kind: Build
 spec:
   source:
-    url: "https://github.com/shipwright-io/sample-go"
+    url: "https://github.com/qu1queee/taxi"
   strategy:
     kind: ClusterBuildStrategy
   output:
@@ -131,7 +131,7 @@ apiVersion: shipwright.io/v1alpha1
 kind: Build
 spec:
   source:
-    url: "https://github.com/shipwright-io/sample-go"
+    url: "https://github.com/qu1queee/taxi"
   strategy:
     kind: ClusterBuildStrategy
   output:
@@ -148,7 +148,7 @@ apiVersion: shipwright.io/v1alpha1
 kind: Build
 spec:
   source:
-    url: "https://github.com/shipwright-io/sample-go"
+    url: "https://github.com/qu1queee/taxi"
     credentials:
       name: source-secret
   strategy:
@@ -165,7 +165,7 @@ apiVersion: shipwright.io/v1alpha1
 kind: Build
 spec:
   source:
-    url: "https://github.com/shipwright-io/sample-go"
+    url: "https://github.com/qu1queee/taxi"
   builder:
     image: heroku/buildpacks:18
     credentials:
@@ -184,7 +184,7 @@ apiVersion: shipwright.io/v1alpha1
 kind: Build
 spec:
   source:
-    url: "https://github.com/shipwright-io/sample-go"
+    url: "https://github.com/qu1queee/taxi"
     credentials:
       name: source-secret
   builder:
@@ -205,7 +205,7 @@ apiVersion: shipwright.io/v1alpha1
 kind: Build
 spec:
   source:
-    url: "https://github.com/shipwright-io/sample-go"
+    url: "https://github.com/qu1queee/taxi"
   strategy:
     kind: ClusterBuildStrategy
   output:
@@ -265,7 +265,7 @@ metadata:
     build.shipwright.io/build-run-deletion: "true"
 spec:
   source:
-    url: "https://github.com/shipwright-io/sample-go"
+    url: "https://github.com/qu1queee/taxi"
   strategy:
     kind: ClusterBuildStrategy
   output:
diff --git a/test/catalog.go b/test/catalog.go
index e6c25055..42c74f70 100644
--- a/test/catalog.go
+++ b/test/catalog.go
@@ -85,7 +85,7 @@ func (c *Catalog) BuildWithClusterBuildStrategy(name string, ns string, strategy
 		},
 		Spec: build.BuildSpec{
 			Source: build.GitSource{
-				URL: "https://github.com/shipwright-io/sample-go",
+				URL: "https://github.com/qu1queee/taxi",
 			},
 			StrategyRef: &build.StrategyRef{
 				Name: strategyName,
@@ -111,7 +111,7 @@ func (c *Catalog) BuildWithClusterBuildStrategyAndSourceSecret(name string, ns s
 		},
 		Spec: build.BuildSpec{
 			Source: build.GitSource{
-				URL: "https://github.com/shipwright-io/sample-go",
+				URL: "https://github.com/qu1queee/taxi",
 				SecretRef: &corev1.LocalObjectReference{
 					Name: "foobar",
 				},
@@ -137,7 +137,7 @@ func (c *Catalog) BuildWithBuildStrategy(name string, ns string, strategyName st
 		},
 		Spec: build.BuildSpec{
 			Source: build.GitSource{
-				URL: "https://github.com/shipwright-io/sample-go",
+				URL: "https://github.com/qu1queee/taxi",
 			},
 			StrategyRef: &build.StrategyRef{
 				Name: strategyName,
@@ -156,7 +156,7 @@ func (c *Catalog) BuildWithNilBuildStrategyKind(name string, ns string, strategy
 		},
 		Spec: build.BuildSpec{
 			Source: build.GitSource{
-				URL: "https://github.com/shipwright-io/sample-go",
+				URL: "https://github.com/qu1queee/taxi",
 			},
 			StrategyRef: &build.StrategyRef{
 				Name: strategyName,
@@ -174,7 +174,7 @@ func (c *Catalog) BuildWithOutputSecret(name string, ns string, secretName strin
 		},
 		Spec: build.BuildSpec{
 			Source: build.GitSource{
-				URL: "https://github.com/shipwright-io/sample-go",
+				URL: "https://github.com/qu1queee/taxi",
 			},
 			Output: build.Image{
 				SecretRef: &corev1.LocalObjectReference{
diff --git a/test/data/build_buildah_cr_custom_context+dockerfile.yaml b/test/data/build_buildah_cr_custom_context+dockerfile.yaml
index 948cc70d..b3a67cdf 100644
--- a/test/data/build_buildah_cr_custom_context+dockerfile.yaml
+++ b/test/data/build_buildah_cr_custom_context+dockerfile.yaml
@@ -5,8 +5,8 @@ metadata:
   name: buildah-custom-context-dockerfile
 spec:
   source:
-    url: https://github.com/shipwright-io/sample-nodejs
-    contextDir: docker-build-renamed
+    url: https://github.com/SaschaSchwarze0/npm-simple
+    contextDir: renamed
   strategy:
     name: buildah
     kind: ClusterBuildStrategy
diff --git a/test/data/build_buildpacks-v3_golang_cr.yaml b/test/data/build_buildpacks-v3_golang_cr.yaml
index 0ac744cd..f6a0257c 100644
--- a/test/data/build_buildpacks-v3_golang_cr.yaml
+++ b/test/data/build_buildpacks-v3_golang_cr.yaml
@@ -5,8 +5,9 @@ metadata:
   name: buildpack-golang-build
 spec:
   source:
-    url: https://github.com/shipwright-io/sample-go
-    contextDir: source-build
+    url: https://github.com/cloudfoundry/cf-acceptance-tests
+    contextDir: assets/catnip
+    revision: main
   strategy:
     name: buildpacks-v3
     kind: ClusterBuildStrategy
diff --git a/test/data/build_buildpacks-v3_java_cr.yaml b/test/data/build_buildpacks-v3_java_cr.yaml
index 22a3289e..1e401e17 100644
--- a/test/data/build_buildpacks-v3_java_cr.yaml
+++ b/test/data/build_buildpacks-v3_java_cr.yaml
@@ -5,8 +5,9 @@ metadata:
   name: buildpack-java-build
 spec:
   source:
-    url: https://github.com/shipwright-io/sample-java
-    contextDir: source-build
+    url: https://github.com/cloudfoundry/cf-acceptance-tests
+    contextDir: assets/java
+    revision: main
   strategy:
     name: buildpacks-v3
     kind: ClusterBuildStrategy
diff --git a/test/data/build_buildpacks-v3_nodejs_runtime-image_cr.yaml b/test/data/build_buildpacks-v3_nodejs_runtime-image_cr.yaml
index 7ebc7bee..49f5d911 100644
--- a/test/data/build_buildpacks-v3_nodejs_runtime-image_cr.yaml
+++ b/test/data/build_buildpacks-v3_nodejs_runtime-image_cr.yaml
@@ -1,6 +1,4 @@
 ---
-# Note: Cannot replace the repository here in favor of https://github.com/shipwright-io/sample-nodejs
-# due to https://github.com/shipwright-io/build/issues/636
 apiVersion: shipwright.io/v1alpha1
 kind: Build
 metadata:
diff --git a/test/data/build_buildpacks-v3_php_cr.yaml b/test/data/build_buildpacks-v3_php_cr.yaml
index ed51eace..c86707b6 100644
--- a/test/data/build_buildpacks-v3_php_cr.yaml
+++ b/test/data/build_buildpacks-v3_php_cr.yaml
@@ -5,8 +5,9 @@ metadata:
   name: buildpack-php-build
 spec:
   source:
-    url: https://github.com/shipwright-io/sample-php
-    contextDir: source-build
+    url: https://github.com/cloudfoundry/cf-acceptance-tests
+    contextDir: assets/php
+    revision: main
   strategy:
     name: buildpacks-v3
     kind: ClusterBuildStrategy
diff --git a/test/data/build_buildpacks-v3_ruby_cr.yaml b/test/data/build_buildpacks-v3_ruby_cr.yaml
index c46eecab..fa28075d 100644
--- a/test/data/build_buildpacks-v3_ruby_cr.yaml
+++ b/test/data/build_buildpacks-v3_ruby_cr.yaml
@@ -5,8 +5,9 @@ metadata:
   name: buildpack-ruby-build
 spec:
   source:
-    url: https://github.com/shipwright-io/sample-ruby
-    contextDir: source-build
+    url: https://github.com/cloudfoundry/cf-acceptance-tests
+    contextDir: assets/dora
+    revision: main
   strategy:
     name: buildpacks-v3
     kind: ClusterBuildStrategy
diff --git a/test/data/build_kaniko_cr_advanced_dockerfile.yaml b/test/data/build_kaniko_cr_advanced_dockerfile.yaml
index 854c0273..15b2d578 100644
--- a/test/data/build_kaniko_cr_advanced_dockerfile.yaml
+++ b/test/data/build_kaniko_cr_advanced_dockerfile.yaml
@@ -7,8 +7,7 @@ metadata:
     build.shipwright.io/build-run-deletion: "false"
 spec:
   source:
-    url: https://github.com/shipwright-io/sample-java
-    contextDir: docker-build
+    url: https://github.com/SaschaSchwarze0/java-simple
   strategy:
     name: kaniko
     kind: ClusterBuildStrategy
diff --git a/test/data/build_kaniko_cr_custom_context+dockerfile.yaml b/test/data/build_kaniko_cr_custom_context+dockerfile.yaml
index eef400c9..d91efea8 100644
--- a/test/data/build_kaniko_cr_custom_context+dockerfile.yaml
+++ b/test/data/build_kaniko_cr_custom_context+dockerfile.yaml
@@ -5,11 +5,11 @@ metadata:
   name: kaniko-custom-context-dockerfile
 spec:
   source:
-    url: https://github.com/shipwright-io/sample-nodejs
-    contextDir: docker-build
+    url: https://github.com/SaschaSchwarze0/npm-simple
+    contextDir: renamed
   strategy:
     name: kaniko
     kind: ClusterBuildStrategy
-  dockerfile: Dockerfile
+  dockerfile: RenamedDockerfile
   output:
     image: image-registry.openshift-image-registry.svc:5000/build-examples/renamed-dockerfile
diff --git a/test/data/build_timeout.yaml b/test/data/build_timeout.yaml
index 4f3908ef..4f422a0f 100644
--- a/test/data/build_timeout.yaml
+++ b/test/data/build_timeout.yaml
@@ -5,8 +5,7 @@ metadata:
   name: build-timeout
 spec:
   source:
-    url: https://github.com/shipwright-io/sample-java
-    contextDir: docker-build
+    url: https://github.com/SaschaSchwarze0/java-simple
   strategy:
     name: kaniko
     kind: ClusterBuildStrategy
diff --git a/test/integration/build_to_buildruns_test.go b/test/integration/build_to_buildruns_test.go
index 9b09604f..139e09f6 100644
--- a/test/integration/build_to_buildruns_test.go
+++ b/test/integration/build_to_buildruns_test.go
@@ -338,11 +338,11 @@ var _ = Describe("Integration tests Build and BuildRuns", func() {
 
 			tr01, err := tb.GetTaskRunFromBuildRun(buildRun01.Name)
 			Expect(err).To(BeNil())
-			Expect(tr01.Spec.Resources.Inputs[0].PipelineResourceBinding.ResourceSpec.Params[0].Value).To(Equal("https://github.com/shipwright-io/sample-go"))
+			Expect(tr01.Spec.Resources.Inputs[0].PipelineResourceBinding.ResourceSpec.Params[0].Value).To(Equal("https://github.com/qu1queee/taxi"))
 
 			tr02, err := tb.GetTaskRunFromBuildRun(buildRun02.Name)
 			Expect(err).To(BeNil())
-			Expect(tr02.Spec.Resources.Inputs[0].PipelineResourceBinding.ResourceSpec.Params[0].Value).To(Equal("https://github.com/shipwright-io/sample-go"))
+			Expect(tr02.Spec.Resources.Inputs[0].PipelineResourceBinding.ResourceSpec.Params[0].Value).To(Equal("https://github.com/qu1queee/taxi"))
 
 		})
 	})
diff --git a/test/integration/build_to_git_test.go b/test/integration/build_to_git_test.go
index 28074911..8c17cc6a 100644
--- a/test/integration/build_to_git_test.go
+++ b/test/integration/build_to_git_test.go
@@ -46,7 +46,7 @@ var _ = Describe("Integration tests Build and referenced Source url", func() {
 			Expect(err).To(BeNil())
 
 			buildObject.ObjectMeta.Annotations["build.shipwright.io/verify.repository"] = "true"
-			buildObject.Spec.Source.URL = "http://github.com/shipwright-io/sample-go"
+			buildObject.Spec.Source.URL = "http://github.com/qu1queee/taxi"
 
 			Expect(tb.CreateBuild(buildObject)).To(BeNil())
 
@@ -71,7 +71,7 @@ var _ = Describe("Integration tests Build and referenced Source url", func() {
 			)
 			Expect(err).To(BeNil())
 
-			buildObject.Spec.Source.URL = "http://github.com/shipwright-io/sample-go-fake"
+			buildObject.Spec.Source.URL = "http://github.com/qu1queee/taxi-fake"
 			Expect(tb.CreateBuild(buildObject)).To(BeNil())
 
 			// wait until the Build finish the validation
@@ -96,7 +96,7 @@ var _ = Describe("Integration tests Build and referenced Source url", func() {
 			Expect(err).To(BeNil())
 
 			buildObject.ObjectMeta.Annotations["build.shipwright.io/verify.repository"] = "true"
-			buildObject.Spec.Source.URL = "https://github.com/shipwright-io/sample-go"
+			buildObject.Spec.Source.URL = "https://github.com/qu1queee/taxi"
 
 			Expect(tb.CreateBuild(buildObject)).To(BeNil())
 
@@ -121,7 +121,7 @@ var _ = Describe("Integration tests Build and referenced Source url", func() {
 			)
 			Expect(err).To(BeNil())
 
-			buildObject.Spec.Source.URL = "https://github.com/shipwright-io/sample-go-fake"
+			buildObject.Spec.Source.URL = "https://github.com/qu1queee/taxi-fake"
 			Expect(tb.CreateBuild(buildObject)).To(BeNil())
 
 			// wait until the Build finish the validation