-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdeployment.yaml
72 lines (72 loc) · 1.57 KB
/
deployment.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
apiVersion: apps/v1
kind: Deployment
metadata:
name: demo-plugin
namespace: cc-backend
spec:
replicas: 0
selector:
matchLabels:
app: demo-plugin
template:
metadata:
labels:
app: demo-plugin
spec:
imagePullSecrets:
- name: pipeline-docker-registry
containers:
- name: demo-plugin
image: ${CICD_IMAGE}:${CICD_EXECUTION_SEQUENCE}
imagePullPolicy: Always
ports:
- containerPort: 5000
readinessProbe:
httpGet:
path: /height
port: 5000
successThreshold: 3
failureThreshold: 3
periodSeconds: 2
timeoutSeconds: 2
livenessProbe:
httpGet:
path: /height
port: 5000
failureThreshold: 3
periodSeconds: 5
timeoutSeconds: 2
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: demo-plugin
namespace: cc-backend
annotations:
kubernetes.io/ingress.class: "nginx"
nginx.ingress.kubernetes.io/enable-cors: "true"
nginx.ingress.kubernetes.io/cors-allow-origin: "https://status.core.cloudchainsinc.com"
nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
spec:
rules:
- host: demo-plugin.core.cloudchainsinc.com
http:
paths:
- backend:
serviceName: demo-plugin
servicePort: 5000
---
apiVersion: v1
kind: Service
metadata:
name: demo-plugin
namespace: cc-backend
labels:
app: demo-plugin
spec:
ports:
- protocol: TCP
port: 5000
targetPort: 5000
selector:
app: demo-plugin