Skip to content

Commit

Permalink
Merge pull request #113 from kkulak/feat/multiplatform-build
Browse files Browse the repository at this point in the history
feat: multiplatform build setup - linux/arm64
  • Loading branch information
kane8n authored Mar 27, 2024
2 parents 7de6839 + b5350f9 commit 6a49574
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,11 @@ jobs:
echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/v}
echo ::set-output name=TAG_NAME::${GITHUB_REF#refs/tags/}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v3

- name: Create release YAML (gatling-operator.yaml)
env:
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ run: manifests generate fmt vet ## Run a controller from your host.
docker-build: test ## Build docker image with the manager.
docker build -t ${IMG} .

docker-push: docker-build ## Push docker image with the manager.
docker push ${IMG}
docker-push: test ## Push docker image with the manager.
docker buildx build --platform linux/amd64,linux/arm64 -t ${IMG} . --push

kind-load-image: kind-create docker-build ## Load local docker image into the kind cluster
@echo "Loading image into kind"
Expand Down
12 changes: 6 additions & 6 deletions controllers/gatling_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -464,8 +464,8 @@ func (r *GatlingReconciler) newGatlingRunnerJobForCR(gatling *gatlingv1alpha1.Ga
},
Spec: batchv1.JobSpec{
BackoffLimit: &noRestarts,
Parallelism: r.getGatlingRunnerJobParallelism(gatling),
Completions: r.getGatlingRunnerJobParallelism(gatling),
Parallelism: r.getGatlingRunnerJobParallelism(gatling),
Completions: r.getGatlingRunnerJobParallelism(gatling),
Template: corev1.PodTemplateSpec{
ObjectMeta: metav1.ObjectMeta{
Name: r.getObjectMeta(gatling).Name,
Expand All @@ -479,7 +479,7 @@ func (r *GatlingReconciler) newGatlingRunnerJobForCR(gatling *gatlingv1alpha1.Ga
InitContainers: []corev1.Container{
{
Name: "gatling-waiter",
Image: "bitnami/kubectl:1.21.8",
Image: "bitnami/kubectl:1.29.3",
Command: []string{"/bin/sh", "-c"},
Args: []string{gatlingWaiterCommand},
Resources: r.getPodResources(gatling),
Expand Down Expand Up @@ -531,8 +531,8 @@ func (r *GatlingReconciler) newGatlingRunnerJobForCR(gatling *gatlingv1alpha1.Ga
},
Spec: batchv1.JobSpec{
BackoffLimit: &noRestarts,
Parallelism: &gatling.Spec.TestScenarioSpec.Parallelism,
Completions: &gatling.Spec.TestScenarioSpec.Parallelism,
Parallelism: &gatling.Spec.TestScenarioSpec.Parallelism,
Completions: &gatling.Spec.TestScenarioSpec.Parallelism,
Template: corev1.PodTemplateSpec{
ObjectMeta: metav1.ObjectMeta{
Name: r.getObjectMeta(gatling).Name,
Expand All @@ -546,7 +546,7 @@ func (r *GatlingReconciler) newGatlingRunnerJobForCR(gatling *gatlingv1alpha1.Ga
InitContainers: []corev1.Container{
{
Name: "gatling-waiter",
Image: "bitnami/kubectl:1.21.8",
Image: "bitnami/kubectl:1.29.3",
Command: []string{"/bin/sh", "-c"},
Args: []string{gatlingWaiterCommand},
Resources: r.getPodResources(gatling),
Expand Down

0 comments on commit 6a49574

Please sign in to comment.