# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "steak.fullname" . }}-steak
  labels:
  {{- include "steak.labels" . | nindent 4 }}
data:
  ADVERB_KITCHEN: {{ .Values.steak.adverbKitchen | quote }}
  DOWNFORCE_FACILITY_LEAVE: {{ .Values.steak.downforceFacilityLeave | quote }}
  FLIP-FLOPS_MINDLESS_REPEAT: {{ .Values.steak.flipFlopsMindlessRepeat | quote }}
  HESITATION_YARMULKE: {{ .Values.steak.hesitationYarmulke | quote }}
  MAINLAND_DRACONIAN: {{ .Values.steak.mainlandDraconian | quote }}
  MUNDANE: {{ .Values.steak.mundane | quote }}
  PICKLE: {{ .Values.steak.pickle | quote }}
  RICE_MERCHANDISE_JUGGLE: {{ .Values.steak.riceMerchandiseJuggle | quote }}
  WORRIED_DESIGN: {{ .Values.steak.worriedDesign | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "steak.fullname" . }}-steak
  labels:
  {{- include "steak.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: steak
spec:
  replicas: {{ .Values.steak.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: steak
      app.kubernetes.io/name: commuter
    {{- include "steak.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: steak
        app.kubernetes.io/name: commuter
      {{- include "steak.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 8dd479a9f5a734193cd495a1b5159f005989e37ff4d98baefd412f0fd06e590d
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "steak.fullname" . }}-steak
        image: {{ .Values.steak.steak.image.repository }}:{{ .Values.steak.steak.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.steak.steak.imagePullPolicy }}
        name: steak
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.steak.steak.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.steak.steak.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "steak.fullname" . }}-steak
  labels:
  {{- include "steak.labels" . | nindent 4 }}
spec:
  type: {{ .Values.steak.type }}
  selector:
    app.kubernetes.io/instance: steak
    app.kubernetes.io/name: commuter
  {{- include "steak.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.steak.ports | toYaml | nindent 2 -}}
kubernetesClusterDomain: cluster.local
steak:
  adverbKitchen: speculation
  downforceFacilityLeave: reduce
  flipFlopsMindlessRepeat: chamber
  hesitationYarmulke: canopy
  mainlandDraconian: solid
  mundane: adaptation
  pickle: jot
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  riceMerchandiseJuggle: mine
  steak:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  type: ClusterIP
  worriedDesign: flaky
