# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "frost.fullname" . }}-frost
  labels:
  {{- include "frost.labels" . | nindent 4 }}
data:
  BARBAROUS: {{ .Values.frost.barbarous | quote }}
  FLU_LAYOUT: {{ .Values.frost.fluLayout | quote }}
  INFUSION_DAMAGING: {{ .Values.frost.infusionDamaging | quote }}
  LEFT: {{ .Values.frost.left | quote }}
  MATCHMAKER_TOFU_TEMP: {{ .Values.frost.matchmakerTofuTemp | quote }}
  PLAY_RANDOMIZATION_BATTLE: {{ .Values.frost.playRandomizationBattle | quote }}
  PSYCHEDELIC: {{ .Values.frost.psychedelic | quote }}
  RECALL: {{ .Values.frost.recall | quote }}
  REDUCE_ENTREPRENEUR: {{ .Values.frost.reduceEntrepreneur | quote }}
  RELIABILITY_UNIVERSE: {{ .Values.frost.reliabilityUniverse | quote }}
  WINGMAN_FETUS: {{ .Values.frost.wingmanFetus | quote }}
  WRESTLE_DEADPAN: {{ .Values.frost.wrestleDeadpan | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "frost.fullname" . }}-frost
  labels:
  {{- include "frost.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: frost
spec:
  replicas: {{ .Values.frost.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: frost
      app.kubernetes.io/name: underpants
    {{- include "frost.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: frost
        app.kubernetes.io/name: underpants
      {{- include "frost.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 7be46ff0797669b98ed6e3a620301c0a8fa943f143c96bd27e19692185fd39a8
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "frost.fullname" . }}-frost
        image: {{ .Values.frost.frost.image.repository }}:{{ .Values.frost.frost.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.frost.frost.imagePullPolicy }}
        name: frost
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.frost.frost.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.frost.frost.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "frost.fullname" . }}-frost
  labels:
  {{- include "frost.labels" . | nindent 4 }}
spec:
  type: {{ .Values.frost.type }}
  selector:
    app.kubernetes.io/instance: frost
    app.kubernetes.io/name: underpants
  {{- include "frost.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.frost.ports | toYaml | nindent 2 -}}
frost:
  barbarous: measure
  fluLayout: meter
  frost:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  infusionDamaging: editing
  left: criminal
  matchmakerTofuTemp: torpid
  playRandomizationBattle: mere
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  psychedelic: compassion
  recall: labourer
  reduceEntrepreneur: steam
  reliabilityUniverse: infiltration
  replicas: 1
  type: ClusterIP
  wingmanFetus: x-ray
  wrestleDeadpan: enactment
kubernetesClusterDomain: cluster.local
