-
Notifications
You must be signed in to change notification settings - Fork 0
/
polaris.yml
68 lines (68 loc) · 2.24 KB
/
polaris.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: polaris
name: polaris
spec:
replicas: 1
selector:
matchLabels:
app: polaris
strategy: {}
template:
metadata:
labels:
app: polaris
spec:
containers:
- image: ogarcia/polaris
name: polaris
ports:
- containerPort: 5050
resources:
limits:
cpu: "2000m"
memory: "2048Mi"
volumeMounts: # In this section we specify where our NFS volume will mount in the running container.
- name: datavol # Mount name. Must match corresponding volume name below.
mountPath: /var/lib/polaris # Path in the container. We chose Polari's default data directory.
- name: cachevol
mountPath: /var/cache/polaris
- name: musicdir
mountPath: /music
volumes: # In this section we specify the volumes that will be mounted to the container. I'm using an NFS server to store Polaris's data, cache, and music.
- name: datavol
nfs:
server: 192.168.1.10
path: /mnt/servicesTank/polaris
readOnly: false
- name: cachevol
nfs:
server: 192.168.1.10
path: /mnt/servicesTank/polaris/cache
readOnly: false
- name: musicdir
nfs:
server: 192.168.1.10
path: /mnt/cpool1/media/music/Music
readOnly: true
restartPolicy: Always
---
kind: Service
apiVersion: v1
metadata:
name: polaris-tcp
# namespace: # < namespace where to place service
spec:
selector:
app: polaris # < reference to the deployment (connects the service with the deployment)
ports:
- port: 5050 # < port to open on the outside on the server
targetPort: 5050 # < targetport. port on the pod to passthrough
name: http-tcp # < reference name for the port in the deployment yaml
protocol: TCP
type: LoadBalancer
loadBalancerIP: 192.168.3.83 # < IP to access your Polaris server. Should be one from the MetalLB range and the same as the TCP yaml
sessionAffinity: ClientIP