1
0
Fork 0

app/internet: initialize with landing page

This is already rolled out at https://internet.hackerspace.pl/.

Change-Id: Ibebaeb830a4b58cecfc1ecbf63d07cc63ded7e2b
master
q3k 2019-07-09 13:02:27 +02:00
parent 1c825949c4
commit 94f8dbf347
5 changed files with 163 additions and 0 deletions

3
app/internet/Dockerfile Normal file
View File

@ -0,0 +1,3 @@
FROM nginx:1.17.1-alpine
COPY static /usr/share/nginx/html

View File

@ -0,0 +1,85 @@
local kube = import '../../../kube/kube.libsonnet';
{
local internet = self,
local cfg = internet.cfg,
cfg:: {
namespace: "internet",
appName: "internet-landing",
domain: "internet.hackerspace.pl",
tag: "201907091256",
image: "registry.k0.hswaw.net/app/internet:" + cfg.tag,
resources: {
requests: {
cpu: "25m",
memory: "50Mi",
},
limits: {
cpu: "100m",
memory: "200Mi",
},
},
},
namespace: kube.Namespace(cfg.namespace),
metadata(component):: {
namespace: cfg.namespace,
labels: {
"app.kubernetes.io/name": cfg.appName,
"app.kubernetes.io/managed-by": "kubecfg",
"app.kubernetes.io/component": component,
},
},
deployment: kube.Deployment("nginx") {
metadata+: internet.metadata("nginx"),
spec+: {
replicas: 1,
template+: {
spec+: {
containers_: {
nginx: kube.Container("nginx") {
image: cfg.image,
ports_: {
http: { containerPort: 80 },
},
resources: cfg.resources,
},
},
},
},
},
},
svc: kube.Service("frontend") {
metadata+: internet.metadata("frontend"),
target_pod:: internet.deployment.spec.template,
},
ingress: kube.Ingress("frontend") {
metadata+: internet.metadata("frontend") {
annotations+: {
"kubernetes.io/tls-acme": "true",
"certmanager.k8s.io/cluster-issuer": "letsencrypt-prod",
},
},
spec+: {
tls: [
{ hosts: [cfg.domain], secretName: "frontend-tls"}
],
rules: [
{
host: cfg.domain,
http: {
paths: [
{ path: "/", backend: internet.svc.name_port },
],
},
},
],
},
},
}

View File

@ -0,0 +1,74 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Warszawski Hackerspace - Internet</title>
<style type="text/css">
body {
margin: 80px auto;
line-height: 1.6;
font-size: 18px;
max-width: 800px;
color: #444;
background-color: #eee;
padding: 0 10px;
font-family: helvetica, arial, sans-serif;
}
a {
color: #449;
font-weight: 600;
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
span.snippet {
font-family: system, courier new, serif;
}
div.container {
background-color: #f8f8f8;
padding: 10px 20px 10px 20px;
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
margin-bottom: 40px;
}
div.container h1, h2, h3 {
margin: 0;
}
</style>
</head>
<body>
<div class="container">
<h1>Warszawski Hackerspace</h1>
<h2>Dostęp do Internetu</h2>
<p>
Świadczymy usługi dostępu do Internetu drogą kablową i światłowodową w obrębie budynku na ul. Wolność 2A w Warszawie.
</p>
<p>
<b>Kontakt</b>: kontakt@hackerspace.pl
</p>
<p>
<b>Zgłaszanie awarii</b>: awaria@hackerspace.pl
</p>
<p>
<b>Zgłaszanie nadużycia</b> (abuse): abuse@hackerspace.pl
</p>
</div>
<div class="container">
<h2>Zasoby</h2>
<p>
<a href="/regulamin.pdf">Regulamin świadczenia usług telekomunikacyjnych - Dostęp do Internetu</a> (obowiązuje od 2019/07/01)
</p>
<p>
<a href="https://speedtest.hackerspace.pl">Pomiar prędkości łącza - speedtest</a>
</p>
<p>
<a href="https://bgp.wtf">Informacje techniczne</a> (peering, sieć szkieletowa, ...)
</p>
</div>
<div class="container">
<p style="font-size: 0.8em;">
Stowarzysznie “Warszawski Hackerspace” (KRS 0000424347) zarejestrowane jest w Rejestrze Przedsiębiorców Telekomunikacyjnych UKE pod numerem 12216.
</p>
</div>
</body>
</html>

Binary file not shown.

View File

@ -153,6 +153,7 @@ local cm = import "../../cluster/kube/lib/cert-manager.libsonnet";
{ who: ["q3k"], what: "app/radio" },
{ who: ["q3k"], what: "app/factorio" },
{ who: ["q3k"], what: "app/gerrit" },
{ who: ["q3k"], what: "app/internet" },
{ who: ["q3k"], what: "go/svc/egressifier" },
],
acl: [