github.com/replicatedcom/ship@v0.50.0/integration/unfork/postgres/expected/base/statefulset.yaml (about)

     1  ---
     2  # Source: postgresql/templates/statefulset.yaml
     3  apiVersion: apps/v1beta2
     4  kind: StatefulSet
     5  metadata:
     6    name: postgres-postgresql
     7    labels:
     8      app: postgresql
     9      chart: postgresql-2.6.6
    10      release: "postgres"
    11      heritage: "Tiller"
    12  spec:
    13    serviceName: postgres-postgresql-headless
    14    replicas: 1
    15    updateStrategy:
    16      type: RollingUpdate
    17    selector:
    18      matchLabels:
    19        app: postgresql
    20        release: "postgres"
    21        role: master
    22    template:
    23      metadata:
    24        name: postgres-postgresql
    25        labels:
    26          app: postgresql
    27          chart: postgresql-2.6.6
    28          release: "postgres"
    29          heritage: "Tiller"
    30          role: master
    31      spec:
    32        securityContext:
    33          fsGroup: 1001
    34          runAsUser: 1001
    35        initContainers:
    36        - name: init-chmod-data
    37          image: docker.io/bitnami/minideb:latest
    38          imagePullPolicy: "Always"
    39          command:
    40            - sh
    41            - -c
    42            - |
    43              chown -R 1001:1001 /bitnami
    44              if [ -d /bitnami/postgresql/data ]; then
    45                chmod  0700 /bitnami/postgresql/data;
    46              fi
    47          securityContext:
    48            runAsUser: 0
    49          volumeMounts:
    50          - name: data
    51            mountPath: /bitnami/postgresql
    52        
    53        containers:
    54        - name: postgres-postgresql
    55          image: docker.io/bitnami/postgresql:10.6.0
    56          imagePullPolicy: "Always"
    57          resources:
    58            requests:
    59              cpu: 250m
    60              memory: 256Mi
    61            
    62          env:
    63          - name: POSTGRESQL_USERNAME
    64            value: "postgres"
    65          - name: POSTGRESQL_PASSWORD
    66            valueFrom:
    67              secretKeyRef:
    68                name: postgres-postgresql
    69                key: postgresql-password
    70          - name: POSTGRESQL_DATABASE
    71            value: "<nil>"
    72          - name: POD_IP
    73            valueFrom: { fieldRef: { fieldPath: status.podIP } }
    74          ports:
    75          - name: postgresql
    76            containerPort: 5432
    77          livenessProbe:
    78            exec:
    79              command:
    80              - sh
    81              - -c
    82              - exec pg_isready -U "postgres" --host $POD_IP
    83            initialDelaySeconds: 30
    84            periodSeconds: 10
    85            timeoutSeconds: 5
    86            successThreshold: 1
    87            failureThreshold: 6
    88          readinessProbe:
    89            exec:
    90              command:
    91              - sh
    92              - -c
    93              - exec pg_isready -U "postgres" --host $POD_IP
    94            initialDelaySeconds: 5
    95            periodSeconds: 10
    96            timeoutSeconds: 5
    97            successThreshold: 1
    98            failureThreshold: 6
    99          volumeMounts:
   100          - name: custom-init-scripts
   101            mountPath: /docker-entrypoint-initdb.d
   102          - name: data
   103            mountPath: /bitnami/postgresql
   104          
   105          
   106          
   107        volumes:
   108        
   109        - name: custom-init-scripts
   110          configMap:
   111            name: postgres-postgresql-init-scripts
   112    volumeClaimTemplates:
   113      - metadata:
   114          name: data
   115        spec:
   116          accessModes:
   117            - "ReadWriteOnce"
   118          resources:
   119            requests:
   120              storage: "8Gi"