# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "mukluk.fullname" . }}-mukluk
  labels:
  {{- include "mukluk.labels" . | nindent 4 }}
data:
  CURLY_SHEARLING: {{ .Values.mukluk.curlyShearling | quote }}
  INVESTOR_MASS_RUBBER: {{ .Values.mukluk.investorMassRubber | quote }}
  LYCHEE: {{ .Values.mukluk.lychee | quote }}
  MURDER: {{ .Values.mukluk.murder | quote }}
  MURDER_EAGLE: {{ .Values.mukluk.murderEagle | quote }}
  OVERWROUGHT_DOGWOOD_EXTERNAL: {{ .Values.mukluk.overwroughtDogwoodExternal | quote
    }}
  PERIODIC: {{ .Values.mukluk.periodic | quote }}
  PORCELAIN_TAMALE: {{ .Values.mukluk.porcelainTamale | quote }}
  REVIVAL_EXCELLENT: {{ .Values.mukluk.revivalExcellent | quote }}
  RULE_YEAST: {{ .Values.mukluk.ruleYeast | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "mukluk.fullname" . }}-mukluk
  labels:
  {{- include "mukluk.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: mukluk
spec:
  replicas: {{ .Values.mukluk.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: mukluk
      app.kubernetes.io/name: interconnection
    {{- include "mukluk.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: mukluk
        app.kubernetes.io/name: interconnection
      {{- include "mukluk.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: b5b60285bb16fa39171bd7d8fc305e9e9f54bac16e22fc6d733d767c05bd6c7b
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "mukluk.fullname" . }}-mukluk
        image: {{ .Values.mukluk.mukluk.image.repository }}:{{ .Values.mukluk.mukluk.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.mukluk.mukluk.imagePullPolicy }}
        name: mukluk
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.mukluk.mukluk.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.mukluk.mukluk.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "mukluk.fullname" . }}-mukluk
  labels:
  {{- include "mukluk.labels" . | nindent 4 }}
spec:
  type: {{ .Values.mukluk.type }}
  selector:
    app.kubernetes.io/instance: mukluk
    app.kubernetes.io/name: interconnection
  {{- include "mukluk.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.mukluk.ports | toYaml | nindent 2 -}}
kubernetesClusterDomain: cluster.local
mukluk:
  curlyShearling: almond
  investorMassRubber: festival
  lychee: recall
  mukluk:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  murder: ford
  murderEagle: cookbook
  overwroughtDogwoodExternal: sister
  periodic: aside
  porcelainTamale: carol
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  revivalExcellent: shoestring
  ruleYeast: feature
  type: ClusterIP
