From 515aa59989e1193eba994d3ed99cda013638dc66 Mon Sep 17 00:00:00 2001 From: k8s-infra-cherrypick-robot <90416843+k8s-infra-cherrypick-robot@users.noreply.github.com> Date: Tue, 23 Jan 2024 08:28:14 -0800 Subject: [PATCH] s/RELATED_IMAGES_/RELATED_IMAGE_/ (#711) Co-authored-by: Quentin Barrand --- ci/install-ci-hub/kustomization.yaml | 2 +- ci/install-ci-spoke/kustomization.yaml | 2 +- ci/install-ci/kustomization.yaml | 4 ++-- cmd/manager/main.go | 2 +- config/manager-base/manager.yaml | 4 ++-- config/manager/manager_worker_image_patch.yaml | 2 +- internal/build/pod/maker.go | 2 +- internal/build/pod/maker_test.go | 2 +- internal/sign/pod/signer.go | 4 ++-- internal/sign/pod/signer_test.go | 4 ++-- 10 files changed, 14 insertions(+), 14 deletions(-) diff --git a/ci/install-ci-hub/kustomization.yaml b/ci/install-ci-hub/kustomization.yaml index 8c749b7e0..75747f5bf 100644 --- a/ci/install-ci-hub/kustomization.yaml +++ b/ci/install-ci-hub/kustomization.yaml @@ -23,5 +23,5 @@ patches: - name: manager imagePullPolicy: Never env: - - name: RELATED_IMAGES_SIGN + - name: RELATED_IMAGE_SIGN value: host.minikube.internal:5000/kmm/signimage:local diff --git a/ci/install-ci-spoke/kustomization.yaml b/ci/install-ci-spoke/kustomization.yaml index 0abd943c7..b56c8f050 100644 --- a/ci/install-ci-spoke/kustomization.yaml +++ b/ci/install-ci-spoke/kustomization.yaml @@ -19,5 +19,5 @@ patches: env: - name: KMM_MANAGED value: "1" - - name: RELATED_IMAGES_WORKER + - name: RELATED_IMAGE_WORKER value: host.minikube.internal:5000/kmm/worker:local diff --git a/ci/install-ci/kustomization.yaml b/ci/install-ci/kustomization.yaml index 4f7a21662..8f56739b4 100644 --- a/ci/install-ci/kustomization.yaml +++ b/ci/install-ci/kustomization.yaml @@ -23,7 +23,7 @@ patches: - name: manager imagePullPolicy: Never env: - - name: RELATED_IMAGES_SIGN + - name: RELATED_IMAGE_SIGN value: host.minikube.internal:5000/kmm/signimage:local - - name: RELATED_IMAGES_WORKER + - name: RELATED_IMAGE_WORKER value: host.minikube.internal:5000/kmm/worker:local diff --git a/cmd/manager/main.go b/cmd/manager/main.go index 39f159cba..8e9ae2487 100644 --- a/cmd/manager/main.go +++ b/cmd/manager/main.go @@ -84,7 +84,7 @@ func main() { commit = "" } - workerImage := cmd.GetEnvOrFatalError("RELATED_IMAGES_WORKER", setupLogger) + workerImage := cmd.GetEnvOrFatalError("RELATED_IMAGE_WORKER", setupLogger) managed, err := GetBoolEnv("KMM_MANAGED") if err != nil { diff --git a/config/manager-base/manager.yaml b/config/manager-base/manager.yaml index d371bb34a..066245c9c 100644 --- a/config/manager-base/manager.yaml +++ b/config/manager-base/manager.yaml @@ -47,9 +47,9 @@ spec: valueFrom: fieldRef: fieldPath: metadata.namespace - - name: RELATED_IMAGES_BUILD + - name: RELATED_IMAGE_BUILD value: gcr.io/kaniko-project/executor:latest - - name: RELATED_IMAGES_SIGN + - name: RELATED_IMAGE_SIGN value: signer imagePullPolicy: Always securityContext: diff --git a/config/manager/manager_worker_image_patch.yaml b/config/manager/manager_worker_image_patch.yaml index e4cb217f5..3db99f2f9 100644 --- a/config/manager/manager_worker_image_patch.yaml +++ b/config/manager/manager_worker_image_patch.yaml @@ -9,5 +9,5 @@ spec: containers: - name: manager env: - - name: RELATED_IMAGES_WORKER + - name: RELATED_IMAGE_WORKER value: worker diff --git a/internal/build/pod/maker.go b/internal/build/pod/maker.go index cced99221..e2375152a 100644 --- a/internal/build/pod/maker.go +++ b/internal/build/pod/maker.go @@ -107,7 +107,7 @@ func (m *maker) MakePodTemplate( func (m *maker) podSpec(mld *api.ModuleLoaderData, containerImage string, pushImage bool) v1.PodSpec { buildConfig := mld.Build - kanikoImage := os.Getenv("RELATED_IMAGES_BUILD") + kanikoImage := os.Getenv("RELATED_IMAGE_BUILD") if buildConfig.KanikoParams != nil && buildConfig.KanikoParams.Tag != "" { if idx := strings.IndexAny(kanikoImage, "@:"); idx != -1 { diff --git a/internal/build/pod/maker_test.go b/internal/build/pod/maker_test.go index 66ffbd67b..d823532b5 100644 --- a/internal/build/pod/maker_test.go +++ b/internal/build/pod/maker_test.go @@ -32,7 +32,7 @@ var _ = Describe("MakePodTemplate", func() { kernelVersion = "1.2.3" moduleName = "module-name" namespace = "some-namespace" - relatedImageEnvVar = "RELATED_IMAGES_BUILD" + relatedImageEnvVar = "RELATED_IMAGE_BUILD" ) var ( diff --git a/internal/sign/pod/signer.go b/internal/sign/pod/signer.go index e0adb4a9b..22248dc75 100644 --- a/internal/sign/pod/signer.go +++ b/internal/sign/pod/signer.go @@ -85,7 +85,7 @@ func (s *signer) MakePodTemplate( td := TemplateData{ FilesToSign: mld.Sign.FilesToSign, - SignImage: os.Getenv("RELATED_IMAGES_SIGN"), + SignImage: os.Getenv("RELATED_IMAGE_SIGN"), } args := make([]string, 0) @@ -181,7 +181,7 @@ func (s *signer) MakePodTemplate( Containers: []v1.Container{ { Name: "kaniko", - Image: os.Getenv("RELATED_IMAGES_BUILD"), + Image: os.Getenv("RELATED_IMAGE_BUILD"), Args: args, VolumeMounts: volumeMounts, }, diff --git a/internal/sign/pod/signer_test.go b/internal/sign/pod/signer_test.go index 798660724..ec37da8d9 100644 --- a/internal/sign/pod/signer_test.go +++ b/internal/sign/pod/signer_test.go @@ -91,8 +91,8 @@ COPY --from=signimage /tmp/signroot/modules/simple-procfs-kmod.ko /modules/simpl privateSignData := map[string][]byte{constants.PrivateSignDataKey: []byte(privateKey)} DescribeTable("should set fields correctly", func(imagePullSecret *v1.LocalObjectReference) { - GinkgoT().Setenv("RELATED_IMAGES_BUILD", buildImage) - GinkgoT().Setenv("RELATED_IMAGES_SIGN", "some-sign-image:some-tag") + GinkgoT().Setenv("RELATED_IMAGE_BUILD", buildImage) + GinkgoT().Setenv("RELATED_IMAGE_SIGN", "some-sign-image:some-tag") ctx := context.Background() nodeSelector := map[string]string{"arch": "x64"}