-
Notifications
You must be signed in to change notification settings - Fork 1
/
deployment.yml
122 lines (122 loc) · 4.99 KB
/
deployment.yml
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
111
112
113
114
115
116
117
118
119
120
121
122
kind: Service
apiVersion: v1
metadata:
name: next-atomic-back
namespace: ${CICD_GIT_BRANCH}
spec:
selector:
app: next-atomic-back
type: ClusterIP
ports:
- protocol: TCP
port: 80
targetPort: 80
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: next-atomic-back
namespace: ${CICD_GIT_BRANCH}
labels:
app: next-atomic-back
spec:
replicas: 2
selector:
matchLabels:
app: next-atomic-back
template:
metadata:
annotations:
commit-ref: ${CICD_GIT_BRANCH}:${CICD_GIT_COMMIT}
pipeline-ref: ${CICD_EXECUTION_ID}
labels:
app: next-atomic-back
spec:
#affinity:
# podAntiAffinity:
# requiredDuringSchedulingIgnoredDuringExecution:
# - labelSelector:
# matchExpressions:
# - key: app
# operator: In
# values:
# - next-atomic-back
# topologyKey: kubernetes.io/hostname
imagePullSecrets:
- name: dockerhub
containers:
- name: next-atomic-back
image: index.docker.io/aDockerUser/aDockerRepo:next-atomic-back-${CICD_GIT_COMMIT}
#resources:
# requests:
# memory: '200Mi'
# cpu: '100m'
# You can create a "next-atomic-back" Kubernetes Secret or feel free to inject envs in another way
env:
- name: MONGO_URL
valueFrom: # mongodb://mongodb:27017/parse
secretKeyRef:
name: next-atomic-back
key: mongo-url
- name: MONGO_USER
valueFrom: # parse
secretKeyRef:
name: next-atomic-back
key: mongo-user
# From an already deployed helm MongoDB
- name: MONGO_PASSWORD
valueFrom: # aSuperStrongPassword
secretKeyRef:
name: mongodb
key: mongodb-password
- name: PUBLIC_PARSE_URL
valueFrom: # https://api.my-site.com/parse
secretKeyRef:
name: next-atomic-back
key: public-parse-url
- name: PUBLIC_GRAPHQL_URL
valueFrom:
secretKeyRef: # https://api.my-site.com/graphql
name: next-atomic-back
key: public-graphql-url
- name: next-atomic_ADMIN
valueFrom:
secretKeyRef: # adminUserName
name: next-atomic-back
key: next-atomic-admin
- name: next-atomic_PASSWORD
valueFrom:
secretKeyRef: # aSuperStrongAdminPassword
name: next-atomic-back
key: next-atomic-password
- name: next-atomic_SESSION_SECRET
valueFrom:
secretKeyRef: # aSuperStrongSessionSecretRandomString
name: next-atomic-back
key: next-atomic-session-secret
- name: PORT
value: '80'
- name: APP_ID
value: next-atomic
- name: MASTER_KEY
valueFrom: # aSuperSuperStrongSuperLongRandomString
secretKeyRef:
name: next-atomic-back
key: master-key
- name: S3_ACCESS_KEY
valueFrom: #anS3AccessKey
secretKeyRef:
name: next-atomic-back
key: s3-access-key
- name: S3_SECRET_KEY
valueFrom: #aS3SecretKey
secretKeyRef:
name: next-atomic-back
key: s3-secret-key
- name: S3_ENDPOINT
valueFrom: # https://s3.my-site.com
secretKeyRef:
name: next-atomic-back
key: s3-endpoint
- name: S3_BUCKET
value: ${CICD_GIT_BRANCH}