# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "honoree.fullname" . }}-honoree
  labels:
  {{- include "honoree.labels" . | nindent 4 }}
data:
  CARP_CARABAO_GRADUATION: {{ .Values.honoree.carpCarabaoGraduation | quote }}
  ENVIOUS: {{ .Values.honoree.envious | quote }}
  FENNEL: {{ .Values.honoree.fennel | quote }}
  GOODIE_COUNCILPERSON_LATITUDE: {{ .Values.honoree.goodieCouncilpersonLatitude |
    quote }}
  NETWORKING_COMPLETION: {{ .Values.honoree.networkingCompletion | quote }}
  OPHTHALMOLOGIST: {{ .Values.honoree.ophthalmologist | quote }}
  OX_AGENT_TUBE: {{ .Values.honoree.oxAgentTube | quote }}
  RABBI_SHERBET: {{ .Values.honoree.rabbiSherbet | quote }}
  SEAT_FANG_DRUMMER: {{ .Values.honoree.seatFangDrummer | quote }}
  SHOEHORN: {{ .Values.honoree.shoehorn | quote }}
  TRAVELER: {{ .Values.honoree.traveler | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "honoree.fullname" . }}-honoree
  labels:
  {{- include "honoree.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: honoree
spec:
  replicas: {{ .Values.honoree.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: honoree
      app.kubernetes.io/name: battery
    {{- include "honoree.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: honoree
        app.kubernetes.io/name: battery
      {{- include "honoree.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 49378f2a2c69cd1165de75b4fb2c6759997ff4cf5f7d63eafdb7549ea0a674b9
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "honoree.fullname" . }}-honoree
        image: {{ .Values.honoree.honoree.image.repository }}:{{ .Values.honoree.honoree.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.honoree.honoree.imagePullPolicy }}
        name: honoree
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.honoree.honoree.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.honoree.honoree.containerSecurityContext |
          nindent 10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "honoree.fullname" . }}-honoree
  labels:
  {{- include "honoree.labels" . | nindent 4 }}
spec:
  type: {{ .Values.honoree.type }}
  selector:
    app.kubernetes.io/instance: honoree
    app.kubernetes.io/name: battery
  {{- include "honoree.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.honoree.ports | toYaml | nindent 2 -}}
honoree:
  carpCarabaoGraduation: reply
  envious: trinket
  fennel: executor
  goodieCouncilpersonLatitude: dress
  honoree:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  networkingCompletion: kneejerk
  ophthalmologist: performance
  oxAgentTube: raincoat
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  rabbiSherbet: hops
  replicas: 1
  seatFangDrummer: swift
  shoehorn: archer
  traveler: door
  type: ClusterIP
kubernetesClusterDomain: cluster.local
