# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "ingrate.fullname" . }}-ingrate
  labels:
  {{- include "ingrate.labels" . | nindent 4 }}
data:
  BIDDER_CAT_CAROL: {{ .Values.ingrate.bidderCatCarol | quote }}
  EXPLORER_WASTING: {{ .Values.ingrate.explorerWasting | quote }}
  FUEL_KIDNEY_RUM: {{ .Values.ingrate.fuelKidneyRum | quote }}
  GLOVE_ZOMBIE_SUMMARIZE: {{ .Values.ingrate.gloveZombieSummarize | quote }}
  PERP_CROWD: {{ .Values.ingrate.perpCrowd | quote }}
  SNOWBOARDING: {{ .Values.ingrate.snowboarding | quote }}
  SOIL_LOVER: {{ .Values.ingrate.soilLover | quote }}
  TERMINOLOGY_RULER: {{ .Values.ingrate.terminologyRuler | quote }}
  TOQUE_PREPARE_GEMSBOK: {{ .Values.ingrate.toquePrepareGemsbok | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "ingrate.fullname" . }}-ingrate
  labels:
  {{- include "ingrate.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: ingrate
spec:
  replicas: {{ .Values.ingrate.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: ingrate
      app.kubernetes.io/name: space
    {{- include "ingrate.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: ingrate
        app.kubernetes.io/name: space
      {{- include "ingrate.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 4a0ae3643817a4257df16da215a902c5a58e6ab20825ff2e55d5a086db3ee4e7
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "ingrate.fullname" . }}-ingrate
        image: {{ .Values.ingrate.ingrate.image.repository }}:{{ .Values.ingrate.ingrate.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.ingrate.ingrate.imagePullPolicy }}
        name: ingrate
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.ingrate.ingrate.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.ingrate.ingrate.containerSecurityContext |
          nindent 10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "ingrate.fullname" . }}-ingrate
  labels:
  {{- include "ingrate.labels" . | nindent 4 }}
spec:
  type: {{ .Values.ingrate.type }}
  selector:
    app.kubernetes.io/instance: ingrate
    app.kubernetes.io/name: space
  {{- include "ingrate.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.ingrate.ports | toYaml | nindent 2 -}}
ingrate:
  bidderCatCarol: airship
  explorerWasting: mattock
  fuelKidneyRum: wear
  gloveZombieSummarize: square
  ingrate:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  perpCrowd: tart
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  snowboarding: make
  soilLover: front
  terminologyRuler: software
  toquePrepareGemsbok: kid
  type: ClusterIP
kubernetesClusterDomain: cluster.local
