diff options
Diffstat (limited to 'bundles')
| -rw-r--r-- | bundles/gonic/files/kube.yaml | 67 | ||||
| -rw-r--r-- | bundles/gonic/items.py | 7 | ||||
| -rw-r--r-- | bundles/gonic/metadata.py | 16 |
3 files changed, 90 insertions, 0 deletions
diff --git a/bundles/gonic/files/kube.yaml b/bundles/gonic/files/kube.yaml new file mode 100644 index 0000000..1eaeb5b --- /dev/null +++ b/bundles/gonic/files/kube.yaml @@ -0,0 +1,67 @@ +apiVersion: v1 +kind: Pod +metadata: + name: gonic + labels: + traefik.enable: true + traefik.http.routers.gonic.tls: true + traefik.http.routers.gonic.tls.certresolver: le + traefik.http.routers.gonic.entrypoints: http,https + traefik.http.routers.gonic.rule: Host(`music.gzr.im`) + traefik.http.routers.gonic.service: gonic + traefik.http.services.gonic.loadbalancer.server.port: 80 +spec: + dnsPolicy: Default + containers: + - name: gonic + image: docker.io/sentriz/gonic:${version} + env: + - name: GONIC_EXCLUDE_PATTERN + value: '.*\/inbox\/.*' + - name: GONIC_SCAN_INTERVAL + value: 1440 + - name: GONIC_SCAN_AT_START_ENABLED + value: 1 + volumeMounts: + - name: data + mountPath: /data + - name: cache + mountPath: /cache + - name: podcasts + mountPath: /podcasts + - name: playlists + mountPath: /playlists + - name: media + mountPath: /music + readOnly: true + ports: + - containerPort: 80 + protocol: TCP + #livenessProbe: + # exec: + # command: ["/healthcheck.sh"] + #resources: + # limits: + # cpu: 100m + # memory: 128Mi + volumes: + - name: data + hostPath: + path: /var/lib/gonic/data + type: DirectoryOrCreate + - name: cache + hostPath: + path: /var/lib/gonic/cache + type: DirectoryOrCreate + - name: podcasts + hostPath: + path: /var/lib/gonic/podcasts + type: DirectoryOrCreate + - name: playlists + hostPath: + path: /var/lib/gonic/playlists + type: DirectoryOrCreate + - name: media + hostPath: + path: /media/hayasui/media/music + type: Directory diff --git a/bundles/gonic/items.py b/bundles/gonic/items.py new file mode 100644 index 0000000..f5d943f --- /dev/null +++ b/bundles/gonic/items.py @@ -0,0 +1,7 @@ +files = { + "/etc/deployments/gonic/kube.yaml": { + "content_type": "mako", + "context": node.metadata.get("containers")["gonic"], + "triggers": {"svc_s6rc:gonic:restart"}, + }, +} diff --git a/bundles/gonic/metadata.py b/bundles/gonic/metadata.py new file mode 100644 index 0000000..67b033d --- /dev/null +++ b/bundles/gonic/metadata.py @@ -0,0 +1,16 @@ +defaults = { + "containers": { + "gonic": { + "version": "latest", + }, + }, + # "backup": { + # "/var/lib/gonic": {}, + # }, + # "metrics": { + # "gonic": {}, + # }, + # "go": { + # "gonic": "https://gonic.gzr.im", + # }, +} |