# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "odd.fullname" . }}-odd
  labels:
  {{- include "odd.labels" . | nindent 4 }}
data:
  BARTENDER_LIST_INCLUDE: {{ .Values.odd.bartenderListInclude | quote }}
  IGLOO: {{ .Values.odd.igloo | quote }}
  KUMQUAT_HARSH: {{ .Values.odd.kumquatHarsh | quote }}
  MISTAKE: {{ .Values.odd.mistake | quote }}
  MORSEL_CLAMP_CHARSET: {{ .Values.odd.morselClampCharset | quote }}
  PERSPECTIVE_UPLIFT_SAIL: {{ .Values.odd.perspectiveUpliftSail | quote }}
  PROPAGANDA_ALPENHORN: {{ .Values.odd.propagandaAlpenhorn | quote }}
  SCRAWNY: {{ .Values.odd.scrawny | quote }}
  TEMP_DEFENDER: {{ .Values.odd.tempDefender | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "odd.fullname" . }}-odd
  labels:
  {{- include "odd.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: odd
spec:
  replicas: {{ .Values.odd.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: odd
      app.kubernetes.io/name: premier
    {{- include "odd.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: odd
        app.kubernetes.io/name: premier
      {{- include "odd.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 14dc590715757c5e7f1e044af027661222d633006ffab460a6ffdb4712dbb59e
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "odd.fullname" . }}-odd
        image: {{ .Values.odd.odd.image.repository }}:{{ .Values.odd.odd.image.tag | default
          .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.odd.odd.imagePullPolicy }}
        name: odd
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.odd.odd.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.odd.odd.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "odd.fullname" . }}-odd
  labels:
  {{- include "odd.labels" . | nindent 4 }}
spec:
  type: {{ .Values.odd.type }}
  selector:
    app.kubernetes.io/instance: odd
    app.kubernetes.io/name: premier
  {{- include "odd.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.odd.ports | toYaml | nindent 2 -}}
kubernetesClusterDomain: cluster.local
odd:
  bartenderListInclude: housework
  igloo: spirit
  kumquatHarsh: wide-eyed
  mistake: dew
  morselClampCharset: cesspool
  odd:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  perspectiveUpliftSail: class
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  propagandaAlpenhorn: anteater
  replicas: 1
  scrawny: want
  tempDefender: regionalism
  type: ClusterIP
