Skip to content

Commit

Permalink
Add authorized keys for simon's irssi.
Browse files Browse the repository at this point in the history
  • Loading branch information
pippijn committed Nov 4, 2023
1 parent bee0f1b commit 069915e
Show file tree
Hide file tree
Showing 5 changed files with 78 additions and 0 deletions.
9 changes: 9 additions & 0 deletions code/kubes/vps/irssi/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/sh

set -eux

for home in home/*; do
user="${home/home\/}"
port="$(cat $home/.port)"
sed -e "s/\${user}/$user/g;s/\${port}/$port/g" template/irssi.yaml > "$user.yaml"
done
1 change: 1 addition & 0 deletions code/kubes/vps/irssi/home/pippijn/.port
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2230
1 change: 1 addition & 0 deletions code/kubes/vps/irssi/home/simon/.port
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2231
6 changes: 6 additions & 0 deletions code/kubes/vps/irssi/home/simon/.ssh/authorized_keys
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDy2o69eFzgkdHu4FqHcPg5ReevTXnLtaRNNIrNcB7Mi5hB2PbBaxe7wkwGygjTWfysdhkGNTG7u0V8iDFnzqqeWvgKj3+p+HEF7cwQmE+1EI0WUFcl3u/ez/rd1W6SJjZWZxLAXfb0fiabIN3/uiI8/cxqzdbDYnahUPXoDDqH2xCJaUzAjXcqir864Y98rDjOwCtnr8zFrCe8LbEExVyAPyk9s9d99D3Phvy7kvWxev686RzSqBQ5wbxcyIZiDBBnip2/TCBmTgsv01KJdGLP8MRA+n3E5d11YP2tAAm5uzuuuKyyCTl+G3vlkCG3TrGLQBGiUFgIx4XicZCvuoFf s20@heisenberg
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQD0HWCxYT/z64Sxf+JZPuXfnJAHEtdGb/QAD/qmOaGcESsinUzElVIWXaDQzneuXy6qYVpoz6cW5pEIEnQMC4OW1ZNC/3e+J/dEiR/SR9FXQsH2j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uCDj5hPLcmhs2LpvfX8PprNaGMcRtX73YlXSWIgpJXBb+SmtUMWisAWhgMclDlJkQ0/6N9knD7HHzWui/OEOkmKDx1IZZy15qGquxmQmro9DFeZ9TCdfD42vOojdlFAnaZtlar9x/1InS3F0OAq8VR6w2HT6A7kVyFT2af8SeCqhhxK1mT0ZfEG/v6D6/tb1ILy4ITfdKq/CdplRE1r6MIDnyR5hoQxG40mTJfYNJbEiRaua95cOts4ZfySq/DRxAyPHNhAn7eY63TZSFMB2fggGMamDW3wBgMxji+ehj s20@beacon
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDCZa3t/zg7DubYjtN563gDni1YgNonapp2newH9CFOF9BxTMsFHOhpZCvJBUQ/lalyZb3OpLEf1q61Vqp/fBnboFjVTF0mBEVK2DIYH4qGUgdOnZTUfL7rt9SAC/zQzlrtG/clABfhSWi0ZTxCHFGCai+ddMgv/OewVT/M+Fp4cfJzr2bjPQxDp1g/dD/NqLlNuAh47MFQF3+VJcGV/6LcjLNS8u77XOTzKzpqsbs4JKNuZJG1FAV1hllhmAW6bwrVNDugZsnEpz725p3mLyBUlQXCzOW0fmzhStcFXVKlpL3QhnTtHLAusFtA9m76t+6hnxeXVBVGf5WxjJuhFHSj simon@DESKTOP-NQ5O0B6
61 changes: 61 additions & 0 deletions code/kubes/vps/irssi/template/irssi.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
---
apiVersion: v1
kind: Namespace
metadata:
name: vps-${user}
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
namespace: vps-${user}
name: irssi-storage
spec:
accessModes:
- ReadWriteOnce
storageClassName: local-path
resources:
requests:
storage: 5Gi
---
apiVersion: apps/v1
kind: Deployment
metadata:
namespace: vps-${user}
name: irssi-${user}
spec:
selector:
matchLabels:
run: irssi-${user}
template:
metadata:
labels:
run: irssi-${user}
spec:
volumes:
- name: data
persistentVolumeClaim:
claimName: irssi-storage
containers:
- name: irssi
image: xinutec/irssi:latest
imagePullPolicy: Always
env:
- name: IRSSI_USER
value: ${user}
ports:
- containerPort: 22
hostPort: ${port}
resources:
requests:
memory: "64Mi"
cpu: "10m"
limits:
memory: "128Mi"
cpu: "100m"
volumeMounts:
- mountPath: /home/irssi
name: data
subPath: home
- mountPath: /etc/ssh_keys
name: data
subPath: ssh

0 comments on commit 069915e

Please sign in to comment.