Sebastian Kippe
915fd7db8a
Based on recent usage stats. If these are not set, the scheduler's capacity check doesn't work and it will place new pods on nodes that are actually not free enough for them.
81 lines
1.5 KiB
YAML
81 lines
1.5 KiB
YAML
apiVersion: extensions/v1beta1
|
|
kind: Deployment
|
|
metadata:
|
|
name: gitea-db
|
|
labels:
|
|
app: gitea
|
|
spec:
|
|
replicas: 1
|
|
strategy:
|
|
type: Recreate
|
|
template:
|
|
metadata:
|
|
labels:
|
|
name: gitea-db
|
|
app: gitea
|
|
spec:
|
|
containers:
|
|
- env:
|
|
- name: MYSQL_DATABASE
|
|
value: gitea
|
|
- name: MYSQL_ROOT_PASSWORD
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: mysql-pass
|
|
key: password
|
|
- name: MYSQL_PASSWORD
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: gitea-mysql-pass
|
|
key: password
|
|
- name: MYSQL_USER
|
|
value: gitea
|
|
image: mariadb:10.3.10
|
|
name: gitea-db
|
|
ports:
|
|
- containerPort: 3306
|
|
name: mysql
|
|
volumeMounts:
|
|
- mountPath: /var/lib/mysql
|
|
name: gitea-db-data
|
|
resources:
|
|
requests:
|
|
cpu: 250m
|
|
memory: 150Mi
|
|
limits:
|
|
cpu: 500m
|
|
memory: 300Mi
|
|
restartPolicy: Always
|
|
volumes:
|
|
- name: gitea-db-data
|
|
persistentVolumeClaim:
|
|
claimName: gitea-db-data
|
|
---
|
|
apiVersion: v1
|
|
kind: PersistentVolumeClaim
|
|
metadata:
|
|
name: gitea-db-data
|
|
labels:
|
|
name: gitea-db-data
|
|
app: gitea
|
|
spec:
|
|
accessModes:
|
|
- ReadWriteOnce
|
|
resources:
|
|
requests:
|
|
storage: 1Gi
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: gitea-db
|
|
labels:
|
|
service: gitea-db
|
|
app: gitea
|
|
spec:
|
|
selector:
|
|
name: gitea-db
|
|
type: ClusterIP
|
|
ports:
|
|
- port: 3306
|