# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "sidecar.fullname" . }}-sidecar
  labels:
  {{- include "sidecar.labels" . | nindent 4 }}
data:
  BLADDER_SHRED_EXTERIOR: {{ .Values.sidecar.bladderShredExterior | quote }}
  DOLOR_PURITY: {{ .Values.sidecar.dolorPurity | quote }}
  LIPOPROTEIN_TYPE: {{ .Values.sidecar.lipoproteinType | quote }}
  PEEP: {{ .Values.sidecar.peep | quote }}
  REAL_CLOSURE: {{ .Values.sidecar.realClosure | quote }}
  SCRIM_BROAD_GRANDPA: {{ .Values.sidecar.scrimBroadGrandpa | quote }}
  TAKEOVER_GOVERNOR: {{ .Values.sidecar.takeoverGovernor | quote }}
  TRITONE_TAKE-OUT_VANISH: {{ .Values.sidecar.tritoneTakeOutVanish | quote }}
  UNDERSTATEMENT_SOFTBALL_DEPRESSION: {{ .Values.sidecar.understatementSoftballDepression
    | quote }}
  VOLUME: {{ .Values.sidecar.volume | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "sidecar.fullname" . }}-sidecar
  labels:
  {{- include "sidecar.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: sidecar
spec:
  replicas: {{ .Values.sidecar.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: sidecar
      app.kubernetes.io/name: shoe-horn
    {{- include "sidecar.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: sidecar
        app.kubernetes.io/name: shoe-horn
      {{- include "sidecar.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 9aea4989a91f7138531536f26a25ffeca6c894cab96edf51ae4058cd3e6a6f6c
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "sidecar.fullname" . }}-sidecar
        image: {{ .Values.sidecar.sidecar.image.repository }}:{{ .Values.sidecar.sidecar.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.sidecar.sidecar.imagePullPolicy }}
        name: sidecar
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.sidecar.sidecar.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.sidecar.sidecar.containerSecurityContext |
          nindent 10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "sidecar.fullname" . }}-sidecar
  labels:
  {{- include "sidecar.labels" . | nindent 4 }}
spec:
  type: {{ .Values.sidecar.type }}
  selector:
    app.kubernetes.io/instance: sidecar
    app.kubernetes.io/name: shoe-horn
  {{- include "sidecar.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.sidecar.ports | toYaml | nindent 2 -}}
kubernetesClusterDomain: cluster.local
sidecar:
  bladderShredExterior: switch
  dolorPurity: boiling
  lipoproteinType: monastery
  peep: hexagon
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  realClosure: siege
  replicas: 1
  scrimBroadGrandpa: bowl
  sidecar:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  takeoverGovernor: wicked
  tritoneTakeOutVanish: armor
  type: ClusterIP
  understatementSoftballDepression: motionless
  volume: assault
