# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "pathogenesis.fullname" . }}-pathogenesis
  labels:
  {{- include "pathogenesis.labels" . | nindent 4 }}
data:
  FOOTAGE_PUPPY: {{ .Values.pathogenesis.footagePuppy | quote }}
  INCONCLUSIVE: {{ .Values.pathogenesis.inconclusive | quote }}
  MOTORCAR_PENINSULA_MOUSSE: {{ .Values.pathogenesis.motorcarPeninsulaMousse | quote
    }}
  PUBLICATION_UNDERWIRE_STEP-GRANDFATHER: {{ .Values.pathogenesis.publicationUnderwireStepGrandfather
    | quote }}
  RESOLUTION_INTERFACE_CLOUD: {{ .Values.pathogenesis.resolutionInterfaceCloud |
    quote }}
  STUPIDITY_PAT: {{ .Values.pathogenesis.stupidityPat | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "pathogenesis.fullname" . }}-pathogenesis
  labels:
  {{- include "pathogenesis.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: pathogenesis
spec:
  replicas: {{ .Values.pathogenesis.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: pathogenesis
      app.kubernetes.io/name: footrest
    {{- include "pathogenesis.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: pathogenesis
        app.kubernetes.io/name: footrest
      {{- include "pathogenesis.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 8f5c0f798da5b802443ea7d6f7b4689c08bd8b6b58bded55f9f7a6c5ec9bc5c2
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "pathogenesis.fullname" . }}-pathogenesis
        image: {{ .Values.pathogenesis.pathogenesis.image.repository }}:{{ .Values.pathogenesis.pathogenesis.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.pathogenesis.pathogenesis.imagePullPolicy }}
        name: pathogenesis
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.pathogenesis.pathogenesis.resources | nindent 10
          }}
        securityContext: {{- toYaml .Values.pathogenesis.pathogenesis.containerSecurityContext
          | nindent 10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "pathogenesis.fullname" . }}-pathogenesis
  labels:
  {{- include "pathogenesis.labels" . | nindent 4 }}
spec:
  type: {{ .Values.pathogenesis.type }}
  selector:
    app.kubernetes.io/instance: pathogenesis
    app.kubernetes.io/name: footrest
  {{- include "pathogenesis.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.pathogenesis.ports | toYaml | nindent 2 -}}
kubernetesClusterDomain: cluster.local
pathogenesis:
  footagePuppy: bathe
  inconclusive: escape
  motorcarPeninsulaMousse: pitcher
  pathogenesis:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  publicationUnderwireStepGrandfather: soy
  replicas: 1
  resolutionInterfaceCloud: offset
  stupidityPat: interpretation
  type: ClusterIP
