diff --git a/jellyfin/nvidia.yaml b/jellyfin/nvidia.yaml new file mode 100644 index 0000000..0869780 --- /dev/null +++ b/jellyfin/nvidia.yaml @@ -0,0 +1,20 @@ +apiVersion: v1 +kind: Pod +metadata: + name: nbody-gpu-benchmark + namespace: default +spec: + restartPolicy: OnFailure + runtimeClassName: nvidia + containers: + - name: cuda-container + image: nvcr.io/nvidia/k8s/cuda-sample:nbody + args: ["nbody", "-gpu", "-benchmark"] + resources: + limits: + nvidia.com/gpu: 1 + env: + - name: NVIDIA_VISIBLE_DEVICES + value: all + - name: NVIDIA_DRIVER_CAPABILITIES + value: all \ No newline at end of file diff --git a/networking/haproxy.yaml b/networking/haproxy.yaml new file mode 100644 index 0000000..5041566 --- /dev/null +++ b/networking/haproxy.yaml @@ -0,0 +1,21 @@ +--- + +apiVersion: v1 +kind: Namespace +metadata: + name: networking + +--- +apiVersion: helm.cattle.io/v1 +kind: HelmChart +metadata: + name: haproxy-kubernetes-ingress + namespace: kube-system +spec: + repo: https://haproxytech.github.io/helm-charts + chart: kubernetes-ingress + targetNamespace: networking + # valuesContent: |- + # controller: + # deployment: + # useHostPort: true \ No newline at end of file diff --git a/networking/pihole.yaml b/networking/pihole.yaml new file mode 100644 index 0000000..aaf452e --- /dev/null +++ b/networking/pihole.yaml @@ -0,0 +1,164 @@ +--- + +# ----------------------------------------------------------------------- +# DEPLOYMENTS +# ----------------------------------------------------------------------- + +apiVersion: apps/v1 +kind: Deployment +metadata: + name: pihole + namespace: networking +spec: + replicas: 1 + selector: + matchLabels: + app: pihole + template: + metadata: + labels: + app: pihole + spec: + containers: + - name: pihole + image: pihole/pihole:latest + imagePullPolicy: IfNotPresent + env: + - name: TZ + value: "Australia/Melbourne" + - name: FTLCONF_webserver_api_password + value: grepgrepgrep + # allow it to respond to devices outside cluster + - name: FTLCONF_dns_listeningMode + value: single + ports: + - containerPort: 53 + protocol: TCP + - containerPort: 53 + protocol: UDP + - containerPort: 67 + protocol: UDP + - containerPort: 80 + protocol: TCP + - containerPort: 443 + protocol: TCP + # volumeMounts: + # - name: etc + # mountPath: /etc/pihole + # - name: dnsmasq + # mountPath: /etc/dnsmasq.d + resources: + requests: + memory: 128Mi + cpu: 100m + limits: + memory: 2Gi + cpu: 1 + # volumes: + # - name: etc + # hostPath: + # path: /data/pihole/etc + # type: Directory + # - name: dnsmasq + # hostPath: + # path: /data/pihole/dnsmasq.d + # type: Directory + +# ----------------------------------------------------------------------- +# SERVICES +# ----------------------------------------------------------------------- + +--- + +kind: Service +apiVersion: v1 +metadata: + name: pihole + namespace: networking +spec: + selector: + app: pihole + ports: + - name: web + port: 80 + targetPort: 80 + - name: dns-tcp + port: 53 + targetPort: 53 + protocol: TCP + - name: dns-udp + port: 53 + targetPort: 53 + protocol: UDP + +--- + +apiVersion: v1 +kind: Service +metadata: + name: pihole-dns-udp + namespace: networking +spec: + selector: + app: pihole + ports: + - name: dns-udp + port: 53 + protocol: UDP + externalTrafficPolicy: Local + type: LoadBalancer + +--- + +apiVersion: v1 +kind: Service +metadata: + name: pihole-dns-tcp + namespace: networking +spec: + selector: + app: pihole + ports: + - name: dns-tcp + port: 53 + protocol: TCP + externalTrafficPolicy: Local + type: LoadBalancer + +--- + +apiVersion: v1 +kind: Service +metadata: + name: pihole-web-debug + namespace: networking +spec: + selector: + app: pihole + ports: + - name: dns-tcp + port: 9980 + targetPort: 80 + protocol: TCP + externalTrafficPolicy: Local + type: LoadBalancer + +--- +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: pihole + namespace: networking +spec: + ingressClassName: haproxy + rules: + - host: "pihole.nightowl.hayst" + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: pihole + port: + name: web