Browse Source

Use python 3.9, add k8s config

master
Taavi Väänänen 8 months ago
parent
commit
fb352195e1
Signed by: taavi GPG Key ID: EF242F709F912FBE
  1. 2
      Dockerfile
  2. 1
      config_example.yml
  3. 24
      k8s/config_example.yaml
  4. 5
      k8s/namespace.yaml
  5. 32
      k8s/service.yaml

2
Dockerfile

@ -1,4 +1,4 @@
FROM python:3.8-slim
FROM python:3.9-slim
WORKDIR /app
ENV PATH=/root/.local:$PATH

1
config_example.yml

@ -1,4 +1,3 @@
---
irc:
server: 'chat.freenode.net'
port: 6697

24
k8s/config_example.yaml

@ -0,0 +1,24 @@
---
apiVersion: v1
kind: Secret
metadata:
name: salbotconf
namespace: salbot
stringData:
config.yml: |
irc:
server: 'chat.freenode.net'
port: 6697
nick: 'example'
realname: 'example'
password: 'example'
channels:
- '#example-operations'
mediawiki:
host: 'wiki.example.org'
consumer_token: 'example'
consumer_secret: 'example'
access_token: 'example'
access_secret: 'example'
page: 'SAL'

5
k8s/namespace.yaml

@ -0,0 +1,5 @@
---
apiVersion: v1
kind: Namespace
metadata:
name: salbot

32
k8s/service.yaml

@ -0,0 +1,32 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: salbot-deployment
namespace: salbot
labels:
app: salbot
spec:
replicas: 1
selector:
matchLabels:
app: salbot
template:
metadata:
labels:
app: salbot
spec:
containers:
- name: salbot
image: quay.io/tassu/salbot
imagePullPolicy: Always
command: [ "python", "/app/app.py", "--config", "/secrets/config.yml" ]
workingDir: /app
volumeMounts:
- name: salbotconf
mountPath: "/secrets"
readOnly: true
volumes:
- name: salbotconf
secret:
secretName: salbotconf
Loading…
Cancel
Save