# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "hashtag.fullname" . }}-hashtag
  labels:
  {{- include "hashtag.labels" . | nindent 4 }}
data:
  ANCESTOR_QUESTION_ALMANAC: {{ .Values.hashtag.ancestorQuestionAlmanac | quote }}
  BROOCH_MEDAL: {{ .Values.hashtag.broochMedal | quote }}
  CONFESS: {{ .Values.hashtag.confess | quote }}
  FAVA_MANDOLIN_TRICK: {{ .Values.hashtag.favaMandolinTrick | quote }}
  FISHERMAN_ANALOGUE_SNAP: {{ .Values.hashtag.fishermanAnalogueSnap | quote }}
  INCUBATION_MOTIVATE_HEYDAY: {{ .Values.hashtag.incubationMotivateHeyday | quote
    }}
  INTERFACE_NEUROPSYCHIATRY_FORGETFUL: {{ .Values.hashtag.interfaceNeuropsychiatryForgetful
    | quote }}
  MEASLY_SITAR_CLOSING: {{ .Values.hashtag.measlySitarClosing | quote }}
  MUSIC-MAKING_DERIVATIVE_BROAD: {{ .Values.hashtag.musicMakingDerivativeBroad |
    quote }}
  SYMPTOM: {{ .Values.hashtag.symptom | quote }}
  WED_GLIDER: {{ .Values.hashtag.wedGlider | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "hashtag.fullname" . }}-hashtag
  labels:
  {{- include "hashtag.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: hashtag
spec:
  replicas: {{ .Values.hashtag.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: hashtag
      app.kubernetes.io/name: brooch
    {{- include "hashtag.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: hashtag
        app.kubernetes.io/name: brooch
      {{- include "hashtag.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 6ef712d1963baff4b689643d98a5500b6db0755fbefdf8c9fe65683d75d06318
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "hashtag.fullname" . }}-hashtag
        image: {{ .Values.hashtag.hashtag.image.repository }}:{{ .Values.hashtag.hashtag.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.hashtag.hashtag.imagePullPolicy }}
        name: hashtag
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.hashtag.hashtag.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.hashtag.hashtag.containerSecurityContext |
          nindent 10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "hashtag.fullname" . }}-hashtag
  labels:
  {{- include "hashtag.labels" . | nindent 4 }}
spec:
  type: {{ .Values.hashtag.type }}
  selector:
    app.kubernetes.io/instance: hashtag
    app.kubernetes.io/name: brooch
  {{- include "hashtag.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.hashtag.ports | toYaml | nindent 2 -}}
hashtag:
  ancestorQuestionAlmanac: cross-contamination
  broochMedal: ambiguous
  confess: hunter
  favaMandolinTrick: matchmaker
  fishermanAnalogueSnap: saffron
  hashtag:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  incubationMotivateHeyday: azimuth
  interfaceNeuropsychiatryForgetful: nod
  measlySitarClosing: limb
  musicMakingDerivativeBroad: distribution
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  symptom: skillful
  type: ClusterIP
  wedGlider: interject
kubernetesClusterDomain: cluster.local
