bottin/deployments/kubernetes/bottin-pod.yaml

61 lines
1.5 KiB
YAML
Raw Normal View History

apiVersion: v1
kind: Pod
metadata:
name: bottin-pod
spec:
initContainers:
- name: clone
image: alpine:3.20
command: ['sh', '-c']
args:
- apk add git &&
git clone -- https://git.agecem.com/agecem/bottin /opt/bottin-src
volumeMounts:
- name: bottin-src
mountPath: /opt/bottin-src
- name: build
image: golang:1.23
env:
- name: CGO_ENABLED
value: '0'
command: ['sh', '-c']
args:
- cd /opt/bottin-src &&
go build -a -o /opt/bottin-executable/bottin
volumeMounts:
- name: bottin-src
mountPath: /opt/bottin-src
- name: bottin-executable
mountPath: /opt/bottin-executable
containers:
- name: api
image: alpine:3.20
command: ['sh', '-c']
args:
- ln -s /opt/bottin-executable/bottin /usr/bin/bottin
volumeMounts:
- name: bottin-executable
mountPath: /opt/bottin-executable
- name: bottin-secret
readOnly: true
mountPath: '/etc/bottin'
- name: ui
image: alpine:3.20
command: ['sh', '-c']
args:
- bottin --config /etc/bottin/ui.yaml server ui
volumeMounts:
- name: bottin-executable
mountPath: /opt/bottin-executable
- name: bottin-secret
readOnly: true
mountPath: '/etc/bottin'
volumes:
- name: bottin-src
emptyDir: {}
- name: bottin-executable
emptyDir: {}
- name: bottin-secret
secret:
secretName: bottin-secret