# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "disclosure.fullname" . }}-disclosure
  labels:
  {{- include "disclosure.labels" . | nindent 4 }}
data:
  DROMEDARY_SUPER_LIKELIHOOD: {{ .Values.disclosure.dromedarySuperLikelihood | quote
    }}
  FEATHER_POETRY: {{ .Values.disclosure.featherPoetry | quote }}
  HOVERCRAFT_AUNT_SERIES: {{ .Values.disclosure.hovercraftAuntSeries | quote }}
  MAIL: {{ .Values.disclosure.mail | quote }}
  STIR-FRY_EX-HUSBAND_PROMENADE: {{ .Values.disclosure.stirFryExHusbandPromenade
    | quote }}
  TAB_SPEAKERPHONE: {{ .Values.disclosure.tabSpeakerphone | quote }}
  WARDEN: {{ .Values.disclosure.warden | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "disclosure.fullname" . }}-disclosure
  labels:
  {{- include "disclosure.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: disclosure
spec:
  replicas: {{ .Values.disclosure.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: disclosure
      app.kubernetes.io/name: football
    {{- include "disclosure.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: disclosure
        app.kubernetes.io/name: football
      {{- include "disclosure.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 7eb6493634827f935febc8a374b1e6a762b5efe342d3983de6639c4f4dee2ce6
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "disclosure.fullname" . }}-disclosure
        image: {{ .Values.disclosure.disclosure.image.repository }}:{{ .Values.disclosure.disclosure.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.disclosure.disclosure.imagePullPolicy }}
        name: disclosure
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.disclosure.disclosure.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.disclosure.disclosure.containerSecurityContext
          | nindent 10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "disclosure.fullname" . }}-disclosure
  labels:
  {{- include "disclosure.labels" . | nindent 4 }}
spec:
  type: {{ .Values.disclosure.type }}
  selector:
    app.kubernetes.io/instance: disclosure
    app.kubernetes.io/name: football
  {{- include "disclosure.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.disclosure.ports | toYaml | nindent 2 -}}
disclosure:
  disclosure:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  dromedarySuperLikelihood: stag
  featherPoetry: thank
  hovercraftAuntSeries: obedience
  mail: awe
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  stirFryExHusbandPromenade: investment
  tabSpeakerphone: dozen
  type: ClusterIP
  warden: dude
kubernetesClusterDomain: cluster.local
