docs: Add more information to README
This commit is contained in:
		
							parent
							
								
									5bc67f4271
								
							
						
					
					
						commit
						c2a8f8784f
					
				
					 1 changed files with 38 additions and 5 deletions
				
			
		
							
								
								
									
										41
									
								
								README.md
									
										
									
									
									
								
							
							
						
						
									
										41
									
								
								README.md
									
										
									
									
									
								
							| 
						 | 
					@ -3,9 +3,15 @@ Kontemplate - A simple Kubernetes templater
 | 
				
			||||||
 | 
					
 | 
				
			||||||
[](https://travis-ci.org/tazjin/kontemplate)
 | 
					[](https://travis-ci.org/tazjin/kontemplate)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
I made this tool out of frustration with the available ways to template Kubernetes resource files. All I want out of
 | 
					Kontemplate is a simple CLI tool that can take sets of Kubernetes resource
 | 
				
			||||||
such a tool is a way to specify lots of resources with placeholders that get filled in with specific values, based on
 | 
					files with placeholders and insert values per environment.
 | 
				
			||||||
which context (i.e. k8s cluster) is specified.
 | 
					
 | 
				
			||||||
 | 
					This tool was made because in many cases all I want in terms of Kubernetes
 | 
				
			||||||
 | 
					configuration is simple value interpolation per environment (i.e. Kubernetes
 | 
				
			||||||
 | 
					cluster), but with the same deployment files.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					In my experience this is often enough and more complex solutions such as
 | 
				
			||||||
 | 
					[Helm][] are not required.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## Overview
 | 
					## Overview
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -37,7 +43,32 @@ include:
 | 
				
			||||||
      apiPort: 4567
 | 
					      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`. That's it!
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					You can also set up more complicated folder structures for organisation, for example:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					.
 | 
				
			||||||
 | 
					├── api
 | 
				
			||||||
 | 
					│   ├── image-api
 | 
				
			||||||
 | 
					│   │   └── deployment.yaml
 | 
				
			||||||
 | 
					│   └── music-api
 | 
				
			||||||
 | 
					│       └── deployment.yaml
 | 
				
			||||||
 | 
					│   │   └── default.json
 | 
				
			||||||
 | 
					├── frontend
 | 
				
			||||||
 | 
					│   ├── main-app
 | 
				
			||||||
 | 
					│   │   ├── deployment.yaml
 | 
				
			||||||
 | 
					│   │   └── service.yaml
 | 
				
			||||||
 | 
					│   └── user-page
 | 
				
			||||||
 | 
					│       ├── deployment.yaml
 | 
				
			||||||
 | 
					│       └── service.yaml
 | 
				
			||||||
 | 
					├── prod-cluster.yaml
 | 
				
			||||||
 | 
					└── test-cluster.yaml
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					And selectively template or apply resources with a command such as
 | 
				
			||||||
 | 
					`kontemplate apply test-cluster.yaml --include api --include frontend/user-page`
 | 
				
			||||||
 | 
					to only update the `api` resource sets and the `frontend/user-page` resource set.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## Installation
 | 
					## Installation
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -90,3 +121,5 @@ kontemplate apply example/prod-cluster.yaml --dry-run
 | 
				
			||||||
# And actually apply it if you like what you see:
 | 
					# And actually apply it if you like what you see:
 | 
				
			||||||
kontemplate apply example/prod-cluster.yaml
 | 
					kontemplate apply example/prod-cluster.yaml
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[Helm]: https://helm.sh/
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue