1
0
Fork 0

tweak resource requests/limits, fix drone persistence

This commit is contained in:
Massaki Archambault 2021-09-02 00:00:42 -04:00
parent cae45d5676
commit 4df81101ad
6 changed files with 38 additions and 9 deletions

View File

@ -38,11 +38,11 @@ spec:
containerPort: 3000
resources:
requests:
cpu: 1000m
memory: 1Gi
cpu: 250m
memory: 250Mi
limits:
cpu: 2000m
memory: 2Gi
cpu: 500m
memory: 500Mi
---
kind: Role
apiVersion: rbac.authorization.k8s.io/v1

View File

@ -6,6 +6,9 @@ metadata:
app.kubernetes.io/name: drone
app.kubernetes.io/component: server
spec:
replicas: 1
strategy:
type: Recreate
selector:
matchLabels:
app.kubernetes.io/name: drone
@ -43,16 +46,39 @@ spec:
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: 500m
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

View File

@ -8,6 +8,7 @@ secretGenerator:
type: Opaque
literals:
- rpc_secret=changeme
- database_secret=changeme
- name: drone-gitea-oauth-secret
type: Opaque
literals:

View File

@ -66,11 +66,11 @@ spec:
containerPort: 80
resources:
requests:
cpu: 750m
memory: 1Gi
cpu: 1500m
memory: 1.5Gi
limits:
cpu: 1000m
memory: 1Gi
cpu: 2000m
memory: 2Gi
volumeMounts:
- name: nextcloud-pv
mountPath: /var/www/html

View File

@ -6,6 +6,7 @@ spec:
valuesContent: |-
additionalArguments:
- '--entryPoints.web.forwardedHeaders.insecure'
- '--entryPoints.websecure.forwardedHeaders.insecure'
- '--serversTransport.insecureSkipVerify=true'
- '--metrics.prometheus=true'
ports:

View File

@ -31,6 +31,7 @@ secretGenerator:
behavior: replace
literals:
- rpc_secret=${ssm:/k3s/prod/drone/gitea/rpc_secret}
- database_secret=${ssm:/k3s/prod/drone/gitea/database_secret}
# https://docs.drone.io/server/provider/gitea/
- name: drone-gitea-oauth-secret
type: Opaque