netflux-kubernetes/deploy/base/deploy-drone.yaml

94 lines
2.4 KiB
YAML
Raw Normal View History

2022-05-18 16:11:15 +00:00
apiVersion: apps/v1
kind: Deployment
metadata:
name: drone
labels:
2022-06-05 15:44:52 +00:00
app: drone
component: web
2022-05-18 16:11:15 +00:00
app.kubernetes.io/name: drone
app.kubernetes.io/instance: drone
spec:
selector:
matchLabels:
2022-06-05 15:44:52 +00:00
app: drone
component: web
2022-05-18 16:11:15 +00:00
template:
metadata:
labels:
2022-06-05 15:44:52 +00:00
app: drone
component: web
2022-05-18 16:11:15 +00:00
app.kubernetes.io/name: drone
app.kubernetes.io/instance: drone
spec:
containers:
- name: drone
image: drone/drone:2
imagePullPolicy: IfNotPresent
ports:
- name: http
protocol: TCP
containerPort: 80
env:
# Limit users permitted to use Drone, to prevent bitcoin mining :-/
- name: DRONE_USER_FILTER
value: rob
- name: DRONE_DATABASE_DRIVER
value: postgres
- name: DRONE_DATABASE_DATASOURCE
valueFrom:
secretKeyRef:
name: drone-credentials
key: database-url
- name: DRONE_GITEA_CLIENT_ID
valueFrom:
secretKeyRef:
name: drone-credentials
key: gitea-client-id
- name: DRONE_GITEA_CLIENT_SECRET
valueFrom:
secretKeyRef:
name: drone-credentials
key: gitea-client-secret
- name: DRONE_RPC_SECRET
valueFrom:
secretKeyRef:
name: drone-credentials
key: rpc-secret
- name: DRONE_GITEA_SERVER
valueFrom:
configMapKeyRef:
name: drone-config
key: gitea-server
- name: DRONE_SERVER_HOST
valueFrom:
configMapKeyRef:
name: drone-config
key: server-host
- name: DRONE_SERVER_PROTO
valueFrom:
configMapKeyRef:
name: drone-config
key: server-proto
- name: DRONE_LOGS_DEBUG
valueFrom:
configMapKeyRef:
name: drone-config
key: logs-debug
resources:
requests:
memory: "32Mi"
cpu: "50m"
limits:
memory: "128Mi"
cpu: "250m"
livenessProbe:
failureThreshold: 10
httpGet:
path: /healthz
port: 80
scheme: HTTP
initialDelaySeconds: 30
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 10