# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "defiant.fullname" . }}-defiant
  labels:
  {{- include "defiant.labels" . | nindent 4 }}
data:
  AFTERNOON_FERTILIZER_SCRAPE: {{ .Values.defiant.afternoonFertilizerScrape | quote
    }}
  BORDER_SUBURB_ADMINISTER: {{ .Values.defiant.borderSuburbAdminister | quote }}
  BRINK_DIFFERENCE_PUMPKIN: {{ .Values.defiant.brinkDifferencePumpkin | quote }}
  ENJOY_KAYAK: {{ .Values.defiant.enjoyKayak | quote }}
  EYE: {{ .Values.defiant.eye | quote }}
  PENINSULA_OPINION_MORTISE: {{ .Values.defiant.peninsulaOpinionMortise | quote }}
  RAIL_BRICK: {{ .Values.defiant.railBrick | quote }}
  ROADWAY_SORGHUM_EXPLAIN: {{ .Values.defiant.roadwaySorghumExplain | quote }}
  SAFETY_CONSEQUENCE: {{ .Values.defiant.safetyConsequence | quote }}
  SHIRTDRESS_ENCIRCLEMENT: {{ .Values.defiant.shirtdressEncirclement | quote }}
  THEFT_CABLE: {{ .Values.defiant.theftCable | quote }}
  VALIDATE_SOLE_CALF: {{ .Values.defiant.validateSoleCalf | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "defiant.fullname" . }}-defiant
  labels:
  {{- include "defiant.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: defiant
spec:
  replicas: {{ .Values.defiant.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: defiant
      app.kubernetes.io/name: papa
    {{- include "defiant.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: defiant
        app.kubernetes.io/name: papa
      {{- include "defiant.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 50047c6acd1fd135afaf7bcba11fd480486adce3c486616e13ab0e00a5833721
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "defiant.fullname" . }}-defiant
        image: {{ .Values.defiant.defiant.image.repository }}:{{ .Values.defiant.defiant.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.defiant.defiant.imagePullPolicy }}
        name: defiant
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.defiant.defiant.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.defiant.defiant.containerSecurityContext |
          nindent 10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "defiant.fullname" . }}-defiant
  labels:
  {{- include "defiant.labels" . | nindent 4 }}
spec:
  type: {{ .Values.defiant.type }}
  selector:
    app.kubernetes.io/instance: defiant
    app.kubernetes.io/name: papa
  {{- include "defiant.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.defiant.ports | toYaml | nindent 2 -}}
defiant:
  afternoonFertilizerScrape: harmonious
  borderSuburbAdminister: counterterrorism
  brinkDifferencePumpkin: ubiquitous
  defiant:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  enjoyKayak: money
  eye: coonskin
  peninsulaOpinionMortise: remark
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  railBrick: handrail
  replicas: 1
  roadwaySorghumExplain: peace
  safetyConsequence: technician
  shirtdressEncirclement: rawhide
  theftCable: placebo
  type: ClusterIP
  validateSoleCalf: gumshoe
kubernetesClusterDomain: cluster.local
