# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "vulture.fullname" . }}-vulture
  labels:
  {{- include "vulture.labels" . | nindent 4 }}
data:
  BANQUETTE_TROUBLE: {{ .Values.vulture.banquetteTrouble | quote }}
  BRIBERY: {{ .Values.vulture.bribery | quote }}
  CARPET_INSPIRE: {{ .Values.vulture.carpetInspire | quote }}
  CLASSIC_MIGHT: {{ .Values.vulture.classicMight | quote }}
  EJECTOR_WHOLESALE_ROCKET-SHIP: {{ .Values.vulture.ejectorWholesaleRocketShip |
    quote }}
  FINGER: {{ .Values.vulture.finger | quote }}
  MAIDEN: {{ .Values.vulture.maiden | quote }}
  MESSENGER: {{ .Values.vulture.messenger | quote }}
  MIRACLE_TERRAPIN: {{ .Values.vulture.miracleTerrapin | quote }}
  PAST: {{ .Values.vulture.past | quote }}
  VERDANT_QUINOA: {{ .Values.vulture.verdantQuinoa | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "vulture.fullname" . }}-vulture
  labels:
  {{- include "vulture.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: vulture
spec:
  replicas: {{ .Values.vulture.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: vulture
      app.kubernetes.io/name: underwear
    {{- include "vulture.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: vulture
        app.kubernetes.io/name: underwear
      {{- include "vulture.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 71d817aaa571bb229d046e0e26321cc597adb2d5ceb3152f9f33892481f0fe92
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "vulture.fullname" . }}-vulture
        image: {{ .Values.vulture.vulture.image.repository }}:{{ .Values.vulture.vulture.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.vulture.vulture.imagePullPolicy }}
        name: vulture
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.vulture.vulture.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.vulture.vulture.containerSecurityContext |
          nindent 10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "vulture.fullname" . }}-vulture
  labels:
  {{- include "vulture.labels" . | nindent 4 }}
spec:
  type: {{ .Values.vulture.type }}
  selector:
    app.kubernetes.io/instance: vulture
    app.kubernetes.io/name: underwear
  {{- include "vulture.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.vulture.ports | toYaml | nindent 2 -}}
kubernetesClusterDomain: cluster.local
vulture:
  banquetteTrouble: therapeutic
  bribery: announce
  carpetInspire: tube
  classicMight: pet
  ejectorWholesaleRocketShip: plight
  finger: grab-bag
  maiden: rejoice
  messenger: department
  miracleTerrapin: billowy
  past: urge
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  type: ClusterIP
  verdantQuinoa: work
  vulture:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
