# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "pine.fullname" . }}-pine
  labels:
  {{- include "pine.labels" . | nindent 4 }}
data:
  BALACLAVA: {{ .Values.pine.balaclava | quote }}
  GARB_GAP: {{ .Values.pine.garbGap | quote }}
  HOUSEWIFE_LARGE_CLIMATE: {{ .Values.pine.housewifeLargeClimate | quote }}
  LAVISH_STINGY_FORAGER: {{ .Values.pine.lavishStingyForager | quote }}
  MINNOW_RHINOCEROS_GRADUATE: {{ .Values.pine.minnowRhinocerosGraduate | quote }}
  POPULATION_WAKEFUL: {{ .Values.pine.populationWakeful | quote }}
  SCULPTURAL_SAVINGS: {{ .Values.pine.sculpturalSavings | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "pine.fullname" . }}-pine
  labels:
  {{- include "pine.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: pine
spec:
  replicas: {{ .Values.pine.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: pine
      app.kubernetes.io/name: drive
    {{- include "pine.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: pine
        app.kubernetes.io/name: drive
      {{- include "pine.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: e29b5303b8c5b1a152bd97938ff0eedfa90f93a882962818737579dc024b26ea
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "pine.fullname" . }}-pine
        image: {{ .Values.pine.pine.image.repository }}:{{ .Values.pine.pine.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.pine.pine.imagePullPolicy }}
        name: pine
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.pine.pine.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.pine.pine.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "pine.fullname" . }}-pine
  labels:
  {{- include "pine.labels" . | nindent 4 }}
spec:
  type: {{ .Values.pine.type }}
  selector:
    app.kubernetes.io/instance: pine
    app.kubernetes.io/name: drive
  {{- include "pine.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.pine.ports | toYaml | nindent 2 -}}
kubernetesClusterDomain: cluster.local
pine:
  balaclava: substantial
  garbGap: prospect
  housewifeLargeClimate: little
  lavishStingyForager: sleuth
  minnowRhinocerosGraduate: hypochondria
  pine:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  populationWakeful: shipping
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  sculpturalSavings: tensor
  type: ClusterIP
