# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "scary.fullname" . }}-scary
  labels:
  {{- include "scary.labels" . | nindent 4 }}
data:
  CHOW_SPIDERLING: {{ .Values.scary.chowSpiderling | quote }}
  COMMOTION_MANTEL: {{ .Values.scary.commotionMantel | quote }}
  COMPLETE_CLASSIFY: {{ .Values.scary.completeClassify | quote }}
  GRAN: {{ .Values.scary.gran | quote }}
  IMMINENT: {{ .Values.scary.imminent | quote }}
  MESENCHYME_DEDUCE_DIAL: {{ .Values.scary.mesenchymeDeduceDial | quote }}
  PLEAT_WARRANT_NETBALL: {{ .Values.scary.pleatWarrantNetball | quote }}
  TRANSIT_RESISTANCE: {{ .Values.scary.transitResistance | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "scary.fullname" . }}-scary
  labels:
  {{- include "scary.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: scary
spec:
  replicas: {{ .Values.scary.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: scary
      app.kubernetes.io/name: nightingale
    {{- include "scary.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: scary
        app.kubernetes.io/name: nightingale
      {{- include "scary.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 269a7636ef9ebf9a58fc9a6489e57b2a340b922853b191cdfb699cebf1426475
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "scary.fullname" . }}-scary
        image: {{ .Values.scary.scary.image.repository }}:{{ .Values.scary.scary.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.scary.scary.imagePullPolicy }}
        name: scary
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.scary.scary.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.scary.scary.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "scary.fullname" . }}-scary
  labels:
  {{- include "scary.labels" . | nindent 4 }}
spec:
  type: {{ .Values.scary.type }}
  selector:
    app.kubernetes.io/instance: scary
    app.kubernetes.io/name: nightingale
  {{- include "scary.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.scary.ports | toYaml | nindent 2 -}}
kubernetesClusterDomain: cluster.local
scary:
  chowSpiderling: atmosphere
  commotionMantel: chin
  completeClassify: administrator
  gran: add
  imminent: famous
  mesenchymeDeduceDial: hearthside
  pleatWarrantNetball: reaction
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  scary:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  transitResistance: suet
  type: ClusterIP
