---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "hookshot.fullname" . }}
  namespace: {{ template "hookshot.namespace" . }}
  labels:
    {{- include "hookshot.labels" . | nindent 4 }}
spec:
  {{- if not .Values.autoscaling.enabled }}
  replicas: {{ .Values.replicaCount }}
  {{- end }}
  selector:
    matchLabels:
      {{- include "hookshot.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      {{- with .Values.podAnnotations }}
      annotations:
        {{- toYaml . | nindent 8 }}
      {{- end }}
      labels:
        {{- include "hookshot.selectorLabels" . | nindent 8 }}
    spec:
      {{- include "hookshot.pod" . | nindent 6 }}