# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "frightened.fullname" . }}-frightened
  labels:
  {{- include "frightened.labels" . | nindent 4 }}
data:
  CHIVE: {{ .Values.frightened.chive | quote }}
  DISGUISE_REJECT_CONCEPTUALIZE: {{ .Values.frightened.disguiseRejectConceptualize
    | quote }}
  DRIVER: {{ .Values.frightened.driver | quote }}
  SPARE: {{ .Values.frightened.spare | quote }}
  WITHSTAND_RANDOMIZATION_WITHSTAND: {{ .Values.frightened.withstandRandomizationWithstand
    | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "frightened.fullname" . }}-frightened
  labels:
  {{- include "frightened.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: frightened
spec:
  replicas: {{ .Values.frightened.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: frightened
      app.kubernetes.io/name: octopus
    {{- include "frightened.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: frightened
        app.kubernetes.io/name: octopus
      {{- include "frightened.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: e3c39cd46aaae6c0cc1168f33301aede9cc015721bd1bef4944bd24c23e014d3
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "frightened.fullname" . }}-frightened
        image: {{ .Values.frightened.frightened.image.repository }}:{{ .Values.frightened.frightened.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.frightened.frightened.imagePullPolicy }}
        name: frightened
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.frightened.frightened.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.frightened.frightened.containerSecurityContext
          | nindent 10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "frightened.fullname" . }}-frightened
  labels:
  {{- include "frightened.labels" . | nindent 4 }}
spec:
  type: {{ .Values.frightened.type }}
  selector:
    app.kubernetes.io/instance: frightened
    app.kubernetes.io/name: octopus
  {{- include "frightened.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.frightened.ports | toYaml | nindent 2 -}}
frightened:
  chive: picayune
  disguiseRejectConceptualize: kill
  driver: contractor
  frightened:
    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
  replicas: 1
  spare: point
  type: ClusterIP
  withstandRandomizationWithstand: freckle
kubernetesClusterDomain: cluster.local
