-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmoodledb-exporter-deployment.yaml
75 lines (70 loc) · 1.59 KB
/
moodledb-exporter-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
73
74
apiVersion: apps/v1
kind: Deployment
metadata:
name: moodledb-exporter-deployment
labels:
app: moodledb-exporter
spec:
replicas: 1
selector:
matchLabels:
app: moodledb-exporter
template:
metadata:
labels:
app: moodledb-exporter
spec:
containers:
- name: moodledb-exporter
image: git.atcomputing.nl:5050/training/infra/moodledb-exporter:latest
ports:
- containerPort: 8899
env:
- name: DB_HOST
value: "db_host_here"
- name: DB_USER
value: "db_user_here"
- name: DB_PASSWORD
value: "db_password_here"
- name: DB_NAME
value: "moodle_database_name_here"
- name: SLEEP_INTERVAL
value: "60"
- name: SERVER_PORT
value: "8899"
- name: BASIC_AUTH_USERNAME
value: "basic_auth_username_here"
- name: BASIC_AUTH_PASSWORD
value: "basic_auth_password_here"
restartPolicy: UnlessStopped
---
apiVersion: v1
kind: Service
metadata:
name: moodledb-exporter-service
spec:
selector:
app: moodledb-exporter
ports:
- protocol: TCP
port: 8899
targetPort: 8899
type: ClusterIP
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: moodledb-exporter-ingress
annotations:
# Include any specific annotations for your ingress controller, if required.
spec:
rules:
- http:
paths:
- path: /moodledb-exporter
pathType: Prefix
backend:
service:
name: moodledb-exporter-service
port:
number: 8899