# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "bull.fullname" . }}-bull
  labels:
  {{- include "bull.labels" . | nindent 4 }}
data:
  ADAPT_SPEECH_RIGHT: {{ .Values.bull.adaptSpeechRight | quote }}
  CRATE_KIMONO: {{ .Values.bull.crateKimono | quote }}
  EARN_GRACEFUL_ACORN: {{ .Values.bull.earnGracefulAcorn | quote }}
  FLICK_VOYAGE_BREATH: {{ .Values.bull.flickVoyageBreath | quote }}
  FOREST: {{ .Values.bull.forest | quote }}
  HUMOUR_BOTANY: {{ .Values.bull.humourBotany | quote }}
  INTERNAL_AMBITION: {{ .Values.bull.internalAmbition | quote }}
  MEMO_UKULELE_VESSEL: {{ .Values.bull.memoUkuleleVessel | quote }}
  ORGANISING: {{ .Values.bull.organising | quote }}
  PENINSULA_IVORY_LARD: {{ .Values.bull.peninsulaIvoryLard | quote }}
  POVERTY_COVERAGE: {{ .Values.bull.povertyCoverage | quote }}
  TOP-HAT: {{ .Values.bull.topHat | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "bull.fullname" . }}-bull
  labels:
  {{- include "bull.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: bull
spec:
  replicas: {{ .Values.bull.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: bull
      app.kubernetes.io/name: blog
    {{- include "bull.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: bull
        app.kubernetes.io/name: blog
      {{- include "bull.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 96f1865ae697cb401050eb175fb25f322b621be9767969a225fd30fb9163dfa1
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "bull.fullname" . }}-bull
        image: {{ .Values.bull.bull.image.repository }}:{{ .Values.bull.bull.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.bull.bull.imagePullPolicy }}
        name: bull
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.bull.bull.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.bull.bull.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "bull.fullname" . }}-bull
  labels:
  {{- include "bull.labels" . | nindent 4 }}
spec:
  type: {{ .Values.bull.type }}
  selector:
    app.kubernetes.io/instance: bull
    app.kubernetes.io/name: blog
  {{- include "bull.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.bull.ports | toYaml | nindent 2 -}}
bull:
  adaptSpeechRight: drag
  bull:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  crateKimono: wind
  earnGracefulAcorn: deal
  flickVoyageBreath: ascertain
  forest: cultivator
  humourBotany: yawn
  internalAmbition: candidacy
  memoUkuleleVessel: propaganda
  organising: cilantro
  peninsulaIvoryLard: upward
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  povertyCoverage: pantyhose
  replicas: 1
  topHat: ephemera
  type: ClusterIP
kubernetesClusterDomain: cluster.local
