Skip to content
This repository has been archived by the owner on Jul 12, 2022. It is now read-only.

ZupIT/charlescd-kustomize

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The Charles project has been archived by Zup Innovation. It might start again eventually; however, we won't deliver support for now.

Description

A kustomize lib that downloads the contents from the source, do the kustomize build of kustomize and return an array of manifests\

How to use

Instantiate the kustomizer and client of your preference(we recommend the go getter client) and pass as an argument of the New method with the source url, the destination and path of manifests. See the example below:

    kustomizer := krusty.MakeKustomizer(
	build.HonorKustomizeFlags(krusty.MakeDefaultOptions()),)
    client := getter.Client{
        Pwd:  pwd,
        Ctx:  context.TODO(),
        Mode: getter.ClientModeAny,
        Src:  "github.com/thallesfreitaszup/kustomize-demo",
        Dst:  filepath.Join(os.TempDir(), "kustomize"+strconv.Itoa(int(z.FastRand()))),
    }
    path := "overlays/dev"
    k := kustomize.New(kustomizer, &client, client.Dst, client.Src, path)

After that call the Render method that will return the desired manifests:

```
    manifests, err := k.Render()

``

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages