update osbuilder/osartifact

This commit is contained in:
Sebastian Florek
2025-01-30 21:07:00 +01:00
parent 6733cc712b
commit ebe602b113
9 changed files with 52 additions and 7 deletions

View File

@@ -309,14 +309,19 @@ func (r *OSArtifactReconciler) checkExport(ctx context.Context, artifact *osbuil
tag = "latest"
}
image := artifact.Spec.Exporter.Image
if len(image) == 0 {
image = "gcr.io/kaniko-project/executor:latest"
}
container := corev1.Container{
Name: "exporter",
Image: "gcr.io/kaniko-project/executor:latest",
Args: []string{
Image: image,
Args: append([]string{
"--context=/artifacts/",
"--dockerfile=/artifacts/Dockerfile",
fmt.Sprintf("--destination=%s/%s:%s", artifact.Spec.Exporter.Registry.Name, artifact.Spec.Exporter.Registry.Image.Repository, tag),
},
}, artifact.Spec.Exporter.ExtraArgs...),
VolumeMounts: []corev1.VolumeMount{
{
Name: "artifacts",