# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "ceramic.fullname" . }}-ceramic
  labels:
  {{- include "ceramic.labels" . | nindent 4 }}
data:
  ANTENNAE_BOTTOM-LINE_HUSHED: {{ .Values.ceramic.antennaeBottomLineHushed | quote
    }}
  CRANBERRY_INCONVENIENCE_FAVOR: {{ .Values.ceramic.cranberryInconvenienceFavor |
    quote }}
  MUSHROOM_MACADAMIA_CAPABILITY: {{ .Values.ceramic.mushroomMacadamiaCapability |
    quote }}
  OVERTAKE: {{ .Values.ceramic.overtake | quote }}
  RATEPAYER: {{ .Values.ceramic.ratepayer | quote }}
  TOASTER_OBNOXIOUS_GREASY: {{ .Values.ceramic.toasterObnoxiousGreasy | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "ceramic.fullname" . }}-ceramic
  labels:
  {{- include "ceramic.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: ceramic
spec:
  replicas: {{ .Values.ceramic.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: ceramic
      app.kubernetes.io/name: bitten
    {{- include "ceramic.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: ceramic
        app.kubernetes.io/name: bitten
      {{- include "ceramic.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 9934795d1d899a1e72438fd8ca71faf67487a537937af0d1fe2ca721392512e2
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "ceramic.fullname" . }}-ceramic
        image: {{ .Values.ceramic.ceramic.image.repository }}:{{ .Values.ceramic.ceramic.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.ceramic.ceramic.imagePullPolicy }}
        name: ceramic
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.ceramic.ceramic.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.ceramic.ceramic.containerSecurityContext |
          nindent 10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "ceramic.fullname" . }}-ceramic
  labels:
  {{- include "ceramic.labels" . | nindent 4 }}
spec:
  type: {{ .Values.ceramic.type }}
  selector:
    app.kubernetes.io/instance: ceramic
    app.kubernetes.io/name: bitten
  {{- include "ceramic.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.ceramic.ports | toYaml | nindent 2 -}}
ceramic:
  antennaeBottomLineHushed: kneejerk
  ceramic:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  cranberryInconvenienceFavor: gator
  mushroomMacadamiaCapability: boxer
  overtake: kohlrabi
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  ratepayer: nightclub
  replicas: 1
  toasterObnoxiousGreasy: flute
  type: ClusterIP
kubernetesClusterDomain: cluster.local
