# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "marionberry.fullname" . }}-marionberry
  labels:
  {{- include "marionberry.labels" . | nindent 4 }}
data:
  BITE_WILDERNESS_TRIGONOMETRY: {{ .Values.marionberry.biteWildernessTrigonometry
    | quote }}
  CONTROLLER: {{ .Values.marionberry.controller | quote }}
  CUP_CLEAVAGE_EPOCH: {{ .Values.marionberry.cupCleavageEpoch | quote }}
  GLOW: {{ .Values.marionberry.glow | quote }}
  GOODWILL_HALTING_BUILDING: {{ .Values.marionberry.goodwillHaltingBuilding | quote
    }}
  LAVA_GET: {{ .Values.marionberry.lavaGet | quote }}
  PRIVILEGE_SPUD_TEMPERATURE: {{ .Values.marionberry.privilegeSpudTemperature | quote
    }}
  SKILLFUL: {{ .Values.marionberry.skillful | quote }}
  SPEECH_PIMPLE: {{ .Values.marionberry.speechPimple | quote }}
  SUSPEND: {{ .Values.marionberry.suspend | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "marionberry.fullname" . }}-marionberry
  labels:
  {{- include "marionberry.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: marionberry
spec:
  replicas: {{ .Values.marionberry.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: marionberry
      app.kubernetes.io/name: ravioli
    {{- include "marionberry.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: marionberry
        app.kubernetes.io/name: ravioli
      {{- include "marionberry.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 19f73c7759a9afe12d3765161e52f97037f123c6e2d8fe60daf962410683f605
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "marionberry.fullname" . }}-marionberry
        image: {{ .Values.marionberry.marionberry.image.repository }}:{{ .Values.marionberry.marionberry.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.marionberry.marionberry.imagePullPolicy }}
        name: marionberry
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.marionberry.marionberry.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.marionberry.marionberry.containerSecurityContext
          | nindent 10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "marionberry.fullname" . }}-marionberry
  labels:
  {{- include "marionberry.labels" . | nindent 4 }}
spec:
  type: {{ .Values.marionberry.type }}
  selector:
    app.kubernetes.io/instance: marionberry
    app.kubernetes.io/name: ravioli
  {{- include "marionberry.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.marionberry.ports | toYaml | nindent 2 -}}
kubernetesClusterDomain: cluster.local
marionberry:
  biteWildernessTrigonometry: matter
  controller: consent
  cupCleavageEpoch: rain
  glow: phenomenon
  goodwillHaltingBuilding: bet
  lavaGet: army
  marionberry:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  privilegeSpudTemperature: nun
  replicas: 1
  skillful: boyhood
  speechPimple: tense
  suspend: vignette
  type: ClusterIP
