-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path42screensaver.yml
94 lines (90 loc) · 1.9 KB
/
42screensaver.yml
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
kind: Deployment
apiVersion: apps/v1
metadata:
name: ft-ss
labels:
app.kubernetes.io/name: 'ft-ss'
app.kubernetes.io/part-of: 'ft-ss'
spec:
replicas: 1
selector:
matchLabels:
app.kubernetes.io/name: ft-ss
template:
metadata:
labels:
app.kubernetes.io/name: 'ft-ss'
app.kubernetes.io/part-of: 'ft-ss'
spec:
volumes:
- name: secret-volume
secret:
secretName: 42screensaver
containers:
- name: ft-ss
image: localhost:32000/42screensaver:latest
imagePullPolicy: Always
resources:
limits:
cpu: "1"
memory: 1Gi
requests:
cpu: "0.5"
memory: 1Gi
ports:
- containerPort: 3000
env:
- name: API_UUID
valueFrom:
secretKeyRef:
name: 42screensaver
key: API_UUID
- name: API_SECRET
valueFrom:
secretKeyRef:
name: 42screensaver
key: API_SECRET
---
kind: Service
apiVersion: v1
metadata:
name: ft-ss
labels:
app.kubernetes.io/name: 'ft-ss'
app.kubernetes.io/part-of: 'ft-ss'
spec:
selector:
app.kubernetes.io/name: ft-ss
type: ClusterIP
ports:
- name: http
protocol: TCP
port: 80
targetPort: 3000
---
kind: Ingress
apiVersion: networking.k8s.io/v1
metadata:
name: http-ingress-ft-ss
annotations:
cert-manager.io/cluster-issuer: "lets-encrypt"
kubernetes.io/ingress.class: "public"
nginx.ingress.kubernetes.io/rewrite-target: '/$2'
labels:
app.kubernetes.io/part-of: 'ft-ss'
spec:
tls:
- hosts:
- 42screensaver.alopez.fr
secretName: ft-ss-tls
rules:
- host: 42screensaver.alopez.fr
http:
paths:
- backend:
service:
name: ft-ss
port:
number: 80
pathType: Prefix
path: /()(.*)