# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "footage.fullname" . }}-footage
  labels:
  {{- include "footage.labels" . | nindent 4 }}
data:
  HUMAN: {{ .Values.footage.human | quote }}
  MERCHANDISE: {{ .Values.footage.merchandise | quote }}
  PAINFUL_SIDEWALK_JUSTIFICATION: {{ .Values.footage.painfulSidewalkJustification
    | quote }}
  THOUSAND: {{ .Values.footage.thousand | quote }}
  VET_MAILBOX_COMPREHENSION: {{ .Values.footage.vetMailboxComprehension | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "footage.fullname" . }}-footage
  labels:
  {{- include "footage.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: footage
spec:
  replicas: {{ .Values.footage.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: footage
      app.kubernetes.io/name: soda
    {{- include "footage.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: footage
        app.kubernetes.io/name: soda
      {{- include "footage.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 01fa20827c64429d449c9e276a06b06142aeebf871765728c7887c322f572355
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "footage.fullname" . }}-footage
        image: {{ .Values.footage.footage.image.repository }}:{{ .Values.footage.footage.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.footage.footage.imagePullPolicy }}
        name: footage
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.footage.footage.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.footage.footage.containerSecurityContext |
          nindent 10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "footage.fullname" . }}-footage
  labels:
  {{- include "footage.labels" . | nindent 4 }}
spec:
  type: {{ .Values.footage.type }}
  selector:
    app.kubernetes.io/instance: footage
    app.kubernetes.io/name: soda
  {{- include "footage.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.footage.ports | toYaml | nindent 2 -}}
footage:
  footage:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  human: misunderstand
  merchandise: gamma-ray
  painfulSidewalkJustification: flee
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  thousand: diarist
  type: ClusterIP
  vetMailboxComprehension: replica
kubernetesClusterDomain: cluster.local
