diff --git a/librespeed/deployment.yaml b/librespeed/deployment.yaml new file mode 100644 index 0000000..9f6912e --- /dev/null +++ b/librespeed/deployment.yaml @@ -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: {} diff --git a/librespeed/docker-compose.yml b/librespeed/docker-compose.yml index ffb45be..ea819a5 100644 --- a/librespeed/docker-compose.yml +++ b/librespeed/docker-compose.yml @@ -4,28 +4,11 @@ services: librespeed: image: lscr.io/linuxserver/librespeed container_name: librespeed - restart: unless-stopped security_opt: - no-new-privileges:true - networks: - - proxy - volumes: - - /etc/localtime:/etc/localtime:ro - - ${PWD}/data/librespeed/config:/config - + ports: + - 80 + environment: + - TZ=UTC # optional: set desired timezone labels: - - "traefik.enable=true" - - "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 + kompose.service.expose: librespeed.wayl.one,librespeed.k.waylonwalker.com diff --git a/librespeed/justfile b/librespeed/justfile new file mode 100644 index 0000000..9401ee6 --- /dev/null +++ b/librespeed/justfile @@ -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 diff --git a/librespeed/librespeed-k8s.png b/librespeed/librespeed-k8s.png new file mode 100644 index 0000000..61f27ab Binary files /dev/null and b/librespeed/librespeed-k8s.png differ