# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "chowder.fullname" . }}-chowder
  labels:
  {{- include "chowder.labels" . | nindent 4 }}
data:
  CAMPAIGNING_TERM_PLUM: {{ .Values.chowder.campaigningTermPlum | quote }}
  CHIME_IMPUDENCE: {{ .Values.chowder.chimeImpudence | quote }}
  CLAUSE_DESTINATION: {{ .Values.chowder.clauseDestination | quote }}
  EMBARRASS: {{ .Values.chowder.embarrass | quote }}
  HALF-BROTHER: {{ .Values.chowder.halfBrother | quote }}
  HALT: {{ .Values.chowder.halt | quote }}
  HISTORICAL: {{ .Values.chowder.historical | quote }}
  MODE_BUSINESSMAN_BAD: {{ .Values.chowder.modeBusinessmanBad | quote }}
  MODERNITY_RARE: {{ .Values.chowder.modernityRare | quote }}
  PANTIES: {{ .Values.chowder.panties | quote }}
  RIFLE_FISHERY_HEARTWOOD: {{ .Values.chowder.rifleFisheryHeartwood | quote }}
  SCHEME_DETECTION: {{ .Values.chowder.schemeDetection | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "chowder.fullname" . }}-chowder
  labels:
  {{- include "chowder.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: chowder
spec:
  replicas: {{ .Values.chowder.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: chowder
      app.kubernetes.io/name: epee
    {{- include "chowder.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: chowder
        app.kubernetes.io/name: epee
      {{- include "chowder.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 72f914839b21af538a9ce248901b9437f646c6a42707751f38a6dfbedd30177d
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "chowder.fullname" . }}-chowder
        image: {{ .Values.chowder.chowder.image.repository }}:{{ .Values.chowder.chowder.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.chowder.chowder.imagePullPolicy }}
        name: chowder
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.chowder.chowder.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.chowder.chowder.containerSecurityContext |
          nindent 10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "chowder.fullname" . }}-chowder
  labels:
  {{- include "chowder.labels" . | nindent 4 }}
spec:
  type: {{ .Values.chowder.type }}
  selector:
    app.kubernetes.io/instance: chowder
    app.kubernetes.io/name: epee
  {{- include "chowder.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.chowder.ports | toYaml | nindent 2 -}}
chowder:
  campaigningTermPlum: zebrafish
  chimeImpudence: spy
  chowder:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  clauseDestination: peck
  embarrass: thrift
  halfBrother: bizarre
  halt: hawk
  historical: swath
  modeBusinessmanBad: creep
  modernityRare: SUV
  panties: help
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  rifleFisheryHeartwood: tugboat
  schemeDetection: salary
  type: ClusterIP
kubernetesClusterDomain: cluster.local
