fix: change ntfy-sh to ntfy to try get out of template missing

This commit is contained in:
Tommy 2024-04-06 21:10:30 +02:00
parent c7b547d72c
commit b71a6441be
No known key found for this signature in database
5 changed files with 22 additions and 22 deletions

View file

@ -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

View file

@ -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 }}

View file

@ -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

View file

@ -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
name: {{ include "ntfy.fullname" . }}-server-config

View file

@ -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