# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "feigned.fullname" . }}-feigned
  labels:
  {{- include "feigned.labels" . | nindent 4 }}
data:
  ACTIVATION: {{ .Values.feigned.activation | quote }}
  AMBIGUITY_OCTET: {{ .Values.feigned.ambiguityOctet | quote }}
  COLLEAGUE: {{ .Values.feigned.colleague | quote }}
  COMPETITOR: {{ .Values.feigned.competitor | quote }}
  COMPETITOR_INTERVENTION: {{ .Values.feigned.competitorIntervention | quote }}
  LAYOUT_BORDER: {{ .Values.feigned.layoutBorder | quote }}
  METHODOLOGY_RAID: {{ .Values.feigned.methodologyRaid | quote }}
  MUFFIN_OBTAINABLE: {{ .Values.feigned.muffinObtainable | quote }}
  SOLUTION_SHOEHORN: {{ .Values.feigned.solutionShoehorn | quote }}
  SQUEEZE: {{ .Values.feigned.squeeze | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "feigned.fullname" . }}-feigned
  labels:
  {{- include "feigned.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: feigned
spec:
  replicas: {{ .Values.feigned.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: feigned
      app.kubernetes.io/name: grove
    {{- include "feigned.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: feigned
        app.kubernetes.io/name: grove
      {{- include "feigned.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: bc35e5129fd3dafd17f6a6348d7fac92a7a81ad4308b2a3cefc0a0636122c93d
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "feigned.fullname" . }}-feigned
        image: {{ .Values.feigned.feigned.image.repository }}:{{ .Values.feigned.feigned.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.feigned.feigned.imagePullPolicy }}
        name: feigned
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.feigned.feigned.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.feigned.feigned.containerSecurityContext |
          nindent 10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "feigned.fullname" . }}-feigned
  labels:
  {{- include "feigned.labels" . | nindent 4 }}
spec:
  type: {{ .Values.feigned.type }}
  selector:
    app.kubernetes.io/instance: feigned
    app.kubernetes.io/name: grove
  {{- include "feigned.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.feigned.ports | toYaml | nindent 2 -}}
feigned:
  activation: lighting
  ambiguityOctet: blushing
  colleague: chapter
  competitor: furtive
  competitorIntervention: alfalfa
  feigned:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  layoutBorder: presidency
  methodologyRaid: peaceful
  muffinObtainable: upstairs
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  solutionShoehorn: first
  squeeze: troubleshoot
  type: ClusterIP
kubernetesClusterDomain: cluster.local
