---
kind: Deployment
apiVersion: apps/v1
metadata:
  name: graphql
spec:
  selector:
    matchLabels:
      app: graphql
  template:
    metadata:
      labels:
        app: graphql
      # annotations:
      #   prometheus.io/scrape: "true"
      #   prometheus.io/path: /metrics
      #   prometheus.io/port: "5050"
    spec:
      securityContext:
        fsGroup: 1000
      containers:
        - name: graphql
          image: shokohsc/moleculer-ouistity
          securityContext:
            runAsUser: 1000
            runAsGroup: 1000
          env:
            - name: APP_NATS_HOSTNAME
              value: nats
            - name: APP_RETHINKDB_HOSTNAME
              value: rethinkdb
          args:
            - services/graphql-gateway.service.js
          ports:
            - name: http
              containerPort: 7000
              protocol: TCP
          # livenessProbe:
          #   httpGet:
          #     port: http
          #     path: /
          # readinessProbe:
          #   httpGet:
          #     port: http
          #     path: /
