apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: smart-power-ui
    component: $APP_SENVICE_NAME
    tier: backend
  name: $APP_SENVICE_NAME
  namespace: $APP_NAME_SPACE
spec:
  progressDeadlineSeconds: 600
  replicas: 1
  selector:
    matchLabels:
      app: smart-power-ui
      component: $APP_SENVICE_NAME
      tier: backend
  template:
    metadata:
      labels:
        app: smart-power-ui
        component: $APP_SENVICE_NAME
        tier: backend
    spec:
      containers:
        - image: $REGISTRY_histron/$DOCKERHUB_NAMESPACE_histron/$APP_NAME_histron:$BRANCH_NAME-$BUILD_NUMBER
          imagePullPolicy: Always
          name: $APP_SENVICE_NAME
          ports:
            - name: http-80
              containerPort: 80
              protocol: TCP
          terminationMessagePath: /dev/termination-log
          terminationMessagePolicy: File
      imagePullSecrets:
        - name: histron
      dnsPolicy: ClusterFirst
      restartPolicy: Always
      terminationGracePeriodSeconds: 30
