# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "lag.fullname" . }}-lag
  labels:
  {{- include "lag.labels" . | nindent 4 }}
data:
  AD HOC_NUTTY: {{ .Values.lag.adHocNutty | quote }}
  CLAY_CONCEPT_BARE: {{ .Values.lag.clayConceptBare | quote }}
  EXCEED_ABOLISHMENT: {{ .Values.lag.exceedAbolishment | quote }}
  GROTESQUE_BOXER_TOMB: {{ .Values.lag.grotesqueBoxerTomb | quote }}
  SERVAL: {{ .Values.lag.serval | quote }}
  STATIN: {{ .Values.lag.statin | quote }}
  TELLER_REVENUE: {{ .Values.lag.tellerRevenue | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "lag.fullname" . }}-lag
  labels:
  {{- include "lag.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: lag
spec:
  replicas: {{ .Values.lag.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: lag
      app.kubernetes.io/name: know-how
    {{- include "lag.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: lag
        app.kubernetes.io/name: know-how
      {{- include "lag.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: a23eeb70c2c03640939d7a85d0dedffbfcc678af63410270761c79465872c9c7
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "lag.fullname" . }}-lag
        image: {{ .Values.lag.lag.image.repository }}:{{ .Values.lag.lag.image.tag | default
          .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.lag.lag.imagePullPolicy }}
        name: lag
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.lag.lag.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.lag.lag.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "lag.fullname" . }}-lag
  labels:
  {{- include "lag.labels" . | nindent 4 }}
spec:
  type: {{ .Values.lag.type }}
  selector:
    app.kubernetes.io/instance: lag
    app.kubernetes.io/name: know-how
  {{- include "lag.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.lag.ports | toYaml | nindent 2 -}}
kubernetesClusterDomain: cluster.local
lag:
  adHocNutty: exposure
  clayConceptBare: sticky
  exceedAbolishment: glucose
  grotesqueBoxerTomb: people
  lag:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  serval: procurement
  statin: flag
  tellerRevenue: impropriety
  type: ClusterIP
