# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "representation.fullname" . }}-representation
  labels:
  {{- include "representation.labels" . | nindent 4 }}
data:
  BEEF: {{ .Values.representation.beef | quote }}
  EGO_CLOUDBURST_TUTU: {{ .Values.representation.egoCloudburstTutu | quote }}
  FEEDBACK: {{ .Values.representation.feedback | quote }}
  GRANDCHILD_HONOREE_ABUNDANT: {{ .Values.representation.grandchildHonoreeAbundant
    | quote }}
  INTERRUPT_MINIMALISM: {{ .Values.representation.interruptMinimalism | quote }}
  JACKAL_CUTTING: {{ .Values.representation.jackalCutting | quote }}
  LILY_TROUSERS_CHARD: {{ .Values.representation.lilyTrousersChard | quote }}
  UNBLINKING_CUE_PARALLELOGRAM: {{ .Values.representation.unblinkingCueParallelogram
    | quote }}
  WORD: {{ .Values.representation.word | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "representation.fullname" . }}-representation
  labels:
  {{- include "representation.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: representation
spec:
  replicas: {{ .Values.representation.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: representation
      app.kubernetes.io/name: icebreaker
    {{- include "representation.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: representation
        app.kubernetes.io/name: icebreaker
      {{- include "representation.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: ac574bf229fb7b5a76f5776d99aa3f6fae15bae3f0fa50e0474f536106dcf676
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "representation.fullname" . }}-representation
        image: {{ .Values.representation.representation.image.repository }}:{{ .Values.representation.representation.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.representation.representation.imagePullPolicy }}
        name: representation
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.representation.representation.resources | nindent
          10 }}
        securityContext: {{- toYaml .Values.representation.representation.containerSecurityContext
          | nindent 10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "representation.fullname" . }}-representation
  labels:
  {{- include "representation.labels" . | nindent 4 }}
spec:
  type: {{ .Values.representation.type }}
  selector:
    app.kubernetes.io/instance: representation
    app.kubernetes.io/name: icebreaker
  {{- include "representation.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.representation.ports | toYaml | nindent 2 -}}
kubernetesClusterDomain: cluster.local
representation:
  beef: crayfish
  egoCloudburstTutu: bend
  feedback: consumer
  grandchildHonoreeAbundant: lettuce
  interruptMinimalism: fly
  jackalCutting: abbey
  lilyTrousersChard: backbone
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  representation:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  type: ClusterIP
  unblinkingCueParallelogram: scarce
  word: familiarity
