apiVersion: apps/v1
kind: Deployment
metadata:
  name: konga
  namespace: kong
  labels:
    app: konga
spec:
  replicas: 1
  selector:
    matchLabels:
      app: konga
  template:
    metadata:
      labels:
        name: konga
        app: konga
      #annotations:
        #disable istio sidecar injection
        #sidecar.istio.io/inject: "false"
        #scheduler.alpha.kubernetes.io/critical-pod=""
    spec:
      containers:
      - name: konga
        #image: slpcat/konga
        image: pantsel/konga:0.14.9
        imagePullPolicy: Always
        env:
        - name: TOKEN_SECRET
          value: "somerandomstring"
        - name: KONGA_HOOK_TIMEOUT
          value: "120000"
        #'mongo','postgres','sqlserver',or'mysql'
        - name: DB_ADAPTER
          value: "mysql"
        - name: DB_HOST
          value: "mysql-server"
        - name: DB_PORT
          value: "3306"
        - name: DB_USER
          value: "root"
        - name: DB_PASSWORD
          value: "root_password"
        #Defaults to 'konga_database'
        - name: DB_DATABASE
          value: "konga_database"
        #- name: DB_PG_SCHEMA
        #  value: "schema"
        #'production' or 'development' | defaults to 'development'
        - name: NODE_ENV
          value: "development"
        - name: KONGA_LOG_LEVEL
          value: "info"
        #- name: BASE_URL
        #  value: "www.example.com/konga"
        resources:
          requests:
            cpu: 100m
            memory: 128Mi
          limits:
            cpu: "2"
            memory: 4Gi
        ports:
          - name: web
            containerPort: 1337
