---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: jirabot
  namespace: demo
  annotations:
    fluxcd.io/automated: "true"
    fluxcd.io/tag.init: regex:^3.10.*
    fluxcd.io/tag.podinfod: semver:~3.1
spec:
  selector:
    matchLabels:
      app: jirabot
  template:
    metadata:
      labels:
        app: jirabot
    spec:
      containers:
      - name: jirabotd
        image: localhost:5000/tlnd-docker-dev/talend/management-console/tmc-qa/talend-slack-bots/jirabot:0.0.3
        imagePullPolicy: IfNotPresent
        ports:
        - name: http
          containerPort: 8080
          protocol: TCP
        env:
        - name: WELCOME_MESSAGE
          value: "From subfolder"
        - name: SLACK_BOT_TOKEN
          valueFrom:
            secretKeyRef:
              name: jira-to-slack
              key: slack-bot-token
        - name: MANAGED_PROJECTS
          value: "tpops,tpsvc"
        - name: TPOPS_INITIAL_USERSID_LIST
          value: "U01EXT4T5HA"
        - name: TPSVC_INITIAL_USERSID_LIST
          value: "U01EXT4T5HA"
# ---
# apiVersion: v1
# kind: Service
# metadata:
#   name: jirabot-lb
#   namespace: demo
# spec:
#   ports:
#   - port: 8080
#     protocol: TCP
#     targetPort: 8080
#   selector:
#     app: jirabot
#   sessionAffinity: None
#   type: LoadBalancer
