This repository has been archived by the owner on Apr 2, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
cloud-deploy.yaml
120 lines (120 loc) · 2.76 KB
/
cloud-deploy.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
apiVersion: apps/v1
kind: Deployment
metadata:
name: summer-mc-info
labels:
app: summer-mc-info
service: web
spec:
replicas: 1
revisionHistoryLimit: 2
strategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: 1
selector:
matchLabels:
app: summer-mc-info
template:
metadata:
labels:
app: summer-mc-info
service: web
spec:
containers:
- name: summer-mc-info
image: quay.io/uface/summer-mc-info:2.1
ports:
- containerPort: 80
protocol: TCP
livenessProbe:
httpGet:
path: /health
port: 80
initialDelaySeconds: 3
periodSeconds: 3
lifecycle:
preStop:
exec:
command: ["/usr/sbin/nginx","-s","quit"]
---
apiVersion: v1
kind: Service
metadata:
name: summer-mc-info
labels:
service: web
spec:
ports:
- port: 80
targetPort: 80
protocol: TCP
name: http
selector:
app: summer-mc-info
---
apiVersion: v1
kind: Service
metadata:
name: ace-summer-minecraft-dynmap
namespace: ace-official
labels:
service: game
spec:
ports:
- port: 8123
targetPort: 8123
protocol: TCP
name: dynmap
selector:
app: ace-summer-minecraft
---
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: summer-mc-info
labels:
service: web
annotations:
kubernetes.io/ingress.class: "nginx"
cert-manager.io/cluster-issuer: "letsencrypt-prod"
external-dns.alpha.kubernetes.io/cloudflare-proxied: "false"
spec:
tls:
- hosts:
- minecraft.uf-ace.com
secretName: summer-mc-info-tls
rules:
- host: minecraft.uf-ace.com
http:
paths:
- path: /
backend:
serviceName: summer-mc-info
servicePort: 80
---
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: dynmap-mc
labels:
service: web
annotations:
kubernetes.io/ingress.class: "nginx"
cert-manager.io/cluster-issuer: "letsencrypt-prod"
external-dns.alpha.kubernetes.io/cloudflare-proxied: "false"
nginx.ingress.kubernetes.io/configuration-snippet: |
more_set_headers "Content-Security-Policy: default-src 'none'; script-src 'self' 'unsafe-inline'; style-src 'self'; img-src 'self' data:; connect-src 'self'; font-src 'self' data:; base-uri 'none'; form-action 'self'; frame-ancestors 'none'; navigate-to https:; block-all-mixed-content";
spec:
tls:
- hosts:
- dynmap.uf-ace.com
secretName: dynmap-mc-tls
rules:
- host: dynmap.uf-ace.com
http:
paths:
- path: /
backend:
serviceName: ace-summer-minecraft-dynmap
servicePort: 8123