Skip to content

Commit

Permalink
modify to work with values.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
Chengming-Li committed Dec 31, 2023
1 parent 934641d commit 7feabdd
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 14 deletions.
6 changes: 3 additions & 3 deletions bt-test/templates/mongodb-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ kind: Deployment
metadata:
name: mongodb
spec:
replicas: 1
replicas: {{ .Values.mongo.replicas }}
selector:
matchLabels:
app: mongodb
Expand All @@ -27,7 +27,7 @@ spec:
spec:
containers:
- name: mongodb
image: mongo:{ { .Values.mongodb.image.tag } }
image: mongo:{{ .Values.mongo.image.tag }}
ports:
- containerPort: 27017
volumeMounts:
Expand All @@ -37,4 +37,4 @@ spec:
volumes:
- name: mongodb-data
hostPath:
path: ./db
path: {{ .Values.mongo.path }}
8 changes: 4 additions & 4 deletions bt-test/templates/nginx-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ kind: Deployment
metadata:
name: nginx
spec:
replicas: 1
replicas: {{ .Values.nginx.replicas }}
selector:
matchLabels:
app: nginx
Expand All @@ -27,14 +27,14 @@ spec:
spec:
containers:
- name: nginx
image: nginx:{ { .Values.nginx.image.tag } }
image: nginx:{{ .Values.nginx.image.tag }}
volumeMounts:
- name: nginx-config-volume
mountPath: /etc/nginx/conf.d/default.conf
mountPath: /etc/nginx/conf.d/
ports:
- containerPort: 8080
restartPolicy: Always
volumes:
- name: nginx-config-volume
hostPath:
path: ./nginx.conf
path: {{ .Values.nginx.path }}
2 changes: 1 addition & 1 deletion bt-test/templates/redis-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ kind: Deployment
metadata:
name: redis
spec:
replicas: 1
replicas: {{ .Values.redis.replicas }}
selector:
matchLabels:
app: redis
Expand Down
17 changes: 11 additions & 6 deletions bt-test/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,20 @@ backend:
envFile: .env
sourceCodePath: ./backend/src
redis:
replicas: 1
image:
tag: 6
mongodb:
image:
tag: 5
nginx:
image:
tag: 5
frontend:
image:
repository: berkeleytime-frontend
tag: latest
mongo:
replicas: 1
image:
tag: 6
path: "/home/chengmingli/home/berkeleytime/db"
nginx:
replicas: 1
image:
tag: 1.21
path: "/home/chengmingli/home/berkeleytime/nginx.conf"

0 comments on commit 7feabdd

Please sign in to comment.