Compare commits
11 Commits
57b4629424
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 5941043d85 | |||
| 4e19949075 | |||
| 03aa9e69aa | |||
| 6fed58bc89 | |||
| 5b7a8cba68 | |||
| ae6ba776a4 | |||
| 9dcb48e4dc | |||
| 29dcb23fb2 | |||
| 3682da1b23 | |||
| e0386f137b | |||
| 3735ce1b5c |
1
.obsidian/app.json
vendored
Normal file
1
.obsidian/app.json
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{}
|
||||
1
.obsidian/appearance.json
vendored
Normal file
1
.obsidian/appearance.json
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{}
|
||||
33
.obsidian/core-plugins.json
vendored
Normal file
33
.obsidian/core-plugins.json
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
{
|
||||
"file-explorer": true,
|
||||
"global-search": true,
|
||||
"switcher": true,
|
||||
"graph": true,
|
||||
"backlink": true,
|
||||
"canvas": true,
|
||||
"outgoing-link": true,
|
||||
"tag-pane": true,
|
||||
"footnotes": false,
|
||||
"properties": true,
|
||||
"page-preview": true,
|
||||
"daily-notes": true,
|
||||
"templates": true,
|
||||
"note-composer": true,
|
||||
"command-palette": true,
|
||||
"slash-command": false,
|
||||
"editor-status": true,
|
||||
"bookmarks": true,
|
||||
"markdown-importer": false,
|
||||
"zk-prefixer": false,
|
||||
"random-note": false,
|
||||
"outline": true,
|
||||
"word-count": true,
|
||||
"slides": false,
|
||||
"audio-recorder": false,
|
||||
"workspaces": false,
|
||||
"file-recovery": true,
|
||||
"publish": false,
|
||||
"sync": true,
|
||||
"bases": true,
|
||||
"webviewer": false
|
||||
}
|
||||
22
.obsidian/graph.json
vendored
Normal file
22
.obsidian/graph.json
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"collapse-filter": true,
|
||||
"search": "",
|
||||
"showTags": false,
|
||||
"showAttachments": false,
|
||||
"hideUnresolved": false,
|
||||
"showOrphans": true,
|
||||
"collapse-color-groups": true,
|
||||
"colorGroups": [],
|
||||
"collapse-display": true,
|
||||
"showArrow": false,
|
||||
"textFadeMultiplier": 0,
|
||||
"nodeSizeMultiplier": 1,
|
||||
"lineSizeMultiplier": 1,
|
||||
"collapse-forces": true,
|
||||
"centerStrength": 0.518713248970312,
|
||||
"repelStrength": 10,
|
||||
"linkStrength": 1,
|
||||
"linkDistance": 250,
|
||||
"scale": 1,
|
||||
"close": false
|
||||
}
|
||||
195
.obsidian/workspace.json
vendored
Normal file
195
.obsidian/workspace.json
vendored
Normal file
@@ -0,0 +1,195 @@
|
||||
{
|
||||
"main": {
|
||||
"id": "43695258c32658e7",
|
||||
"type": "split",
|
||||
"children": [
|
||||
{
|
||||
"id": "9cac58892ad2665b",
|
||||
"type": "tabs",
|
||||
"children": [
|
||||
{
|
||||
"id": "7d03f81db58db910",
|
||||
"type": "leaf",
|
||||
"state": {
|
||||
"type": "markdown",
|
||||
"state": {
|
||||
"file": "skubelb.md",
|
||||
"mode": "source",
|
||||
"source": false
|
||||
},
|
||||
"icon": "lucide-file",
|
||||
"title": "skubelb"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"direction": "vertical"
|
||||
},
|
||||
"left": {
|
||||
"id": "d39d3a473637afb8",
|
||||
"type": "split",
|
||||
"children": [
|
||||
{
|
||||
"id": "49d4c8a0d3f7f144",
|
||||
"type": "tabs",
|
||||
"children": [
|
||||
{
|
||||
"id": "08c078c6d4a98746",
|
||||
"type": "leaf",
|
||||
"state": {
|
||||
"type": "file-explorer",
|
||||
"state": {
|
||||
"sortOrder": "alphabetical",
|
||||
"autoReveal": false
|
||||
},
|
||||
"icon": "lucide-folder-closed",
|
||||
"title": "Files"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "4ea3b24b7ec07c99",
|
||||
"type": "leaf",
|
||||
"state": {
|
||||
"type": "search",
|
||||
"state": {
|
||||
"query": "",
|
||||
"matchingCase": false,
|
||||
"explainSearch": false,
|
||||
"collapseAll": false,
|
||||
"extraContext": false,
|
||||
"sortOrder": "alphabetical"
|
||||
},
|
||||
"icon": "lucide-search",
|
||||
"title": "Search"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "b545fa64e3acff09",
|
||||
"type": "leaf",
|
||||
"state": {
|
||||
"type": "bookmarks",
|
||||
"state": {},
|
||||
"icon": "lucide-bookmark",
|
||||
"title": "Bookmarks"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"direction": "horizontal",
|
||||
"width": 300
|
||||
},
|
||||
"right": {
|
||||
"id": "a4a8acd82b026829",
|
||||
"type": "split",
|
||||
"children": [
|
||||
{
|
||||
"id": "ec24445c92158e46",
|
||||
"type": "tabs",
|
||||
"children": [
|
||||
{
|
||||
"id": "f8a46b0608a1dc14",
|
||||
"type": "leaf",
|
||||
"state": {
|
||||
"type": "backlink",
|
||||
"state": {
|
||||
"file": "skubelb.md",
|
||||
"collapseAll": false,
|
||||
"extraContext": false,
|
||||
"sortOrder": "alphabetical",
|
||||
"showSearch": false,
|
||||
"searchQuery": "",
|
||||
"backlinkCollapsed": false,
|
||||
"unlinkedCollapsed": true
|
||||
},
|
||||
"icon": "links-coming-in",
|
||||
"title": "Backlinks for skubelb"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "105238162e43594b",
|
||||
"type": "leaf",
|
||||
"state": {
|
||||
"type": "outgoing-link",
|
||||
"state": {
|
||||
"file": "skubelb.md",
|
||||
"linksCollapsed": false,
|
||||
"unlinkedCollapsed": true
|
||||
},
|
||||
"icon": "links-going-out",
|
||||
"title": "Outgoing links from skubelb"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "f7db911d22211924",
|
||||
"type": "leaf",
|
||||
"state": {
|
||||
"type": "tag",
|
||||
"state": {
|
||||
"sortOrder": "frequency",
|
||||
"useHierarchy": true,
|
||||
"showSearch": false,
|
||||
"searchQuery": ""
|
||||
},
|
||||
"icon": "lucide-tags",
|
||||
"title": "Tags"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "f25bdf844b6a644e",
|
||||
"type": "leaf",
|
||||
"state": {
|
||||
"type": "all-properties",
|
||||
"state": {
|
||||
"sortOrder": "frequency",
|
||||
"showSearch": false,
|
||||
"searchQuery": ""
|
||||
},
|
||||
"icon": "lucide-archive",
|
||||
"title": "All properties"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "6ec89bc7e80d93ac",
|
||||
"type": "leaf",
|
||||
"state": {
|
||||
"type": "outline",
|
||||
"state": {
|
||||
"file": "valheim.md",
|
||||
"followCursor": false,
|
||||
"showSearch": false,
|
||||
"searchQuery": ""
|
||||
},
|
||||
"icon": "lucide-list",
|
||||
"title": "Outline of valheim"
|
||||
}
|
||||
}
|
||||
],
|
||||
"currentTab": 1
|
||||
}
|
||||
],
|
||||
"direction": "horizontal",
|
||||
"width": 300
|
||||
},
|
||||
"left-ribbon": {
|
||||
"hiddenItems": {
|
||||
"switcher:Open quick switcher": false,
|
||||
"graph:Open graph view": false,
|
||||
"canvas:Create new canvas": false,
|
||||
"daily-notes:Open today's daily note": false,
|
||||
"templates:Insert template": false,
|
||||
"command-palette:Open command palette": false,
|
||||
"bases:Create new base": false
|
||||
}
|
||||
},
|
||||
"active": "7d03f81db58db910",
|
||||
"lastOpenFiles": [
|
||||
"valheim.md",
|
||||
"infra.md",
|
||||
"README.md",
|
||||
"rikidown.md",
|
||||
"skubelb.md",
|
||||
"thoughts.md"
|
||||
]
|
||||
}
|
||||
9
README.md
Normal file
9
README.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# Hello world!
|
||||
|
||||
This is powered by rikidown (see below); some previous text alluded a different software I was considering that ultimately got dropped because it was not using propert Markdown format. This seems to be working much better.
|
||||
|
||||
[infra.md](infra.md)
|
||||
|
||||
[rikidown.md](rikidown.md) describes the wiki software that was written to support this wobsite. In essence, this is the most basic version of a git-based wiki that uses Markdown to render it's content that I could make.
|
||||
|
||||
[[skubelb]] is a simple kubernetes load balancer/proxy tool; the intended use case is to provide ingress from a free-tier GCP VM to hosts that live at dynamic IPs. Originally, this was used to expose a GKE instance hosted on spot VMs to the internet, and deal with the constantly changing IPs.
|
||||
@@ -1,7 +0,0 @@
|
||||
= Hello world!
|
||||
|
||||
It appears this does not support normal markdown, so this may be dropped awfully quick. Much sadness.
|
||||
|
||||
It seems to be simple and fast though, so I'm conflicted.
|
||||
|
||||
[[ Infra ]]
|
||||
23
infra.md
Normal file
23
infra.md
Normal file
@@ -0,0 +1,23 @@
|
||||
I acquired a used server for a very reasonable cost; it has 80x3.0ghz ARM cores, 128 GiB of RAM, and uses 70w of power. Power where I live is super expensive, so I'm very excited to have this beast available for minimal power cost.
|
||||
|
||||
If you are interested in hosting anything, please reach out :). If I you don't know how to reach out, you probably aren't invited to reach out.
|
||||
|
||||
I also have 5pi5, a Raspberry Pi 5 (16 GiB) that I use to host smaller applications.
|
||||
|
||||
## Configuration
|
||||
|
||||
The very strong ARM machine (aka, machop) runs k3s. This allows me to store my configurations in FluxCD, kept in a Git repo. Very helpful in terms of my ability to work on one project a time, when tipsy.
|
||||
|
||||
As a bonus, those silly AI tools are *very* helpful when you are tipsy. You can just ask it to:
|
||||
|
||||
> add a new app to prod which uses the Docker image docker.tipsy.codes/rikidown:20251217.
|
||||
> the app should include and ingress for wiki.tipsy.codes, and it should add the arguments '--git-repo https://git.tipsy.codes/charles/wiki.tipsy.codes.git'.
|
||||
> the pod will expose port 8080, which should be wrapped in a service and used in the ingress
|
||||
|
||||
and it will do the thing. It did pretty good, overall.
|
||||
|
||||
The Git repo for my FluxCD configuration is not public because I'm not confident that I've correctly removed all private keys from it (notably, the keys to access the kubernetes dashboard). In principle it should still be fine because access to the k3s control plane is restricted to my local network, but all the same... I don't trust you.
|
||||
|
||||
# Projects
|
||||
|
||||
[Valheim](valheim.md)
|
||||
@@ -1,9 +0,0 @@
|
||||
All of this is running on a Raspberry Pi 5 sitting in a closet. The Pi runs k3s, a lightweight Kubernetes implementation, and Tailscale to allow me to access resources when I'm away from home.
|
||||
|
||||
== FluxCD
|
||||
|
||||
The cluster is managed by FluxCD. I describe my apps in kustomizations and plain YAML.
|
||||
|
||||
== SSL
|
||||
|
||||
SSL certs are issues through letsencrypt. I've pointed my name cheap domain name to Google Clouds DNS servers, then setup cert-manager in the Kubernetes cluster to acquire SSL certificates using the DNS challenge method. This allows me to have valid SSL certs with no client side configuration, and without actually exposing my service to the Internet (which would be required for the standard HTML challenge).
|
||||
5
rikidown.md
Normal file
5
rikidown.md
Normal file
@@ -0,0 +1,5 @@
|
||||
Homepage: [https://git.tipsy.codes/charles/rikidown]
|
||||
|
||||
This is a very simple Markdown-wiki renderer. I use it with Obsidian, because it has a fancy UI and I like shiny things, BUT, Obsidian does not seem to be open source. And this makes me sad.
|
||||
|
||||
Irregardless; the tool is simple, and not super optimal. In particular, it will render the markdown page for every single request, which is fairly expensive. It might be better to render the pages when the git repo is updated/cloned, but I'm lazy.
|
||||
3
skubelb.md
Normal file
3
skubelb.md
Normal file
@@ -0,0 +1,3 @@
|
||||
Homepage: [https://git.tipsy.codes/charles/skubelb]
|
||||
## Setup
|
||||
Described in the README.
|
||||
21
template.html
Normal file
21
template.html
Normal file
@@ -0,0 +1,21 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>wiki.tipsy.codes</title>
|
||||
<link
|
||||
rel="stylesheet"
|
||||
href="https://cdn.simplecss.org/simple.min.css"
|
||||
/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<nav>
|
||||
<a href="/README.md">README</a>
|
||||
<a href="/thoughts.md">Thoughts</a>
|
||||
</nav>
|
||||
<h1>wiki.tipsy.codes</h1>
|
||||
<p>For those who only have time to code while tipsy 🍻</p>
|
||||
</header>
|
||||
<div class="content">{% block body %} {% endblock %}</div>
|
||||
</body>
|
||||
</html>
|
||||
15
thoughts.md
Normal file
15
thoughts.md
Normal file
@@ -0,0 +1,15 @@
|
||||
This is a placeholder for thoughts I might have.
|
||||
## Alcohol use
|
||||
Top of mind for me when I consider tipsy.codes is that it is largely inspired by alcohol consumption. This is a fairly dangerous substance, and should only be used in specific situations. In particular:
|
||||
|
||||
- Do not drink below the age of 25. Your brain is still forming, you will hurt it
|
||||
- Do not drink if alcohol has a negative impact on your quality of life, for example:
|
||||
- You don't perform well at work because of your drinking habits
|
||||
- It gets in the way of your goals, whether those be relationships (i.e., listen to your partner when they ask you to cut back), professional, fitness or health
|
||||
- You need to drink.
|
||||
|
||||
Having said that; there is a very interesting lineage of alcohol consumption in humanity. It is present in a at least some religious works (Jesus turning water to wine at a party? drinking wine as the blood of our savior?), and there is evidence that it was crucial to the development of ancestors as a cheap and available source of energy [source](https://www.scientificamerican.com/article/origins-of-human-alcohol-consumption-revealed/).
|
||||
|
||||
There are dangers to alcohol; it is an addictive substances, for me at least, because it is fun. It helps me relax, forget about the daily worries, and even feel comfortable expressing myself on this forum when I normally wouldn't. Balancing the expression of "I'm comfortable saying this AND its appropriate", and saying or doing absolutely terrible things is a challenge. If you catch yourself apologizing for your behavior after a few drinks, consider whether you are having trouble acting correctly under the influence.
|
||||
|
||||
And of course; don't do anything while you're drinking that puts others at risk. Such as driving 😠.
|
||||
312
valheim.md
Normal file
312
valheim.md
Normal file
@@ -0,0 +1,312 @@
|
||||
It turns out that you can run x86 applications on ARM machines, which is super cool. But it requires a bit of nonsense. Here is how I got the Valheim server to work.
|
||||
## Dockerfile
|
||||
I created a docker file like:
|
||||
```
|
||||
# Use Ubuntu 22.04 as base
|
||||
FROM weilbyte/box:debian-11
|
||||
|
||||
RUN apt update && apt upgrade -y
|
||||
RUN apt install -y curl libpulse-dev libatomic1 libc6
|
||||
|
||||
https://git.tipsy.codes/charles/skubelb# Create user steam
|
||||
RUN useradd -m steam
|
||||
|
||||
# Change user to steam
|
||||
USER steam
|
||||
|
||||
# Go to /home/steam/Steam
|
||||
WORKDIR /home/steam/Steam
|
||||
|
||||
# Download and extract SteamCMD
|
||||
RUN curl -sqL "https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz" | tar zxvf -
|
||||
|
||||
RUN /usr/local/bin/box64 /home/steam/Steam/steamcmd.sh +force_install_dir /home/steam/Valheim +login anonymous +app_update 896660 validate +exit
|
||||
|
||||
WORKDIR /home/steam/Valheim
|
||||
|
||||
COPY start_server.sh /home/steam/Valheim
|
||||
|
||||
ENTRYPOINT ["/usr/local/bin/box64", "/home/steam/Valheim/start_server.sh"]
|
||||
```
|
||||
I built and pushed this image with:
|
||||
```
|
||||
docker build -t docker.tipsy.codes/valheim:20251214 .
|
||||
```
|
||||
## k3s config
|
||||
To deploy this, I made added some files to my Flux repo. Here is a tree:
|
||||
|
||||
```
|
||||
❯ tree apps/prod/valheim
|
||||
apps/prod/valheim
|
||||
├── deployment.yaml
|
||||
├── ingress.yaml
|
||||
├── kustomization.yaml
|
||||
├── namespace.yaml
|
||||
├── pvc.yaml
|
||||
├── pv.yaml
|
||||
└── service.yaml
|
||||
|
||||
1 directory, 7 files
|
||||
```
|
||||
The most interesting files are:
|
||||
```
|
||||
❯ find apps/prod/valheim/* -exec echo '# {}' \; -exec cat {} \;
|
||||
# apps/prod/valheim/deployment.yaml
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: valheim
|
||||
namespace: valheim
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: valheim
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: valheim
|
||||
spec:
|
||||
containers:
|
||||
- name: valheim
|
||||
image: docker.tipsy.codes/valheim:20251214
|
||||
ports:
|
||||
- containerPort: 2456
|
||||
protocol: UDP
|
||||
- containerPort: 2457
|
||||
protocol: UDP
|
||||
- containerPort: 9001
|
||||
protocol: TCP
|
||||
- containerPort: 80
|
||||
protocol: TCP
|
||||
volumeMounts:
|
||||
- name: valheim-data
|
||||
mountPath: /opt/valheim
|
||||
- name: valheim-config
|
||||
mountPath: /config
|
||||
volumes:
|
||||
- name: valheim-data
|
||||
persistentVolumeClaim:
|
||||
claimName: valheim-pvc
|
||||
- name: valheim-config
|
||||
persistentVolumeClaim:
|
||||
claimName: valheim-config-pvc
|
||||
# apps/prod/valheim/ingress.yaml
|
||||
apiVersion: traefik.io/v1alpha1
|
||||
kind: IngressRouteUDP
|
||||
metadata:
|
||||
name: valheim-udp1
|
||||
spec:
|
||||
# By default, IngressRouteUDP listens to all UDP entry points if 'entryPoints' is not specified.
|
||||
entryPoints:
|
||||
- valheim-udp1
|
||||
routes:
|
||||
- services:
|
||||
- name: valheim
|
||||
port: 2456 # Replace with your service port
|
||||
---
|
||||
apiVersion: traefik.io/v1alpha1
|
||||
kind: IngressRouteUDP
|
||||
metadata:
|
||||
name: valheim-udp2
|
||||
spec:
|
||||
# By default, IngressRouteUDP listens to all UDP entry points if 'entryPoints' is not specified.
|
||||
entryPoints:
|
||||
- valheim-udp2
|
||||
routes:
|
||||
- services:
|
||||
- name: valheim
|
||||
port: 2457 # Replace with your service port
|
||||
---
|
||||
apiVersion: traefik.io/v1alpha1
|
||||
kind: IngressRouteTCP
|
||||
metadata:
|
||||
name: valheim-tcp1
|
||||
spec:
|
||||
# By default, IngressRouteUDP listens to all UDP entry points if 'entryPoints' is not specified.
|
||||
entryPoints:
|
||||
- valheim-tcp1
|
||||
routes:
|
||||
- match: HostSNI(`*`)
|
||||
services:
|
||||
- name: valheim
|
||||
port: 2456 # Replace with your service port
|
||||
---
|
||||
apiVersion: traefik.io/v1alpha1
|
||||
kind: IngressRouteTCP
|
||||
metadata:
|
||||
name: valheim-tcp2
|
||||
spec:
|
||||
# By default, IngressRouteUDP listens to all UDP entry points if 'entryPoints' is not specified.
|
||||
entryPoints:
|
||||
- valheim-tcp2
|
||||
routes:
|
||||
- match: HostSNI(`*`)
|
||||
services:
|
||||
- name: valheim
|
||||
port: 2457 # Replace with your service port
|
||||
# apps/prod/valheim/kustomization.yaml
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- ./namespace.yaml
|
||||
- ./pvc.yaml
|
||||
- ./deployment.yaml
|
||||
- ./service.yaml
|
||||
- ./ingress.yaml
|
||||
- ./pv.yaml
|
||||
patches:
|
||||
- patch: |
|
||||
- op: replace
|
||||
path: /metadata/namespace
|
||||
value: valheim
|
||||
target:
|
||||
name: ".*"
|
||||
# apps/prod/valheim/namespace.yaml
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: valheim
|
||||
# apps/prod/valheim/pvc.yaml
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: valheim-pvc
|
||||
namespace: valheim
|
||||
spec:
|
||||
storageClassName: local-path
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 100Gi
|
||||
volumeName: valheim-pv
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: valheim-config-pvc
|
||||
namespace: valheim
|
||||
spec:
|
||||
storageClassName: local-path
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 100Gi
|
||||
volumeName: valheim-config-pv
|
||||
# apps/prod/valheim/pv.yaml
|
||||
apiVersion: v1
|
||||
kind: PersistentVolume
|
||||
metadata:
|
||||
name: valheim-pv
|
||||
spec:
|
||||
capacity:
|
||||
storage: 100Gi
|
||||
volumeMode: Filesystem
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
persistentVolumeReclaimPolicy: Retain
|
||||
storageClassName: local-path
|
||||
claimRef:
|
||||
namespace: valheim
|
||||
name: valheim-pvc
|
||||
local:
|
||||
path: /var/lib/rancher/k3s/storage/valheim-pvc
|
||||
nodeAffinity:
|
||||
required:
|
||||
nodeSelectorTerms:
|
||||
- matchExpressions:
|
||||
- key: kubernetes.io/hostname
|
||||
operator: In
|
||||
values:
|
||||
- machop
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolume
|
||||
metadata:
|
||||
name: valheim-config-pv
|
||||
spec:
|
||||
capacity:
|
||||
storage: 100Gi
|
||||
volumeMode: Filesystem
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
persistentVolumeReclaimPolicy: Retain
|
||||
storageClassName: local-path
|
||||
claimRef:
|
||||
namespace: valheim
|
||||
name: valheim-config-pvc
|
||||
local:
|
||||
path: /var/lib/rancher/k3s/storage/valheim-config-pvc
|
||||
nodeAffinity:
|
||||
required:
|
||||
nodeSelectorTerms:
|
||||
- matchExpressions:
|
||||
- key: kubernetes.io/hostname
|
||||
operator: In
|
||||
values:
|
||||
- machop
|
||||
# apps/prod/valheim/service.yaml
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: valheim
|
||||
namespace: valheim
|
||||
spec:
|
||||
selector:
|
||||
app: valheim
|
||||
ports:
|
||||
- name: udp-2456
|
||||
protocol: UDP
|
||||
port: 2456
|
||||
targetPort: 2456
|
||||
- name: udp-2457
|
||||
protocol: UDP
|
||||
port: 2457
|
||||
targetPort: 2457
|
||||
- name: tcp-2456
|
||||
protocol: TCP
|
||||
port: 2456
|
||||
targetPort: 2456
|
||||
- name: tcp-2457
|
||||
protocol: TCP
|
||||
port: 2457
|
||||
targetPort: 2457
|
||||
```
|
||||
I did have to make some changes to k3s configuration to open the correct ports:
|
||||
```
|
||||
charles@machop:~/p3/palworld-arm64$ sudo cat /var/lib/rancher/k3s/server/manifests/traefik-config.yaml
|
||||
apiVersion: helm.cattle.io/v1
|
||||
kind: HelmChartConfig
|
||||
metadata:
|
||||
name: traefik
|
||||
namespace: kube-system
|
||||
spec:
|
||||
valuesContent: |-
|
||||
ports:
|
||||
websecure:
|
||||
transport:
|
||||
respondingTimeouts:
|
||||
readTimeout: 180m
|
||||
valheim-udp1:
|
||||
port: 2456
|
||||
hostPort: 2456
|
||||
protocol: UDP
|
||||
valheim-udp2:
|
||||
port: 2457
|
||||
hostPort: 2457
|
||||
protocol: UDP
|
||||
valheim-tcp1:
|
||||
port: 2456
|
||||
hostPort: 2456
|
||||
protocol: TCP
|
||||
valheim-tcp2:
|
||||
port: 2457
|
||||
hostPort: 2457
|
||||
protocol: TCP
|
||||
```
|
||||
## Does it work?
|
||||
Yeah, it seems to work. I had some trouble with crossplay, but I have no interest in playing with console peasants anyway.
|
||||
|
||||
Happy hunting!
|
||||
Reference in New Issue
Block a user