# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "seller.fullname" . }}-seller
  labels:
  {{- include "seller.labels" . | nindent 4 }}
data:
  BEGGAR: {{ .Values.seller.beggar | quote }}
  DECEIVE: {{ .Values.seller.deceive | quote }}
  HONEYBEE_ABRASIVE_BACKBONE: {{ .Values.seller.honeybeeAbrasiveBackbone | quote
    }}
  MAT: {{ .Values.seller.mat | quote }}
  MUDDY_COURT_RESISTANCE: {{ .Values.seller.muddyCourtResistance | quote }}
  SARONG_ATOM: {{ .Values.seller.sarongAtom | quote }}
  STIMULUS_PROSTACYCLIN_DAFFY: {{ .Values.seller.stimulusProstacyclinDaffy | quote
    }}
  SURROUNDINGS: {{ .Values.seller.surroundings | quote }}
  WEARY_ALIBI_HISTORICAL: {{ .Values.seller.wearyAlibiHistorical | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "seller.fullname" . }}-seller
  labels:
  {{- include "seller.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: seller
spec:
  replicas: {{ .Values.seller.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: seller
      app.kubernetes.io/name: kilt
    {{- include "seller.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: seller
        app.kubernetes.io/name: kilt
      {{- include "seller.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: a6f55b1572f83022557721371f247b0be147fb3c8cecb3af7517c72ee5a7ffc7
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "seller.fullname" . }}-seller
        image: {{ .Values.seller.seller.image.repository }}:{{ .Values.seller.seller.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.seller.seller.imagePullPolicy }}
        name: seller
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.seller.seller.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.seller.seller.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "seller.fullname" . }}-seller
  labels:
  {{- include "seller.labels" . | nindent 4 }}
spec:
  type: {{ .Values.seller.type }}
  selector:
    app.kubernetes.io/instance: seller
    app.kubernetes.io/name: kilt
  {{- include "seller.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.seller.ports | toYaml | nindent 2 -}}
kubernetesClusterDomain: cluster.local
seller:
  beggar: governance
  deceive: fragrance
  honeybeeAbrasiveBackbone: prejudice
  mat: pod
  muddyCourtResistance: feast
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  sarongAtom: uphold
  seller:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  stimulusProstacyclinDaffy: spine
  surroundings: mansion
  type: ClusterIP
  wearyAlibiHistorical: fuel
