98 lines
2.4 KiB
YAML
98 lines
2.4 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: drone-server
|
|
labels:
|
|
app.kubernetes.io/name: drone
|
|
app.kubernetes.io/component: server
|
|
spec:
|
|
replicas: 1
|
|
strategy:
|
|
type: Recreate
|
|
selector:
|
|
matchLabels:
|
|
app.kubernetes.io/name: drone
|
|
app.kubernetes.io/component: server
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app.kubernetes.io/name: drone
|
|
app.kubernetes.io/component: server
|
|
spec:
|
|
containers:
|
|
- name: drone
|
|
image: drone/drone
|
|
env:
|
|
- name: DRONE_SERVER_HOST
|
|
value: ${DRONE_EXTERNAL_HOST}
|
|
- name: DRONE_SERVER_PORT
|
|
value: ":80"
|
|
- name: DRONE_SERVER_PROTO
|
|
value: https
|
|
- name: DRONE_GITEA_SERVER
|
|
value: https://${GITEA_EXTERNAL_HOST}
|
|
- name: DRONE_GITEA_CLIENT_ID
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: drone-gitea-oauth-secret
|
|
key: client_id
|
|
- name: DRONE_GITEA_CLIENT_SECRET
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: drone-gitea-oauth-secret
|
|
key: client_secret
|
|
- name: DRONE_RPC_SECRET
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: drone-secret
|
|
key: rpc_secret
|
|
- name: DRONE_DATABASE_SECRET
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: drone-secret
|
|
key: database_secret
|
|
ports:
|
|
- name: http
|
|
containerPort: 80
|
|
resources:
|
|
requests:
|
|
cpu: 250m
|
|
memory: 250Mi
|
|
limits:
|
|
cpu: 500m
|
|
memory: 500Mi
|
|
volumeMounts:
|
|
- mountPath: /data
|
|
name: drone-server-pv
|
|
volumes:
|
|
- name: drone-server-pv
|
|
persistentVolumeClaim:
|
|
claimName: drone-server-pvc
|
|
---
|
|
apiVersion: v1
|
|
kind: PersistentVolumeClaim
|
|
metadata:
|
|
name: drone-server-pvc
|
|
spec:
|
|
accessModes:
|
|
- ReadWriteOnce
|
|
resources:
|
|
requests:
|
|
storage: 1Gi
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: drone-server
|
|
labels:
|
|
app.kubernetes.io/name: drone
|
|
app.kubernetes.io/component: server
|
|
# monitor: prometheus
|
|
spec:
|
|
selector:
|
|
app.kubernetes.io/name: drone
|
|
app.kubernetes.io/component: server
|
|
ports:
|
|
- name: http
|
|
port: 80
|
|
targetPort: http |