Kustomize plugins
This is the third article out of three articles on Kubernetes tool : Kustomize. This article covers the plugins.
kustomize plugins
Kustomize offers a plugin framework allowing people to write their own resource generators and transformers.
kustomization.yaml
generators:
- gen_file.yaml
transformers:
- trans_file.yaml
Let's focus on gen_file. Trans_file will be similar.
gen_file.yaml
apiVersion: "apiVersion"
kind: Gen_File
metadata:
name: "some name"
Now the file name "Gen_File" will be searched at path
XDG_CONFIG_HOME = $HOME/.config = /home/manish.config
/home/manish/.config/kustomize/plugin/${apiVersion}/LOWERCASE(${kind})
Possible value for apiVersion = someteam.example.com/v1
If failed then "Gen_File.so" will be searched at same path
This file will be invoked with gen_file.yaml
Reference : https://github.com/kubernetes-sigs/kustomize/tree/master/docs/plugins
Built-in plugins : https://github.com/kubernetes-sigs/kustomize/tree/master/plugin/builtin
https://github.com/kubernetes-sigs/kustomize/blob/master/examples/chart.md
https://github.com/kubernetes-sigs/kustomize/blob/master/examples/secretGeneratorPlugin.md
https://github.com/kubernetes-sigs/kustomize/blob/master/examples/goGetterGeneratorPlugin.md
https://github.com/kubernetes-sigs/kustomize/blob/master/examples/validationTransformer/README.md
https://github.com/kubernetes-sigs/kustomize/blob/master/examples/transformerconfigs/README.md
Plugin Development
https://github.com/kubernetes-sigs/kustomize/blob/master/docs/plugins/execPluginGuidedExample.md
https://github.com/kubernetes-sigs/kustomize/blob/master/docs/plugins/goPluginGuidedExample.md
kustomize plugins
Kustomize offers a plugin framework allowing people to write their own resource generators and transformers.
kustomization.yaml
generators:
- gen_file.yaml
transformers:
- trans_file.yaml
Let's focus on gen_file. Trans_file will be similar.
gen_file.yaml
apiVersion: "apiVersion"
kind: Gen_File
metadata:
name: "some name"
Now the file name "Gen_File" will be searched at path
XDG_CONFIG_HOME = $HOME/.config = /home/manish.config
/home/manish/.config/kustomize/plugin/${apiVersion}/LOWERCASE(${kind})
Possible value for apiVersion = someteam.example.com/v1
If failed then "Gen_File.so" will be searched at same path
This file will be invoked with gen_file.yaml
Reference : https://github.com/kubernetes-sigs/kustomize/tree/master/docs/plugins
Built-in plugins : https://github.com/kubernetes-sigs/kustomize/tree/master/plugin/builtin
https://github.com/kubernetes-sigs/kustomize/blob/master/examples/chart.md
https://github.com/kubernetes-sigs/kustomize/blob/master/examples/secretGeneratorPlugin.md
https://github.com/kubernetes-sigs/kustomize/blob/master/examples/goGetterGeneratorPlugin.md
https://github.com/kubernetes-sigs/kustomize/blob/master/examples/validationTransformer/README.md
https://github.com/kubernetes-sigs/kustomize/blob/master/examples/transformerconfigs/README.md
Plugin Development
https://github.com/kubernetes-sigs/kustomize/blob/master/docs/plugins/execPluginGuidedExample.md
https://github.com/kubernetes-sigs/kustomize/blob/master/docs/plugins/goPluginGuidedExample.md
0 comments:
Post a Comment