# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "sigh.fullname" . }}-sigh
  labels:
  {{- include "sigh.labels" . | nindent 4 }}
data:
  CAT_INGREDIENT: {{ .Values.sigh.catIngredient | quote }}
  EMERGENCY: {{ .Values.sigh.emergency | quote }}
  PIPELINE_GLUE: {{ .Values.sigh.pipelineGlue | quote }}
  POEM_SHRED_AMBITIOUS: {{ .Values.sigh.poemShredAmbitious | quote }}
  REPUBLIC: {{ .Values.sigh.republic | quote }}
  SALOON_NEEDLE_CORNFLAKES: {{ .Values.sigh.saloonNeedleCornflakes | quote }}
  TURBAN_FORESEE_TRAPDOOR: {{ .Values.sigh.turbanForeseeTrapdoor | quote }}
  WOOD: {{ .Values.sigh.wood | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "sigh.fullname" . }}-sigh
  labels:
  {{- include "sigh.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: sigh
spec:
  replicas: {{ .Values.sigh.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: sigh
      app.kubernetes.io/name: daybed
    {{- include "sigh.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: sigh
        app.kubernetes.io/name: daybed
      {{- include "sigh.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: e6cf197520327d9baa4355b8fdb1c5541e9d3e4710e9f9134efd035460d9241e
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "sigh.fullname" . }}-sigh
        image: {{ .Values.sigh.sigh.image.repository }}:{{ .Values.sigh.sigh.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.sigh.sigh.imagePullPolicy }}
        name: sigh
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.sigh.sigh.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.sigh.sigh.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "sigh.fullname" . }}-sigh
  labels:
  {{- include "sigh.labels" . | nindent 4 }}
spec:
  type: {{ .Values.sigh.type }}
  selector:
    app.kubernetes.io/instance: sigh
    app.kubernetes.io/name: daybed
  {{- include "sigh.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.sigh.ports | toYaml | nindent 2 -}}
kubernetesClusterDomain: cluster.local
sigh:
  catIngredient: sake
  emergency: run
  pipelineGlue: winter
  poemShredAmbitious: answer
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  republic: gram
  saloonNeedleCornflakes: hunter
  sigh:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  turbanForeseeTrapdoor: direful
  type: ClusterIP
  wood: oeuvre
