generated from keptn-sandbox/keptn-service-template-go
-
Notifications
You must be signed in to change notification settings - Fork 5
/
service.yaml
132 lines (132 loc) · 3.75 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
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: keptn-litmus-service
namespace: keptn
labels:
name: keptn-litmus-service
---
# Source: openebs/templates/clusterrole.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: keptn-litmus-service
labels:
name: keptn-litmus-service
rules:
- apiGroups: ["","apps","batch","extensions","litmuschaos.io","openebs.io","storage.k8s.io"]
resources: ["chaosengines","chaosexperiments","chaosresults","cstorpools","cstorvolumereplicas","configmaps","secrets","pods","pods/exec","pods/log","pods/eviction","jobs","replicasets","deployments","daemonsets","statefulsets","persistentvolumeclaims","persistentvolumes","storageclasses","services","events"]
verbs: ["create","delete","get","list","patch","update", "deletecollection"]
- apiGroups: [""]
resources: ["nodes"]
verbs: ["get","list","patch","update"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: keptn-litmus-service
labels:
name: keptn-litmus-service
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: keptn-litmus-service
subjects:
- kind: ServiceAccount
name: keptn-litmus-service
namespace: keptn
---
# Deployment of our litmus-service
apiVersion: apps/v1
kind: Deployment
metadata:
name: litmus-service
namespace: keptn
spec:
selector:
matchLabels:
run: litmus-service
replicas: 1
template:
metadata:
labels:
run: litmus-service
app.kubernetes.io/name: litmus-service
app.kubernetes.io/version: 0.2.1
spec:
serviceAccountName: keptn-litmus-service
containers:
- name: litmus-service
image: jetzlstorfer/litmus-service:0.2.2
imagePullPolicy: Always
ports:
- containerPort: 8080
env:
- name: CONFIGURATION_SERVICE
value: 'http://configuration-service:8080'
- name: distributor
image: keptn/distributor:0.8.4
livenessProbe:
httpGet:
path: /health
port: 10999
initialDelaySeconds: 5
periodSeconds: 5
imagePullPolicy: Always
ports:
- containerPort: 8080
resources:
requests:
memory: "16Mi"
cpu: "50m"
limits:
memory: "32Mi"
cpu: "250m"
env:
- name: PUBSUB_URL
value: 'nats://keptn-nats'
- name: PUBSUB_TOPIC
value: 'sh.keptn.event.test.triggered,sh.keptn.event.test.finished'
- name: PUBSUB_RECIPIENT
value: '127.0.0.1'
- 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
---
# Expose litmus-service via Port 8080 within the cluster
apiVersion: v1
kind: Service
metadata:
name: litmus-service
namespace: keptn
labels:
run: litmus-service
spec:
ports:
- port: 8080
protocol: TCP
selector:
run: litmus-service