apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: api
  name: api
spec:
  replicas: 1
  selector:
    matchLabels:
      app: api
  template:
    metadata:
      labels:
        app: api
    spec:
      containers:
        - image: gcr.io/bootiful/joshlong-com-api
          imagePullPolicy: Always
          name: api
          env:
            - name: BLOG_INDEX_REBUILD_KEY
              valueFrom:
                secretKeyRef:
                  name: joshlong-com-api-secrets
                  key: BLOG_INDEX_REBUILD_KEY
            - name: BLOG_RESET_ON_REBUILD
              value: "true"
            - name: BLOG_API_SERVER_URI
              value: "https://api.joshlong.com"
            - name: LANG
              value: "en_US.UTF-8"
          readinessProbe:
            httpGet:
              port: 8080
              path: /actuator/health/readiness
          livenessProbe:
            httpGet:
              port: 8080
              path: /actuator/health/liveness
          ports:
            - containerPort: 8080
          resources:
            limits:
              memory: "2Gi"
            requests:
              memory: "2Gi"