Browse Source

Creo Navidrome

main
Celestino Rey 2 years ago
parent
commit
185132783d
8 changed files with 276 additions and 6 deletions
  1. +23
    -0
      HelmCharts/navidrome-chart/.helmignore
  2. +24
    -0
      HelmCharts/navidrome-chart/Chart.yaml
  3. +87
    -0
      HelmCharts/navidrome-chart/templates/navidrome-deployment.yaml
  4. +23
    -0
      HelmCharts/navidrome-chart/templates/pv-local-navidrome.yaml
  5. +82
    -0
      HelmCharts/navidrome-chart/values.yaml
  6. +1
    -0
      HelmCharts/navidrome.sh
  7. +23
    -5
      Navidrome/navidrome-deployment.yaml
  8. +13
    -1
      Navidrome/pv-local-navidrome.yaml

+ 23
- 0
HelmCharts/navidrome-chart/.helmignore View File

@ -0,0 +1,23 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/

+ 24
- 0
HelmCharts/navidrome-chart/Chart.yaml View File

@ -0,0 +1,24 @@
apiVersion: v2
name: navidrome-chart
description: A Helm chart for Kubernetes
# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.0
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "1.16.0"

+ 87
- 0
HelmCharts/navidrome-chart/templates/navidrome-deployment.yaml View File

@ -0,0 +1,87 @@
apiVersion: v1
kind: Service
metadata:
name: navidrome
namespace: navidrome
spec:
type: NodePort
ports:
- name: http
port: 4533
nodePort: 30781
targetPort: navidrome-http
selector:
app: navidrome
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: navidrome-data-claim
namespace: navidrome
labels:
app: navidrome
spec:
accessModes:
- ReadWriteMany
storageClassName: ""
resources:
requests:
storage: 2Gi
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: navidrome-music-claim
namespace: navidrome
labels:
app: navidrome
spec:
accessModes:
- ReadWriteMany
storageClassName: ""
resources:
requests:
storage: 20Gi
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: navidrome
namespace: navidrome
labels:
app: navidrome
spec:
selector:
matchLabels:
app: navidrome
tier: frontend
strategy:
type: Recreate
template:
metadata:
labels:
app: navidrome
tier: frontend
spec:
containers:
- env:
- name: JAVA_OPTS
value: -Dserver.port=4533
name: navidrome
image: deluan/navidrome:latest
imagePullPolicy: IfNotPresent
ports:
- containerPort: 4533
name: "navidrome-http"
volumeMounts:
- name: navidrome-data-folder
mountPath: /data
- name: navidrome-music-folder
mountPath: /music
volumes:
- name: navidrome-data-folder
persistentVolumeClaim:
claimName: navidrome-data-claim
- name: navidrome-music-folder
persistentVolumeClaim:
claimName: navidrome-music-claim

+ 23
- 0
HelmCharts/navidrome-chart/templates/pv-local-navidrome.yaml View File

@ -0,0 +1,23 @@
apiVersion: v1
kind: PersistentVolume
metadata:
name: navidrome-data-folder
spec:
capacity:
storage: 2Gi
accessModes:
- ReadWriteMany
hostPath:
path: "/mnt/Externo/navidrome/data"
---
apiVersion: v1
kind: PersistentVolume
metadata:
name: navidrome-music-folder
spec:
capacity:
storage: 20Gi
accessModes:
- ReadWriteMany
hostPath:
path: "/mnt/Externo/navidrome/music"

+ 82
- 0
HelmCharts/navidrome-chart/values.yaml View File

@ -0,0 +1,82 @@
# Default values for navidrome-chart.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
replicaCount: 1
image:
repository: nginx
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
tag: ""
imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""
serviceAccount:
# Specifies whether a service account should be created
create: true
# Annotations to add to the service account
annotations: {}
# The name of the service account to use.
# If not set and create is true, a name is generated using the fullname template
name: ""
podAnnotations: {}
podSecurityContext: {}
# fsGroup: 2000
securityContext: {}
# capabilities:
# drop:
# - ALL
# readOnlyRootFilesystem: true
# runAsNonRoot: true
# runAsUser: 1000
service:
type: ClusterIP
port: 80
ingress:
enabled: false
className: ""
annotations: {}
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"
hosts:
- host: chart-example.local
paths:
- path: /
pathType: ImplementationSpecific
tls: []
# - secretName: chart-example-tls
# hosts:
# - chart-example.local
resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi
autoscaling:
enabled: false
minReplicas: 1
maxReplicas: 100
targetCPUUtilizationPercentage: 80
# targetMemoryUtilizationPercentage: 80
nodeSelector: {}
tolerations: []
affinity: {}

+ 1
- 0
HelmCharts/navidrome.sh View File

@ -0,0 +1 @@
helm install navidrome ./navidrome-chart --namespace=navidrome --create-namespace

+ 23
- 5
Navidrome/navidrome-deployment.yaml View File

@ -16,7 +16,7 @@ spec:
apiVersion: v1 apiVersion: v1
kind: PersistentVolumeClaim kind: PersistentVolumeClaim
metadata: metadata:
name: navidrome-pv-claim
name: navidrome-data-claim
namespace: navidrome namespace: navidrome
labels: labels:
app: navidrome app: navidrome
@ -28,6 +28,21 @@ spec:
requests: requests:
storage: 2Gi storage: 2Gi
--- ---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: navidrome-music-claim
namespace: navidrome
labels:
app: navidrome
spec:
accessModes:
- ReadWriteMany
storageClassName: ""
resources:
requests:
storage: 20Gi
---
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
@ -59,11 +74,14 @@ spec:
- containerPort: 4533 - containerPort: 4533
name: "navidrome-http" name: "navidrome-http"
volumeMounts: volumeMounts:
- name: navidrome-www-folder
- name: navidrome-data-folder
mountPath: /data mountPath: /data
- name: navidrome-www-folder
- name: navidrome-music-folder
mountPath: /music mountPath: /music
volumes: volumes:
- name: navidrome-www-folder
- name: navidrome-data-folder
persistentVolumeClaim:
claimName: navidrome-data-claim
- name: navidrome-music-folder
persistentVolumeClaim: persistentVolumeClaim:
claimName: navidrome-pv-claim
claimName: navidrome-music-claim

+ 13
- 1
Navidrome/pv-local-navidrome.yaml View File

@ -8,4 +8,16 @@ spec:
accessModes: accessModes:
- ReadWriteMany - ReadWriteMany
hostPath: hostPath:
path: "/mnt/Externo/navidrome"
path: "/mnt/Externo/navidrome/data"
---
apiVersion: v1
kind: PersistentVolume
metadata:
name: navidrome-music-folder
spec:
capacity:
storage: 20Gi
accessModes:
- ReadWriteMany
hostPath:
path: "/mnt/Externo/navidrome/music"

Loading…
Cancel
Save