# Source: lighthouse/templates/webhooks-deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: lighthouse-webhooks
  labels:
    chart: "lighthouse-1.0.25"
    app: lighthouse-webhooks
    git.jenkins-x.io/sha: annotate
    gitops.jenkins-x.io/pipeline: 'namespaces'
  annotations:
    checksum/config: 112ce4e08858b39cd575b4c6738da8b75ff64a8b8e4a8c4499b694181464d329
    wave.pusher.com/update-on-config-change: 'true'
  namespace: jx
spec:
  replicas: 1
  selector:
    matchLabels:
      app: lighthouse-webhooks
  template:
    metadata:
      labels:
        app: lighthouse-webhooks
      annotations:
        prometheus.io/port: "2112"
        prometheus.io/scrape: "true"
        jenkins-x.io/hash: '14dd9c4eb855703fb80b153e067aec668fb8d75f65f35f0d747de99c5f353007'
    spec:
      serviceAccountName: lighthouse-webhooks
      containers:
        - name: lighthouse-webhooks
          image: gcr.io/jenkinsxio/lighthouse-webhooks:1.0.25
          imagePullPolicy: IfNotPresent
          args:
            - "--namespace=jx"
          env:
            - name: "GIT_KIND"
              value: "github"
            - name: "LH_CUSTOM_TRIGGER_COMMAND"
              value: "jx"
            - name: "GIT_SERVER"
              value: "https://github.com"
            - name: "GIT_USER"
              value: martin-noretoft
            - name: "GIT_TOKEN"
              valueFrom:
                secretKeyRef:
                  name: lighthouse-oauth-token
                  key: oauth
            - name: "HMAC_TOKEN"
              valueFrom:
                secretKeyRef:
                  name: "lighthouse-hmac-token"
                  key: hmac
                  optional: false
            - name: "JX_LOG_FORMAT"
              value: "json"
            - name: "LOGRUS_FORMAT"
              value: "json"
            - name: DEFAULT_PIPELINE_RUN_SERVICE_ACCOUNT
              value: "tekton-bot"
            - name: DEFAULT_PIPELINE_RUN_TIMEOUT
              value: "2h0m0s"
            - name: FILE_BROWSER
              value: "git"
            - name: JX_DEFAULT_IMAGE
              value: "gcr.io/jenkinsxio/builder-maven:2.1.142-761"
            - name: LIGHTHOUSE_DASHBOARD_TEMPLATE
              value: "namespaces/{{ .Namespace }}/pipelineruns/{{ .PipelineRun }}"
            - name: LIGHTHOUSE_VERSIONSTREAM_JENKINS_X_JX3_PIPELINE_CATALOG
              value: "57c4224e06c8bea016edc4b7ea97829017d5d130"
          ports:
            - containerPort: 8080
          livenessProbe:
            httpGet:
              path: /
              port: 8080
            initialDelaySeconds: 60
            periodSeconds: 10
            successThreshold: 1
            timeoutSeconds: 1
          readinessProbe:
            httpGet:
              path: /
              port: 8080
            periodSeconds: 10
            successThreshold: 1
            timeoutSeconds: 1
          resources:
            limits:
              cpu: 100m
              memory: 512Mi
            requests:
              cpu: 80m
              memory: 128Mi
      terminationGracePeriodSeconds: 180
