2020-05-01 22:08:35 +00:00
|
|
|
apiVersion: apps/v1
|
|
|
|
kind: Deployment
|
|
|
|
metadata:
|
2020-05-18 20:18:39 +00:00
|
|
|
name: drone-server
|
2020-05-01 22:08:35 +00:00
|
|
|
labels:
|
2021-08-26 16:42:32 +00:00
|
|
|
app.kubernetes.io/name: drone
|
|
|
|
app.kubernetes.io/component: server
|
2020-05-01 22:08:35 +00:00
|
|
|
spec:
|
2021-09-02 04:00:42 +00:00
|
|
|
replicas: 1
|
|
|
|
strategy:
|
|
|
|
type: Recreate
|
2020-05-01 22:08:35 +00:00
|
|
|
selector:
|
|
|
|
matchLabels:
|
2021-08-26 16:42:32 +00:00
|
|
|
app.kubernetes.io/name: drone
|
|
|
|
app.kubernetes.io/component: server
|
2020-05-01 22:08:35 +00:00
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
2021-08-26 16:42:32 +00:00
|
|
|
app.kubernetes.io/name: drone
|
|
|
|
app.kubernetes.io/component: server
|
2020-05-01 22:08:35 +00:00
|
|
|
spec:
|
|
|
|
containers:
|
|
|
|
- name: drone
|
2021-08-26 16:42:21 +00:00
|
|
|
image: drone/drone
|
2020-05-01 22:08:35 +00:00
|
|
|
env:
|
2023-02-07 05:02:13 +00:00
|
|
|
- name: DRONE_GITEA_SERVER
|
|
|
|
value: https://${GITEA_EXTERNAL_HOST}
|
2020-05-01 22:08:35 +00:00
|
|
|
- name: DRONE_SERVER_HOST
|
2020-08-02 03:40:27 +00:00
|
|
|
value: ${DRONE_EXTERNAL_HOST}
|
2021-08-26 16:42:32 +00:00
|
|
|
- name: DRONE_SERVER_PORT
|
|
|
|
value: ":80"
|
2021-08-26 16:42:21 +00:00
|
|
|
- name: DRONE_SERVER_PROTO
|
|
|
|
value: https
|
2020-05-01 22:08:35 +00:00
|
|
|
- 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
|
2021-09-02 04:00:42 +00:00
|
|
|
- name: DRONE_DATABASE_SECRET
|
|
|
|
valueFrom:
|
|
|
|
secretKeyRef:
|
|
|
|
name: drone-secret
|
|
|
|
key: database_secret
|
2021-08-26 16:42:32 +00:00
|
|
|
ports:
|
|
|
|
- name: http
|
|
|
|
containerPort: 80
|
2021-08-26 16:42:28 +00:00
|
|
|
resources:
|
|
|
|
requests:
|
2021-09-02 04:00:42 +00:00
|
|
|
cpu: 250m
|
2021-12-26 06:58:38 +00:00
|
|
|
memory: 100Mi
|
2021-08-26 16:42:44 +00:00
|
|
|
limits:
|
2021-12-26 06:58:38 +00:00
|
|
|
cpu: 250m
|
2022-05-26 03:43:44 +00:00
|
|
|
memory: 100Mi
|
2021-09-02 04:00:42 +00:00
|
|
|
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
|
2020-05-01 22:08:35 +00:00
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
|
|
kind: Service
|
|
|
|
metadata:
|
2021-08-26 16:42:32 +00:00
|
|
|
name: drone-server
|
2020-05-01 22:08:35 +00:00
|
|
|
labels:
|
2021-08-26 16:42:32 +00:00
|
|
|
app.kubernetes.io/name: drone
|
|
|
|
app.kubernetes.io/component: server
|
|
|
|
# monitor: prometheus
|
2020-05-01 22:08:35 +00:00
|
|
|
spec:
|
|
|
|
selector:
|
2021-08-26 16:42:32 +00:00
|
|
|
app.kubernetes.io/name: drone
|
|
|
|
app.kubernetes.io/component: server
|
2020-05-01 22:08:35 +00:00
|
|
|
ports:
|
|
|
|
- name: http
|
|
|
|
port: 80
|
2021-08-26 16:42:21 +00:00
|
|
|
targetPort: http
|