Skip to content

Commit

Permalink
sample: add antiaffinity to default sample yaml. radondb#371
Browse files Browse the repository at this point in the history
  • Loading branch information
runkecheng committed Mar 14, 2022
1 parent b1af5f9 commit 7aa9215
Showing 1 changed file with 97 additions and 0 deletions.
97 changes: 97 additions & 0 deletions config/samples/mysql_v1alpha1_mysqlcluster_podAntiAffinity.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
apiVersion: mysql.radondb.com/v1alpha1
kind: MysqlCluster
metadata:
name: sample
spec:
replicas: 3
mysqlVersion: "5.7"

# the backupSecretName specify the secret file name which store S3 information,
# if you want S3 backup or restore, please create backup_secret.yaml, uncomment below and fill secret name:
# backupSecretName:

# if you want create mysqlcluster from S3, uncomment and fill the directory in S3 bucket below:
# restoreFrom:

mysqlOpts:
rootPassword: "RadonDB@123"
rootHost: localhost
user: radondb_usr
password: RadonDB@123
database: radondb
initTokuDB: true

# A simple map between string and string.
# Such as:
# mysqlConf:
# expire_logs_days: "7"
mysqlConf: {}

resources:
requests:
cpu: 100m
memory: 256Mi
limits:
cpu: 500m
memory: 1Gi

xenonOpts:
image: radondb/xenon:1.1.5-alpha
admitDefeatHearbeatCount: 5
electionTimeout: 10000

resources:
requests:
cpu: 50m
memory: 128Mi
limits:
cpu: 100m
memory: 256Mi

metricsOpts:
enabled: false
image: prom/mysqld-exporter:v0.12.1

resources:
requests:
cpu: 10m
memory: 32Mi
limits:
cpu: 100m
memory: 128Mi

podPolicy:
imagePullPolicy: IfNotPresent
sidecarImage: radondb/mysql-sidecar:latest
busyboxImage: busybox:1.32

slowLogTail: false
auditLogTail: false

labels: {}
annotations: {}
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: mysql.radondb.com/cluster
operator: In
values:
- sample
topologyKey: "kubernetes.io/hostname"
priorityClassName: ""
tolerations: []
schedulerName: ""
# extraResources defines quotas for containers other than mysql or xenon.
extraResources:
requests:
cpu: 10m
memory: 32Mi

persistence:
enabled: true
accessModes:
- ReadWriteOnce
#storageClass: ""
size: 20Gi

0 comments on commit 7aa9215

Please sign in to comment.