-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdeployment.yaml
108 lines (108 loc) · 2.3 KB
/
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
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
apiVersion: v1
kind: Namespace
metadata:
name: python-garbage
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: rage-gauge
namespace: python-garbage
labels:
app: rage-gauge
spec:
revisionHistoryLimit: 1
selector:
matchLabels:
app: rage-gauge
replicas: 1
template:
metadata:
labels:
app: rage-gauge
spec:
containers:
- name: main
image: docker.fndk.io/other/rage-gauge-backend:latest
imagePullPolicy: Always
ports:
- containerPort: 8765
- name: front
image: docker.fndk.io/other/rage-gauge-front:latest
imagePullPolicy: Always
ports:
- containerPort: 80
restartPolicy: Always
---
apiVersion: v1
kind: Service
metadata:
name: rage-gauge
namespace: python-garbage
labels:
app: rage-gauge
spec:
ports:
- name: websocket
port: 8765
targetPort: 8765
- name: http
port: 80
targetPort: 80
selector:
app: rage-gauge
---
apiVersion: v1
data:
auth: cGVybzokYXByMSROTElBV0RIdSRabWdXZjJhd0JQTXI1LkZnOEdHd0cvCg==
kind: Secret
metadata:
name: rage-gauge-auth
namespace: python-garbage
type: Opaque
---
apiVersion: traefik.containo.us/v1alpha1
kind: Middleware
metadata:
name: rage-gauge-auth-middleware
namespace: python-garbage
spec:
basicAuth:
removeHeader: true
secret: rage-gauge-auth
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: rage-gauge-ingress
namespace: python-garbage
annotations:
kubernetes.io/ingress.class: traefik
cert-manager.io/cluster-issuer: letsencrypt
traefik.ingress.kubernetes.io/router.middlewares: python-garbage-rage-gauge-auth-middleware@kubernetescrd,default-redirect-https@kubernetescrd
spec:
rules:
- host: rage-gauge.fndk.io
http:
paths:
- path: /ws
pathType: Prefix
backend:
service:
name: rage-gauge
port:
name: websocket
- host: rage-gauge.fndk.io
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: rage-gauge
port:
name: http
tls:
- secretName: rage-gauge.fndk.io
hosts:
- rage-gauge.fndk.io