Skip to content

Commit

Permalink
feat: clean up old images in k0s images directory
Browse files Browse the repository at this point in the history
  • Loading branch information
emosbaugh committed Oct 30, 2024
1 parent 0cbc569 commit 9ba5aff
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions operator/pkg/artifacts/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,6 @@ var copyArtifactsJob = &batchv1.Job{
"/usr/local/bin/local-artifact-mirror pull helmcharts --data-dir /embedded-cluster $INSTALLATION_DATA\n" +
"mv /embedded-cluster/bin/k0s /embedded-cluster/bin/k0s-upgrade\n" +
"rm /embedded-cluster/images/images-amd64-* || true\n" +
"cd /embedded-cluster/images/\n" +
"mv images-amd64.tar images-amd64-${INSTALLATION}.tar\n" +
"echo 'done'",
},
},
Expand Down Expand Up @@ -262,8 +260,8 @@ func CreateAutopilotAirgapPlanCommand(ctx context.Context, cli client.Client, in
}

imageURL := fmt.Sprintf(
"http://127.0.0.1:%d/images/images-amd64-%s.tar",
provider.LocalArtifactMirrorPort(), in.Name,
"http://127.0.0.1:%d/images/images-amd64.tar",
provider.LocalArtifactMirrorPort(),
)

return &autopilotv1beta2.PlanCommand{
Expand Down

0 comments on commit 9ba5aff

Please sign in to comment.