kind: ControllerRevision
apiVersion: apps/v1
metadata:
    name: kubevious-mysql-57bbf8c47b
    namespace: kubevious
    selfLink: >-
        /apis/apps/v1/namespaces/kubevious/controllerrevisions/kubevious-mysql-57bbf8c47b
    uid: e1fcc8da-6e4b-4466-b160-bac2ea363fe8
    resourceVersion: '140050397'
    creationTimestamp: '2020-11-25T08:32:24Z'
    labels:
        app.kubernetes.io/component: kubevious-mysql
        app.kubernetes.io/instance: kubevious
        app.kubernetes.io/managed-by: Helm
        app.kubernetes.io/name: kubevious
        app.kubernetes.io/version: 0.8.2
        controller.kubernetes.io/hash: 57bbf8c47b
        helm.sh/chart: kubevious-0.8.2
    annotations:
        meta.helm.sh/release-name: kubevious
        meta.helm.sh/release-namespace: kubevious
    ownerReferences:
        -
            apiVersion: apps/v1
            kind: StatefulSet
            name: kubevious-mysql
            uid: cd331f30-6015-4715-b64a-9998107c105a
            controller: true
            blockOwnerDeletion: true
data:
    spec:
        template:
            $patch: replace
            metadata:
                creationTimestamp: null
                labels:
                    app.kubernetes.io/component: kubevious-mysql
                    app.kubernetes.io/instance: kubevious
                    app.kubernetes.io/managed-by: Helm
                    app.kubernetes.io/name: kubevious
                    app.kubernetes.io/version: 0.8.2
                    helm.sh/chart: kubevious-0.8.2
            spec:
                containers:
                    -
                        env:
                            -
                                name: NODE_ENV
                                value: production
                            -
                                name: MYSQL_DATABASE
                                value: kubevious
                            -
                                name: MYSQL_USER
                                value: kubevious
                            -
                                name: MYSQL_PASSWORD
                                valueFrom:
                                    secretKeyRef:
                                        key: MYSQL_PASS
                                        name: kubevious-mysql-secret
                            -
                                name: MYSQL_ROOT_PASSWORD
                                valueFrom:
                                    secretKeyRef:
                                        key: MYSQL_ROOT_PASSWORD
                                        name: kubevious-mysql-secret-root
                        image: 'mysql:8.0.22'
                        imagePullPolicy: IfNotPresent
                        livenessProbe:
                            exec:
                                command:
                                    - mysqladmin
                                    - ping
                            failureThreshold: 3
                            initialDelaySeconds: 120
                            periodSeconds: 10
                            successThreshold: 1
                            timeoutSeconds: 5
                        name: mysql
                        ports:
                            -
                                containerPort: 3306
                                name: mysql
                                protocol: TCP
                        readinessProbe:
                            exec:
                                command:
                                    - bash
                                    - '-c'
                                    - >
                                        mysql -p$MYSQL_ROOT_PASSWORD -h
                                        127.0.0.1 -e 'SELECT 1'
                            failureThreshold: 3
                            initialDelaySeconds: 5
                            periodSeconds: 2
                            successThreshold: 1
                            timeoutSeconds: 1
                        resources:
                            requests:
                                cpu: 100m
                                memory: 200Mi
                        terminationMessagePath: /dev/termination-log
                        terminationMessagePolicy: File
                        volumeMounts:
                            -
                                mountPath: /var/lib/mysql
                                name: data
                                subPath: mysql
                            -
                                mountPath: /etc/mysql/conf.d
                                name: conf
                            -
                                mountPath: /docker-entrypoint-initdb.d
                                name: init-script
                dnsPolicy: ClusterFirst
                initContainers:
                    -
                        command:
                            - bash
                            - '-c'
                            - |
                                set -ex
                                echo "[mysqld]" > /mnt/conf.d/server-id.cnf
                                echo "server-id=1" >> /mnt/conf.d/server-id.cnf
                                cp /mnt/config-map/master.cnf /mnt/conf.d/
                        image: 'mysql:8.0.22'
                        imagePullPolicy: IfNotPresent
                        name: init-mysql
                        resources: {}
                        terminationMessagePath: /dev/termination-log
                        terminationMessagePolicy: File
                        volumeMounts:
                            -
                                mountPath: /mnt/conf.d
                                name: conf
                            -
                                mountPath: /mnt/config-map
                                name: config-map
                restartPolicy: Always
                schedulerName: default-scheduler
                securityContext: {}
                terminationGracePeriodSeconds: 30
                volumes:
                    -
                        emptyDir: {}
                        name: conf
                    -
                        configMap:
                            defaultMode: 420
                            name: kubevious-mysql-conf
                        name: config-map
                    -
                        configMap:
                            defaultMode: 420
                            name: kubevious-mysql-init-script
                        name: init-script
revision: 4

