diff --git a/stable/minecraft/Chart.yaml b/stable/minecraft/Chart.yaml index 13526fed0e06..0a8fd6539402 100755 --- a/stable/minecraft/Chart.yaml +++ b/stable/minecraft/Chart.yaml @@ -1,5 +1,5 @@ name: minecraft -version: 0.1.4 +version: 0.2.0 description: Minecraft server keywords: - game diff --git a/stable/minecraft/templates/NOTES.txt b/stable/minecraft/templates/NOTES.txt index af64a5762c3f..bbe7512fbb90 100644 --- a/stable/minecraft/templates/NOTES.txt +++ b/stable/minecraft/templates/NOTES.txt @@ -15,7 +15,7 @@ same shell: {{- if contains "NodePort" .Values.minecraftServer.serviceType }} export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} \ - -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "fullname" . }}) + -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "minecraft.fullname" . }}) export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} \ -o jsonpath="{.items[0].status.addresses[0].address}") echo "You'll need to expose this node through your security groups/firewall" @@ -27,12 +27,12 @@ same shell: !! NOTE: It may take a few minutes for the LoadBalancer IP to be available. !! You can watch for EXTERNAL-IP to populate by running: - kubectl get svc --namespace {{ .Release.Namespace }} -w {{ template "fullname" . }} + kubectl get svc --namespace {{ .Release.Namespace }} -w {{ template "minecraft.fullname" . }} {{- else if contains "ClusterIP" .Values.minecraftServer.serviceType }} export POD_NAME=$(kubectl get pods \ --namespace {{ .Release.Namespace }} \ - -l "component={{ template "fullname" . }}" \ + -l "component={{ template "minecraft.fullname" . }}" \ -o jsonpath="{.items[0].metadata.name}") kubectl port-forward $POD_NAME 25565:25565 echo "Point your Minecraft client at 127.0.0.1:22565" diff --git a/stable/minecraft/templates/_helpers.tpl b/stable/minecraft/templates/_helpers.tpl index f0d83d2edba6..406d4234405c 100644 --- a/stable/minecraft/templates/_helpers.tpl +++ b/stable/minecraft/templates/_helpers.tpl @@ -2,7 +2,7 @@ {{/* Expand the name of the chart. */}} -{{- define "name" -}} +{{- define "minecraft.name" -}} {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} {{- end -}} @@ -10,7 +10,7 @@ Expand the name of the chart. 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 "fullname" -}} +{{- define "minecraft.fullname" -}} {{- $name := default .Chart.Name .Values.nameOverride -}} {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} {{- end -}} diff --git a/stable/minecraft/templates/datadir-pvc.yaml b/stable/minecraft/templates/datadir-pvc.yaml index 82263b8291f8..2225a9444576 100644 --- a/stable/minecraft/templates/datadir-pvc.yaml +++ b/stable/minecraft/templates/datadir-pvc.yaml @@ -2,9 +2,9 @@ kind: PersistentVolumeClaim apiVersion: v1 metadata: - name: {{ template "fullname" . }}-datadir + name: {{ template "minecraft.fullname" . }}-datadir labels: - app: {{ template "fullname" . }} + app: {{ template "minecraft.fullname" . }} chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" release: "{{ .Release.Name }}" heritage: "{{ .Release.Service }}" diff --git a/stable/minecraft/templates/deployment.yaml b/stable/minecraft/templates/deployment.yaml index 40e398576a44..cc0b7014fe82 100644 --- a/stable/minecraft/templates/deployment.yaml +++ b/stable/minecraft/templates/deployment.yaml @@ -2,9 +2,9 @@ apiVersion: extensions/v1beta1 kind: Deployment metadata: - name: {{ template "fullname" . }} + name: {{ template "minecraft.fullname" . }} labels: - app: {{ template "fullname" . }} + app: {{ template "minecraft.fullname" . }} chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" release: "{{ .Release.Name }}" heritage: "{{ .Release.Service }}" @@ -12,10 +12,10 @@ spec: template: metadata: labels: - app: {{ template "fullname" . }} + app: {{ template "minecraft.fullname" . }} spec: containers: - - name: {{ template "fullname" . }} + - name: {{ template "minecraft.fullname" . }} image: "{{ .Values.image }}:{{ .Values.imageTag }}" imagePullPolicy: Always resources: @@ -86,7 +86,7 @@ spec: - name: RCON_PASSWORD valueFrom: secretKeyRef: - name: {{ template "fullname" . }} + name: {{ template "minecraft.fullname" . }} key: rcon-password {{- end }} @@ -106,7 +106,7 @@ spec: - name: datadir {{- if .Values.persistence.dataDir.enabled }} persistentVolumeClaim: - claimName: {{ template "fullname" . }}-datadir + claimName: {{ template "minecraft.fullname" . }}-datadir {{- else }} emptyDir: {} {{- end }} diff --git a/stable/minecraft/templates/minecraft-svc.yaml b/stable/minecraft/templates/minecraft-svc.yaml index b51851bc4a3a..e64b9deb2104 100644 --- a/stable/minecraft/templates/minecraft-svc.yaml +++ b/stable/minecraft/templates/minecraft-svc.yaml @@ -1,9 +1,9 @@ apiVersion: v1 kind: Service metadata: - name: {{ template "fullname" . }} + name: {{ template "minecraft.fullname" . }} labels: - app: {{ template "fullname" . }} + app: {{ template "minecraft.fullname" . }} chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" release: "{{ .Release.Name }}" heritage: "{{ .Release.Service }}" @@ -15,4 +15,4 @@ spec: targetPort: minecraft protocol: TCP selector: - app: {{ template "fullname" . }} + app: {{ template "minecraft.fullname" . }} diff --git a/stable/minecraft/templates/rcon-svc.yaml b/stable/minecraft/templates/rcon-svc.yaml index c0600fe32f37..2a34aad41cb1 100644 --- a/stable/minecraft/templates/rcon-svc.yaml +++ b/stable/minecraft/templates/rcon-svc.yaml @@ -2,9 +2,9 @@ apiVersion: v1 kind: Service metadata: - name: "{{ template "fullname" . }}-rcon" + name: "{{ template "minecraft.fullname" . }}-rcon" labels: - app: {{ template "fullname" . }} + app: {{ template "minecraft.fullname" . }} chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" release: "{{ .Release.Name }}" heritage: "{{ .Release.Service }}" @@ -16,5 +16,5 @@ spec: targetPort: rcon protocol: TCP selector: - app: {{ template "fullname" . }} + app: {{ template "minecraft.fullname" . }} {{- end }} diff --git a/stable/minecraft/templates/secrets.yaml b/stable/minecraft/templates/secrets.yaml index 16c5264d39c2..6ab4c2715654 100644 --- a/stable/minecraft/templates/secrets.yaml +++ b/stable/minecraft/templates/secrets.yaml @@ -1,9 +1,9 @@ apiVersion: v1 kind: Secret metadata: - name: {{ template "fullname" . }} + name: {{ template "minecraft.fullname" . }} labels: - app: {{ template "fullname" . }} + app: {{ template "minecraft.fullname" . }} chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" release: "{{ .Release.Name }}" heritage: "{{ .Release.Service }}"