github.com/percona/percona-xtradb-cluster-operator@v1.14.0/e2e-tests/monitoring-2-0/compare/statefulset_monitoring-pxc-oc.yml (about)

     1  apiVersion: apps/v1
     2  kind: StatefulSet
     3  metadata:
     4    generation: 3
     5    name: monitoring-pxc
     6    ownerReferences:
     7      - controller: true
     8        kind: PerconaXtraDBCluster
     9        name: monitoring
    10  spec:
    11    podManagementPolicy: OrderedReady
    12    replicas: 3
    13    revisionHistoryLimit: 10
    14    selector:
    15      matchLabels:
    16        app.kubernetes.io/component: pxc
    17        app.kubernetes.io/instance: monitoring
    18        app.kubernetes.io/managed-by: percona-xtradb-cluster-operator
    19        app.kubernetes.io/name: percona-xtradb-cluster
    20        app.kubernetes.io/part-of: percona-xtradb-cluster
    21    serviceName: monitoring-pxc
    22    template:
    23      metadata:
    24        labels:
    25          app.kubernetes.io/component: pxc
    26          app.kubernetes.io/instance: monitoring
    27          app.kubernetes.io/managed-by: percona-xtradb-cluster-operator
    28          app.kubernetes.io/name: percona-xtradb-cluster
    29          app.kubernetes.io/part-of: percona-xtradb-cluster
    30      spec:
    31        containers:
    32          - env:
    33              - name: PMM_SERVER
    34                value: monitoring-service
    35              - name: PMM_USER
    36                value: api_key
    37              - name: PMM_PASSWORD
    38                valueFrom:
    39                  secretKeyRef:
    40                    key: pmmserverkey
    41                    name: internal-monitoring
    42              - name: CLIENT_PORT_LISTEN
    43                value: "7777"
    44              - name: CLIENT_PORT_MIN
    45                value: "30100"
    46              - name: CLIENT_PORT_MAX
    47                value: "30105"
    48              - name: POD_NAME
    49                valueFrom:
    50                  fieldRef:
    51                    apiVersion: v1
    52                    fieldPath: metadata.name
    53              - name: POD_NAMESPASE
    54                valueFrom:
    55                  fieldRef:
    56                    apiVersion: v1
    57                    fieldPath: metadata.namespace
    58              - name: PMM_AGENT_SERVER_ADDRESS
    59                value: monitoring-service
    60              - name: PMM_AGENT_SERVER_USERNAME
    61                value: api_key
    62              - name: PMM_AGENT_SERVER_PASSWORD
    63                valueFrom:
    64                  secretKeyRef:
    65                    key: pmmserverkey
    66                    name: internal-monitoring
    67              - name: PMM_AGENT_LISTEN_PORT
    68                value: "7777"
    69              - name: PMM_AGENT_PORTS_MIN
    70                value: "30100"
    71              - name: PMM_AGENT_PORTS_MAX
    72                value: "30105"
    73              - name: PMM_AGENT_CONFIG_FILE
    74                value: /usr/local/percona/pmm2/config/pmm-agent.yaml
    75              - name: PMM_AGENT_SERVER_INSECURE_TLS
    76                value: "1"
    77              - name: PMM_AGENT_LISTEN_ADDRESS
    78                value: 0.0.0.0
    79              - name: PMM_AGENT_SETUP_METRICS_MODE
    80                value: push
    81              - name: PMM_AGENT_SETUP
    82                value: "1"
    83              - name: PMM_AGENT_SETUP_FORCE
    84                value: "1"
    85              - name: PMM_AGENT_SETUP_NODE_TYPE
    86                value: container
    87              - name: PMM_AGENT_SETUP_NODE_NAME
    88                value: $(PMM_PREFIX)$(POD_NAMESPASE)-$(POD_NAME)
    89              - name: DB_TYPE
    90                value: mysql
    91              - name: DB_USER
    92                value: monitor
    93              - name: DB_PASSWORD
    94                valueFrom:
    95                  secretKeyRef:
    96                    key: monitor
    97                    name: internal-monitoring
    98              - name: DB_ARGS
    99                value: --query-source=perfschema
   100              - name: DB_CLUSTER
   101                value: pxc
   102              - name: DB_HOST
   103                value: localhost
   104              - name: DB_PORT
   105                value: "33062"
   106              - name: CLUSTER_NAME
   107                value: monitoring
   108              - name: PMM_ADMIN_CUSTOM_PARAMS
   109                value: --disable-tablestats-limit=2000
   110              - name: PMM_AGENT_PRERUN_SCRIPT
   111                value: /var/lib/mysql/pmm-prerun.sh
   112              - name: PMM_AGENT_SIDECAR
   113                value: "true"
   114              - name: PMM_AGENT_SIDECAR_SLEEP
   115                value: "5"
   116              - name: PMM_AGENT_PATHS_TEMPDIR
   117                value: /tmp
   118            envFrom:
   119              - secretRef:
   120                  name: my-env-var-secrets
   121                  optional: true
   122            imagePullPolicy: Always
   123            lifecycle:
   124              preStop:
   125                exec:
   126                  command:
   127                    - bash
   128                    - -c
   129                    - pmm-admin unregister --force
   130            livenessProbe:
   131              failureThreshold: 3
   132              httpGet:
   133                path: /local/Status
   134                port: 7777
   135                scheme: HTTP
   136              initialDelaySeconds: 60
   137              periodSeconds: 10
   138              successThreshold: 1
   139              timeoutSeconds: 5
   140            name: pmm-client
   141            ports:
   142              - containerPort: 7777
   143                protocol: TCP
   144              - containerPort: 30100
   145                protocol: TCP
   146              - containerPort: 30101
   147                protocol: TCP
   148              - containerPort: 30102
   149                protocol: TCP
   150              - containerPort: 30103
   151                protocol: TCP
   152              - containerPort: 30104
   153                protocol: TCP
   154              - containerPort: 30105
   155                protocol: TCP
   156            resources:
   157              limits:
   158                cpu: "1"
   159                memory: 1G
   160              requests:
   161                cpu: 308m
   162                memory: 508M
   163            terminationMessagePath: /dev/termination-log
   164            terminationMessagePolicy: File
   165            volumeMounts:
   166              - mountPath: /var/lib/mysql
   167                name: datadir
   168          - args:
   169              - mysqld
   170            command:
   171              - /var/lib/mysql/pxc-entrypoint.sh
   172            env:
   173              - name: PXC_SERVICE
   174                value: monitoring-pxc-unready
   175              - name: MONITOR_HOST
   176                value: '%'
   177              - name: MYSQL_ROOT_PASSWORD
   178                valueFrom:
   179                  secretKeyRef:
   180                    key: root
   181                    name: internal-monitoring
   182              - name: XTRABACKUP_PASSWORD
   183                valueFrom:
   184                  secretKeyRef:
   185                    key: xtrabackup
   186                    name: internal-monitoring
   187              - name: MONITOR_PASSWORD
   188                valueFrom:
   189                  secretKeyRef:
   190                    key: monitor
   191                    name: internal-monitoring
   192              - name: OPERATOR_ADMIN_PASSWORD
   193                valueFrom:
   194                  secretKeyRef:
   195                    key: operator
   196                    name: internal-monitoring
   197              - name: LIVENESS_CHECK_TIMEOUT
   198                value: "5"
   199              - name: READINESS_CHECK_TIMEOUT
   200                value: "15"
   201              - name: DEFAULT_AUTHENTICATION_PLUGIN
   202                value: caching_sha2_password
   203            envFrom:
   204              - secretRef:
   205                  name: my-env-var-secrets
   206                  optional: true
   207            imagePullPolicy: Always
   208            livenessProbe:
   209              exec:
   210                command:
   211                  - /var/lib/mysql/liveness-check.sh
   212              failureThreshold: 3
   213              initialDelaySeconds: 300
   214              periodSeconds: 10
   215              successThreshold: 1
   216              timeoutSeconds: 5
   217            name: pxc
   218            ports:
   219              - containerPort: 3306
   220                name: mysql
   221                protocol: TCP
   222              - containerPort: 4444
   223                name: sst
   224                protocol: TCP
   225              - containerPort: 4567
   226                name: write-set
   227                protocol: TCP
   228              - containerPort: 4568
   229                name: ist
   230                protocol: TCP
   231              - containerPort: 33062
   232                name: mysql-admin
   233                protocol: TCP
   234              - containerPort: 33060
   235                name: mysqlx
   236                protocol: TCP
   237            readinessProbe:
   238              exec:
   239                command:
   240                  - /var/lib/mysql/readiness-check.sh
   241              failureThreshold: 5
   242              initialDelaySeconds: 15
   243              periodSeconds: 30
   244              successThreshold: 1
   245              timeoutSeconds: 15
   246            resources:
   247              requests:
   248                cpu: 300m
   249                memory: 500M
   250            terminationMessagePath: /dev/termination-log
   251            terminationMessagePolicy: File
   252            volumeMounts:
   253              - mountPath: /var/lib/mysql
   254                name: datadir
   255              - mountPath: /etc/percona-xtradb-cluster.conf.d
   256                name: config
   257              - mountPath: /tmp
   258                name: tmp
   259              - mountPath: /etc/mysql/ssl
   260                name: ssl
   261              - mountPath: /etc/mysql/ssl-internal
   262                name: ssl-internal
   263              - mountPath: /etc/mysql/mysql-users-secret
   264                name: mysql-users-secret-file
   265              - mountPath: /etc/my.cnf.d
   266                name: auto-config
   267              - mountPath: /etc/mysql/vault-keyring-secret
   268                name: vault-keyring-secret
   269              - mountPath: /etc/mysql/init-file
   270                name: mysql-init-file
   271        dnsPolicy: ClusterFirst
   272        initContainers:
   273          - command:
   274              - /pxc-init-entrypoint.sh
   275            imagePullPolicy: Always
   276            name: pxc-init
   277            resources:
   278              limits:
   279                cpu: 50m
   280                memory: 50M
   281            terminationMessagePath: /dev/termination-log
   282            terminationMessagePolicy: File
   283            volumeMounts:
   284              - mountPath: /var/lib/mysql
   285                name: datadir
   286        restartPolicy: Always
   287        schedulerName: default-scheduler
   288        securityContext:
   289          supplementalGroups:
   290            - 1001
   291        serviceAccount: default
   292        serviceAccountName: default
   293        terminationGracePeriodSeconds: 600
   294        volumes:
   295          - emptyDir: {}
   296            name: tmp
   297          - configMap:
   298              defaultMode: 420
   299              name: monitoring-pxc
   300              optional: true
   301            name: config
   302          - name: ssl-internal
   303            secret:
   304              defaultMode: 420
   305              optional: true
   306              secretName: monitoring-ssl-internal
   307          - name: ssl
   308            secret:
   309              defaultMode: 420
   310              optional: false
   311              secretName: some-name-ssl
   312          - configMap:
   313              defaultMode: 420
   314              name: auto-monitoring-pxc
   315              optional: true
   316            name: auto-config
   317          - name: vault-keyring-secret
   318            secret:
   319              defaultMode: 420
   320              optional: true
   321              secretName: monitoring-vault
   322          - name: mysql-users-secret-file
   323            secret:
   324              defaultMode: 420
   325              optional: false
   326              secretName: internal-monitoring
   327          - name: mysql-init-file
   328            secret:
   329              defaultMode: 420
   330              optional: true
   331              secretName: monitoring-mysql-init
   332    updateStrategy:
   333      rollingUpdate:
   334        partition: 0
   335      type: RollingUpdate
   336    volumeClaimTemplates:
   337      - metadata:
   338          name: datadir
   339        spec:
   340          accessModes:
   341            - ReadWriteOnce
   342          resources:
   343            requests:
   344              storage: 2Gi
   345        status:
   346          phase: Pending