# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "frantic.fullname" . }}-frantic
  labels:
  {{- include "frantic.labels" . | nindent 4 }}
data:
  CLAVICLE_SLING: {{ .Values.frantic.clavicleSling | quote }}
  EXTREME_PLEASURE_SNAIL: {{ .Values.frantic.extremePleasureSnail | quote }}
  FRAUD_ADMIN: {{ .Values.frantic.fraudAdmin | quote }}
  LAPDOG_BELONG_CHAIRPERSON: {{ .Values.frantic.lapdogBelongChairperson | quote }}
  SHELL_BIRTH_MARSHMALLOW: {{ .Values.frantic.shellBirthMarshmallow | quote }}
  SOCIALISM_STEPDAUGHTER_CONSTRUCT: {{ .Values.frantic.socialismStepdaughterConstruct
    | quote }}
  SPOKESMAN_ABORTIVE_OCELOT: {{ .Values.frantic.spokesmanAbortiveOcelot | quote }}
  SWITCHING_SHADOW_PROSE: {{ .Values.frantic.switchingShadowProse | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "frantic.fullname" . }}-frantic
  labels:
  {{- include "frantic.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: frantic
spec:
  replicas: {{ .Values.frantic.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: frantic
      app.kubernetes.io/name: reversal
    {{- include "frantic.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: frantic
        app.kubernetes.io/name: reversal
      {{- include "frantic.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 4fa323c4fe6c5d5b021a79f905fdfdc270b33ad0faaf7cc36a2807d591e938ca
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "frantic.fullname" . }}-frantic
        image: {{ .Values.frantic.frantic.image.repository }}:{{ .Values.frantic.frantic.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.frantic.frantic.imagePullPolicy }}
        name: frantic
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.frantic.frantic.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.frantic.frantic.containerSecurityContext |
          nindent 10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "frantic.fullname" . }}-frantic
  labels:
  {{- include "frantic.labels" . | nindent 4 }}
spec:
  type: {{ .Values.frantic.type }}
  selector:
    app.kubernetes.io/instance: frantic
    app.kubernetes.io/name: reversal
  {{- include "frantic.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.frantic.ports | toYaml | nindent 2 -}}
frantic:
  clavicleSling: frightened
  extremePleasureSnail: step-grandfather
  frantic:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  fraudAdmin: assumption
  lapdogBelongChairperson: criteria
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  shellBirthMarshmallow: local
  socialismStepdaughterConstruct: terrify
  spokesmanAbortiveOcelot: rainbow
  switchingShadowProse: shield
  type: ClusterIP
kubernetesClusterDomain: cluster.local
