diff --git a/HelmCharts/jellyfin-chart/.helmignore b/HelmCharts/jellyfin-chart/.helmignore new file mode 100644 index 00000000..0e8a0eb3 --- /dev/null +++ b/HelmCharts/jellyfin-chart/.helmignore @@ -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/ diff --git a/HelmCharts/jellyfin-chart/Chart.yaml b/HelmCharts/jellyfin-chart/Chart.yaml new file mode 100644 index 00000000..8bf6dc21 --- /dev/null +++ b/HelmCharts/jellyfin-chart/Chart.yaml @@ -0,0 +1,24 @@ +apiVersion: v2 +name: jellyfin-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" diff --git a/HelmCharts/jellyfin-chart/creatodo.sh b/HelmCharts/jellyfin-chart/creatodo.sh new file mode 100644 index 00000000..7cb26ac1 --- /dev/null +++ b/HelmCharts/jellyfin-chart/creatodo.sh @@ -0,0 +1,12 @@ +# los pv +kubectl create -f pv-local-jellyfin-cache.yaml +kubectl create -f pv-local-jellyfin-config.yaml +kubectl create -f pv-local-jellyfin-media2.yaml +kubectl create -f pv-local-jellyfin-media.yaml +# las pvc +kubectl create -f jellyfin-cache-persistentvolumeclaim.yaml +kubectl create -f jellyfin-config-persistentvolumeclaim.yaml +kubectl create -f jellyfin-media2-persistentvolumeclaim.yaml +kubectl create -f jellyfin-media-persistentvolumeclaim.yaml +# el deployment +kubectl create -f jellyfin-deployment.yaml diff --git a/HelmCharts/jellyfin-chart/paratodo.sh b/HelmCharts/jellyfin-chart/paratodo.sh new file mode 100644 index 00000000..fff6b1a5 --- /dev/null +++ b/HelmCharts/jellyfin-chart/paratodo.sh @@ -0,0 +1,12 @@ +# el deployment +kubectl delete -f jellyfin-deployment.yaml +# las pvc +kubectl delete -f jellyfin-cache-persistentvolumeclaim.yaml +kubectl delete -f jellyfin-config-persistentvolumeclaim.yaml +kubectl delete -f jellyfin-media2-persistentvolumeclaim.yaml +kubectl delete -f jellyfin-media-persistentvolumeclaim.yaml +# los pv +kubectl delete -f pv-local-jellyfin-cache.yaml +kubectl delete -f pv-local-jellyfin-config.yaml +kubectl delete -f pv-local-jellyfin-media2.yaml +kubectl delete -f pv-local-jellyfin-media.yaml diff --git a/HelmCharts/jellyfin-chart/templates/jellyfin-cache-persistentvolumeclaim.yaml b/HelmCharts/jellyfin-chart/templates/jellyfin-cache-persistentvolumeclaim.yaml new file mode 100644 index 00000000..04f27fda --- /dev/null +++ b/HelmCharts/jellyfin-chart/templates/jellyfin-cache-persistentvolumeclaim.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + creationTimestamp: null + labels: + io.kompose.service: jellyfin-cache + name: jellyfin-cache + namespace: jellyfin +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 150Mi +status: {} diff --git a/HelmCharts/jellyfin-chart/templates/jellyfin-config-persistentvolumeclaim.yaml b/HelmCharts/jellyfin-chart/templates/jellyfin-config-persistentvolumeclaim.yaml new file mode 100644 index 00000000..ccb1d51c --- /dev/null +++ b/HelmCharts/jellyfin-chart/templates/jellyfin-config-persistentvolumeclaim.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + creationTimestamp: null + labels: + io.kompose.service: jellyfin-config + name: jellyfin-config + namespace: jellyfin +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 100Mi +status: {} diff --git a/HelmCharts/jellyfin-chart/templates/jellyfin-deployment.yaml b/HelmCharts/jellyfin-chart/templates/jellyfin-deployment.yaml new file mode 100644 index 00000000..c5f42713 --- /dev/null +++ b/HelmCharts/jellyfin-chart/templates/jellyfin-deployment.yaml @@ -0,0 +1,61 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + annotations: + kompose.cmd: kompose convert + kompose.version: 1.26.0 (40646f47) + creationTimestamp: null + labels: + io.kompose.service: jellyfin + name: jellyfin + namespace: jellyfin +spec: + replicas: 1 + selector: + matchLabels: + io.kompose.service: jellyfin + strategy: + type: Recreate + template: + metadata: + annotations: + kompose.cmd: kompose convert + kompose.version: 1.26.0 (40646f47) + creationTimestamp: null + labels: + io.kompose.service: jellyfin + spec: + hostNetwork: true + containers: + - image: jellyfin/jellyfin + name: jellyfin + ports: + - containerPort: 8096 + name: jellyfin + resources: {} + volumeMounts: + - mountPath: /config + name: jellyfin-config + - mountPath: /cache + name: jellyfin-cache + - mountPath: /media + name: jellyfin-media + - mountPath: /media2 + name: jellyfin-media2 + readOnly: true + restartPolicy: Always + volumes: + - name: jellyfin-config + persistentVolumeClaim: + claimName: jellyfin-config + - name: jellyfin-cache + persistentVolumeClaim: + claimName: jellyfin-cache + - name: jellyfin-media + persistentVolumeClaim: + claimName: jellyfin-media + - name: jellyfin-media2 + persistentVolumeClaim: + claimName: jellyfin-media2 + readOnly: true +status: {} diff --git a/HelmCharts/jellyfin-chart/templates/jellyfin-media-persistentvolumeclaim.yaml b/HelmCharts/jellyfin-chart/templates/jellyfin-media-persistentvolumeclaim.yaml new file mode 100644 index 00000000..4d341033 --- /dev/null +++ b/HelmCharts/jellyfin-chart/templates/jellyfin-media-persistentvolumeclaim.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + creationTimestamp: null + labels: + io.kompose.service: jellyfin-media + name: jellyfin-media + namespace: jellyfin +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 20Gi +status: {} diff --git a/HelmCharts/jellyfin-chart/templates/jellyfin-media2-persistentvolumeclaim.yaml b/HelmCharts/jellyfin-chart/templates/jellyfin-media2-persistentvolumeclaim.yaml new file mode 100644 index 00000000..bc5fdd66 --- /dev/null +++ b/HelmCharts/jellyfin-chart/templates/jellyfin-media2-persistentvolumeclaim.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + creationTimestamp: null + labels: + io.kompose.service: jellyfin-media2 + name: jellyfin-media2 + namespace: jellyfin +spec: + accessModes: + - ReadOnlyMany + resources: + requests: + storage: 10Gi +status: {} diff --git a/HelmCharts/jellyfin-chart/templates/pv-local-jellyfin-cache.yaml b/HelmCharts/jellyfin-chart/templates/pv-local-jellyfin-cache.yaml new file mode 100644 index 00000000..9a3b6750 --- /dev/null +++ b/HelmCharts/jellyfin-chart/templates/pv-local-jellyfin-cache.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: PersistentVolume +metadata: + name: jellyfin-cache-folder + labels: + app: jellyfin +spec: + capacity: + storage: 150Mi + accessModes: + - ReadWriteOnce + hostPath: + path: "/mnt/Externo/jellyfin/cache" + diff --git a/HelmCharts/jellyfin-chart/templates/pv-local-jellyfin-config.yaml b/HelmCharts/jellyfin-chart/templates/pv-local-jellyfin-config.yaml new file mode 100644 index 00000000..558ea27d --- /dev/null +++ b/HelmCharts/jellyfin-chart/templates/pv-local-jellyfin-config.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: PersistentVolume +metadata: + name: jellyfin-config-folder + labels: + app: jellyfin +spec: + capacity: + storage: 100Mi + accessModes: + - ReadWriteOnce + hostPath: + path: "/mnt/Externo/jellyfin/config" + diff --git a/HelmCharts/jellyfin-chart/templates/pv-local-jellyfin-media.yaml b/HelmCharts/jellyfin-chart/templates/pv-local-jellyfin-media.yaml new file mode 100644 index 00000000..4a2e18c6 --- /dev/null +++ b/HelmCharts/jellyfin-chart/templates/pv-local-jellyfin-media.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: PersistentVolume +metadata: + name: jellyfin-media-folder + labels: + app: jellyfin +spec: + capacity: + storage: 20Gi + accessModes: + - ReadWriteOnce + hostPath: + path: "/mnt/Externo/jellyfin/media" + diff --git a/HelmCharts/jellyfin-chart/templates/pv-local-jellyfin-media2.yaml b/HelmCharts/jellyfin-chart/templates/pv-local-jellyfin-media2.yaml new file mode 100644 index 00000000..fccb4162 --- /dev/null +++ b/HelmCharts/jellyfin-chart/templates/pv-local-jellyfin-media2.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: PersistentVolume +metadata: + name: jellyfin-media2-folder + labels: + app: jellyfin +spec: + capacity: + storage: 10Gi + accessModes: + - ReadOnlyMany + hostPath: + path: "/mnt/Externo/jellyfin/media2" + diff --git a/HelmCharts/jellyfin-chart/values.yaml b/HelmCharts/jellyfin-chart/values.yaml new file mode 100644 index 00000000..a9d949f8 --- /dev/null +++ b/HelmCharts/jellyfin-chart/values.yaml @@ -0,0 +1,82 @@ +# Default values for jellyfin-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: {} diff --git a/HelmCharts/nodered-chart/templates/mysql-deployment.yaml b/HelmCharts/nodered-chart/mysql-deployment.yaml similarity index 98% rename from HelmCharts/nodered-chart/templates/mysql-deployment.yaml rename to HelmCharts/nodered-chart/mysql-deployment.yaml index 4388daaf..0a14de17 100644 --- a/HelmCharts/nodered-chart/templates/mysql-deployment.yaml +++ b/HelmCharts/nodered-chart/mysql-deployment.yaml @@ -10,7 +10,7 @@ spec: ports: - name: mysql port: 3306 - nodePort: 30385 + nodePort: 30685 targetPort: mysql selector: app: nodered diff --git a/HelmCharts/nodered-chart/templates/php-myadmin-deployment.yaml b/HelmCharts/nodered-chart/php-myadmin-deployment.yaml similarity index 98% rename from HelmCharts/nodered-chart/templates/php-myadmin-deployment.yaml rename to HelmCharts/nodered-chart/php-myadmin-deployment.yaml index 83a0ea42..411443d3 100644 --- a/HelmCharts/nodered-chart/templates/php-myadmin-deployment.yaml +++ b/HelmCharts/nodered-chart/php-myadmin-deployment.yaml @@ -13,7 +13,7 @@ spec: ports: - name: phpadmin port: 80 - nodePort: 30386 + nodePort: 30686 targetPort: phpmyadm --- apiVersion: apps/v1 diff --git a/HelmCharts/nodered-chart/templates/pv-local-mysql.yaml b/HelmCharts/nodered-chart/pv-local-mysql.yaml similarity index 100% rename from HelmCharts/nodered-chart/templates/pv-local-mysql.yaml rename to HelmCharts/nodered-chart/pv-local-mysql.yaml diff --git a/HelmCharts/nodered-chart/templates/influxdb-deployment.yaml b/HelmCharts/nodered-chart/templates/influxdb-deployment.yaml new file mode 100644 index 00000000..e3a4dce0 --- /dev/null +++ b/HelmCharts/nodered-chart/templates/influxdb-deployment.yaml @@ -0,0 +1,67 @@ +apiVersion: v1 +kind: Service +metadata: + name: nodered-influxdb + namespace: nodered + labels: + app: nodered +spec: + type: NodePort + ports: + - name: influxdb + port: 8086 + nodePort: 30686 + targetPort: influxdb + selector: + app: nodered + tier: influxdb +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: influxdb-pv-claim + namespace: nodered + labels: + app: nodered +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 25Gi +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: nodered-influxdb + namespace: nodered + labels: + app: nodered +spec: + selector: + matchLabels: + app: nodered + tier: influxdb + strategy: + type: Recreate + template: + metadata: + labels: + app: nodered + tier: influxdb + spec: + containers: + - image: influxdb:latest + name: influxdb + ports: + - containerPort: 8086 + name: influxdb + volumeMounts: + - name: influxdb-persistent-storage + mountPath: /var/lib/influxdb2 + imagePullSecrets: + - name: reg-cred-secret + volumes: + - name: influxdb-persistent-storage + persistentVolumeClaim: + claimName: influxdb-pv-claim diff --git a/HelmCharts/nodered-chart/templates/nodered-deployment.yaml b/HelmCharts/nodered-chart/templates/nodered-deployment.yaml index 0bfaf41d..8b6df780 100644 --- a/HelmCharts/nodered-chart/templates/nodered-deployment.yaml +++ b/HelmCharts/nodered-chart/templates/nodered-deployment.yaml @@ -9,7 +9,7 @@ spec: type: NodePort ports: - port: 1880 - nodePort: 30096 + nodePort: 30696 targetPort: nodered selector: app: nodered diff --git a/HelmCharts/nodered-chart/templates/pv-local-influxdb.yaml b/HelmCharts/nodered-chart/templates/pv-local-influxdb.yaml new file mode 100644 index 00000000..676f2c06 --- /dev/null +++ b/HelmCharts/nodered-chart/templates/pv-local-influxdb.yaml @@ -0,0 +1,11 @@ +apiVersion: v1 +kind: PersistentVolume +metadata: + name: nodered-influxdb +spec: + capacity: + storage: 25Gi + accessModes: + - ReadWriteOnce + hostPath: + path: "/mnt/Externo/nodered/influx-db" diff --git a/Jellyfin/docker-compose.yml b/Jellyfin/docker-compose.yml new file mode 100644 index 00000000..074585b1 --- /dev/null +++ b/Jellyfin/docker-compose.yml @@ -0,0 +1,13 @@ +version: '3.5' +services: + jellyfin: + image: jellyfin/jellyfin + container_name: jellyfin + network_mode: "host" + volumes: + - /mnt/Externo/jellyfin/config:/config + - /mnt/Externo/jellyfin/cache:/cache + - /mnt/Externo/jellyfin/media:/media + - /mnt/Externo/jellyfin/media2:/media2:ro + restart: 'unless-stopped' + \ No newline at end of file diff --git a/Jellyfin/jellyfin-claim0-persistentvolumeclaim.yaml b/Jellyfin/jellyfin-claim0-persistentvolumeclaim.yaml new file mode 100644 index 00000000..4c93c61f --- /dev/null +++ b/Jellyfin/jellyfin-claim0-persistentvolumeclaim.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + creationTimestamp: null + labels: + io.kompose.service: jellyfin-claim0 + name: jellyfin-claim0 +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 100Mi +status: {} diff --git a/Jellyfin/jellyfin-claim1-persistentvolumeclaim.yaml b/Jellyfin/jellyfin-claim1-persistentvolumeclaim.yaml new file mode 100644 index 00000000..d78dc35a --- /dev/null +++ b/Jellyfin/jellyfin-claim1-persistentvolumeclaim.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + creationTimestamp: null + labels: + io.kompose.service: jellyfin-claim1 + name: jellyfin-claim1 +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 100Mi +status: {} diff --git a/Jellyfin/jellyfin-claim2-persistentvolumeclaim.yaml b/Jellyfin/jellyfin-claim2-persistentvolumeclaim.yaml new file mode 100644 index 00000000..9cc78d24 --- /dev/null +++ b/Jellyfin/jellyfin-claim2-persistentvolumeclaim.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + creationTimestamp: null + labels: + io.kompose.service: jellyfin-claim2 + name: jellyfin-claim2 +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 100Mi +status: {} diff --git a/Jellyfin/jellyfin-claim3-persistentvolumeclaim.yaml b/Jellyfin/jellyfin-claim3-persistentvolumeclaim.yaml new file mode 100644 index 00000000..e4264c66 --- /dev/null +++ b/Jellyfin/jellyfin-claim3-persistentvolumeclaim.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + creationTimestamp: null + labels: + io.kompose.service: jellyfin-claim3 + name: jellyfin-claim3 +spec: + accessModes: + - ReadOnlyMany + resources: + requests: + storage: 100Mi +status: {} diff --git a/Jellyfin/jellyfin-deployment.yaml b/Jellyfin/jellyfin-deployment.yaml new file mode 100644 index 00000000..3d4eb7e1 --- /dev/null +++ b/Jellyfin/jellyfin-deployment.yaml @@ -0,0 +1,56 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + annotations: + kompose.cmd: kompose convert + kompose.version: 1.26.0 (40646f47) + creationTimestamp: null + labels: + io.kompose.service: jellyfin + name: jellyfin +spec: + replicas: 1 + selector: + matchLabels: + io.kompose.service: jellyfin + strategy: + type: Recreate + template: + metadata: + annotations: + kompose.cmd: kompose convert + kompose.version: 1.26.0 (40646f47) + creationTimestamp: null + labels: + io.kompose.service: jellyfin + spec: + containers: + - image: jellyfin/jellyfin + name: jellyfin + resources: {} + volumeMounts: + - mountPath: /config + name: jellyfin-claim0 + - mountPath: /cache + name: jellyfin-claim1 + - mountPath: /media + name: jellyfin-claim2 + - mountPath: /media2 + name: jellyfin-claim3 + readOnly: true + restartPolicy: Always + volumes: + - name: jellyfin-claim0 + persistentVolumeClaim: + claimName: jellyfin-claim0 + - name: jellyfin-claim1 + persistentVolumeClaim: + claimName: jellyfin-claim1 + - name: jellyfin-claim2 + persistentVolumeClaim: + claimName: jellyfin-claim2 + - name: jellyfin-claim3 + persistentVolumeClaim: + claimName: jellyfin-claim3 + readOnly: true +status: {}