# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "innovation.fullname" . }}-innovation
  labels:
  {{- include "innovation.labels" . | nindent 4 }}
data:
  FIND: {{ .Values.innovation.find | quote }}
  JIFFY_LEAP: {{ .Values.innovation.jiffyLeap | quote }}
  TENT_TURKEY_TOGA: {{ .Values.innovation.tentTurkeyToga | quote }}
  TENTH: {{ .Values.innovation.tenth | quote }}
  VIRTUE_MUFFIN: {{ .Values.innovation.virtueMuffin | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "innovation.fullname" . }}-innovation
  labels:
  {{- include "innovation.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: innovation
spec:
  replicas: {{ .Values.innovation.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: innovation
      app.kubernetes.io/name: spreadsheet
    {{- include "innovation.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: innovation
        app.kubernetes.io/name: spreadsheet
      {{- include "innovation.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 3619f245b86188aba66e2cda155217690fe19c5cd74a7f978085fbf4929489ab
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "innovation.fullname" . }}-innovation
        image: {{ .Values.innovation.innovation.image.repository }}:{{ .Values.innovation.innovation.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.innovation.innovation.imagePullPolicy }}
        name: innovation
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.innovation.innovation.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.innovation.innovation.containerSecurityContext
          | nindent 10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "innovation.fullname" . }}-innovation
  labels:
  {{- include "innovation.labels" . | nindent 4 }}
spec:
  type: {{ .Values.innovation.type }}
  selector:
    app.kubernetes.io/instance: innovation
    app.kubernetes.io/name: spreadsheet
  {{- include "innovation.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.innovation.ports | toYaml | nindent 2 -}}
innovation:
  find: appraise
  innovation:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  jiffyLeap: golf
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  tentTurkeyToga: friend
  tenth: stot
  type: ClusterIP
  virtueMuffin: guideline
kubernetesClusterDomain: cluster.local
