docs: Add YAML to docs

This commit is contained in:
Vincent Ambo 2017-02-08 13:15:36 +01:00
parent d94a0ffc25
commit a1c23d7018
2 changed files with 23 additions and 16 deletions

View file

@ -13,7 +13,7 @@ KonTemplate lets you describe resources as you normally would in a simple folder
``` ```
. .
├── prod-cluster.json ├── prod-cluster.yaml
└── some-api └── some-api
├── deployment.yaml ├── deployment.yaml
└── service.yaml └── service.yaml
@ -22,24 +22,21 @@ KonTemplate lets you describe resources as you normally would in a simple folder
This example has all resources belonging to `some-api` (no file naming conventions enforced at all!) in the `some-api` This example has all resources belonging to `some-api` (no file naming conventions enforced at all!) in the `some-api`
folder and the configuration for the cluster `prod-cluster` in the corresponding file. folder and the configuration for the cluster `prod-cluster` in the corresponding file.
Lets take a short look at `prod-cluster.json`: Lets take a short look at `prod-cluster.yaml`:
```json ```yaml
{ ---
"context": "k8s.prod.mydomain.com", context: k8s.prod.mydomain.com
"include": [ global:
{ globalVar: lizards
"name": "some-api", include:
"values": { - name: some-api
"importantFeature": true, values:
"apiPort": 4567 version: 1.0-0e6884d
} importantFeature: true
} apiPort: 4567
]
}
``` ```
Those values are then templated into the resource files of `some-api`. Those values are then templated into the resource files of `some-api`.
## Usage ## Usage

10
example/prod-cluster.yaml Normal file
View file

@ -0,0 +1,10 @@
---
context: k8s.prod.mydomain.com
global:
globalVar: lizards
include:
- name: some-api
values:
version: 1.0-0e6884d
importantFeature: true
apiPort: 4567