Skip to content

Commit

Permalink
fix: allow specifying OCI registry as repository
Browse files Browse the repository at this point in the history
Support specifying an OCI repository URI within the `repository` field of the kustomize plugin or kpt function config.

Relates to #46 and #72
  • Loading branch information
mgoltzsche committed Apr 11, 2024
1 parent 04cb954 commit b28139a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion example/oci-image/generator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ kind: ChartRenderer
metadata:
name: karpenter
namespace: kube-system
chart: "oci://public.ecr.aws/karpenter/karpenter"
chart: karpenter
version: 0.35.0
repository: "oci://public.ecr.aws/karpenter"
4 changes: 4 additions & 0 deletions pkg/helm/load.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ func (h *Helm) loadChart(ctx context.Context, cfg *config.ChartConfig) (*chart.C
} else {
return nil, errors.Errorf("chart directory %q not found and no repository specified", cfg.Chart)
}
} else if registry.IsOCI(cfg.Repository) {
cfg.Chart = fmt.Sprintf("%s/%s", cfg.Repository, cfg.Chart)
cfg.Repository = ""
return h.loadOCIChart(ctx, cfg)
}
return h.loadRemoteChart(ctx, cfg)
}
Expand Down

0 comments on commit b28139a

Please sign in to comment.