diff --git a/argocd-apps/tunedrop.yaml b/argocd-apps/tunedrop.yaml new file mode 100644 index 0000000..7733bb6 --- /dev/null +++ b/argocd-apps/tunedrop.yaml @@ -0,0 +1,21 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: tunedrop + namespace: argocd +spec: + project: my-apps + source: + repoURL: https://git.dvirlabs.com/dvirlabs/my-apps.git + targetRevision: HEAD + path: charts/tunedrop + helm: + valueFiles: + - ../../manifests/tunedrop/values.yaml + destination: + server: https://kubernetes.default.svc + namespace: my-apps + syncPolicy: + automated: + prune: true + selfHeal: true diff --git a/charts/tunedrop-chart/Chart.yaml b/charts/tunedrop-chart/Chart.yaml new file mode 100644 index 0000000..3894611 --- /dev/null +++ b/charts/tunedrop-chart/Chart.yaml @@ -0,0 +1,9 @@ +apiVersion: v2 +name: tunedrop +version: 0.1.0 +appVersion: "1.0.0" +description: Tunedrop - Music Downloader API + +dependencies: [] + +type: application \ No newline at end of file diff --git a/charts/tunedrop-chart/templates/deployment.yaml b/charts/tunedrop-chart/templates/deployment.yaml new file mode 100644 index 0000000..ff9474d --- /dev/null +++ b/charts/tunedrop-chart/templates/deployment.yaml @@ -0,0 +1,30 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: tunedrop +spec: + replicas: 1 + selector: + matchLabels: + app: tunedrop + template: + metadata: + labels: + app: tunedrop + spec: + containers: + - name: tunedrop + image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + env: + - name: MUSIC_DIR + value: {{ .Values.env.MUSIC_DIR | quote }} + - name: NAVIDROME_SCAN_URL + value: {{ .Values.env.NAVIDROME_SCAN_URL | quote }} + volumeMounts: + - name: music + mountPath: {{ .Values.persistence.mountPath }} + volumes: + - name: music + persistentVolumeClaim: + claimName: tunedrop-pvc \ No newline at end of file diff --git a/charts/tunedrop-chart/templates/pvc.yaml b/charts/tunedrop-chart/templates/pvc.yaml new file mode 100644 index 0000000..4d256aa --- /dev/null +++ b/charts/tunedrop-chart/templates/pvc.yaml @@ -0,0 +1,11 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: tunedrop-pvc +spec: + accessModes: + - {{ .Values.persistence.accessMode }} + resources: + requests: + storage: {{ .Values.persistence.size }} + storageClassName: {{ .Values.persistence.storageClass }} \ No newline at end of file diff --git a/charts/tunedrop-chart/values.yaml b/charts/tunedrop-chart/values.yaml new file mode 100644 index 0000000..74db52c --- /dev/null +++ b/charts/tunedrop-chart/values.yaml @@ -0,0 +1,27 @@ +image: + repository: my-apps/tunedrop + tag: latest + pullPolicy: IfNotPresent + +ingress: + enabled: true + className: traefik + annotations: + traefik.ingress.kubernetes.io/router.entrypoints: websecure + traefik.ingress.kubernetes.io/router.tls: "true" + hosts: + - host: tunedrop.dvirlabs.com + paths: + - path: / + pathType: Prefix + +env: + MUSIC_DIR: /music + NAVIDROME_SCAN_URL: http://navidrome.my-apps.svc.cluster.local:4533/api/rescan + +persistence: + enabled: true + mountPath: /music + size: 100Gi + accessMode: ReadWriteMany + storageClass: nfs-client \ No newline at end of file diff --git a/manifests/tunedrop/values.yaml b/manifests/tunedrop/values.yaml new file mode 100644 index 0000000..74db52c --- /dev/null +++ b/manifests/tunedrop/values.yaml @@ -0,0 +1,27 @@ +image: + repository: my-apps/tunedrop + tag: latest + pullPolicy: IfNotPresent + +ingress: + enabled: true + className: traefik + annotations: + traefik.ingress.kubernetes.io/router.entrypoints: websecure + traefik.ingress.kubernetes.io/router.tls: "true" + hosts: + - host: tunedrop.dvirlabs.com + paths: + - path: / + pathType: Prefix + +env: + MUSIC_DIR: /music + NAVIDROME_SCAN_URL: http://navidrome.my-apps.svc.cluster.local:4533/api/rescan + +persistence: + enabled: true + mountPath: /music + size: 100Gi + accessMode: ReadWriteMany + storageClass: nfs-client \ No newline at end of file