-
Notifications
You must be signed in to change notification settings - Fork 1
/
deployment.yml
62 lines (62 loc) · 1.98 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
kind: Service
apiVersion: v1
metadata:
name: next-atomic-front
namespace: ${CICD_GIT_BRANCH}
spec:
selector:
app: next-atomic-front
type: ClusterIP
ports:
- protocol: TCP
port: 80
targetPort: 3000
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: next-atomic-front
namespace: ${CICD_GIT_BRANCH}
labels:
app: next-atomic-front
spec:
replicas: 2
selector:
matchLabels:
app: next-atomic-front
template:
metadata:
annotations:
commit-ref: ${CICD_GIT_BRANCH}:${CICD_GIT_COMMIT}
pipeline-ref: ${CICD_EXECUTION_ID}
labels:
app: next-atomic-front
spec:
#affinity:
# podAntiAffinity:
# requiredDuringSchedulingIgnoredDuringExecution:
# - labelSelector:
# matchExpressions:
# - key: app
# operator: In
# values:
# - next-atomic-front
# topologyKey: kubernetes.io/hostname
imagePullSecrets:
- name: dockerhub
containers:
- name: next-atomic-front
# You need to modify this line here and into .rancher-pipeline.yml
image: index.docker.io/aDockerUser/aDockerRepo:next-atomic-front-${CICD_GIT_COMMIT}
#resources:
# requests:
# memory: '200Mi'
# cpu: '100m'
env:
- name: APP_ID
value: next-atomic
- name: GRAPHQL_URL
valueFrom:
secretKeyRef:
name: next-atomic-back
key: public-graphql-url