# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "disturbed.fullname" . }}-disturbed
  labels:
  {{- include "disturbed.labels" . | nindent 4 }}
data:
  CROCUS_FLOAT_QUICKSAND: {{ .Values.disturbed.crocusFloatQuicksand | quote }}
  DISCREET_ALLOW: {{ .Values.disturbed.discreetAllow | quote }}
  GRILL_VIVACIOUS: {{ .Values.disturbed.grillVivacious | quote }}
  HARDWARE: {{ .Values.disturbed.hardware | quote }}
  HOLE: {{ .Values.disturbed.hole | quote }}
  MADAM: {{ .Values.disturbed.madam | quote }}
  MOLAR: {{ .Values.disturbed.molar | quote }}
  MOST_DROP_UGLIEST: {{ .Values.disturbed.mostDropUgliest | quote }}
  SHORELINE_READINESS_SYMBOL: {{ .Values.disturbed.shorelineReadinessSymbol | quote
    }}
  WINDSHIELD_SPEND: {{ .Values.disturbed.windshieldSpend | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "disturbed.fullname" . }}-disturbed
  labels:
  {{- include "disturbed.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: disturbed
spec:
  replicas: {{ .Values.disturbed.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: disturbed
      app.kubernetes.io/name: damage
    {{- include "disturbed.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: disturbed
        app.kubernetes.io/name: damage
      {{- include "disturbed.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 8fdeeaa20297ff7960a6af63200e81818cc8cb09d7dcebec6c31fe958276d698
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "disturbed.fullname" . }}-disturbed
        image: {{ .Values.disturbed.disturbed.image.repository }}:{{ .Values.disturbed.disturbed.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.disturbed.disturbed.imagePullPolicy }}
        name: disturbed
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.disturbed.disturbed.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.disturbed.disturbed.containerSecurityContext
          | nindent 10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "disturbed.fullname" . }}-disturbed
  labels:
  {{- include "disturbed.labels" . | nindent 4 }}
spec:
  type: {{ .Values.disturbed.type }}
  selector:
    app.kubernetes.io/instance: disturbed
    app.kubernetes.io/name: damage
  {{- include "disturbed.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.disturbed.ports | toYaml | nindent 2 -}}
disturbed:
  crocusFloatQuicksand: flair
  discreetAllow: authority
  disturbed:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  grillVivacious: pride
  hardware: platinum
  hole: observation
  madam: adrenalin
  molar: rear
  mostDropUgliest: flag
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  shorelineReadinessSymbol: juvenile
  type: ClusterIP
  windshieldSpend: attach
kubernetesClusterDomain: cluster.local
