Add config template plugin examples (#7)
This commit is contained in:
1 parent
179faabd63
commit
23eeb0925b
13 files changed
+116
-9
No files matched your search
@@ -0,0 +1,2 @@
|
||||
vendor
|
||||
Kasanefile.lock
|
||||
@@ -0,0 +1,5 @@
|
||||
layers:
|
||||
- ../../guestbook/guestbook-ui-deployment.yaml
|
||||
- patch.jsonnet
|
||||
- ../../guestbook/guestbook-ui-svc.yaml
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
# Kasane
|
||||
|
||||
[Kasane](https://github.com/google/kasane) is a layering tool for Kubernetes which utilises Jsonnet for deep object modification and patching.
|
||||
|
||||
Use following steps to try the application:
|
||||
|
||||
* Follow instructions from [custom_tools.md](https://github.com/argoproj/argo-cd/blob/master/docs/custom_tools.md) to make sure `kasane` binary is available in `argocd-repo-server` pod.
|
||||
* Register `kasane` plugin `argocd-cm` ConfigMap:
|
||||
|
||||
```yaml
|
||||
apiVersion: v1
|
||||
data:
|
||||
configManagementPlugins: |
|
||||
- name: kasane
|
||||
init:
|
||||
command: [kasane, update]
|
||||
generate:
|
||||
command: [kasane, show]
|
||||
```
|
||||
* Create application using `kasane` as a config management plugin name.
|
||||
|
||||
```
|
||||
argocd app create kasane \
|
||||
--config-management-plugin kasane \
|
||||
--repo https://github.com/argoproj/argocd-example-apps \
|
||||
--path plugins/kasane \
|
||||
--dest-server https://kubernetes.default.svc \
|
||||
--dest-namespace default
|
||||
```
|
||||
@@ -0,0 +1,9 @@
|
||||
function (layers)
|
||||
|
||||
[
|
||||
layers[0] {
|
||||
spec+: {
|
||||
replicas: 2,
|
||||
},
|
||||
}
|
||||
]
|
||||
Reference in new issue
Block a user