# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "bay.fullname" . }}-bay
  labels:
  {{- include "bay.labels" . | nindent 4 }}
data:
  DRILL_CARRIAGE_LOCALITY: {{ .Values.bay.drillCarriageLocality | quote }}
  EQUAL_PARENTING_KALE: {{ .Values.bay.equalParentingKale | quote }}
  FINICKY: {{ .Values.bay.finicky | quote }}
  LUDICROUS_CLOAK_WALLABY: {{ .Values.bay.ludicrousCloakWallaby | quote }}
  MOUND: {{ .Values.bay.mound | quote }}
  PROFESSIONAL_AUTHENTICITY_OUTRAGE: {{ .Values.bay.professionalAuthenticityOutrage
    | quote }}
  PROSE: {{ .Values.bay.prose | quote }}
  SELLING: {{ .Values.bay.selling | quote }}
  THOUGHT_SAILBOAT_HOT: {{ .Values.bay.thoughtSailboatHot | quote }}
  WETSUIT_PARAGRAPH_UNABLE: {{ .Values.bay.wetsuitParagraphUnable | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "bay.fullname" . }}-bay
  labels:
  {{- include "bay.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: bay
spec:
  replicas: {{ .Values.bay.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: bay
      app.kubernetes.io/name: date
    {{- include "bay.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: bay
        app.kubernetes.io/name: date
      {{- include "bay.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 938aed54cd37811a599053b6839b1b0129c7ccbc8f77a6405b265c65ff48732a
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "bay.fullname" . }}-bay
        image: {{ .Values.bay.bay.image.repository }}:{{ .Values.bay.bay.image.tag | default
          .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.bay.bay.imagePullPolicy }}
        name: bay
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.bay.bay.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.bay.bay.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "bay.fullname" . }}-bay
  labels:
  {{- include "bay.labels" . | nindent 4 }}
spec:
  type: {{ .Values.bay.type }}
  selector:
    app.kubernetes.io/instance: bay
    app.kubernetes.io/name: date
  {{- include "bay.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.bay.ports | toYaml | nindent 2 -}}
bay:
  bay:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  drillCarriageLocality: hydraulics
  equalParentingKale: point
  finicky: valance
  ludicrousCloakWallaby: map
  mound: swamp
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  professionalAuthenticityOutrage: divan
  prose: mattock
  replicas: 1
  selling: misrepresentation
  thoughtSailboatHot: dune buggy
  type: ClusterIP
  wetsuitParagraphUnable: honey
kubernetesClusterDomain: cluster.local
