Skip to content
This repository was archived by the owner on Feb 22, 2022. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion stable/minecraft/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: minecraft
version: 0.1.4
version: 0.2.0
description: Minecraft server
keywords:
- game
Expand Down
6 changes: 3 additions & 3 deletions stable/minecraft/templates/NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions stable/minecraft/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "name" -}}
{{- define "minecraft.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{/*
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 -}}
4 changes: 2 additions & 2 deletions stable/minecraft/templates/datadir-pvc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}"
Expand Down
12 changes: 6 additions & 6 deletions stable/minecraft/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@
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 }}"
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:
Expand Down Expand Up @@ -86,7 +86,7 @@ spec:
- name: RCON_PASSWORD
valueFrom:
secretKeyRef:
name: {{ template "fullname" . }}
name: {{ template "minecraft.fullname" . }}
key: rcon-password
{{- end }}

Expand All @@ -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 }}
Expand Down
6 changes: 3 additions & 3 deletions stable/minecraft/templates/minecraft-svc.yaml
Original file line number Diff line number Diff line change
@@ -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 }}"
Expand All @@ -15,4 +15,4 @@ spec:
targetPort: minecraft
protocol: TCP
selector:
app: {{ template "fullname" . }}
app: {{ template "minecraft.fullname" . }}
6 changes: 3 additions & 3 deletions stable/minecraft/templates/rcon-svc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}"
Expand All @@ -16,5 +16,5 @@ spec:
targetPort: rcon
protocol: TCP
selector:
app: {{ template "fullname" . }}
app: {{ template "minecraft.fullname" . }}
{{- end }}
4 changes: 2 additions & 2 deletions stable/minecraft/templates/secrets.yaml
Original file line number Diff line number Diff line change
@@ -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 }}"
Expand Down