# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "aware.fullname" . }}-aware
  labels:
  {{- include "aware.labels" . | nindent 4 }}
data:
  CLIP: {{ .Values.aware.clip | quote }}
  ICING_DWELLING: {{ .Values.aware.icingDwelling | quote }}
  KILOGRAM_ABRASIVE_COLLEAGUE: {{ .Values.aware.kilogramAbrasiveColleague | quote
    }}
  MIDDLEMAN_ARTERY_WASHBASIN: {{ .Values.aware.middlemanArteryWashbasin | quote }}
  NOISY: {{ .Values.aware.noisy | quote }}
  PIZZA: {{ .Values.aware.pizza | quote }}
  PROPRIETOR_EDGE: {{ .Values.aware.proprietorEdge | quote }}
  SILICON_CIRCUMFERENCE_CONGO: {{ .Values.aware.siliconCircumferenceCongo | quote
    }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "aware.fullname" . }}-aware
  labels:
  {{- include "aware.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: aware
spec:
  replicas: {{ .Values.aware.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: aware
      app.kubernetes.io/name: coin
    {{- include "aware.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: aware
        app.kubernetes.io/name: coin
      {{- include "aware.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 66e493a405752cf52a9a990966fad2ae34626cadb50c92605a9a287505c2f261
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "aware.fullname" . }}-aware
        image: {{ .Values.aware.aware.image.repository }}:{{ .Values.aware.aware.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.aware.aware.imagePullPolicy }}
        name: aware
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.aware.aware.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.aware.aware.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "aware.fullname" . }}-aware
  labels:
  {{- include "aware.labels" . | nindent 4 }}
spec:
  type: {{ .Values.aware.type }}
  selector:
    app.kubernetes.io/instance: aware
    app.kubernetes.io/name: coin
  {{- include "aware.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.aware.ports | toYaml | nindent 2 -}}
aware:
  aware:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  clip: fence
  icingDwelling: defendant
  kilogramAbrasiveColleague: righteous
  middlemanArteryWashbasin: mercury
  noisy: haunt
  pizza: year
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  proprietorEdge: notoriety
  replicas: 1
  siliconCircumferenceCongo: dock
  type: ClusterIP
kubernetesClusterDomain: cluster.local
