github.com/pingcap/tiflow@v0.0.0-20240520035814-5bf52d54e205/dm/chaos/manifests/sources.yaml (about)

     1  apiVersion: v1
     2  kind: Service
     3  metadata:
     4    name: sources
     5    labels:
     6      app: sources
     7  spec:
     8    ports:
     9      - name: mysql57
    10        port: 3306
    11        targetPort: 3306
    12      - name: mysql8
    13        port: 3307
    14        targetPort: 3306
    15      - name: mariadb
    16        port: 3308
    17        targetPort: 3306
    18    selector:
    19      app: sources
    20  
    21  ---
    22  apiVersion: apps/v1
    23  kind: StatefulSet
    24  metadata:
    25    name: mysql57
    26    labels:
    27      app: sources
    28  spec:
    29    selector:
    30      matchLabels:
    31        app: sources
    32    serviceName: sources
    33    replicas: 1
    34    podManagementPolicy: Parallel
    35    template:
    36      metadata:
    37        labels:
    38          app: sources
    39      spec:
    40        containers:
    41          - name: mysql57
    42            image: mysql:5.7
    43            imagePullPolicy: IfNotPresent
    44            volumeMounts:
    45              - mountPath: "/var/lib/mysql"
    46                name: mysql57
    47            env:
    48              - name: MYSQL_ALLOW_EMPTY_PASSWORD
    49                value: "true"
    50            ports:
    51              - containerPort: 3306
    52                name: mysql57
    53            args:
    54              - "--server-id=1"
    55              - "--log-bin=/var/lib/mysql/mysql-bin"
    56              - "--enforce-gtid-consistency=ON"
    57              - "--gtid-mode=ON"
    58              - "--binlog-format=ROW"
    59    volumeClaimTemplates:
    60      - metadata:
    61          name: mysql57
    62        spec:
    63          accessModes:
    64            - ReadWriteOnce
    65          resources:
    66            requests:
    67              storage: 5Gi
    68  
    69  ---
    70  apiVersion: apps/v1
    71  kind: StatefulSet
    72  metadata:
    73    name: mysql8
    74    labels:
    75      app: sources
    76  spec:
    77    selector:
    78      matchLabels:
    79        app: sources
    80    serviceName: sources
    81    replicas: 1
    82    podManagementPolicy: Parallel
    83    template:
    84      metadata:
    85        labels:
    86          app: sources
    87      spec:
    88        containers:
    89          - name: mysql8
    90            image: mysql:latest
    91            imagePullPolicy: IfNotPresent
    92            volumeMounts:
    93              - mountPath: "/var/lib/mysql"
    94                name: mysql8
    95            env:
    96              - name: MYSQL_ALLOW_EMPTY_PASSWORD
    97                value: "true"
    98            ports:
    99              - containerPort: 3306
   100                name: mysql8
   101            args:
   102              - "--server-id=1"
   103              - "--log-bin=/var/lib/mysql/mysql-bin"
   104              - "--enforce-gtid-consistency=ON"
   105              - "--gtid-mode=ON"
   106              - "--binlog-format=ROW"
   107    volumeClaimTemplates:
   108      - metadata:
   109          name: mysql8
   110        spec:
   111          accessModes:
   112            - ReadWriteOnce
   113          resources:
   114            requests:
   115              storage: 5Gi
   116  
   117  ---
   118  apiVersion: apps/v1
   119  kind: StatefulSet
   120  metadata:
   121    name: mariadb
   122    labels:
   123      app: sources
   124  spec:
   125    selector:
   126      matchLabels:
   127        app: sources
   128    serviceName: sources
   129    replicas: 1
   130    podManagementPolicy: Parallel
   131    template:
   132      metadata:
   133        labels:
   134          app: sources
   135      spec:
   136        containers:
   137          - name: mariadb
   138            image: mariadb:latest
   139            imagePullPolicy: IfNotPresent
   140            volumeMounts:
   141              - mountPath: "/var/lib/mysql"
   142                name: mariadb
   143            env:
   144              - name: MYSQL_ALLOW_EMPTY_PASSWORD
   145                value: "true"
   146            ports:
   147              - containerPort: 3306
   148                name: mariadb
   149            args:
   150              - "--log-bin=/var/lib/mysql/mysql-bin"
   151              - "--binlog-format=ROW"
   152              - "--explicit-defaults-for-timestamp=ON" # mariadb does not support setting it by session
   153    volumeClaimTemplates:
   154      - metadata:
   155          name: mariadb
   156        spec:
   157          accessModes:
   158            - ReadWriteOnce
   159          resources:
   160            requests:
   161              storage: 5Gi