From 796a807cef6b323cf8d5c1deefd00cd9a27af7d5 Mon Sep 17 00:00:00 2001 From: Jory Irving <46251616+joryirving@users.noreply.github.com> Date: Thu, 10 Apr 2025 10:51:29 -0600 Subject: [PATCH 1/2] fix: add catch for nil value --- charts/minecraft/templates/_helpers.tpl | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/charts/minecraft/templates/_helpers.tpl b/charts/minecraft/templates/_helpers.tpl index 044bd18..4f1f695 100644 --- a/charts/minecraft/templates/_helpers.tpl +++ b/charts/minecraft/templates/_helpers.tpl @@ -3,7 +3,8 @@ Expand the name of the chart. */}} {{- define "minecraft.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- $nameOverride := (and .Values (get .Values "nameOverride")) }} +{{- default .Chart.Name $nameOverride | trunc 63 | trimSuffix "-" -}} {{- end -}} {{/* @@ -29,10 +30,10 @@ 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 "minecraft.fullname" -}} -{{- if .Values.fullnameOverride }} +{{- if and .Values (hasKey .Values "fullnameOverride") .Values.fullnameOverride }} {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} {{- else }} -{{- $name := default .Chart.Name .Values.nameOverride }} +{{- $name := default .Chart.Name (and .Values (get .Values "nameOverride")) }} {{- if contains $name .Release.Name }} {{- .Release.Name | trunc 63 | trimSuffix "-" }} {{- else }} From 51c055c691bace98f1d5863bfb710cec8479240a Mon Sep 17 00:00:00 2001 From: Jory Irving <46251616+joryirving@users.noreply.github.com> Date: Thu, 10 Apr 2025 10:53:18 -0600 Subject: [PATCH 2/2] Update Chart.yaml --- charts/minecraft/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/minecraft/Chart.yaml b/charts/minecraft/Chart.yaml index 41070d1..e16cbce 100755 --- a/charts/minecraft/Chart.yaml +++ b/charts/minecraft/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: minecraft -version: 4.26.1 +version: 4.26.2 appVersion: SeeValues home: https://minecraft.net/ description: Minecraft server