-
Notifications
You must be signed in to change notification settings - Fork 157
/
okteto-with-volumes.yaml
95 lines (92 loc) · 2.9 KB
/
okteto-with-volumes.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
icon: https://apps.okteto.com/movies/icon.png
build:
frontend:
context: frontend
frontend-dev:
context: frontend
target: dev
catalog:
context: catalog
rent:
context: rent
api:
context: api
api-dev:
context: api
target: dev
worker:
context: worker
worker-dev:
context: worker
target: dev
deploy:
- name: Deploy PostgreSQL
command: |
# If we get a snapshot name passed into the deployment we will add two annotations to the persistent volume for PostgreSQL.
# These annotations tell Okteto to create the volume from an existing snapshot.
# Details in https://www.okteto.com/docs/self-hosted/administration/volume-snapshots/#consuming-a-volume-snapshot-created-in-kubernetes
if [ -z $DB_SNAPSHOT_NAME ]; then
helm upgrade --install postgresql postgresql/postgresql-11.6.21.tgz -f postgresql/values.yml --version 11.6.21
else
helm upgrade --install postgresql postgresql/postgresql-11.6.21.tgz \
-f postgresql/values.yml \
--version 11.6.21 \
--set primary.persistence.annotations."dev\.okteto\.com/from-snapshot-name"="$DB_SNAPSHOT_NAME" \
--set primary.persistence.annotations."dev\.okteto\.com/from-snapshot-namespace"="$DB_SNAPSHOT_NAMESPACE"
fi
- name: Deploy Kafka
command: helm upgrade --install kafka kafka/kafka-18.0.3.tgz -f kafka/values.yml --version 18.0.3
- name: Deploy MongoDB
command: helm upgrade --install mongodb mongodb/mongodb-12.1.30.tgz -f mongodb/values.yml --version 12.1.30
- name: Deploy Frontend
command: helm upgrade --install frontend frontend/chart --set image=${OKTETO_BUILD_FRONTEND_IMAGE}
- name: Deploy Catalog
command: helm upgrade --install catalog catalog/chart --set image=${OKTETO_BUILD_CATALOG_IMAGE}
- name: Deploy Rent
command: helm upgrade --install rent rent/chart --set image=${OKTETO_BUILD_RENT_IMAGE}
- name: Deploy Worker
command: helm upgrade --install worker worker/chart --set image=${OKTETO_BUILD_WORKER_IMAGE}
- name: Deploy API
command: helm upgrade --install api api/chart --set image=${OKTETO_BUILD_API_IMAGE} --set load=${API_LOAD_DATA:-true}
dev:
frontend:
image: ${OKTETO_BUILD_FRONTEND_DEV_IMAGE}
command: bash
sync:
- frontend:/usr/src/app
catalog:
command: yarn start
sync:
- catalog:/src
forward:
- 9229:9229
rent:
command: mvn spring-boot:run
sync:
- rent:/app
volumes:
- /root/.m2
forward:
- 5005:5005
api:
image: ${OKTETO_BUILD_API_DEV_IMAGE}
command: bash
securityContext:
capabilities:
add:
- SYS_PTRACE
sync:
- api:/usr/src/app
forward:
- 2346:2345
worker:
image: ${OKTETO_BUILD_WORKER_DEV_IMAGE}
command: bash
securityContext:
capabilities:
add:
- SYS_PTRACE
sync:
- worker:/usr/src/app
forward:
- 2345:2345