From b71a6441be59d8559de9836b988d9f1a0595c5ff Mon Sep 17 00:00:00 2001 From: Tommy Date: Sat, 6 Apr 2024 21:10:30 +0200 Subject: [PATCH] fix: change ntfy-sh to ntfy to try get out of template missing --- charts/ntfy-sh/Chart.yaml | 2 +- charts/ntfy-sh/templates/_helpers.tpl | 10 +++++----- charts/ntfy-sh/templates/configuration.yaml | 4 ++-- .../ntfy-sh/templates/deployment-server.yaml | 20 +++++++++---------- charts/ntfy-sh/templates/service-server.yaml | 8 ++++---- 5 files changed, 22 insertions(+), 22 deletions(-) diff --git a/charts/ntfy-sh/Chart.yaml b/charts/ntfy-sh/Chart.yaml index 5e4bffc..1fd33d3 100644 --- a/charts/ntfy-sh/Chart.yaml +++ b/charts/ntfy-sh/Chart.yaml @@ -4,7 +4,7 @@ description: | ntfy lets you send push notifications to your phone or desktop via scripts from any computer appVersion: v2.10.0 type: application -version: 0.1.1 +version: 0.1.2 maintainers: - name: Tommy Skaug email: tommy@skaug.me diff --git a/charts/ntfy-sh/templates/_helpers.tpl b/charts/ntfy-sh/templates/_helpers.tpl index cfd98ab..d42a798 100644 --- a/charts/ntfy-sh/templates/_helpers.tpl +++ b/charts/ntfy-sh/templates/_helpers.tpl @@ -3,7 +3,7 @@ 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). */}} -{{- define "ntfy-sh.fullname" -}} +{{- define "ntfy.fullname" -}} {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} {{- end }} @@ -11,9 +11,9 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this {{/* Common labels */}} -{{- define "ntfy-sh.labels" -}} -helm.sh/chart: {{ include "ntfy-sh.chart" . }} -app.kubernetes.io/name: {{ include "ntfy-sh.fullname" . }} +{{- define "ntfy.labels" -}} +helm.sh/chart: {{ include "ntfy.chart" . }} +app.kubernetes.io/name: {{ include "ntfy.fullname" . }} app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/version: {{ .Chart.Version | quote }} app.kubernetes.io/managed-by: {{ .Release.Service }} @@ -23,7 +23,7 @@ app.kubernetes.io/managed-by: {{ .Release.Service }} {{/* Generate basic labels */}} -{{- define "ntfy-sh.chart" -}} +{{- define "ntfy.chart" -}} {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" -}} {{- end }} diff --git a/charts/ntfy-sh/templates/configuration.yaml b/charts/ntfy-sh/templates/configuration.yaml index d587e14..b10e49a 100644 --- a/charts/ntfy-sh/templates/configuration.yaml +++ b/charts/ntfy-sh/templates/configuration.yaml @@ -2,9 +2,9 @@ apiVersion: v1 kind: ConfigMap metadata: - name: {{ include "ntfy-sh.fullname" . }}-server-config + name: {{ include "ntfy.fullname" . }}-server-config labels: - {{- include "ntfy-sh.labels" . | nindent 4 }} + {{- include "ntfy.labels" . | nindent 4 }} data: server.yaml: | enable-metrics: true \ No newline at end of file diff --git a/charts/ntfy-sh/templates/deployment-server.yaml b/charts/ntfy-sh/templates/deployment-server.yaml index d72498d..665f2b0 100644 --- a/charts/ntfy-sh/templates/deployment-server.yaml +++ b/charts/ntfy-sh/templates/deployment-server.yaml @@ -1,22 +1,22 @@ apiVersion: apps/v1 kind: Deployment metadata: - name: {{ include "ntfy-sh.fullname" . }} + name: {{ include "ntfy.fullname" . }} labels: - {{- include "ntfy-sh.labels" . | nindent 4 }} - app.kubernetes.io/component: {{ include "ntfy-sh.fullname" . }}-server + {{- include "ntfy.labels" . | nindent 4 }} + app.kubernetes.io/component: {{ include "ntfy.fullname" . }}-server replicas: 1 selector: matchLabels: - app.kubernetes.io/component: {{ include "ntfy-sh.fullname" . }}-server + app.kubernetes.io/component: {{ include "ntfy.fullname" . }}-server template: metadata: labels: - app.kubernetes.io/component: {{ include "ntfy-sh.fullname" . }}-server + app.kubernetes.io/component: {{ include "ntfy.fullname" . }}-server spec: - serviceAccountName: {{ include "ntfy-sh.fullname" . }} + serviceAccountName: {{ include "ntfy.fullname" . }} containers: - - name: {{ include "ntfy-sh.fullname" . }}-server + - name: {{ include "ntfy.fullname" . }}-server image: {{ .Values.image.repository }}:{{ .Values.image.tag }} args: ["serve"] env: &dispatchEnv @@ -42,16 +42,16 @@ metadata: - containerPort: 80 name: http volumeMounts: - - name: {{ include "ntfy-sh.fullname" . }}-server + - name: {{ include "ntfy.fullname" . }}-server mountPath: "/var/lib/ntfy" readOnly: false - name: config mountPath: "/etc/ntfy" readOnly: true volumes: - - name: {{ include "ntfy-sh.fullname" . }}-server + - name: {{ include "ntfy.fullname" . }}-server persistentVolumeClaim: claimName: {{ .Values.persistence.existingClaim }} - name: config configMap: - name: {{ include "ntfy-sh.fullname" . }}-server-config \ No newline at end of file + name: {{ include "ntfy.fullname" . }}-server-config \ No newline at end of file diff --git a/charts/ntfy-sh/templates/service-server.yaml b/charts/ntfy-sh/templates/service-server.yaml index eb872c4..f682c9c 100644 --- a/charts/ntfy-sh/templates/service-server.yaml +++ b/charts/ntfy-sh/templates/service-server.yaml @@ -2,13 +2,13 @@ apiVersion: v1 kind: Service metadata: - name: {{ include "ntfy-sh.fullname" . }}-server + name: {{ include "ntfy.fullname" . }}-server labels: - {{- include "ntfy-sh.labels" . | nindent 4 }} - app.kubernetes.io/component: {{ include "ntfy-sh.fullname" . }}-server + {{- include "ntfy.labels" . | nindent 4 }} + app.kubernetes.io/component: {{ include "ntfy.fullname" . }}-server spec: selector: - app: {{ include "ntfy-sh.fullname" . }}-server + app: {{ include "ntfy.fullname" . }}-server ports: - port: 80 targetPort: 80 \ No newline at end of file