An open API service indexing awesome lists of open source software.

https://github.com/sapcc/kustomize-plugins

Collection of kustomize plugins
https://github.com/sapcc/kustomize-plugins

Last synced: 12 months ago
JSON representation

Collection of kustomize plugins

Awesome Lists containing this project

README

          

# Kustomize plugins

Collection of external plugins to extend [Kustomize](https://kustomize.io). Read more about [Kustomize Plugins](https://github.com/kubernetes-sigs/kustomize/tree/master/docs/plugins).

## Installation

Create a folder for external plugins, copy the entire `sapcc` directory and populate it via `KUSTOMIZE_PLUGIN_HOME=$pathToFolder` environment variable.

```bash
# Ensure home for Kustomize plugins exists.
export KUSTOMIZE_PLUGIN_HOME=~/.kustomize/plugin && mkdir -p $KUSTOMIZE_PLUGIN_HOME

# Get the plugins.
wget -qO- https://github.com/sapcc/kustomize-plugins/releases/download/$VERSION/kustomize-plugins_$VERSION_$OSTYPE_amd64.tar.gz | tar xvz - -C $KUSTOMIZE_PLUGIN_HOME
```

As of 03/2020 Kustomize external plugins are an alpha feature, so build needs to be invoked with the `--enable_alpha_plugins` flag.

## List of plugins

### ValueTransformer

Replaces variables used in resources incl. Kubernetes Secrets.

Example:

The ValueTransformer
```
apiVersion: sapcc/v2
kind: ValueTransformer
metadata:
name: notImportant

# Provide mapping via external file.
argsFromFile: cluster.yaml

# Provide mapping via values. Might supersede values from file.
values:
REGION: qa-de-1
CLUSTER: s-qa-de-1
```
with the `cluster.yaml` file containing multiple replacements
```
REGION: qa-de-1
CLUSTER: s-qa-de-1
```

will replace every occurence of `$REGION` and `$CLUSTER` in the given resources.

### SecretsMerger