Skip to content

Commit

Permalink
Use minimal cluster builder/stack/store for local dev scenario
Browse files Browse the repository at this point in the history
Co-authored-by: Danail Branekov <[email protected]>
  • Loading branch information
georgethebeatle and danail-branekov committed Jan 15, 2025
1 parent 26f019d commit b75fdc6
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 7 deletions.
3 changes: 0 additions & 3 deletions README.helm.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,6 @@ Here are all the values that can be set for the chart:
- `builderReadinessTimeout` (_String_): The time that the kpack Builder will be waited for if not in ready state, berfore the build workload fails. See [`time.ParseDuration`](https://pkg.go.dev/time#ParseDuration) for details on the format, an additional `d` suffix for days is supported.
- `builderRepository` (_String_): Container image repository to store the `ClusterBuilder` image. Required when `clusterBuilderName` is not provided.
- `clusterBuilderName` (_String_): The name of the `ClusterBuilder` Kpack has been configured with. Leave blank to let `kpack-image-builder` create an example `ClusterBuilder`.
- `clusterStackBuildImage` (_String_): The image to use for building defined in the `ClusterStack`. Used when `clusterBuilderName` is blank.
- `clusterStackID` (_String_): The ID of the `ClusterStack`. Used when `clusterBuilderName` is blank.
- `clusterStackRunImage` (_String_): The image to use for running defined in the `ClusterStack`. Used when `clusterBuilderName` is blank.
- `include` (_Boolean_): Deploy the `kpack-image-builder` component.
- `replicas` (_Integer_): Number of replicas.
- `resources`: [`ResourceRequirements`](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.25/#resourcerequirements-v1-core) for the API.
Expand Down
39 changes: 39 additions & 0 deletions scripts/assets/kind-builder.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
apiVersion: kpack.io/v1alpha2
kind: ClusterStore
metadata:
name: kind-store
spec:
sources:
- image: gcr.io/paketo-buildpacks/procfile
- image: gcr.io/paketo-buildpacks/go
---
apiVersion: kpack.io/v1alpha2
kind: ClusterStack
metadata:
name: kind-stack
spec:
id: "io.buildpacks.stacks.jammy"
buildImage:
image: paketobuildpacks/build-jammy-base
runImage:
image: paketobuildpacks/run-jammy-base
---
apiVersion: kpack.io/v1alpha2
kind: ClusterBuilder
metadata:
name: kind-builder
spec:
serviceAccountRef:
name: kpack-service-account
namespace: cf
stack:
name: kind-stack
kind: ClusterStack
store:
name: kind-store
kind: ClusterStore
order:
- group:
- id: paketo-buildpacks/procfile
- group:
- id: paketo-buildpacks/go
5 changes: 3 additions & 2 deletions scripts/deploy-on-kind.sh
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,8 @@ function deploy_korifi() {
done
fi

kubectl apply -f "$SCRIPT_DIR/assets/kind-builder.yml"

echo "Deploying korifi..."
helm dependency update helm/korifi

Expand All @@ -199,8 +201,7 @@ function deploy_korifi() {
--set=controllers.taskTTL="5s" \
--set=jobTaskRunner.jobTTL="5s" \
--set=containerRepositoryPrefix="$REPOSITORY_PREFIX" \
--set=kpackImageBuilder.clusterStackBuildImage="paketobuildpacks/build-jammy-base" \
--set=kpackImageBuilder.clusterStackRunImage="paketobuildpacks/run-jammy-base" \
--set=kpackImageBuilder.clusterBuilderName="kind-builder" \
--set=kpackImageBuilder.builderRepository="$KPACK_BUILDER_REPOSITORY" \
--set=networking.gatewayClass="contour" \
--set=networking.gatewayPorts.http="32080" \
Expand Down
2 changes: 0 additions & 2 deletions scripts/installer/install-korifi-kind.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,6 @@ spec:
--set=controllers.taskTTL="5s" \
--set=jobTaskRunner.jobTTL="5s" \
--set=containerRepositoryPrefix="localregistry-docker-registry.default.svc.cluster.local:30050/" \
--set=kpackImageBuilder.clusterStackBuildImage="paketobuildpacks/build-jammy-base" \
--set=kpackImageBuilder.clusterStackRunImage="paketobuildpacks/run-jammy-base" \
--set=kpackImageBuilder.builderRepository="localregistry-docker-registry.default.svc.cluster.local:30050/kpack-builder" \
--set=networking.gatewayClass="contour" \
--set=networking.gatewayPorts.http="32080" \
Expand Down

0 comments on commit b75fdc6

Please sign in to comment.