Skip to content

Commit

Permalink
feat: support url as kustomize file path
Browse files Browse the repository at this point in the history
  • Loading branch information
ericzzzzzzz committed Aug 16, 2023
1 parent 85362a1 commit f75f448
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion pkg/skaffold/render/renderer/kustomize/kustomize.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,10 @@ func (k Kustomize) Render(ctx context.Context, out io.Writer, builds []graph.Art
kustomizePaths = append(kustomizePaths, kPath)
}

for _, kustomizePath := range sUtil.AbsolutePaths(k.cfg.GetWorkingDir(), kustomizePaths) {
for _, kustomizePath := range kustomizePaths {
if !sUtil.IsURL(kustomizePath) && !filepath.IsAbs(kustomizePath) {
kustomizePath = filepath.Join(k.cfg.GetWorkingDir(), kustomizePath)
}
out, err := k.render(ctx, kustomizePath, useKubectlKustomize, kCLI)
if err != nil {
return manifest.ManifestListByConfig{}, err
Expand Down Expand Up @@ -407,6 +410,9 @@ func kustomizeDependencies(workdir string, paths []string) ([]string, error) {
if err != nil {
return nil, fmt.Errorf("unable to parse path %q: %w", kustomizePath, err)
}
if sUtil.IsURL(kustomizePath) {
continue
}

if !filepath.IsAbs(expandedKustomizePath) {
expandedKustomizePath = filepath.Join(workdir, expandedKustomizePath)
Expand Down

0 comments on commit f75f448

Please sign in to comment.