projectsyn / commodore

Commodore provides opinionated tenant-aware management of Kapitan inventories and templates. Commodore uses Kapitan for the heavy lifting of rendering templates and resolving a hierachical configuration structure.
https://syn.tools/commodore/
BSD 3-Clause "New" or "Revised" License
46 stars 8 forks source link

Add support for using `kustomize` in components #504

Closed simu closed 2 years ago

simu commented 2 years ago

Context

We've written a bunch of components where we manually download upstream manifests which are intended to be rendered with kustomize, e.g. https://github.com/projectsyn/component-kyverno/. By having to download and render all manifests individually instead of being able to leverage kustomize, errors can happen, e.g. https://github.com/projectsyn/component-kyverno/pull/46

There's already a draft PR to add kustomize to the Commodore container image: #430

Additionally, we'll want at least basic documentation showing how to call kustomize from a component. We may be able to use Kapitan's external input type to run kustomize. This will require the standalone kustomize binary to be present in the path when Commodore is running.

Alternatives

bastjan commented 2 years ago

Kustomize is used in here to render a controller runtime manifest: https://github.com/appuio/component-openshift4-slos/blob/6c201604813c1c6e8c55437cb451edea87ce0992/class/openshift4-slos.yml#L9-L29