From b343896930a863da8444c6ae79e2978e3b27b553 Mon Sep 17 00:00:00 2001 From: Federico Di Pierro Date: Tue, 26 Mar 2024 11:20:59 +0100 Subject: [PATCH] new(pkg/driverbuilder): added a node selector on kubernetes executor on `kubernetes.io/arch` label. This implements support for arm64 build for kubernetes executor. Signed-off-by: Federico Di Pierro --- pkg/driverbuilder/kubernetes.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/driverbuilder/kubernetes.go b/pkg/driverbuilder/kubernetes.go index 9479bdeb..ab723f09 100644 --- a/pkg/driverbuilder/kubernetes.go +++ b/pkg/driverbuilder/kubernetes.go @@ -194,6 +194,7 @@ func (bp *KubernetesBuildProcessor) buildModule(b *builder.Build) error { RestartPolicy: corev1.RestartPolicyNever, SecurityContext: &secuContext, ImagePullSecrets: imagePullSecrets, + NodeSelector: map[string]string{corev1.LabelArchStable: kr.Architecture.String()}, Containers: []corev1.Container{ { Name: name, @@ -236,6 +237,10 @@ func (bp *KubernetesBuildProcessor) buildModule(b *builder.Build) error { }, } + slog. + With("name", pod.Name, "spec", pod.Spec.String()). + Debug("starting pod") + ctx := context.Background() ctx = signals.WithStandardSignals(ctx) _, err = configClient.Create(ctx, cm, metav1.CreateOptions{})