-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathservices.yaml.j2
37 lines (37 loc) · 948 Bytes
/
services.yaml.j2
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
apiVersion: v1
kind: List
items:
{% for index in range(1, (num_apps | int) + 1) %}
- apiVersion: v1
kind: Service
metadata:
annotations:
service.beta.openshift.io/serving-cert-secret-name: app-{{ index }}
labels:
app: scale-test
name: app-{{ index }}
namespace: {{ namespace }}
spec:
ports:
# The port number has to be hardcoded as templates don't allow
# integer parameters and definition with string port fail with
# Error from server: unrecognized type: int32
- name: http-8080
port: 8080
protocol: TCP
targetPort: 8080
- name: db-5432
port: 5432
protocol: TCP
targetPort: 5432
# This is used only in the plain-scale scenario
- name: https-8443
port: 8443
protocol: TCP
targetPort: 8443
selector:
app: scale-test
app.index: application-{{ index }}
sessionAffinity: None
type: ClusterIP
{% endfor %}