-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathservice.yaml
138 lines (137 loc) · 3.29 KB
/
service.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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: keptn-monaco-service
namespace: keptn
labels:
"app": "keptn"
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: keptn-monaco-service-secrets
namespace: keptn
labels:
"app": "keptn"
rules:
- apiGroups:
- ""
resources:
- secrets
verbs:
- get
- list
- watch
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: keptn-monaco-service-secrets
namespace: keptn
labels:
"app": "keptn"
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: keptn-monaco-service-secrets
subjects:
- kind: ServiceAccount
name: keptn-monaco-service
---
# Deployment of our monaco-service
apiVersion: apps/v1
kind: Deployment
metadata:
name: monaco-service
namespace: keptn
spec:
selector:
matchLabels:
run: monaco-service
replicas: 1
template:
metadata:
labels:
run: monaco-service
app.kubernetes.io/name: monaco-service
app.kubernetes.io/version: 0.8.4
spec:
containers:
- name: monaco-service
image: keptnsandbox/monaco-service:0.8.4
ports:
- containerPort: 8080
env:
- name: MONACO_VERBOSE_MODE
value: "true"
- name: MONACO_DRYRUN
value: "true"
- name: MONACO_KEEP_TEMP_DIR
value: "false"
resources:
requests:
memory: "32Mi"
cpu: "100m"
limits:
memory: "256Mi"
cpu: "500m"
- name: distributor
image: keptn/distributor:0.9.1
ports:
- containerPort: 8080
resources:
requests:
memory: "16Mi"
cpu: "25m"
limits:
memory: "32Mi"
cpu: "50m"
env:
- name: VERSION
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: 'metadata.labels[''app.kubernetes.io/version'']'
- name: K8S_DEPLOYMENT_NAME
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: 'metadata.labels[''app.kubernetes.io/name'']'
- name: K8S_POD_NAME
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.name
- name: K8S_NAMESPACE
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.namespace
- name: K8S_NODE_NAME
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: spec.nodeName
- name: PUBSUB_URL
value: 'nats://keptn-nats-cluster'
- name: PUBSUB_TOPIC
value: 'sh.keptn.event.monaco.triggered'
- name: PUBSUB_RECIPIENT
value: '127.0.0.1'
serviceAccountName: keptn-monaco-service
---
# Expose monaco-service via Port 8080 within the cluster
apiVersion: v1
kind: Service
metadata:
name: monaco-service
namespace: keptn
labels:
run: monaco-service
spec:
ports:
- port: 8080
protocol: TCP
selector:
run: monaco-service