# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "hold.fullname" . }}-hold
  labels:
  {{- include "hold.labels" . | nindent 4 }}
data:
  ACCORD: {{ .Values.hold.accord | quote }}
  BURDEN_CONVENIENCE: {{ .Values.hold.burdenConvenience | quote }}
  HOMICIDE_CRITIC_MISREADING: {{ .Values.hold.homicideCriticMisreading | quote }}
  SPINACH_VALLEY_CROUP: {{ .Values.hold.spinachValleyCroup | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "hold.fullname" . }}-hold
  labels:
  {{- include "hold.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: hold
spec:
  replicas: {{ .Values.hold.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: hold
      app.kubernetes.io/name: choke
    {{- include "hold.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: hold
        app.kubernetes.io/name: choke
      {{- include "hold.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 66831a33c8b58d79dfc863aec41c8917d14272eb5579c2fdd8840eb5d84c9679
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "hold.fullname" . }}-hold
        image: {{ .Values.hold.hold.image.repository }}:{{ .Values.hold.hold.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.hold.hold.imagePullPolicy }}
        name: hold
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.hold.hold.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.hold.hold.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "hold.fullname" . }}-hold
  labels:
  {{- include "hold.labels" . | nindent 4 }}
spec:
  type: {{ .Values.hold.type }}
  selector:
    app.kubernetes.io/instance: hold
    app.kubernetes.io/name: choke
  {{- include "hold.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.hold.ports | toYaml | nindent 2 -}}
hold:
  accord: cranberry
  burdenConvenience: station
  hold:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  homicideCriticMisreading: fur
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  spinachValleyCroup: hectare
  type: ClusterIP
kubernetesClusterDomain: cluster.local
