Skip to content

Commit

Permalink
ensure custom k3s images are passed through (#229)
Browse files Browse the repository at this point in the history
  • Loading branch information
joshrwolf authored Nov 4, 2024
1 parent 0fbb93a commit acd51cb
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions internal/provider/harness_k3s_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,14 @@ func (r *HarnessK3sResource) harness(ctx context.Context, data *HarnessK3sResour
}
}

if data.Image.ValueString() != "" {
ref, err := name.ParseReference(data.Image.ValueString())
if err != nil {
return nil, []diag.Diagnostic{diag.NewErrorDiagnostic("invalid k3s image ref", fmt.Sprintf("invalid image reference: %s", err))}
}
kopts = append(kopts, k3s.WithImageRef(ref))
}

b, err := r.bundler(data)
if err != nil {
return nil, []diag.Diagnostic{diag.NewErrorDiagnostic("failed to create bundler", err.Error())}
Expand Down

0 comments on commit acd51cb

Please sign in to comment.