# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "platter.fullname" . }}-platter
  labels:
  {{- include "platter.labels" . | nindent 4 }}
data:
  ARROGANCE: {{ .Values.platter.arrogance | quote }}
  CONTINUE_TISSUE_BARITONE: {{ .Values.platter.continueTissueBaritone | quote }}
  COT_FEDELINI_MADLY: {{ .Values.platter.cotFedeliniMadly | quote }}
  DEPUTY: {{ .Values.platter.deputy | quote }}
  FRUIT_PARTY_FASCINATED: {{ .Values.platter.fruitPartyFascinated | quote }}
  FUZZY: {{ .Values.platter.fuzzy | quote }}
  GIFTED_CONTAINER_DIVISION: {{ .Values.platter.giftedContainerDivision | quote }}
  PURITAN: {{ .Values.platter.puritan | quote }}
  QUICKEST: {{ .Values.platter.quickest | quote }}
  RECEPTIVE_SHIRT: {{ .Values.platter.receptiveShirt | quote }}
  STANCE_PERFUME_CREATIVITY: {{ .Values.platter.stancePerfumeCreativity | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "platter.fullname" . }}-platter
  labels:
  {{- include "platter.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: platter
spec:
  replicas: {{ .Values.platter.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: platter
      app.kubernetes.io/name: urgency
    {{- include "platter.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: platter
        app.kubernetes.io/name: urgency
      {{- include "platter.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 48f593b553de9dc5ff4b730fbe208d84a7a3572d10618552fc04921cd7a21373
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "platter.fullname" . }}-platter
        image: {{ .Values.platter.platter.image.repository }}:{{ .Values.platter.platter.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.platter.platter.imagePullPolicy }}
        name: platter
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.platter.platter.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.platter.platter.containerSecurityContext |
          nindent 10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "platter.fullname" . }}-platter
  labels:
  {{- include "platter.labels" . | nindent 4 }}
spec:
  type: {{ .Values.platter.type }}
  selector:
    app.kubernetes.io/instance: platter
    app.kubernetes.io/name: urgency
  {{- include "platter.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.platter.ports | toYaml | nindent 2 -}}
kubernetesClusterDomain: cluster.local
platter:
  arrogance: winery
  continueTissueBaritone: temperature
  cotFedeliniMadly: boyhood
  deputy: project
  fruitPartyFascinated: bloomer
  fuzzy: jasmine
  giftedContainerDivision: fry
  platter:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  puritan: understood
  quickest: graffiti
  receptiveShirt: country
  replicas: 1
  stancePerfumeCreativity: swivel
  type: ClusterIP
