# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "effect.fullname" . }}-effect
  labels:
  {{- include "effect.labels" . | nindent 4 }}
data:
  BEHEST: {{ .Values.effect.behest | quote }}
  GIG_ESPADRILLE: {{ .Values.effect.gigEspadrille | quote }}
  HORMONE_TEARFUL: {{ .Values.effect.hormoneTearful | quote }}
  INNATE_STUMBLING_RETENTION: {{ .Values.effect.innateStumblingRetention | quote
    }}
  LOVER_DRUMMER: {{ .Values.effect.loverDrummer | quote }}
  WISDOM: {{ .Values.effect.wisdom | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "effect.fullname" . }}-effect
  labels:
  {{- include "effect.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: effect
spec:
  replicas: {{ .Values.effect.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: effect
      app.kubernetes.io/name: affinity
    {{- include "effect.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: effect
        app.kubernetes.io/name: affinity
      {{- include "effect.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: db94f24422191e3a4c1b4987e662939c642d0bed4a4b935ea0ed9d2cf8d06946
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "effect.fullname" . }}-effect
        image: {{ .Values.effect.effect.image.repository }}:{{ .Values.effect.effect.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.effect.effect.imagePullPolicy }}
        name: effect
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.effect.effect.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.effect.effect.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "effect.fullname" . }}-effect
  labels:
  {{- include "effect.labels" . | nindent 4 }}
spec:
  type: {{ .Values.effect.type }}
  selector:
    app.kubernetes.io/instance: effect
    app.kubernetes.io/name: affinity
  {{- include "effect.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.effect.ports | toYaml | nindent 2 -}}
effect:
  behest: acted
  effect:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  gigEspadrille: stir-fry
  hormoneTearful: marten
  innateStumblingRetention: harmonize
  loverDrummer: castle
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  type: ClusterIP
  wisdom: meander
kubernetesClusterDomain: cluster.local
