apiVersion: apps/v1
kind: Deployment
metadata:
  annotations:
    app.openshift.io/vcs-uri: 'https://github.com/openshift-katacoda/blog-django-py.git'
    deployment.kubernetes.io/revision: '2'
    image.openshift.io/triggers: openshiftkatacoda/blog-django-py
    description: "Blog python"
    iconClass: "icon-python"
    tags: "python,blog"
  name: blog-django-py-git
  generation: 2
  namespace: fiap
  labels:
    app: blog-django-py-git
    runtime: python
    RM: 'RM340709_BLOG_APP'
    app.openshift.io/runtime-version: 3.8-ubi7
spec:
  replicas: 1
  selector:
    matchLabels:
      app: blog-django-py-git
  template:
    metadata:
      labels:
        app: blog-django-py-git
        deploymentconfig: blog-django-py-git
    spec:
      containers:
        - name: blog-django-py-git
          image: 'openshiftkatacoda/blog-django-py:latest'
          ports:
            - containerPort: 8080
              protocol: TCP
          resources: {}
          terminationMessagePath: /dev/termination-log
          terminationMessagePolicy: File
          imagePullPolicy: Always
          env:
            - name: BLOG_SITE_NAME
              value: RM 340709
            - name: BLOG_BANNER_COLOR
              value: BLUE
            - name: DATABASE_URL
              value: postgresql://blog:blog@database-blog:5432/blog 
      restartPolicy: Always
      terminationGracePeriodSeconds: 30
      dnsPolicy: ClusterFirst
      securityContext: {}
      schedulerName: default-scheduler