devops/drone/drone-server-deployment.yaml

52 lines
1.4 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: drone-server
namespace: default
spec:
replicas: 1
selector:
matchLabels:
app: drone-server
template:
metadata:
labels:
app: drone-server
spec:
nodeSelector:
node-role.kubernetes.io/control-plane: "true"
containers:
- name: drone-server
image: registry.t-aaron.com/drone/drone:2
ports:
- containerPort: 80
env:
- name: DRONE_GITEA_SERVER
value: "https://git-ops.t-aaron.com"
- name: DRONE_GITEA_CLIENT_ID
value: "87ef56d3-c8ef-40d3-9dd5-d9214fdac09f"
- name: DRONE_GITEA_CLIENT_SECRET
value: "tHe6Cq3dNpelsCA2NRTaGB3EueIFRkyLxh9USwBbxe4A"
- name: DRONE_RPC_SECRET
value: "d3c911a6c227e59f4f86f33db6943dc4"
- name: DRONE_SERVER_HOST
value: "drone-ops.t-aaron.com"
- name: DRONE_SERVER_PROTO
value: "https"
- name: DRONE_DEBUG
value: "true"
- name: DRONE_TRACE
value: "true"
- name: DRONE_USER_CREATE
value: "username:tuoheng,admin:true"
- name: DRONE_GIT_ALWAYS_AUTH
value: "true"
volumeMounts:
- name: drone-data
mountPath: /data
volumes:
- name: drone-data
hostPath:
path: /opt/drone/data
type: DirectoryOrCreate