# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "injunction.fullname" . }}-injunction
  labels:
  {{- include "injunction.labels" . | nindent 4 }}
data:
  ACCORD_PREVENTION: {{ .Values.injunction.accordPrevention | quote }}
  BRIEFING_EMBARRASS: {{ .Values.injunction.briefingEmbarrass | quote }}
  FLOOD_ACCELERANT_SUBSIDY: {{ .Values.injunction.floodAccelerantSubsidy | quote
    }}
  MAKEUP: {{ .Values.injunction.makeup | quote }}
  MEN_CRUSH: {{ .Values.injunction.menCrush | quote }}
  NONDESCRIPT: {{ .Values.injunction.nondescript | quote }}
  SUBWAY_EMERGENCE_UNDERSTOOD: {{ .Values.injunction.subwayEmergenceUnderstood |
    quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "injunction.fullname" . }}-injunction
  labels:
  {{- include "injunction.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: injunction
spec:
  replicas: {{ .Values.injunction.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: injunction
      app.kubernetes.io/name: mend
    {{- include "injunction.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: injunction
        app.kubernetes.io/name: mend
      {{- include "injunction.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 89a7c52d54c31accbdcb5634b0a1637cfbbc6f31c9e94131e020a12e852d9d90
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "injunction.fullname" . }}-injunction
        image: {{ .Values.injunction.injunction.image.repository }}:{{ .Values.injunction.injunction.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.injunction.injunction.imagePullPolicy }}
        name: injunction
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.injunction.injunction.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.injunction.injunction.containerSecurityContext
          | nindent 10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "injunction.fullname" . }}-injunction
  labels:
  {{- include "injunction.labels" . | nindent 4 }}
spec:
  type: {{ .Values.injunction.type }}
  selector:
    app.kubernetes.io/instance: injunction
    app.kubernetes.io/name: mend
  {{- include "injunction.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.injunction.ports | toYaml | nindent 2 -}}
injunction:
  accordPrevention: tender
  briefingEmbarrass: sour
  floodAccelerantSubsidy: wend
  injunction:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  makeup: lychee
  menCrush: diagnose
  nondescript: tiger
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  subwayEmergenceUnderstood: tide
  type: ClusterIP
kubernetesClusterDomain: cluster.local
