diff --git a/apps/templates/whisper-folder.yaml b/apps/templates/whisper-folder.yaml new file mode 100644 index 0000000..e7f3720 --- /dev/null +++ b/apps/templates/whisper-folder.yaml @@ -0,0 +1,19 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: whisper + namespace: argocd + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + project: default + source: + repoURL: https://github.com/rubenhensen/k8scd.git + targetRevision: HEAD + path: whisper + destination: + server: https://kubernetes.default.svc + namespace: whisper + syncPolicy: + syncOptions: + - CreateNamespace=true \ No newline at end of file diff --git a/longhorn/ingress.yaml b/longhorn/ingress.yaml index aff09d9..8c89565 100644 --- a/longhorn/ingress.yaml +++ b/longhorn/ingress.yaml @@ -13,6 +13,7 @@ metadata: nginx.ingress.kubernetes.io/auth-secret: longhorn-basic-auth # message to display with an appropriate context why the authentication is required nginx.ingress.kubernetes.io/auth-realm: 'Authentication Required ' + # nginx.ingress.kubernetes.io/cors-allow-origin: "http://localhost:3000/" # nginx.ingress.kubernetes.io/cors-allow-methods: "PUT, GET, POST, OPTIONS, DELETE" # If you encounter a redirect loop or are getting a 307 response code diff --git a/whisper/app-claim0-persistentvolumeclaim.yaml b/whisper/app-claim0-persistentvolumeclaim.yaml new file mode 100644 index 0000000..e37821a --- /dev/null +++ b/whisper/app-claim0-persistentvolumeclaim.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + labels: + io.kompose.service: app-claim0 + name: app-claim0 +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 10Gi diff --git a/whisper/app-claim1-persistentvolumeclaim.yaml b/whisper/app-claim1-persistentvolumeclaim.yaml new file mode 100644 index 0000000..52c221d --- /dev/null +++ b/whisper/app-claim1-persistentvolumeclaim.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + labels: + io.kompose.service: app-claim1 + name: app-claim1 +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 10Gi diff --git a/whisper/app-deployment.yaml b/whisper/app-deployment.yaml new file mode 100644 index 0000000..5d5a256 --- /dev/null +++ b/whisper/app-deployment.yaml @@ -0,0 +1,46 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + io.kompose.service: app + name: app +spec: + replicas: 1 + selector: + matchLabels: + io.kompose.service: app + strategy: + type: Recreate + template: + metadata: + labels: + io.kompose.service: app + spec: + containers: + - command: + - python + - app.py + - --server_port + - "7860" + - --server_name + - 0.0.0.0 + image: jhj0517/whisper-webui:latest + name: app + ports: + - containerPort: 7860 + protocol: TCP + stdin: true + tty: true + volumeMounts: + - mountPath: /Whisper-WebUI/models + name: app-claim0 + - mountPath: /Whisper-WebUI/outputs + name: app-claim1 + restartPolicy: Always + volumes: + - name: app-claim0 + persistentVolumeClaim: + claimName: app-claim0 + - name: app-claim1 + persistentVolumeClaim: + claimName: app-claim1 diff --git a/whisper/app-service.yaml b/whisper/app-service.yaml new file mode 100644 index 0000000..a098096 --- /dev/null +++ b/whisper/app-service.yaml @@ -0,0 +1,13 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + io.kompose.service: app + name: app +spec: + ports: + - name: "7860" + port: 7860 + targetPort: 7860 + selector: + io.kompose.service: app diff --git a/whisper/docker-compose.yaml b/whisper/docker-compose.yaml new file mode 100644 index 0000000..b26a932 --- /dev/null +++ b/whisper/docker-compose.yaml @@ -0,0 +1,19 @@ +# services: +# app: +# build: . +# image: jhj0517/whisper-webui:latest + +# volumes: +# # You can mount the container's volume paths to directory paths on your local machine. +# # Models will be stored in the `./models' directory on your machine. +# # Similarly, all output files will be stored in the `./outputs` directory. +# - ./models:/Whisper-WebUI/models +# - ./outputs:/Whisper-WebUI/outputs + +# ports: +# - "7860:7860" + +# stdin_open: true +# tty: true + +# entrypoint: ["python", "app.py", "--server_port", "7860", "--server_name", "0.0.0.0",] diff --git a/whisper/ingress.yaml b/whisper/ingress.yaml new file mode 100644 index 0000000..d9a4f1b --- /dev/null +++ b/whisper/ingress.yaml @@ -0,0 +1,43 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: whisper-ingress + annotations: + # nginx.ingress.kubernetes.io/rewrite-target: / + cert-manager.io/cluster-issuer: prod-cluster-issuer + nginx.ingress.kubernetes.io/ssl-passthrough: "false" + nginx.ingress.kubernetes.io/enable-cors: "true" + # type of authentication + nginx.ingress.kubernetes.io/auth-type: basic + # name of the secret that contains the user/password definitions + nginx.ingress.kubernetes.io/auth-secret: whisper-basic-auth + # message to display with an appropriate context why the authentication is required + nginx.ingress.kubernetes.io/auth-realm: 'Authentication Required ' + + # nginx.ingress.kubernetes.io/cors-allow-origin: "http://localhost:3000/" + # nginx.ingress.kubernetes.io/cors-allow-methods: "PUT, GET, POST, OPTIONS, DELETE" + # If you encounter a redirect loop or are getting a 307 response code + # then you need to force the nginx ingress to connect to the backend using HTTPS. + # + # nginx.ingress.kubernetes.io/backend-protocol: "HTTP" + # namespace: ente-photos +spec: + ingressClassName: nginx + rules: + - host: alv.hensen.io + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: app + port: + number: 80 + + # TLS configuration for HTTPS + tls: + # TLS secretName used on ClusterIssuer + - secretName: letsencrypt-prod + hosts: + - alv.hensen.io