# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "duffel.fullname" . }}-duffel
  labels:
  {{- include "duffel.labels" . | nindent 4 }}
data:
  ABASHED: {{ .Values.duffel.abashed | quote }}
  BONUS_FREEZER: {{ .Values.duffel.bonusFreezer | quote }}
  CRANE: {{ .Values.duffel.crane | quote }}
  CROSS-CONTAMINATION: {{ .Values.duffel.crossContamination | quote }}
  LATTER_FLAVOR_PINECONE: {{ .Values.duffel.latterFlavorPinecone | quote }}
  PERCEPTION: {{ .Values.duffel.perception | quote }}
  POVERTY: {{ .Values.duffel.poverty | quote }}
  SORE_WASTING_MINOR-LEAGUE: {{ .Values.duffel.soreWastingMinorLeague | quote }}
  TERM_WICK: {{ .Values.duffel.termWick | quote }}
  TRINKET: {{ .Values.duffel.trinket | quote }}
  UNTIDY_BRAWNY_WIPE: {{ .Values.duffel.untidyBrawnyWipe | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "duffel.fullname" . }}-duffel
  labels:
  {{- include "duffel.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: duffel
spec:
  replicas: {{ .Values.duffel.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: duffel
      app.kubernetes.io/name: spectacular
    {{- include "duffel.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: duffel
        app.kubernetes.io/name: spectacular
      {{- include "duffel.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: bed7127138ca150ca978694ecaa9397d0c1d262b845da57c3ee52b1b4c1bb274
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "duffel.fullname" . }}-duffel
        image: {{ .Values.duffel.duffel.image.repository }}:{{ .Values.duffel.duffel.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.duffel.duffel.imagePullPolicy }}
        name: duffel
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.duffel.duffel.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.duffel.duffel.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "duffel.fullname" . }}-duffel
  labels:
  {{- include "duffel.labels" . | nindent 4 }}
spec:
  type: {{ .Values.duffel.type }}
  selector:
    app.kubernetes.io/instance: duffel
    app.kubernetes.io/name: spectacular
  {{- include "duffel.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.duffel.ports | toYaml | nindent 2 -}}
duffel:
  abashed: patrimony
  bonusFreezer: relieved
  crane: awareness
  crossContamination: typewriter
  duffel:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  latterFlavorPinecone: flair
  perception: soothsay
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  poverty: disk
  replicas: 1
  soreWastingMinorLeague: investment
  termWick: producer
  trinket: unbecoming
  type: ClusterIP
  untidyBrawnyWipe: bloody
kubernetesClusterDomain: cluster.local
