79 lines
2.1 KiB
YAML
79 lines
2.1 KiB
YAML
|
|
# Examples of tolerations for services that SHOULD run on Raspberry Pi
|
||
|
|
# These services have low resource requirements and can benefit from Pi-specific features
|
||
|
|
|
||
|
|
# 1. Pi-hole - Perfect for Raspberry Pi (DNS filtering, network service)
|
||
|
|
---
|
||
|
|
apiVersion: apps/v1
|
||
|
|
kind: Deployment
|
||
|
|
metadata:
|
||
|
|
name: pihole
|
||
|
|
spec:
|
||
|
|
template:
|
||
|
|
spec:
|
||
|
|
# Allow scheduling on Raspberry Pi
|
||
|
|
tolerations:
|
||
|
|
- key: "node-type"
|
||
|
|
operator: "Equal"
|
||
|
|
value: "raspberry-pi"
|
||
|
|
effect: "NoSchedule"
|
||
|
|
# Prefer Raspberry Pi for network services
|
||
|
|
affinity:
|
||
|
|
nodeAffinity:
|
||
|
|
preferredDuringSchedulingIgnoredDuringExecution:
|
||
|
|
- weight: 100
|
||
|
|
preference:
|
||
|
|
matchExpressions:
|
||
|
|
- key: node-type
|
||
|
|
operator: In
|
||
|
|
values: ["raspberry-pi"]
|
||
|
|
|
||
|
|
# 2. Home Assistant - May benefit from running on Pi for local device access
|
||
|
|
---
|
||
|
|
apiVersion: apps/v1
|
||
|
|
kind: Deployment
|
||
|
|
metadata:
|
||
|
|
name: home-assistant
|
||
|
|
namespace: home-assistant
|
||
|
|
spec:
|
||
|
|
template:
|
||
|
|
spec:
|
||
|
|
# Allow scheduling on Raspberry Pi (good for IoT hub role)
|
||
|
|
tolerations:
|
||
|
|
- key: "node-type"
|
||
|
|
operator: "Equal"
|
||
|
|
value: "raspberry-pi"
|
||
|
|
effect: "NoSchedule"
|
||
|
|
# Prefer Raspberry Pi for home automation
|
||
|
|
affinity:
|
||
|
|
nodeAffinity:
|
||
|
|
preferredDuringSchedulingIgnoredDuringExecution:
|
||
|
|
- weight: 80
|
||
|
|
preference:
|
||
|
|
matchExpressions:
|
||
|
|
- key: node-type
|
||
|
|
operator: In
|
||
|
|
values: ["raspberry-pi"]
|
||
|
|
|
||
|
|
# 3. Lightweight services (Fava, Vaultwarden, Glance)
|
||
|
|
---
|
||
|
|
apiVersion: apps/v1
|
||
|
|
kind: Deployment
|
||
|
|
metadata:
|
||
|
|
name: lightweight-service-example
|
||
|
|
spec:
|
||
|
|
template:
|
||
|
|
spec:
|
||
|
|
# Allow scheduling on Raspberry Pi for lightweight workloads
|
||
|
|
tolerations:
|
||
|
|
- key: "node-type"
|
||
|
|
operator: "Equal"
|
||
|
|
value: "raspberry-pi"
|
||
|
|
effect: "NoSchedule"
|
||
|
|
# No preference - let scheduler decide based on resource availability
|
||
|
|
resources:
|
||
|
|
requests:
|
||
|
|
memory: "64Mi"
|
||
|
|
cpu: "50m"
|
||
|
|
limits:
|
||
|
|
memory: "512Mi"
|
||
|
|
cpu: "500m"
|