Skip to content

Commit

Permalink
new(pkg/driverbuilder): added a node selector on kubernetes executor …
Browse files Browse the repository at this point in the history
…on `kubernetes.io/arch` label.

This implements support for arm64 build for kubernetes executor.

Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
  • Loading branch information
FedeDP authored and poiana committed Mar 28, 2024
1 parent 0f094fc commit c12a122
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/driverbuilder/kubernetes.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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{})
Expand Down

0 comments on commit c12a122

Please sign in to comment.