1
0
Fork 0

kitchen: Add manifest for kitchen screen server

I decided to run the kitchen screen service in Kubernetes rather than on
the Raspberry Pi in the kitchen.  This will hopefully make it a bit more
reliable and easier to update.  It will also make it easier to rebuild
the OS on the Pi, if it ever becomes necessary, since it really only
needs Firefox (and MQTTDPMS) now.
dch-webhooks-secrets
Dustin 2022-11-05 16:39:22 -05:00
parent 5208902706
commit de054bd68f
3 changed files with 148 additions and 0 deletions

1
kitchen/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
config.yaml

113
kitchen/kitchen.yaml Normal file
View File

@ -0,0 +1,113 @@
---
apiVersion: v1
kind: Namespace
metadata:
name: kitchen
---
apiVersion: v1
kind: ConfigMap
metadata:
labels:
app.kubernetes.io/name: kitchen
app.kubernetes.io/instance: kitchen
app.kubernetes.io/component: kitchen
app.kubernetes.io/part-of: kitchen
name: kitchen
namespace: kitchen
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app.kubernetes.io/name: kitchen
app.kubernetes.io/instance: kitchen
app.kubernetes.io/component: kitchen
app.kubernetes.io/part-of: kitchen
name: kitchen
namespace: kitchen
spec:
selector:
matchLabels:
app.kubernetes.io/name: kitchen
app.kubernetes.io/instance: kitchen
app.kubernetes.io/component: kitchen
app.kubernetes.io/part-of: kitchen
template:
metadata:
labels:
app.kubernetes.io/name: kitchen
app.kubernetes.io/instance: kitchen
app.kubernetes.io/component: kitchen
app.kubernetes.io/part-of: kitchen
spec:
containers:
- name: kitchen
image: git.pyrocufflink.net/packages/kitchen:master
args:
- --host=0.0.0.0
env:
- name: TZ
value: America/Chicago
imagePullPolicy: Always
ports:
- containerPort: 8000
name: http
volumeMounts:
- name: config
mountPath: /kitchen.yaml
subPath: config.yaml
readOnly: true
- name: tzinfo
mountPath: /usr/share/zoneinfo
readOnly: true
volumes:
- name: config
configMap:
name: kitchen
- name: tzinfo
hostPath:
path: /usr/share/zoneinfo
type: Directory
---
apiVersion: v1
kind: Service
metadata:
labels:
app.kubernetes.io/name: kitchen
app.kubernetes.io/instance: kitchen
app.kubernetes.io/component: kitchen
name: kitchen
namespace: kitchen
spec:
ports:
- port: 8000
name: http
selector:
app.kubernetes.io/name: kitchen
app.kubernetes.io/instance: kitchen
app.kubernetes.io/component: kitchen
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: kitchen
namespace: kitchen
spec:
tls:
- hosts:
- kitchen.pyrocufflink.blue
rules:
- host: kitchen.pyrocufflink.blue
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: kitchen
port:
name: http

View File

@ -0,0 +1,34 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- kitchen.yaml
configMapGenerator:
- name: kitchen
namespace: kitchen
behavior: merge
files:
- config.yaml
secretGenerator:
- name: imagepull-gitea
namespace: kitchen
type: kubernetes.io/dockerconfigjson
files:
- .dockerconfigjson
patches:
- patch: |-
apiVersion: apps/v1
kind: Deployment
metadata:
name: kitchen
spec:
template:
spec:
imagePullSecrets:
- name: imagepull-gitea
target:
kind: Deployment
labelSelector: app.kubernetes.io/name=kitchen