Example deployment
Signed-off-by: Andrew Keesler <akeesler@vmware.com>
This commit is contained in:
parent
7eaca5a56d
commit
4e17853ecf
7
deploy/README.md
Normal file
7
deploy/README.md
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
# Deploying
|
||||||
|
|
||||||
|
This example deployment uses `ytt` and `kapp` from [https://k14s.io](https://k14s.io/).
|
||||||
|
|
||||||
|
1. Fill in the values in [values.yml](values.yaml)
|
||||||
|
2. In a terminal, cd to this `deploy` directory
|
||||||
|
3. Run: `ytt --file . | kapp deploy --yes --app placeholder-name --diff-changes --file -`
|
31
deploy/deployment.yaml
Normal file
31
deploy/deployment.yaml
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
#@ load("@ytt:data", "data")
|
||||||
|
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Namespace
|
||||||
|
metadata:
|
||||||
|
name: #@ data.values.namespace
|
||||||
|
labels:
|
||||||
|
name: #@ data.values.namespace
|
||||||
|
|
||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: #@ data.values.app_name + "-deployment"
|
||||||
|
namespace: #@ data.values.namespace
|
||||||
|
labels:
|
||||||
|
app: #@ data.values.app_name
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: #@ data.values.app_name
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: #@ data.values.app_name
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: placeholder-name
|
||||||
|
image: #@ data.values.image_repo + "@" + data.values.image_digest
|
6
deploy/values.yaml
Normal file
6
deploy/values.yaml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
#@data/values
|
||||||
|
---
|
||||||
|
app_name: placeholder-name
|
||||||
|
namespace:
|
||||||
|
image_repo: #! e.g. gcr.io/your-project-name/repo-name
|
||||||
|
image_digest: #! e.g. sha256:f3c4fdfd3ef865d4b97a1fd295d94acc3f0c654c46b6f27ffad5cf80216903c8
|
Loading…
Reference in New Issue
Block a user