From eac8bc21c2ec8555b21b6ab66dfe1ce5c53c05cb Mon Sep 17 00:00:00 2001 From: sHa Date: Tue, 31 Mar 2026 03:44:39 +0300 Subject: [PATCH] feat: Add Signal Gateway Helm chart with deployment, service, ingress, and values configuration --- signal-gateway/Chart.yaml | 9 +++++ signal-gateway/templates/deployment.yaml | 44 ++++++++++++++++++++++++ signal-gateway/templates/ingress.yaml | 27 +++++++++++++++ signal-gateway/templates/service.yaml | 16 +++++++++ signal-gateway/values.yaml | 31 +++++++++++++++++ 5 files changed, 127 insertions(+) create mode 100644 signal-gateway/Chart.yaml create mode 100644 signal-gateway/templates/deployment.yaml create mode 100644 signal-gateway/templates/ingress.yaml create mode 100644 signal-gateway/templates/service.yaml create mode 100644 signal-gateway/values.yaml diff --git a/signal-gateway/Chart.yaml b/signal-gateway/Chart.yaml new file mode 100644 index 0000000..4aabb2b --- /dev/null +++ b/signal-gateway/Chart.yaml @@ -0,0 +1,9 @@ +apiVersion: v2 +name: signal-gateway +description: Signal Gateway Helm chart +type: application +version: 0.1.0 +appVersion: "0.98" +annotations: + version-source: github-release:bbernhard/signal-cli-rest-api + version-pattern: "s|^v||" diff --git a/signal-gateway/templates/deployment.yaml b/signal-gateway/templates/deployment.yaml new file mode 100644 index 0000000..7b7361e --- /dev/null +++ b/signal-gateway/templates/deployment.yaml @@ -0,0 +1,44 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ .Release.Name }} + labels: + app.kubernetes.io/name: {{ .Chart.Name }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} + app.kubernetes.io/component: signal + app.kubernetes.io/part-of: home-automation +spec: + replicas: 1 + strategy: + type: Recreate + selector: + matchLabels: + app: {{ .Release.Name }} + template: + metadata: + labels: + app: {{ .Release.Name }} + spec: + containers: + - name: {{ .Chart.Name }} + image: "{{ .Values.image.repository }}:{{ .Chart.AppVersion }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + ports: + - containerPort: {{ .Values.port }} + name: http + env: + {{- range $key, $value := .Values.env }} + - name: {{ $key }} + value: {{ $value | quote }} + {{- end }} + resources: + {{- toYaml .Values.resources | nindent 12 }} + volumeMounts: + - name: config + mountPath: /home/.local/share/signal-cli + volumes: + - name: config + hostPath: + path: {{ .Values.volume.hostPath }} + type: DirectoryOrCreate diff --git a/signal-gateway/templates/ingress.yaml b/signal-gateway/templates/ingress.yaml new file mode 100644 index 0000000..6a80701 --- /dev/null +++ b/signal-gateway/templates/ingress.yaml @@ -0,0 +1,27 @@ +{{- range $name, $config := .Values.ingresses }} +--- +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: {{ $.Release.Name }}-{{ $name }} + {{- with $config.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + rules: + - host: {{ $config.host }} + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: {{ $.Release.Name }} + port: + number: {{ $.Values.port }} + {{- with $config.tls }} + tls: + {{- toYaml . | nindent 4 }} + {{- end }} +{{- end }} diff --git a/signal-gateway/templates/service.yaml b/signal-gateway/templates/service.yaml new file mode 100644 index 0000000..4ef2e54 --- /dev/null +++ b/signal-gateway/templates/service.yaml @@ -0,0 +1,16 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ .Release.Name }} + labels: + app.kubernetes.io/name: {{ .Chart.Name }} + app.kubernetes.io/instance: {{ .Release.Name }} +spec: + type: ClusterIP + selector: + app: {{ .Release.Name }} + ports: + - name: http + port: {{ .Values.port }} + targetPort: {{ .Values.port }} + protocol: TCP diff --git a/signal-gateway/values.yaml b/signal-gateway/values.yaml new file mode 100644 index 0000000..56a3361 --- /dev/null +++ b/signal-gateway/values.yaml @@ -0,0 +1,31 @@ +# Default values for Signal Gateway Helm Chart +image: + repository: bbernhard/signal-cli-rest-api + pullPolicy: Always + +port: 8080 + +env: + MODE: "json-rpc" + SIGNAL_CLI_UID: "1001" + SIGNAL_CLI_GID: "1001" + SWAGGER_HOST: "signal.hc.lan" + +resources: + requests: + cpu: "100m" + memory: "128Mi" + limits: + cpu: "1" + memory: "512Mi" + +volume: + hostPath: "" + +ingresses: {} + # https: + # host: signal.example.com + # annotations: {} + # tls: + # - hosts: + # - signal.example.com