k8s librespeed

This commit is contained in:
Waylon Walker 2023-11-05 14:30:03 -06:00
parent 04dfe716b8
commit 82ba3bc778
No known key found for this signature in database
GPG key ID: 66E2BF2B4190EFE4
4 changed files with 131 additions and 22 deletions

117
librespeed/deployment.yaml Normal file
View file

@ -0,0 +1,117 @@
apiVersion: v1
kind: Namespace
metadata:
name: librespeed
---
apiVersion: v1
kind: Service
metadata:
annotations:
kompose.cmd: kompose convert -o deployment.yaml -n librespeed
kompose.service.expose: librespeed.wayl.one,librespeed.k.waylonwalker.com
kompose.version: 1.31.2 (a92241f79)
creationTimestamp: null
labels:
io.kompose.service: librespeed
name: librespeed
namespace: librespeed
spec:
ports:
- name: "80"
port: 80
targetPort: 80
selector:
io.kompose.service: librespeed
status:
loadBalancer: {}
---
apiVersion: v1
kind: Namespace
metadata:
creationTimestamp: null
name: librespeed
namespace: librespeed
spec: {}
status: {}
---
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
kompose.cmd: kompose convert -o deployment.yaml -n librespeed
kompose.service.expose: librespeed.wayl.one,librespeed.k.waylonwalker.com
kompose.version: 1.31.2 (a92241f79)
creationTimestamp: null
labels:
io.kompose.service: librespeed
name: librespeed
namespace: librespeed
spec:
replicas: 1
selector:
matchLabels:
io.kompose.service: librespeed
strategy: {}
template:
metadata:
annotations:
kompose.cmd: kompose convert -o deployment.yaml -n librespeed
kompose.service.expose: librespeed.wayl.one,librespeed.k.waylonwalker.com
kompose.version: 1.31.2 (a92241f79)
creationTimestamp: null
labels:
io.kompose.network/librespeed-default: "true"
io.kompose.service: librespeed
spec:
containers:
- env:
- name: TZ
value: UTC
image: lscr.io/linuxserver/librespeed
name: librespeed
ports:
- containerPort: 80
protocol: TCP
resources: {}
restartPolicy: Always
status: {}
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
annotations:
kompose.cmd: kompose convert -o deployment.yaml -n librespeed
kompose.service.expose: librespeed.wayl.one,librespeed.k.waylonwalker.com
kompose.version: 1.31.2 (a92241f79)
creationTimestamp: null
labels:
io.kompose.service: librespeed
name: librespeed
namespace: librespeed
spec:
rules:
- host: librespeed.wayl.one
http:
paths:
- backend:
service:
name: librespeed
port:
number: 80
path: /
pathType: Prefix
- host: librespeed.k.waylonwalker.com
http:
paths:
- backend:
service:
name: librespeed
port:
number: 80
path: /
pathType: Prefix
status:
loadBalancer: {}

View file

@ -4,28 +4,11 @@ services:
librespeed: librespeed:
image: lscr.io/linuxserver/librespeed image: lscr.io/linuxserver/librespeed
container_name: librespeed container_name: librespeed
restart: unless-stopped
security_opt: security_opt:
- no-new-privileges:true - no-new-privileges:true
networks: ports:
- proxy - 80
volumes: environment:
- /etc/localtime:/etc/localtime:ro - TZ=UTC # optional: set desired timezone
- ${PWD}/data/librespeed/config:/config
labels: labels:
- "traefik.enable=true" kompose.service.expose: librespeed.wayl.one,librespeed.k.waylonwalker.com
- "traefik.http.routers.librespeed.entrypoints=http"
- "traefik.http.routers.librespeed.rule=Host(`librespeed.${URL}`)"
- "traefik.http.middlewares.librespeed-https-redirect.redirectscheme.scheme=https"
- "traefik.http.routers.librespeed.middlewares=librespeed-https-redirect"
- "traefik.http.routers.librespeed-secure.entrypoints=https"
- "traefik.http.routers.librespeed-secure.rule=Host(`librespeed.${URL}`)"
- "traefik.http.routers.librespeed-secure.tls=true"
- "traefik.http.routers.librespeed-secure.service=librespeed"
- "traefik.http.services.librespeed.loadbalancer.server.port=80"
- "traefik.docker.network=proxy"
networks:
proxy:
external: true

9
librespeed/justfile Normal file
View file

@ -0,0 +1,9 @@
default: convert deploy viz
convert:
kompose convert -o deployment.yaml -n librespeed
deploy:
kubectl apply -f deployment.yaml
viz:
k8sviz -n librespeed --kubeconfig $KUBECONFIG -t png -o librespeed-k8s.png
restart:
kubectl rollout restart -n librespeed deployment/librespeed

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB