apiVersion: apps/v1
kind: Deployment
metadata:
  name: backstage
  labels:
    app: backstage
spec:
  strategy:
    type: Recreate
  replicas: 1
  selector:
    matchLabels:
      app: backstage
  template:
    metadata:
      labels:
        app: backstage
    spec:
      serviceAccountName: backstage
      containers:
        - name: backstage
          image: jsa4000/backstage:1.0.3
          imagePullPolicy: IfNotPresent
          ports:
            - containerPort: 7007
              name: http
              protocol: TCP
          livenessProbe:
            httpGet:
              path: /
              port: 7007
            initialDelaySeconds: 20
            timeoutSeconds: 3
            failureThreshold: 2
          readinessProbe:
            httpGet:
              path: /
              port: 7007 
            initialDelaySeconds: 20
            timeoutSeconds: 3
            failureThreshold: 2
          resources:
            limits:
              cpu: 100m
              memory: 128Mi
            requests:
              cpu: 100m
              memory: 128Mi
          volumeMounts:
            - name: backstage-config
              mountPath: /home/node/config
      volumes:
      - name: backstage-config
        configMap:
          name: backstage