From 628d8df6f488f2a3f9d85d0a97f193291829374a Mon Sep 17 00:00:00 2001 From: rust84 Date: Sun, 21 Feb 2021 23:48:57 +0000 Subject: [PATCH] [valheim] new chart (#605) --- charts/valheim/.helmignore | 24 ++++++++++ charts/valheim/Chart.yaml | 20 +++++++++ charts/valheim/OWNERS | 8 ++++ charts/valheim/README.md | 67 ++++++++++++++++++++++++++++ charts/valheim/templates/NOTES.txt | 1 + charts/valheim/templates/common.yaml | 1 + charts/valheim/values.yaml | 66 +++++++++++++++++++++++++++ 7 files changed, 187 insertions(+) create mode 100644 charts/valheim/.helmignore create mode 100644 charts/valheim/Chart.yaml create mode 100644 charts/valheim/OWNERS create mode 100644 charts/valheim/README.md create mode 100644 charts/valheim/templates/NOTES.txt create mode 100644 charts/valheim/templates/common.yaml create mode 100644 charts/valheim/values.yaml diff --git a/charts/valheim/.helmignore b/charts/valheim/.helmignore new file mode 100644 index 00000000..e559de0a --- /dev/null +++ b/charts/valheim/.helmignore @@ -0,0 +1,24 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ +# OWNERS file for Kubernetes +OWNERS diff --git a/charts/valheim/Chart.yaml b/charts/valheim/Chart.yaml new file mode 100644 index 00000000..d4d6725b --- /dev/null +++ b/charts/valheim/Chart.yaml @@ -0,0 +1,20 @@ +apiVersion: v2 +appVersion: latest +description: Valheim dedicated gameserver with automatic update and world backup support +name: valheim +version: 1.0.0 +kubeVersion: ">=1.16.0-0" +keywords: +- valheim +home: https://github.com/k8s-at-home/charts/tree/master/charts/valheim +icon: https://raw.githubusercontent.com/lloesche/valheim-server-docker/main/misc/Logo_valheim.png +sources: +- https://github.com/lloesche/valheim-server-docker +- https://hub.docker.com/r/lloesche/valheim-server +maintainers: +- name: rust84 + email: owner@russellhall.co.uk +dependencies: +- name: common + repository: https://k8s-at-home.com/charts/ + version: 3.0.1 diff --git a/charts/valheim/OWNERS b/charts/valheim/OWNERS new file mode 100644 index 00000000..1ce35762 --- /dev/null +++ b/charts/valheim/OWNERS @@ -0,0 +1,8 @@ +approvers: +- billimek +- onedr0p +- bjw-s +reviewers: +- billimek +- onedr0p +- bjw-s diff --git a/charts/valheim/README.md b/charts/valheim/README.md new file mode 100644 index 00000000..3a6b7757 --- /dev/null +++ b/charts/valheim/README.md @@ -0,0 +1,67 @@ +# valheim + +This is a helm chart for [Valheim-server-docker](https://github.com/lloesche/valheim-server-docker). + +**This chart is not maintained by the upstream project and any issues with the chart should be raised [here](https://github.com/k8s-at-home/charts/issues/new/choose)** + +## TL;DR; + +```shell +$ helm repo add k8s-at-home https://k8s-at-home.com/charts/ +$ helm install k8s-at-home/valheim +``` + +## Installing the Chart + +To install the chart with the release name `my-release`: + +```console +helm install --name my-release k8s-at-home/valheim +``` + +## Uninstalling the Chart + +To uninstall/delete the `my-release` deployment: + +```console +helm delete my-release --purge +``` + +The command removes all the Kubernetes components associated with the chart and deletes the release. + +## Configuration +Read through the charts [values.yaml](https://github.com/k8s-at-home/charts/blob/master/charts/valheim/values.yaml) +file. It has several commented out suggested values. +Additionally you can take a look at the common library [values.yaml](https://github.com/k8s-at-home/charts/blob/master/charts/common/values.yaml) for more (advanced) configuration options. + +Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example, +```console +helm install valheim \ + --set env.SERVER_NAME="My Server" \ + k8s-at-home/valheim +``` +Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the +chart. For example, +```console +helm install valheim k8s-at-home/valheim --values values.yaml +``` + +```yaml +image: + tag: ... +``` + +--- +**NOTE** + +If you get +```console +Error: rendered manifests contain a resource that already exists. Unable to continue with install: existing resource conflict: ...` +``` +it may be because you uninstalled the chart with `skipuninstall` enabled, you need to manually delete the pvc or use `existingClaim`. + +--- + +## Upgrading an existing Release to a new major version + +A major chart version change (like 4.0.1 -> 5.0.0) indicates that there is an incompatible breaking change potentially needing manual actions. diff --git a/charts/valheim/templates/NOTES.txt b/charts/valheim/templates/NOTES.txt new file mode 100644 index 00000000..90f7b653 --- /dev/null +++ b/charts/valheim/templates/NOTES.txt @@ -0,0 +1 @@ +{{- include "common.notes.defaultNotes" . -}} diff --git a/charts/valheim/templates/common.yaml b/charts/valheim/templates/common.yaml new file mode 100644 index 00000000..a6613c2c --- /dev/null +++ b/charts/valheim/templates/common.yaml @@ -0,0 +1 @@ +{{ include "common.all" . }} diff --git a/charts/valheim/values.yaml b/charts/valheim/values.yaml new file mode 100644 index 00000000..176a6bd1 --- /dev/null +++ b/charts/valheim/values.yaml @@ -0,0 +1,66 @@ +# +# IMPORTANT NOTE +# +# This chart inherits from our common library chart. You can check the default values/options here: +# https://github.com/k8s-at-home/charts/tree/master/charts/common/values.yaml +# + +image: + repository: lloesche/valheim-server + pullPolicy: IfNotPresent + tag: latest + +strategy: + type: Recreate + +## See more environment varaibles in the valheim-server-docker documentation +# https://github.com/lloesche/valheim-server-docker#environment-variables +env: {} + # SERVER_NAME: My Server + # SERVER_PORT: 2456 + # WORLD_NAME: Dedicated + # SERVER_PASS: secret + # SERVER_PUBLIC: 1 + # UPDATE_INTERVAL: 10800 # every 3 hours + # BACKUPS: true + # BACKUPS_INTERVAL: 43200 # every 12 hours + # BACKUPS_DIRECTORY: /config/backups + # BACKUPS_MAX_AGE: 3 + # BACKUPS_DIRECTORY_PERMISSIONS: 755 + # BACKUPS_FILE_PERMISSIONS: 644 + # CONFIG_DIRECTORY_PERMISSIONS: 755 + # WORLDS_DIRECTORY_PERMISSIONS: 755 + # WORLDS_FILE_PERMISSIONS: 644 + # STEAMCMD_ARGS: validate + # DNS_1: 8.8.8.8 + # DNS_2: 8.8.4.4 + +service: + type: LoadBalancer + externalTrafficPolicy: Cluster + loadBalancerIP: + port: + port: 2456 + protocol: UDP + additionalPorts: + - name: valheim-2 + port: 2457 + protocol: UDP + targetPort: 2457 + - name: valheim-3 + port: 2458 + protocol: UDP + targetPort: 2458 + +persistence: + config: + enabled: false + mountPath: /config + +probes: + liveness: + enabled: false + readiness: + enabled: false + startup: + enabled: false