# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "conservative.fullname" . }}-conservative
  labels:
  {{- include "conservative.labels" . | nindent 4 }}
data:
  BUN_NINJA: {{ .Values.conservative.bunNinja | quote }}
  CRAZY_UNIVERSITY_UTTERMOST: {{ .Values.conservative.crazyUniversityUttermost |
    quote }}
  DRAFT: {{ .Values.conservative.draft | quote }}
  NERVE_BATH_FEELING: {{ .Values.conservative.nerveBathFeeling | quote }}
  PIG_NAPPY: {{ .Values.conservative.pigNappy | quote }}
  PIRATE_PANEL_WILLOW: {{ .Values.conservative.piratePanelWillow | quote }}
  ROT: {{ .Values.conservative.rot | quote }}
  TRENCH_OBTAIN_FRUIT: {{ .Values.conservative.trenchObtainFruit | quote }}
  TWIST_ARCHITECT: {{ .Values.conservative.twistArchitect | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "conservative.fullname" . }}-conservative
  labels:
  {{- include "conservative.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: conservative
spec:
  replicas: {{ .Values.conservative.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: conservative
      app.kubernetes.io/name: lysine
    {{- include "conservative.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: conservative
        app.kubernetes.io/name: lysine
      {{- include "conservative.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 6536357a594c335716f9e819c31cd4be3ac3906c4ab2e197a50988800e8d82b3
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "conservative.fullname" . }}-conservative
        image: {{ .Values.conservative.conservative.image.repository }}:{{ .Values.conservative.conservative.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.conservative.conservative.imagePullPolicy }}
        name: conservative
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.conservative.conservative.resources | nindent 10
          }}
        securityContext: {{- toYaml .Values.conservative.conservative.containerSecurityContext
          | nindent 10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "conservative.fullname" . }}-conservative
  labels:
  {{- include "conservative.labels" . | nindent 4 }}
spec:
  type: {{ .Values.conservative.type }}
  selector:
    app.kubernetes.io/instance: conservative
    app.kubernetes.io/name: lysine
  {{- include "conservative.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.conservative.ports | toYaml | nindent 2 -}}
conservative:
  bunNinja: finer
  conservative:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  crazyUniversityUttermost: father
  draft: smelting
  nerveBathFeeling: arcade
  pigNappy: prisoner
  piratePanelWillow: define
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  rot: songbird
  trenchObtainFruit: t-shirt
  twistArchitect: pass
  type: ClusterIP
kubernetesClusterDomain: cluster.local
