# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "hire.fullname" . }}-hire
  labels:
  {{- include "hire.labels" . | nindent 4 }}
data:
  DIVER: {{ .Values.hire.diver | quote }}
  HOOK_REUNION: {{ .Values.hire.hookReunion | quote }}
  MIGHTY_HAPPINESS_RESPECT: {{ .Values.hire.mightyHappinessRespect | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "hire.fullname" . }}-hire
  labels:
  {{- include "hire.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: hire
spec:
  replicas: {{ .Values.hire.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: hire
      app.kubernetes.io/name: lunchmeat
    {{- include "hire.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: hire
        app.kubernetes.io/name: lunchmeat
      {{- include "hire.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 6587fe8d0d8179c41bdfd1634e06506f8e98ffbe7eeeee40c91c971e83d211de
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "hire.fullname" . }}-hire
        image: {{ .Values.hire.hire.image.repository }}:{{ .Values.hire.hire.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.hire.hire.imagePullPolicy }}
        name: hire
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.hire.hire.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.hire.hire.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "hire.fullname" . }}-hire
  labels:
  {{- include "hire.labels" . | nindent 4 }}
spec:
  type: {{ .Values.hire.type }}
  selector:
    app.kubernetes.io/instance: hire
    app.kubernetes.io/name: lunchmeat
  {{- include "hire.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.hire.ports | toYaml | nindent 2 -}}
hire:
  diver: codepage
  hire:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  hookReunion: sole
  mightyHappinessRespect: cyst
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  type: ClusterIP
kubernetesClusterDomain: cluster.local
