apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: hrm-go-graphql
  name: hrm-go-graphql
spec:
  progressDeadlineSeconds: 600
  replicas: 1
  revisionHistoryLimit: 10
  selector:
    matchLabels:
      app: hrm-go-graphql
  strategy:
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 0
    type: RollingUpdate
  template:
    metadata:
      labels:
        app: hrm-go-graphql
    spec:
      containers:
      - env:
        - name: HRM_GRPC_URL
          value: "hrm-api:81"
        image: aodpi/hrm-go-graphql:latest
        imagePullPolicy: IfNotPresent
        name: hrm-go-graphql
        ports:
        - containerPort: 4000
          name: http
          protocol: TCP
        resources:
          requests:
            memory: 250M
            cpu: 100m
          limits:
            memory: 500M
            cpu: 250m
        readinessProbe:
            httpGet:
              path: /health
              port: http
              scheme: HTTP
            initialDelaySeconds: 10
            timeoutSeconds: 1
            periodSeconds: 60
            successThreshold: 1
            failureThreshold: 3
        securityContext:
          allowPrivilegeEscalation: false
          capabilities: {}
          privileged: false
          readOnlyRootFilesystem: false
          runAsNonRoot: false
        stdin: true
        terminationMessagePath: /dev/termination-log
        terminationMessagePolicy: File
        tty: true
      dnsPolicy: ClusterFirst
      imagePullSecrets:
      - name: regcred
      securityContext: {}
      terminationGracePeriodSeconds: 30
