# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "rainmaker.fullname" . }}-rainmaker
  labels:
  {{- include "rainmaker.labels" . | nindent 4 }}
data:
  COVARIATE_CUTE: {{ .Values.rainmaker.covariateCute | quote }}
  DECREASE_HEARTACHE: {{ .Values.rainmaker.decreaseHeartache | quote }}
  INSERT_MOOSE: {{ .Values.rainmaker.insertMoose | quote }}
  JUNKET_ARRANGE_CARPENTER: {{ .Values.rainmaker.junketArrangeCarpenter | quote }}
  MONTH_INCUBATION: {{ .Values.rainmaker.monthIncubation | quote }}
  PEEK_GASOLINE: {{ .Values.rainmaker.peekGasoline | quote }}
  PRESSURIZATION_SOMEBODY_DAIRY: {{ .Values.rainmaker.pressurizationSomebodyDairy
    | quote }}
  RAILING_SHALLOWS: {{ .Values.rainmaker.railingShallows | quote }}
  TROT_DEMOCRACY: {{ .Values.rainmaker.trotDemocracy | quote }}
  VISA_FLOAT_SPECTACULAR: {{ .Values.rainmaker.visaFloatSpectacular | quote }}
  WEALTHY: {{ .Values.rainmaker.wealthy | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "rainmaker.fullname" . }}-rainmaker
  labels:
  {{- include "rainmaker.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: rainmaker
spec:
  replicas: {{ .Values.rainmaker.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: rainmaker
      app.kubernetes.io/name: underwriting
    {{- include "rainmaker.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: rainmaker
        app.kubernetes.io/name: underwriting
      {{- include "rainmaker.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: f13f8bc1cfca5909f75e29b28cdf4c88f6926675af0b6f917f3b49b002c113a0
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "rainmaker.fullname" . }}-rainmaker
        image: {{ .Values.rainmaker.rainmaker.image.repository }}:{{ .Values.rainmaker.rainmaker.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.rainmaker.rainmaker.imagePullPolicy }}
        name: rainmaker
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.rainmaker.rainmaker.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.rainmaker.rainmaker.containerSecurityContext
          | nindent 10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "rainmaker.fullname" . }}-rainmaker
  labels:
  {{- include "rainmaker.labels" . | nindent 4 }}
spec:
  type: {{ .Values.rainmaker.type }}
  selector:
    app.kubernetes.io/instance: rainmaker
    app.kubernetes.io/name: underwriting
  {{- include "rainmaker.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.rainmaker.ports | toYaml | nindent 2 -}}
kubernetesClusterDomain: cluster.local
rainmaker:
  covariateCute: spyglass
  decreaseHeartache: seaside
  insertMoose: menorah
  junketArrangeCarpenter: stance
  monthIncubation: dirt
  peekGasoline: nitrogen
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  pressurizationSomebodyDairy: latency
  railingShallows: masonry
  rainmaker:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  replicas: 1
  trotDemocracy: audited
  type: ClusterIP
  visaFloatSpectacular: ethernet
  wealthy: refectory
