# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "shop.fullname" . }}-shop
  labels:
  {{- include "shop.labels" . | nindent 4 }}
data:
  ASSESS_COHESION_HOMELAND: {{ .Values.shop.assessCohesionHomeland | quote }}
  CHRONICLE_SERIES: {{ .Values.shop.chronicleSeries | quote }}
  DESTINY_REACH_HEEL: {{ .Values.shop.destinyReachHeel | quote }}
  GEOLOGY_TRENCH: {{ .Values.shop.geologyTrench | quote }}
  LICENSE_NUCLEOTIDASE_REVASCULARIZATION: {{ .Values.shop.licenseNucleotidaseRevascularization
    | quote }}
  MASS_WRATHFUL_BIN: {{ .Values.shop.massWrathfulBin | quote }}
  WOODCHUCK: {{ .Values.shop.woodchuck | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "shop.fullname" . }}-shop
  labels:
  {{- include "shop.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: shop
spec:
  replicas: {{ .Values.shop.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: shop
      app.kubernetes.io/name: quicksand
    {{- include "shop.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: shop
        app.kubernetes.io/name: quicksand
      {{- include "shop.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: e4a9029f46d780b5fd11f7b3f740bed1e314ae8bb2c031b93e4af2f226e41fda
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "shop.fullname" . }}-shop
        image: {{ .Values.shop.shop.image.repository }}:{{ .Values.shop.shop.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.shop.shop.imagePullPolicy }}
        name: shop
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.shop.shop.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.shop.shop.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "shop.fullname" . }}-shop
  labels:
  {{- include "shop.labels" . | nindent 4 }}
spec:
  type: {{ .Values.shop.type }}
  selector:
    app.kubernetes.io/instance: shop
    app.kubernetes.io/name: quicksand
  {{- include "shop.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.shop.ports | toYaml | nindent 2 -}}
kubernetesClusterDomain: cluster.local
shop:
  assessCohesionHomeland: noon
  chronicleSeries: handsaw
  destinyReachHeel: promote
  geologyTrench: nature
  licenseNucleotidaseRevascularization: qualify
  massWrathfulBin: title
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  shop:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  type: ClusterIP
  woodchuck: infancy
