This commit is contained in:
parent
8a0e065039
commit
0cc06ea7fd
53
kubernetes/apps/production/drone/deployment.yaml
Normal file
53
kubernetes/apps/production/drone/deployment.yaml
Normal file
@ -0,0 +1,53 @@
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: drone-deployment
|
||||
namespace: drone-ci
|
||||
labels:
|
||||
app: drone
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: drone
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: drone
|
||||
spec:
|
||||
containers:
|
||||
- name: drone
|
||||
image: drone/drone:2
|
||||
ports:
|
||||
- containerPort: 80
|
||||
- containerPort: 443
|
||||
env:
|
||||
- name: DRONE_GITEA_SERVER
|
||||
value: "https://try.gitea.io"
|
||||
- name: DRONE_GITEA_CLIENT_ID
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: drone-secret
|
||||
key: DRONE_GITEA_CLIENT_ID
|
||||
- name: DRONE_GITEA_CLIENT_SECRET
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: drone-secret
|
||||
key: DRONE_GITEA_CLIENT_SECRET
|
||||
- name: DRONE_RPC_SECRET
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: drone-secret
|
||||
key: DRONE_RPC_SECRET
|
||||
- name: DRONE_SERVER_HOST
|
||||
value: "drone.local.fascinated.cc"
|
||||
- name: DRONE_SERVER_PROTO
|
||||
value: "https"
|
||||
volumeMounts:
|
||||
- name: drone-data
|
||||
mountPath: /data
|
||||
volumes:
|
||||
- name: drone-data
|
||||
persistentVolumeClaim:
|
||||
claimName: drone-pvc
|
22
kubernetes/apps/production/drone/ingress.yaml
Normal file
22
kubernetes/apps/production/drone/ingress.yaml
Normal file
@ -0,0 +1,22 @@
|
||||
---
|
||||
apiVersion: traefik.io/v1alpha1
|
||||
kind: IngressRoute
|
||||
metadata:
|
||||
name: drone-ci-ingress
|
||||
namespace: drone-ci
|
||||
annotations:
|
||||
kubernetes.io/ingress.class: traefik-external
|
||||
spec:
|
||||
entryPoints:
|
||||
- websecure
|
||||
routes:
|
||||
- match: Host(`drone.local.fascinated.cc`)
|
||||
kind: Rule
|
||||
middlewares:
|
||||
- name: default-headers
|
||||
namespace: traefik
|
||||
services:
|
||||
- name: drone-service
|
||||
port: 80
|
||||
tls:
|
||||
secretName: local-fascinated-cc
|
11
kubernetes/apps/production/drone/kustomization.yaml
Normal file
11
kubernetes/apps/production/drone/kustomization.yaml
Normal file
@ -0,0 +1,11 @@
|
||||
---
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
namespace: drone-ci
|
||||
resources:
|
||||
- namespace.yaml
|
||||
- sealed-secrets.yaml
|
||||
- pvc.yaml
|
||||
- deployment.yaml
|
||||
- service.yaml
|
||||
- ingress.yaml
|
5
kubernetes/apps/production/drone/namespace.yaml
Normal file
5
kubernetes/apps/production/drone/namespace.yaml
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: drone-ci
|
12
kubernetes/apps/production/drone/pvc.yaml
Normal file
12
kubernetes/apps/production/drone/pvc.yaml
Normal file
@ -0,0 +1,12 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: drone-pvc
|
||||
namespace: drone-ci
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 5Gi
|
15
kubernetes/apps/production/drone/sealed-secrets.yaml
Normal file
15
kubernetes/apps/production/drone/sealed-secrets.yaml
Normal file
@ -0,0 +1,15 @@
|
||||
---
|
||||
apiVersion: bitnami.com/v1alpha1
|
||||
kind: SealedSecret
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
name: drone-secret
|
||||
namespace: drone-ci
|
||||
spec:
|
||||
encryptedData:
|
||||
foo: AgBGX0u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
||||
template:
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
name: drone-secret
|
||||
namespace: drone-ci
|
17
kubernetes/apps/production/drone/service.yaml
Normal file
17
kubernetes/apps/production/drone/service.yaml
Normal file
@ -0,0 +1,17 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: drone-service
|
||||
namespace: drone-ci
|
||||
spec:
|
||||
type: ClusterIP
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: 80
|
||||
protocol: TCP
|
||||
- port: 443
|
||||
targetPort: 443
|
||||
protocol: TCP
|
||||
selector:
|
||||
app: drone
|
@ -1,7 +1,7 @@
|
||||
apiVersion: traefik.io/v1alpha1
|
||||
kind: IngressRoute
|
||||
metadata:
|
||||
name: capacitor-external-ingress
|
||||
name: capacitor-ingress
|
||||
namespace: public-services
|
||||
annotations:
|
||||
kubernetes.io/ingress.class: traefik-external
|
||||
|
Reference in New Issue
Block a user