# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "manufacture.fullname" . }}-manufacture
  labels:
  {{- include "manufacture.labels" . | nindent 4 }}
data:
  ABOUNDING_FILL_LORD: {{ .Values.manufacture.aboundingFillLord | quote }}
  BLEND_UGLIEST: {{ .Values.manufacture.blendUgliest | quote }}
  ENDPOINT_TALK: {{ .Values.manufacture.endpointTalk | quote }}
  HURDLE_LAG: {{ .Values.manufacture.hurdleLag | quote }}
  MANGO: {{ .Values.manufacture.mango | quote }}
  MODIFY_PARAMETER: {{ .Values.manufacture.modifyParameter | quote }}
  OBSERVE_PROTEIN: {{ .Values.manufacture.observeProtein | quote }}
  PREMIUM_BECK: {{ .Values.manufacture.premiumBeck | quote }}
  RINGWORM: {{ .Values.manufacture.ringworm | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "manufacture.fullname" . }}-manufacture
  labels:
  {{- include "manufacture.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: manufacture
spec:
  replicas: {{ .Values.manufacture.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: manufacture
      app.kubernetes.io/name: whey
    {{- include "manufacture.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: manufacture
        app.kubernetes.io/name: whey
      {{- include "manufacture.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 6c9da4f2467090529dc18ba44401cb255c100af042b0c75a2ff2af78b9eb094e
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "manufacture.fullname" . }}-manufacture
        image: {{ .Values.manufacture.manufacture.image.repository }}:{{ .Values.manufacture.manufacture.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.manufacture.manufacture.imagePullPolicy }}
        name: manufacture
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.manufacture.manufacture.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.manufacture.manufacture.containerSecurityContext
          | nindent 10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "manufacture.fullname" . }}-manufacture
  labels:
  {{- include "manufacture.labels" . | nindent 4 }}
spec:
  type: {{ .Values.manufacture.type }}
  selector:
    app.kubernetes.io/instance: manufacture
    app.kubernetes.io/name: whey
  {{- include "manufacture.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.manufacture.ports | toYaml | nindent 2 -}}
kubernetesClusterDomain: cluster.local
manufacture:
  aboundingFillLord: halloween
  blendUgliest: rider
  endpointTalk: simvastatin
  hurdleLag: sneaker
  mango: prestige
  manufacture:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  modifyParameter: fringe
  observeProtein: shoes
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  premiumBeck: lacquerware
  replicas: 1
  ringworm: gnat
  type: ClusterIP
