# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "stool.fullname" . }}-stool
  labels:
  {{- include "stool.labels" . | nindent 4 }}
data:
  BORROWER_FOLKLORE: {{ .Values.stool.borrowerFolklore | quote }}
  DADDY_APPETIZER_SIMILARITY: {{ .Values.stool.daddyAppetizerSimilarity | quote }}
  ECLIPTIC_WAITRESS: {{ .Values.stool.eclipticWaitress | quote }}
  FULFILLMENT: {{ .Values.stool.fulfillment | quote }}
  ICE-CREAM_SPEAKERPHONE_INNOVATE: {{ .Values.stool.iceCreamSpeakerphoneInnovate
    | quote }}
  LEMUR_MARGARINE_SILKY: {{ .Values.stool.lemurMargarineSilky | quote }}
  SASSY_CLOVER: {{ .Values.stool.sassyClover | quote }}
  SILK_HIGH_LUNCHEONETTE: {{ .Values.stool.silkHighLuncheonette | quote }}
  STABLE_WARLOCK_CYST: {{ .Values.stool.stableWarlockCyst | quote }}
  STRIVE: {{ .Values.stool.strive | quote }}
  USED: {{ .Values.stool.used | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "stool.fullname" . }}-stool
  labels:
  {{- include "stool.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: stool
spec:
  replicas: {{ .Values.stool.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: stool
      app.kubernetes.io/name: harp
    {{- include "stool.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: stool
        app.kubernetes.io/name: harp
      {{- include "stool.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: c882420e8b7acd15f51e1b5ec441b83d8e05775cafea2a432c8c8c725bde6276
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "stool.fullname" . }}-stool
        image: {{ .Values.stool.stool.image.repository }}:{{ .Values.stool.stool.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.stool.stool.imagePullPolicy }}
        name: stool
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.stool.stool.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.stool.stool.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "stool.fullname" . }}-stool
  labels:
  {{- include "stool.labels" . | nindent 4 }}
spec:
  type: {{ .Values.stool.type }}
  selector:
    app.kubernetes.io/instance: stool
    app.kubernetes.io/name: harp
  {{- include "stool.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.stool.ports | toYaml | nindent 2 -}}
kubernetesClusterDomain: cluster.local
stool:
  borrowerFolklore: max
  daddyAppetizerSimilarity: granola
  eclipticWaitress: pawnshop
  fulfillment: juicy
  iceCreamSpeakerphoneInnovate: juggle
  lemurMargarineSilky: injure
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  sassyClover: paddle
  silkHighLuncheonette: freckle
  stableWarlockCyst: cytoplasm
  stool:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  strive: penalty
  type: ClusterIP
  used: hole
