# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "combine.fullname" . }}-combine
  labels:
  {{- include "combine.labels" . | nindent 4 }}
data:
  BATTERY_EFFECTOR_ROOT: {{ .Values.combine.batteryEffectorRoot | quote }}
  BLINK_SINCERE: {{ .Values.combine.blinkSincere | quote }}
  DUE_CAMP_SANDAL: {{ .Values.combine.dueCampSandal | quote }}
  HANDSAW_FOLK_GYRO: {{ .Values.combine.handsawFolkGyro | quote }}
  HARBOR: {{ .Values.combine.harbor | quote }}
  TIARA: {{ .Values.combine.tiara | quote }}
  UBIQUITOUS_BACKPACK: {{ .Values.combine.ubiquitousBackpack | quote }}
  VERANDA_COPYING: {{ .Values.combine.verandaCopying | quote }}
  WAKE: {{ .Values.combine.wake | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "combine.fullname" . }}-combine
  labels:
  {{- include "combine.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: combine
spec:
  replicas: {{ .Values.combine.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: combine
      app.kubernetes.io/name: nonconformist
    {{- include "combine.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: combine
        app.kubernetes.io/name: nonconformist
      {{- include "combine.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 96d3789d785e37566350df29d31ff9452628f74b22f14b53cfca0fb366040fab
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "combine.fullname" . }}-combine
        image: {{ .Values.combine.combine.image.repository }}:{{ .Values.combine.combine.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.combine.combine.imagePullPolicy }}
        name: combine
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.combine.combine.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.combine.combine.containerSecurityContext |
          nindent 10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "combine.fullname" . }}-combine
  labels:
  {{- include "combine.labels" . | nindent 4 }}
spec:
  type: {{ .Values.combine.type }}
  selector:
    app.kubernetes.io/instance: combine
    app.kubernetes.io/name: nonconformist
  {{- include "combine.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.combine.ports | toYaml | nindent 2 -}}
combine:
  batteryEffectorRoot: jeweller
  blinkSincere: hat
  combine:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  dueCampSandal: mascara
  handsawFolkGyro: typeface
  harbor: obligation
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  tiara: town
  type: ClusterIP
  ubiquitousBackpack: dramaturge
  verandaCopying: payee
  wake: winner
kubernetesClusterDomain: cluster.local
