-
Notifications
You must be signed in to change notification settings - Fork 62
/
Copy pathexample_dependencies.yaml
110 lines (108 loc) · 2.05 KB
/
example_dependencies.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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
##
# mysql-auth-svc
##
## PersistentVolumeClaim
# apiVersion: v1
# kind: PersistentVolumeClaim
# metadata:
# name: mysql-auth-svc-pv-claim
# spec:
# storageClassName: awsgp2
# accessModes:
# - ReadWriteOnce
# resources:
# requests:
# storage: 5Gi
---
## Expose MySQL for Auth-Svc
apiVersion: v1
kind: Service
metadata:
name: mysql-auth-svc
spec:
ports:
- port: 3306
selector:
app: mysql-auth-svc
clusterIP: None
---
## Simple MySQL for Auth-Svc
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: mysql-auth-svc
spec:
selector:
matchLabels:
app: mysql-auth-svc
serviceName: mysql-auth-svc-svc
replicas: 1
template:
metadata:
labels:
app: mysql-auth-svc
spec:
containers:
- image: mysql:5.7
name: mysql-auth-svc
# command: [ '/bin/sh' ]
# args: ['-c', 'tail -f /dev/null']
env:
- name: MYSQL_ROOT_PASSWORD
value: password
- name: MYSQL_USER
value: auth-svc
- name: MYSQL_PASSWORD
value: password
- name: MYSQL_DATABASE
value: auth-svc
- name: NODE_ENV
value: development
ports:
- containerPort: 3306
name: mysql
# volumeMounts:
# - name: mysql-auth-svc-persistent-storage
# mountPath: /var/lib/mysql
# volumes:
# - name: mysql-auth-svc-persistent-storage
# persistentVolumeClaim:
# claimName: mysql-auth-svc-pv-claim
---
##
# Auth-Svc Redis
##
apiVersion: apps/v1
kind: Deployment
metadata:
name: auth-svc-redis
labels:
app: auth-svc-redis
spec:
replicas: 1
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 1
selector:
matchLabels:
app: auth-svc-redis
template:
metadata:
labels:
app: auth-svc-redis
spec:
containers:
- name: redis
image: redis:5.0.4-alpine
---
apiVersion: v1
kind: Service
metadata:
name: auth-svc-redis-svc
spec:
ports:
- port: 6379
selector:
app: auth-svc-redis
clusterIP: None