---
apiVersion: v1
kind: List
items:
- apiVersion: v1
  kind: Service
  metadata:
    annotations:
      fabric8.io/git-commit: 8fa35330b15d9c9bba62dcd3fd1a43968c8bf7fb
      fabric8.io/git-branch: release-v4.0.88
      fabric8.io/scm-con-url: scm:git:git@github.com:fabric8io/fabric8-platform.git/apps/gitea-db
      fabric8.io/scm-devcon-url: scm:git:git@github.com:fabric8io/fabric8-platform.git/apps/gitea-db
      fabric8.io/scm-tag: app-console-2.0.1
      fabric8.io/scm-url: http://github.com/fabric8io/fabric8-platform/apps/gitea-db
    labels:
      service: gitea-db
      provider: fabric8
      project: gitea-db
      version: 4.0.88
      group: io.fabric8.platform.apps
    name: gitea-db
  spec:
    ports:
    - name: postgres
      port: 5432
      protocol: TCP
      targetPort: 5432
    selector:
      service: gitea-db
      project: gitea-db
      provider: fabric8
      group: io.fabric8.platform.apps
    type: ClusterIP
- apiVersion: v1
  kind: PersistentVolumeClaim
  metadata:
    labels:
      provider: fabric8
      project: gitea-db
      version: 4.0.88
      group: io.fabric8.platform.apps
    name: gitea-db-postgresql-data
  spec:
    accessModes:
    - ReadWriteOnce
    resources:
      requests:
        storage: 5Gi
- apiVersion: extensions/v1beta1
  kind: Deployment
  metadata:
    annotations:
      fabric8.io/git-commit: 8fa35330b15d9c9bba62dcd3fd1a43968c8bf7fb
      fabric8.io/metrics-path: dashboard/file/kubernetes-pods.json/?var-project=gitea-db&var-version=4.0.88
      fabric8.io/scm-con-url: scm:git:git@github.com:fabric8io/fabric8-platform.git/apps/gitea-db
      fabric8.io/scm-url: http://github.com/fabric8io/fabric8-platform/apps/gitea-db
      fabric8.io/git-branch: release-v4.0.88
      fabric8.io/scm-devcon-url: scm:git:git@github.com:fabric8io/fabric8-platform.git/apps/gitea-db
      fabric8.io/scm-tag: app-console-2.0.1
    labels:
      service: gitea-db
      provider: fabric8
      project: gitea-db
      version: 4.0.88
      group: io.fabric8.platform.apps
    name: gitea-db
  spec:
    replicas: 1
    selector:
      matchLabels:
        project: gitea-db
        provider: fabric8
        group: io.fabric8.platform.apps
    template:
      metadata:
        annotations:
          fabric8.io/git-commit: 8fa35330b15d9c9bba62dcd3fd1a43968c8bf7fb
          fabric8.io/metrics-path: dashboard/file/kubernetes-pods.json/?var-project=gitea-db&var-version=4.0.88
          fabric8.io/scm-con-url: scm:git:git@github.com:fabric8io/fabric8-platform.git/apps/gitea-db
          fabric8.io/scm-url: http://github.com/fabric8io/fabric8-platform/apps/gitea-db
          fabric8.io/git-branch: release-v4.0.88
          fabric8.io/scm-devcon-url: scm:git:git@github.com:fabric8io/fabric8-platform.git/apps/gitea-db
          fabric8.io/scm-tag: app-console-2.0.1
          pod.alpha.kubernetes.io/init-containers: '[{"image":"busybox","imagePullPolicy":"IfNotPresent","name":"fmp-volume-permission","command":["chmod","777","/var/lib/pgsql"],"volumeMounts":[{"mountPath":"/var/lib/pgsql","name":"gitea-db-postgresql-data"}]}]'
        labels:
          service: gitea-db
          provider: fabric8
          project: gitea-db
          version: 4.0.88
          group: io.fabric8.platform.apps
      spec:
        containers:
        - env:
          - name: POSTGRESQL_DATABASE
            value: gitea
          - name: POSTGRESQL_PASSWORD
            value: mmuser_password
          - name: POSTGRESQL_USER
            value: mmuser
          - name: POD_IP
            valueFrom:
              fieldRef:
                fieldPath: status.podIP
          image: registry.centos.org/postgresql/postgresql:9.6
          imagePullPolicy: IfNotPresent
          livenessProbe:
            exec:
              command:
              - sh
              - -c
              - exec pg_isready --host $POD_IP
            failureThreshold: 6
            initialDelaySeconds: 60
            timeoutSeconds: 5
          name: gitea-db
          ports:
          - containerPort: 5432
            name: postgresql
            protocol: TCP
          readinessProbe:
            exec:
              command:
              - sh
              - -c
              - exec pg_isready --host $POD_IP
            initialDelaySeconds: 5
            periodSeconds: 5
            timeoutSeconds: 3
          volumeMounts:
          - mountPath: /var/lib/pgsql
            name: gitea-db-postgresql-data
            readOnly: false
        volumes:
        - name: gitea-db-postgresql-data
          persistentVolumeClaim:
            claimName: gitea-db-postgresql-data
