83 lines
1.8 KiB
YAML
83 lines
1.8 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: drone-server
|
|
labels:
|
|
app: drone
|
|
component: server
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
app: drone
|
|
component: server
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: drone
|
|
component: server
|
|
spec:
|
|
containers:
|
|
- name: drone
|
|
image: drone/drone:1.7.0
|
|
env:
|
|
- name: DRONE_SERVER_HOST
|
|
value: $(DRONE_EXTERNAL_HOST)
|
|
- 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
|
|
ports:
|
|
- name: http
|
|
containerPort: 80
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: drone
|
|
labels:
|
|
app: drone
|
|
spec:
|
|
selector:
|
|
app: drone
|
|
component: server
|
|
ports:
|
|
- name: http
|
|
protocol: TCP
|
|
port: 80
|
|
targetPort: http
|
|
---
|
|
apiVersion: networking.k8s.io/v1beta1
|
|
kind: Ingress
|
|
metadata:
|
|
name: drone
|
|
labels:
|
|
app: drone
|
|
annotations:
|
|
nginx.ingress.kubernetes.io/rewrite-target: /
|
|
cert-manager.io/cluster-issuer: letsencrypt
|
|
spec:
|
|
tls:
|
|
- hosts:
|
|
- drone.127.0.0.1.nip.io
|
|
secretName: letsencrypt-cert
|
|
rules:
|
|
- host: drone.127.0.0.1.nip.io
|
|
http:
|
|
paths:
|
|
- path: /
|
|
backend:
|
|
serviceName: drone
|
|
servicePort: http |