Skip to content

Add support for loading templates from remote locations #123

@montmanu

Description

@montmanu

Is your feature request related to a problem?

Currently, the plugin requires that resource manifest templates exist on disk:

drone-gke/main.go

Lines 516 to 524 in 6ac83b9

_, err := os.Stat(t)
if os.IsNotExist(err) {
if t == c.String("kube-template") {
return nil, fmt.Errorf("Error finding template: %s\n", err)
}
log("Warning: skipping optional template %s because it was not found\n", t)
continue
}

This complicates sharing / re-use of templates.

Describe the solution you'd like

An ideal implementation would support loading of resource manifest templates from a remote location; similar to kubectl apply [-f|-k]

Describe alternatives you've considered

Current alternatives / workarounds include:

  • pre-fetching remote manifest templates at build time (e.g., via curl, git submodules, etc)
  • use of kubectl / kustomize native features (instead of plugin)

Additional context

Any implementation of this feature request should consider potential interactions with #105 (i.e., how to load multiple templates from a remote location .. especially in the case of supporting directories as a valid argument)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions