-
Notifications
You must be signed in to change notification settings - Fork 0
/
kubernetes-uat.yaml
135 lines (123 loc) · 3.32 KB
/
kubernetes-uat.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
apiVersion: apps/v1
kind: Deployment
metadata:
name: investment-calculator
namespace: fintech-uat-ersa-team
labels:
app: investment-calculator
spec:
replicas: 1
selector:
matchLabels:
app: investment-calculator
template:
metadata:
annotations:
prometheus.io/path: /actuator/prometheus
prometheus.io/port: "9090"
prometheus.io/scrape: "true"
labels:
app: investment-calculator
deploysphere_health: "true"
spec:
imagePullSecrets:
- name: fintech-docker-secret
containers:
- name: investment-calculator
image: ersa-team-docker-registry.fintechchallenge.pl/ersa-team/investment-calculator:latest
imagePullPolicy: Always
ports:
- name: api
containerPort: 8080
- name: management
containerPort: 9090
env:
- name: SPRING_PROFILES_ACTIVE
value: "uat"
resources:
limits:
cpu: 400m
memory: 400Mi
requests:
cpu: 50m
memory: 50Mi
livenessProbe:
httpGet:
path: /actuator/health
port: 9090
initialDelaySeconds: 120
periodSeconds: 10
readinessProbe:
httpGet:
path: /actuator/health
port: 9090
initialDelaySeconds: 50
periodSeconds: 10
restartPolicy: Always
---
apiVersion: v1
kind: Service
metadata:
name: investment-calculator
labels:
app: investment-calculator
visualize: "true"
prometheus_monitoring: "true"
spec:
ports:
- name: api
port: 8080
protocol: TCP
targetPort: api
selector:
app: investment-calculator
---
---
# Note: in a kubernetes secret the string (e.g. generated by htpasswd) must be base64-encoded first.
# To create an encoded user:password pair, the following command can be used:
# htpasswd -nb user password | openssl base64
apiVersion: v1
kind: Secret
metadata:
name: fintech-uat-ersa-team-basic-auth-secret
namespace: fintech-uat-ersa-team
data:
users: |
ZXJzYTokYXByMSQwVWZFMEM2ZyQ4cHV4cnFXbkVTNjRhTy94SmVLVTAuCgo=
---
apiVersion: traefik.containo.us/v1alpha1
kind: Middleware
metadata:
name: fintech-uat-ersa-team-basic-auth-middleware
namespace: fintech-uat-ersa-team
spec:
basicAuth:
secret: fintech-uat-ersa-team-basic-auth-secret
---
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
name: investment-calculator
namespace: fintech-uat-ersa-team
spec:
entryPoints:
- websecure
routes:
- kind: Rule
match: Host(`investment-calculator.ersa-team.uat.fintechchallenge.pl`)
middlewares:
- name: fintech-uat-ersa-team-basic-auth-middleware
namespace: fintech-uat-ersa-team
services:
- kind: Service
name: investment-calculator
namespace: fintech-uat-ersa-team
passHostHeader: true
port: 8080
scheme: http
tls:
options:
namespace: fintech-uat-ersa-team
certResolver: hltech
domains:
- main: investment-calculator.ersa-team.uat.fintechchallenge.pl