Add chart for openwakeword.
All checks were successful
ci/woodpecker/push/openwakeword Pipeline was successful
All checks were successful
ci/woodpecker/push/openwakeword Pipeline was successful
This commit is contained in:
parent
7cc40b6a99
commit
3b459d163f
8 changed files with 267 additions and 0 deletions
12
.woodpecker/openwakeword.yaml
Normal file
12
.woodpecker/openwakeword.yaml
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
---
|
||||||
|
when:
|
||||||
|
path: "charts/openwakeword/**"
|
||||||
|
branch: main
|
||||||
|
steps:
|
||||||
|
package:
|
||||||
|
image: "docker.io/alpine/helm:latest"
|
||||||
|
secrets: [helm_user, helm_password, helm_repo]
|
||||||
|
commands:
|
||||||
|
- helm plugin install https://github.com/chartmuseum/helm-push
|
||||||
|
- helm repo add therepo $HELM_REPO --username $HELM_USER --password $HELM_PASSWORD
|
||||||
|
- helm cm-push charts/openwakeword therepo
|
23
charts/openwakeword/.helmignore
Normal file
23
charts/openwakeword/.helmignore
Normal 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/
|
6
charts/openwakeword/Chart.yaml
Normal file
6
charts/openwakeword/Chart.yaml
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
apiVersion: v2
|
||||||
|
name: openwakeword
|
||||||
|
description: A Helm chart for Kubernetes
|
||||||
|
type: application
|
||||||
|
version: 0.1.0
|
||||||
|
appVersion: "0.1.0"
|
62
charts/openwakeword/templates/_helpers.tpl
Normal file
62
charts/openwakeword/templates/_helpers.tpl
Normal file
|
@ -0,0 +1,62 @@
|
||||||
|
{{/*
|
||||||
|
Expand the name of the chart.
|
||||||
|
*/}}
|
||||||
|
{{- define "openwakeword.name" -}}
|
||||||
|
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create a default fully qualified app name.
|
||||||
|
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||||
|
If release name contains chart name it will be used as a full name.
|
||||||
|
*/}}
|
||||||
|
{{- define "openwakeword.fullname" -}}
|
||||||
|
{{- if .Values.fullnameOverride }}
|
||||||
|
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
|
||||||
|
{{- else }}
|
||||||
|
{{- $name := default .Chart.Name .Values.nameOverride }}
|
||||||
|
{{- if contains $name .Release.Name }}
|
||||||
|
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
|
||||||
|
{{- else }}
|
||||||
|
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create chart name and version as used by the chart label.
|
||||||
|
*/}}
|
||||||
|
{{- define "openwakeword.chart" -}}
|
||||||
|
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Common labels
|
||||||
|
*/}}
|
||||||
|
{{- define "openwakeword.labels" -}}
|
||||||
|
helm.sh/chart: {{ include "openwakeword.chart" . }}
|
||||||
|
{{ include "openwakeword.selectorLabels" . }}
|
||||||
|
{{- if .Chart.AppVersion }}
|
||||||
|
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
||||||
|
{{- end }}
|
||||||
|
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Selector labels
|
||||||
|
*/}}
|
||||||
|
{{- define "openwakeword.selectorLabels" -}}
|
||||||
|
app.kubernetes.io/name: {{ include "openwakeword.name" . }}
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create the name of the service account to use
|
||||||
|
*/}}
|
||||||
|
{{- define "openwakeword.serviceAccountName" -}}
|
||||||
|
{{- if .Values.serviceAccount.create }}
|
||||||
|
{{- default (include "openwakeword.fullname" .) .Values.serviceAccount.name }}
|
||||||
|
{{- else }}
|
||||||
|
{{- default "default" .Values.serviceAccount.name }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
76
charts/openwakeword/templates/deployment.yaml
Normal file
76
charts/openwakeword/templates/deployment.yaml
Normal file
|
@ -0,0 +1,76 @@
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: {{ include "openwakeword.fullname" . }}
|
||||||
|
labels:
|
||||||
|
{{- include "openwakeword.labels" . | nindent 4 }}
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
{{- include "openwakeword.selectorLabels" . | nindent 6 }}
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
{{- with .Values.podAnnotations }}
|
||||||
|
annotations:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
labels:
|
||||||
|
{{- include "openwakeword.selectorLabels" . | nindent 8 }}
|
||||||
|
spec:
|
||||||
|
{{- with .Values.imagePullSecrets }}
|
||||||
|
imagePullSecrets:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
securityContext:
|
||||||
|
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
||||||
|
containers:
|
||||||
|
- name: {{ .Chart.Name }}
|
||||||
|
securityContext:
|
||||||
|
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||||
|
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
|
||||||
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||||
|
ports:
|
||||||
|
- name: wyoming
|
||||||
|
containerPort: 10400
|
||||||
|
protocol: TCP
|
||||||
|
livenessProbe:
|
||||||
|
tcpSocket:
|
||||||
|
port: wyoming
|
||||||
|
readinessProbe:
|
||||||
|
tcpSocket:
|
||||||
|
port: wyoming
|
||||||
|
resources:
|
||||||
|
{{- toYaml .Values.resources | nindent 12 }}
|
||||||
|
args:
|
||||||
|
- "--custom-model-dir"
|
||||||
|
- "/data"
|
||||||
|
- "--preload-model"
|
||||||
|
- {{ .Values.config.preloadModel }}
|
||||||
|
volumeMounts:
|
||||||
|
- name: data
|
||||||
|
mountPath: /data
|
||||||
|
{{- with .Values.nodeSelector }}
|
||||||
|
nodeSelector:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.affinity }}
|
||||||
|
affinity:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.tolerations }}
|
||||||
|
tolerations:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
volumes:
|
||||||
|
- name: data
|
||||||
|
{{- if .Values.pvc.enabled }}
|
||||||
|
persistentVolumeClaim:
|
||||||
|
{{- if not .Values.pvc.existingClaim }}
|
||||||
|
claimName: {{ include "openwakeword.fullname" . }}
|
||||||
|
{{- else }}
|
||||||
|
claimName: {{ .Values.pvc.existingClaim }}
|
||||||
|
{{- end }}
|
||||||
|
{{- else}}
|
||||||
|
emptyDir: {}
|
||||||
|
{{- end }}
|
19
charts/openwakeword/templates/pvc.yaml
Normal file
19
charts/openwakeword/templates/pvc.yaml
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
{{- if .Values.pvc.enabled }}
|
||||||
|
{{- if not .Values.pvc.existingClaim -}}
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: {{ include "openwakeword.fullname" . }}
|
||||||
|
labels:
|
||||||
|
{{- include "openwakeword.labels" . | nindent 4 }}
|
||||||
|
annotations:
|
||||||
|
helm.sh/resource-policy: "keep"
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
storageClassName: {{ .Values.pvc.storageClassName | quote }}
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: {{ .Values.pvc.storage | quote }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
15
charts/openwakeword/templates/service.yaml
Normal file
15
charts/openwakeword/templates/service.yaml
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: {{ include "openwakeword.fullname" . }}
|
||||||
|
labels:
|
||||||
|
{{- include "openwakeword.labels" . | nindent 4 }}
|
||||||
|
spec:
|
||||||
|
type: {{ .Values.service.type }}
|
||||||
|
ports:
|
||||||
|
- port: {{ .Values.service.port }}
|
||||||
|
targetPort: wyoming
|
||||||
|
protocol: TCP
|
||||||
|
name: wyoming
|
||||||
|
selector:
|
||||||
|
{{- include "openwakeword.selectorLabels" . | nindent 4 }}
|
54
charts/openwakeword/values.yaml
Normal file
54
charts/openwakeword/values.yaml
Normal file
|
@ -0,0 +1,54 @@
|
||||||
|
image:
|
||||||
|
repository: docker.io/rhasspy/wyoming-openwakeword
|
||||||
|
pullPolicy: IfNotPresent
|
||||||
|
# Overrides the image tag whose default is the chart appVersion.
|
||||||
|
tag: "latest" # currently no versions are tagged.
|
||||||
|
|
||||||
|
imagePullSecrets: []
|
||||||
|
nameOverride: ""
|
||||||
|
fullnameOverride: ""
|
||||||
|
|
||||||
|
podAnnotations: {}
|
||||||
|
|
||||||
|
podSecurityContext: {}
|
||||||
|
# fsGroup: 2000
|
||||||
|
|
||||||
|
securityContext: {}
|
||||||
|
# capabilities:
|
||||||
|
# drop:
|
||||||
|
# - ALL
|
||||||
|
# readOnlyRootFilesystem: true
|
||||||
|
# runAsNonRoot: true
|
||||||
|
# runAsUser: 1000
|
||||||
|
|
||||||
|
service:
|
||||||
|
type: ClusterIP
|
||||||
|
port: 10400
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
nodeSelector: {}
|
||||||
|
|
||||||
|
tolerations: []
|
||||||
|
|
||||||
|
affinity: {}
|
||||||
|
|
||||||
|
config:
|
||||||
|
preloadModel: "ok_nabu"
|
||||||
|
|
||||||
|
pvc:
|
||||||
|
enabled: false
|
||||||
|
existingClaim: ""
|
||||||
|
storageClassName : ""
|
||||||
|
storage: 1Gi
|
||||||
|
|
Loading…
Reference in a new issue