# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "stock.fullname" . }}-stock
  labels:
  {{- include "stock.labels" . | nindent 4 }}
data:
  ADJUSTMENT_POTENTIAL: {{ .Values.stock.adjustmentPotential | quote }}
  BEHALF: {{ .Values.stock.behalf | quote }}
  COMPLEXITY_OPOSSUM_EGG: {{ .Values.stock.complexityOpossumEgg | quote }}
  CONGRESS_LIKELIHOOD: {{ .Values.stock.congressLikelihood | quote }}
  GREASE: {{ .Values.stock.grease | quote }}
  HELP: {{ .Values.stock.help | quote }}
  LARCH: {{ .Values.stock.larch | quote }}
  NONCONFORMIST_SPOOKY_BROWNIE: {{ .Values.stock.nonconformistSpookyBrownie | quote
    }}
  PIGEON_DETOUR: {{ .Values.stock.pigeonDetour | quote }}
  WEAK_TOLERANT_BULK: {{ .Values.stock.weakTolerantBulk | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "stock.fullname" . }}-stock
  labels:
  {{- include "stock.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: stock
spec:
  replicas: {{ .Values.stock.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: stock
      app.kubernetes.io/name: lipid
    {{- include "stock.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: stock
        app.kubernetes.io/name: lipid
      {{- include "stock.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 13b05bde0092f869de4a0c5a2fd146e4f482d3c203b372fc6ddf5de529818e43
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "stock.fullname" . }}-stock
        image: {{ .Values.stock.stock.image.repository }}:{{ .Values.stock.stock.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.stock.stock.imagePullPolicy }}
        name: stock
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.stock.stock.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.stock.stock.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "stock.fullname" . }}-stock
  labels:
  {{- include "stock.labels" . | nindent 4 }}
spec:
  type: {{ .Values.stock.type }}
  selector:
    app.kubernetes.io/instance: stock
    app.kubernetes.io/name: lipid
  {{- include "stock.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.stock.ports | toYaml | nindent 2 -}}
kubernetesClusterDomain: cluster.local
stock:
  adjustmentPotential: eyebrows
  behalf: choker
  complexityOpossumEgg: arise
  congressLikelihood: shortwave
  grease: element
  help: summit
  larch: genre
  nonconformistSpookyBrownie: catastrophe
  pigeonDetour: swift
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  stock:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  type: ClusterIP
  weakTolerantBulk: razor
