From 5ce08cf54386ae66e8482613c343100f083fc4d2 Mon Sep 17 00:00:00 2001 From: Jacob Weinstock Date: Thu, 9 Jan 2025 09:08:27 -0700 Subject: [PATCH 1/2] Fix Workflow's not moving out of STATE_PREPARING: This resolves an issue where a Workflow with only BootOption -> toggleAllowNetboot: true will stay indefinitely in a preparing state. Signed-off-by: Jacob Weinstock --- internal/deprecated/workflow/pre.go | 1 + internal/deprecated/workflow/pre_test.go | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/internal/deprecated/workflow/pre.go b/internal/deprecated/workflow/pre.go index 54a837066..92a8dfeed 100644 --- a/internal/deprecated/workflow/pre.go +++ b/internal/deprecated/workflow/pre.go @@ -121,6 +121,7 @@ func (s *state) prepareWorkflow(ctx context.Context) (reconcile.Result, error) { return r, err } } + s.workflow.Status.State = v1alpha1.WorkflowStatePending return reconcile.Result{}, nil } diff --git a/internal/deprecated/workflow/pre_test.go b/internal/deprecated/workflow/pre_test.go index 3f2f7814a..9889beecb 100644 --- a/internal/deprecated/workflow/pre_test.go +++ b/internal/deprecated/workflow/pre_test.go @@ -34,7 +34,11 @@ func TestPrepareWorkflow(t *testing.T) { hardware: &v1alpha1.Hardware{}, wantHardware: &v1alpha1.Hardware{}, workflow: &v1alpha1.Workflow{}, - wantWorkflow: &v1alpha1.Workflow{}, + wantWorkflow: &v1alpha1.Workflow{ + Status: v1alpha1.WorkflowStatus{ + State: v1alpha1.WorkflowStatePending, + }, + }, }, "toggle allowPXE": { wantResult: reconcile.Result{}, @@ -82,6 +86,7 @@ func TestPrepareWorkflow(t *testing.T) { }, wantWorkflow: &v1alpha1.Workflow{ Status: v1alpha1.WorkflowStatus{ + State: v1alpha1.WorkflowStatePending, BootOptions: v1alpha1.BootOptionsStatus{ AllowNetboot: v1alpha1.AllowNetbootStatus{ ToggledTrue: true, From 2fe31e97eaf776470988c52f5172b03f2948dd04 Mon Sep 17 00:00:00 2001 From: Jacob Weinstock Date: Thu, 9 Jan 2025 09:18:15 -0700 Subject: [PATCH 2/2] Fix ca-certs from Alpine package repo Signed-off-by: Jacob Weinstock --- cmd/tink-agent/Dockerfile | 2 +- cmd/tink-controller-v1alpha2/Dockerfile | 2 +- cmd/tink-controller/Dockerfile | 2 +- cmd/tink-server/Dockerfile | 2 +- cmd/tink-worker/Dockerfile | 2 +- cmd/virtual-worker/Dockerfile | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cmd/tink-agent/Dockerfile b/cmd/tink-agent/Dockerfile index 6c24d804c..9d2a77aab 100644 --- a/cmd/tink-agent/Dockerfile +++ b/cmd/tink-agent/Dockerfile @@ -3,7 +3,7 @@ FROM alpine:3.20.3 ARG TARGETOS ARG TARGETARCH -RUN apk add --no-cache --update --upgrade ca-certificates=20241121-r0 +RUN apk add --no-cache --update --upgrade ca-certificates=20241121-r1 COPY bin/tink-agent-${TARGETOS}-${TARGETARCH} /usr/bin/tink-agent diff --git a/cmd/tink-controller-v1alpha2/Dockerfile b/cmd/tink-controller-v1alpha2/Dockerfile index 6bb12cdf4..948ae22cc 100644 --- a/cmd/tink-controller-v1alpha2/Dockerfile +++ b/cmd/tink-controller-v1alpha2/Dockerfile @@ -3,7 +3,7 @@ FROM alpine:3.20.3 ARG TARGETOS ARG TARGETARCH -RUN apk add --no-cache --update --upgrade ca-certificates=20241121-r0 +RUN apk add --no-cache --update --upgrade ca-certificates=20241121-r1 COPY bin/tink-controller-v1alpha2-${TARGETOS}-${TARGETARCH} /usr/bin/tink-controller diff --git a/cmd/tink-controller/Dockerfile b/cmd/tink-controller/Dockerfile index 27c98311f..57004a4d4 100644 --- a/cmd/tink-controller/Dockerfile +++ b/cmd/tink-controller/Dockerfile @@ -3,7 +3,7 @@ FROM alpine:3.20.3 ARG TARGETOS ARG TARGETARCH -RUN apk add --no-cache --update --upgrade ca-certificates=20241121-r0 +RUN apk add --no-cache --update --upgrade ca-certificates=20241121-r1 COPY bin/tink-controller-${TARGETOS}-${TARGETARCH} /usr/bin/tink-controller diff --git a/cmd/tink-server/Dockerfile b/cmd/tink-server/Dockerfile index 468a0efde..bbd12ac3b 100644 --- a/cmd/tink-server/Dockerfile +++ b/cmd/tink-server/Dockerfile @@ -5,7 +5,7 @@ ARG TARGETARCH EXPOSE 42113 42114 -RUN apk add --no-cache --update --upgrade ca-certificates=20241121-r0 +RUN apk add --no-cache --update --upgrade ca-certificates=20241121-r1 COPY bin/tink-server-${TARGETOS}-${TARGETARCH} /usr/bin/tink-server diff --git a/cmd/tink-worker/Dockerfile b/cmd/tink-worker/Dockerfile index 9d2366798..5112a64f9 100644 --- a/cmd/tink-worker/Dockerfile +++ b/cmd/tink-worker/Dockerfile @@ -3,7 +3,7 @@ FROM alpine:3.20.3 ARG TARGETOS ARG TARGETARCH -RUN apk add --no-cache --update --upgrade ca-certificates=20241121-r0 +RUN apk add --no-cache --update --upgrade ca-certificates=20241121-r1 COPY bin/tink-worker-${TARGETOS}-${TARGETARCH} /usr/bin/tink-worker diff --git a/cmd/virtual-worker/Dockerfile b/cmd/virtual-worker/Dockerfile index e7cf39034..4afa0a558 100644 --- a/cmd/virtual-worker/Dockerfile +++ b/cmd/virtual-worker/Dockerfile @@ -3,7 +3,7 @@ FROM alpine:3.20.3 ARG TARGETOS ARG TARGETARCH -RUN apk add --no-cache --update --upgrade ca-certificates=20241121-r0 +RUN apk add --no-cache --update --upgrade ca-certificates=20241121-r1 COPY bin/virtual-worker-${TARGETOS}-${TARGETARCH} /usr/bin/virtual-worker