cluster

Infrastructure files for Nordgedanken and Midnightthoughts.
git clone git://archive.git.mtrnord.blog/MTRNord/cluster.git
Log | Files | Refs | README

mariadb.yaml (1505B)


      1 apiVersion: k8s.mariadb.com/v1alpha1
      2 kind: MariaDB
      3 metadata:
      4   name: mediawiki-db
      5   namespace: mediawiki
      6 spec:
      7   maxScaleRef:
      8     name: mediawiki-maxscale
      9   rootPasswordSecretKeyRef:
     10     name: mediawiki-cred
     11     key: admin-password
     12   database: mediawiki
     13   username: mediawiki
     14   passwordSecretKeyRef:
     15     name: mediawiki-cred
     16     key: password
     17   image: "docker.io/library/mariadb:12.2"
     18   replicas: 3
     19   replication:
     20     enabled: true
     21     semiSyncEnabled: false
     22   updateStrategy:
     23     type: RollingUpdate
     24     rollingUpdate:
     25       maxUnavailable: 1
     26   podDisruptionBudget:
     27     maxUnavailable: 1
     28   affinity:
     29     antiAffinityEnabled: true
     30   storage:
     31     size: 2Gi
     32     storageClassName: longhorn
     33   myCnf: |
     34     [mariadb]
     35     bind-address=*
     36     default_storage_engine=InnoDB
     37     innodb_buffer_pool_size=128M
     38     max_allowed_packet=64M
     39     max_connections=50
     40     skip_name_resolve=ON
     41     slow_query_log=ON
     42     long_query_time=1
     43   livenessProbe:
     44     periodSeconds: 10
     45     timeoutSeconds: 10
     46   readinessProbe:
     47     periodSeconds: 10
     48     timeoutSeconds: 10
     49   startupProbe:
     50     failureThreshold: 30
     51     periodSeconds: 10
     52     timeoutSeconds: 10
     53   resources:
     54     requests:
     55       memory: 512Mi
     56       cpu: 100m
     57     limits:
     58       memory: 1Gi
     59       cpu: 400m
     60 ---
     61 apiVersion: k8s.mariadb.com/v1alpha1
     62 kind: MaxScale
     63 metadata:
     64   name: mediawiki-maxscale
     65   namespace: mediawiki
     66 spec:
     67   replicas: 2
     68   mariaDbRef:
     69     name: mediawiki-db
     70   resources:
     71     requests:
     72       cpu: 100m
     73       memory: 128Mi
     74     limits:
     75       memory: 512Mi