From 7be8c577a4532ce2129b1a3eee00db1a51dcfe1e Mon Sep 17 00:00:00 2001 From: Andrei Matveyeu Date: Fri, 27 Sep 2024 10:17:03 +0200 Subject: [PATCH] restored secret ref source for Kubernetes executor --- .../executionspace/executor/kubernetes.go | 21 ++++++++----------- 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/internal/executionspace/executor/kubernetes.go b/internal/executionspace/executor/kubernetes.go index 625177b..a56d2b7 100644 --- a/internal/executionspace/executor/kubernetes.go +++ b/internal/executionspace/executor/kubernetes.go @@ -114,20 +114,17 @@ func (k KubernetesExecutor) Start(ctx context.Context, logger *logrus.Entry, exe Image: executorSpec.Instructions.Image, Args: args, Env: envs, - }, - }, - RestartPolicy: corev1.RestartPolicyNever, - Volumes: []corev1.Volume{ - { - Name: "ssh-key-and-config", - VolumeSource: corev1.VolumeSource{ - Secret: &corev1.SecretVolumeSource{ - SecretName: "kubernetes-provider-ssh-key", - DefaultMode: &SECRETMODE, + EnvFrom: []corev1.EnvFromSource{ + { + SecretRef: &corev1.SecretEnvSource{ + LocalObjectReference: corev1.LocalObjectReference{ + Name: "etos-encryption-key", + }, + }, }, - }, - }, + }}, }, + RestartPolicy: corev1.RestartPolicyNever, }, }, },