MySqlService
The MySqlService is used by many operators to get a database for their service. This resource is normally not used by the users directly but we provide here an example for better understanding.
# NOTE: This file serves as an example only!
# It demonstrates a subset of the API features which are available and
# is NOT FIT FOR PRODUCTIVE USE. You need to adapt them to your
# specific environment, needs and scale.
# DO NOT DEPLOY THIS FILE WITH THE EXPECTATION THAT YOU WILL GET A
# YAOOK DEPLOYMENT FIT FOR ANY USE EXCEPT LOOKING AT IT.
apiVersion: v1
kind: Secret
metadata:
name: backup-s3-password
type: Opaque
data:
access: QWNjZXNzS2V5 # base64 of "AccessKey"
secret: U2VjcmV0S2V5 # base64 of "SecretKey"
---
apiVersion: infra.yaook.cloud/v1
kind: MySQLService
metadata:
name: testdb
spec:
database: testdb
targetRelease: '10.6'
implementation: MariaDB
replicas: 1
proxy:
replicas: 2
timeoutClient: 300
mysqlConfig: {}
frontendIssuerRef:
name: ca-issuer
backendCAIssuerRef:
name: selfsigned-issuer
storageSize: 10Gi
backup:
schedule: "*/5 * * * *"
mysqldump: true
targets:
s3:
endpoint: https://cool.s3.endpoint
bucket: mybucket
addressingStyle: path
credentialRef:
name: backup-s3-password
filePrefix: testdb # optional Prefix to add to the files before storing it