# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "resort.fullname" . }}-resort
  labels:
  {{- include "resort.labels" . | nindent 4 }}
data:
  CLIFF: {{ .Values.resort.cliff | quote }}
  CRITERION_PLANET_MUSHY: {{ .Values.resort.criterionPlanetMushy | quote }}
  EVAPORATION: {{ .Values.resort.evaporation | quote }}
  LAUNDRY_ELEVENTH: {{ .Values.resort.laundryEleventh | quote }}
  MAPLE: {{ .Values.resort.maple | quote }}
  PROMENADE_BRIEF: {{ .Values.resort.promenadeBrief | quote }}
  REJOICE_WEALTH_PURR: {{ .Values.resort.rejoiceWealthPurr | quote }}
  SEAFOOD_NOTORIETY_VITAMIN: {{ .Values.resort.seafoodNotorietyVitamin | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "resort.fullname" . }}-resort
  labels:
  {{- include "resort.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: resort
spec:
  replicas: {{ .Values.resort.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: resort
      app.kubernetes.io/name: birch
    {{- include "resort.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: resort
        app.kubernetes.io/name: birch
      {{- include "resort.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 0398c7186047ac8472872eb07a8485c2e79bb17d79a6e06ef715976d878f0032
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "resort.fullname" . }}-resort
        image: {{ .Values.resort.resort.image.repository }}:{{ .Values.resort.resort.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.resort.resort.imagePullPolicy }}
        name: resort
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.resort.resort.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.resort.resort.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "resort.fullname" . }}-resort
  labels:
  {{- include "resort.labels" . | nindent 4 }}
spec:
  type: {{ .Values.resort.type }}
  selector:
    app.kubernetes.io/instance: resort
    app.kubernetes.io/name: birch
  {{- include "resort.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.resort.ports | toYaml | nindent 2 -}}
kubernetesClusterDomain: cluster.local
resort:
  cliff: new
  criterionPlanetMushy: ratepayer
  evaporation: beanstalk
  laundryEleventh: geranium
  maple: undress
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  promenadeBrief: innovation
  rejoiceWealthPurr: include
  replicas: 1
  resort:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  seafoodNotorietyVitamin: eyestrain
  type: ClusterIP
