# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "briefs.fullname" . }}-briefs
  labels:
  {{- include "briefs.labels" . | nindent 4 }}
data:
  ATTEMPT: {{ .Values.briefs.attempt | quote }}
  AVAILABLE_CORNET_EXULTANT: {{ .Values.briefs.availableCornetExultant | quote }}
  CHIFFONIER: {{ .Values.briefs.chiffonier | quote }}
  EVE: {{ .Values.briefs.eve | quote }}
  NEOLOGISM: {{ .Values.briefs.neologism | quote }}
  PACKAGE: {{ .Values.briefs.package | quote }}
  RADIOSONDE_CLASSIC: {{ .Values.briefs.radiosondeClassic | quote }}
  REPOSITORY_EVASIVE: {{ .Values.briefs.repositoryEvasive | quote }}
  SNOWMAN_JOIN_BUSY: {{ .Values.briefs.snowmanJoinBusy | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "briefs.fullname" . }}-briefs
  labels:
  {{- include "briefs.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: briefs
spec:
  replicas: {{ .Values.briefs.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: briefs
      app.kubernetes.io/name: unfasten
    {{- include "briefs.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: briefs
        app.kubernetes.io/name: unfasten
      {{- include "briefs.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 2a8efcdc2f841ff66ef8c450f50677460a3db62fb2b4b543791b6aab3fbc502e
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "briefs.fullname" . }}-briefs
        image: {{ .Values.briefs.briefs.image.repository }}:{{ .Values.briefs.briefs.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.briefs.briefs.imagePullPolicy }}
        name: briefs
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.briefs.briefs.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.briefs.briefs.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "briefs.fullname" . }}-briefs
  labels:
  {{- include "briefs.labels" . | nindent 4 }}
spec:
  type: {{ .Values.briefs.type }}
  selector:
    app.kubernetes.io/instance: briefs
    app.kubernetes.io/name: unfasten
  {{- include "briefs.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.briefs.ports | toYaml | nindent 2 -}}
briefs:
  attempt: zippy
  availableCornetExultant: doing
  briefs:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  chiffonier: disease
  eve: dame
  neologism: balloonist
  package: parchment
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  radiosondeClassic: qualify
  replicas: 1
  repositoryEvasive: router
  snowmanJoinBusy: coverall
  type: ClusterIP
kubernetesClusterDomain: cluster.local
