# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "ethyl.fullname" . }}-ethyl
  labels:
  {{- include "ethyl.labels" . | nindent 4 }}
data:
  ANALOGY: {{ .Values.ethyl.analogy | quote }}
  COEVOLUTION_SUSPECT_SMITE: {{ .Values.ethyl.coevolutionSuspectSmite | quote }}
  FELLOW_PLEA: {{ .Values.ethyl.fellowPlea | quote }}
  FOLLOW_GREED_REJECT: {{ .Values.ethyl.followGreedReject | quote }}
  HELO_SPEED: {{ .Values.ethyl.heloSpeed | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "ethyl.fullname" . }}-ethyl
  labels:
  {{- include "ethyl.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: ethyl
spec:
  replicas: {{ .Values.ethyl.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: ethyl
      app.kubernetes.io/name: dedication
    {{- include "ethyl.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: ethyl
        app.kubernetes.io/name: dedication
      {{- include "ethyl.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 2647cfd354fbfda1495a148dcf4081f494bb75248b328182394541cf4135ebb8
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "ethyl.fullname" . }}-ethyl
        image: {{ .Values.ethyl.ethyl.image.repository }}:{{ .Values.ethyl.ethyl.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.ethyl.ethyl.imagePullPolicy }}
        name: ethyl
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.ethyl.ethyl.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.ethyl.ethyl.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "ethyl.fullname" . }}-ethyl
  labels:
  {{- include "ethyl.labels" . | nindent 4 }}
spec:
  type: {{ .Values.ethyl.type }}
  selector:
    app.kubernetes.io/instance: ethyl
    app.kubernetes.io/name: dedication
  {{- include "ethyl.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.ethyl.ports | toYaml | nindent 2 -}}
ethyl:
  analogy: top-hat
  coevolutionSuspectSmite: weight
  ethyl:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  fellowPlea: harvest
  followGreedReject: pathogenesis
  heloSpeed: grandfather
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  type: ClusterIP
kubernetesClusterDomain: cluster.local
