apiVersion: apps/v1
kind: Deployment
metadata:
  annotations:
    deployment.kubernetes.io/revision: "1"
  generation: 2
  labels:
    olm.owner: postgresql-operator.v0.1.1
    olm.owner.kind: ClusterServiceVersion
    olm.owner.namespace: example-bank
  name: postgresql-operator
  namespace: example-bank
spec:
  progressDeadlineSeconds: 600
  replicas: 1
  revisionHistoryLimit: 10
  selector:
    matchLabels:
      name: postgresql-operator
  strategy:
    rollingUpdate:
      maxSurge: 25%
      maxUnavailable: 25%
    type: RollingUpdate
  template:
    metadata:
      annotations:
        alm-examples: |-
          [
            {
              "apiVersion": "postgresql.dev4devs.com/v1alpha1",
              "kind": "Database",
              "metadata": {
                "name": "database"
              },
              "spec": {
                "databaseCpu": "30m",
                "databaseCpuLimit": "60m",
                "databaseMemoryLimit": "512Mi",
                "databaseMemoryRequest": "128Mi",
                "databaseName": "example",
                "databaseNameKeyEnvVar": "POSTGRESQL_DATABASE",
                "databasePassword": "postgres",
                "databasePasswordKeyEnvVar": "POSTGRESQL_PASSWORD",
                "databaseStorageRequest": "1Gi",
                "databaseUser": "postgres",
                "databaseUserKeyEnvVar": "POSTGRESQL_USER",
                "image": "centos/postgresql-96-centos7",
                "size": 1
              }
            },
            {
              "apiVersion": "postgresql.dev4devs.com/v1alpha1",
              "kind": "Backup",
              "metadata": {
                "name": "backup"
              },
              "spec": {
                "awsAccessKeyId": "example-awsAccessKeyId",
                "awsS3BucketName": "example-awsS3BucketName",
                "awsSecretAccessKey": "example-awsSecretAccessKey",
                "schedule": "0 0 * * *"
              }
            }
          ]
        capabilities: Full Lifecycle
        categories: Database
        certified: "false"
        containerImage: quay.io/dev4devs-com/postgresql-operator:0.1.1
        createdAt: "2019-09-08T08:00:00Z"
        description: Operator in Go developed using the Operator Framework to package,
          install, configure and manage a PostgreSQL database. This project includes
          backup feature.
        olm.operatorGroup: example-bank-rgc7j
        olm.operatorNamespace: example-bank
        olm.targetNamespaces: example-bank
        repository: https://github.com/dev4devs-com/postgresql-operator
        support: Dev4Devs, Inc
      creationTimestamp: null
      labels:
        name: postgresql-operator
    spec:
      containers:
      - command:
        - postgresql-operator
        env:
        - name: WATCH_NAMESPACE
          valueFrom:
            fieldRef:
              apiVersion: v1
              fieldPath: metadata.annotations['olm.targetNamespaces']
        - name: POD_NAME
          valueFrom:
            fieldRef:
              apiVersion: v1
              fieldPath: metadata.name
        - name: OPERATOR_NAME
          value: postgresql-operator
        image: quay.io/dev4devs-com/postgresql-operator:0.1.1
        imagePullPolicy: Always
        name: postgresql-operator
        resources:
          limits:
            cpu: 60m
            memory: 128Mi
          requests:
            cpu: 30m
            memory: 64Mi
        terminationMessagePath: /dev/termination-log
        terminationMessagePolicy: File
      dnsPolicy: ClusterFirst
      restartPolicy: Always
      schedulerName: default-scheduler
      securityContext: {}
      serviceAccount: postgresql-operator
      serviceAccountName: postgresql-operator
      terminationGracePeriodSeconds: 30
