# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "costume.fullname" . }}-costume
  labels:
  {{- include "costume.labels" . | nindent 4 }}
data:
  ACCOMPLISH_BATHE_ABROGATION: {{ .Values.costume.accomplishBatheAbrogation | quote
    }}
  DAPPER_PAPA_PUDDLE: {{ .Values.costume.dapperPapaPuddle | quote }}
  EVENING-WEAR_INCH: {{ .Values.costume.eveningWearInch | quote }}
  FLUNG_ELICIT: {{ .Values.costume.flungElicit | quote }}
  INTERNET_OBLIGATION_LOGO: {{ .Values.costume.internetObligationLogo | quote }}
  REPLACE_DEVELOPER: {{ .Values.costume.replaceDeveloper | quote }}
  SCREAMER: {{ .Values.costume.screamer | quote }}
  SLICE_VODKA_ACCORD: {{ .Values.costume.sliceVodkaAccord | quote }}
  TERRORISM: {{ .Values.costume.terrorism | quote }}
  TOOL_ACCELERATOR_STREAM: {{ .Values.costume.toolAcceleratorStream | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "costume.fullname" . }}-costume
  labels:
  {{- include "costume.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: costume
spec:
  replicas: {{ .Values.costume.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: costume
      app.kubernetes.io/name: spyglass
    {{- include "costume.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: costume
        app.kubernetes.io/name: spyglass
      {{- include "costume.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 719c6b38b6faaf770abded17f59a4c9c969058a75b352ab780f2f5d293c48dca
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "costume.fullname" . }}-costume
        image: {{ .Values.costume.costume.image.repository }}:{{ .Values.costume.costume.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.costume.costume.imagePullPolicy }}
        name: costume
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.costume.costume.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.costume.costume.containerSecurityContext |
          nindent 10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "costume.fullname" . }}-costume
  labels:
  {{- include "costume.labels" . | nindent 4 }}
spec:
  type: {{ .Values.costume.type }}
  selector:
    app.kubernetes.io/instance: costume
    app.kubernetes.io/name: spyglass
  {{- include "costume.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.costume.ports | toYaml | nindent 2 -}}
costume:
  accomplishBatheAbrogation: counsel
  costume:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  dapperPapaPuddle: pharmacist
  eveningWearInch: friend
  flungElicit: ethyl
  internetObligationLogo: evening
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replaceDeveloper: nylon
  replicas: 1
  screamer: cassava
  sliceVodkaAccord: turning
  terrorism: trumpet
  toolAcceleratorStream: ad
  type: ClusterIP
kubernetesClusterDomain: cluster.local
