# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "picturesque.fullname" . }}-picturesque
  labels:
  {{- include "picturesque.labels" . | nindent 4 }}
data:
  COMPETE_TURN: {{ .Values.picturesque.competeTurn | quote }}
  CONVERT: {{ .Values.picturesque.convert | quote }}
  IDEAL_THUNDERHEAD: {{ .Values.picturesque.idealThunderhead | quote }}
  INDICATOR_TALKING: {{ .Values.picturesque.indicatorTalking | quote }}
  JUMP_LADLE: {{ .Values.picturesque.jumpLadle | quote }}
  OVERCONFIDENT_CHARSET: {{ .Values.picturesque.overconfidentCharset | quote }}
  OYSTER: {{ .Values.picturesque.oyster | quote }}
  PILE_TRANSLATE: {{ .Values.picturesque.pileTranslate | quote }}
  PROGRAMMING_SPREE_FOOD: {{ .Values.picturesque.programmingSpreeFood | quote }}
  TEMPORARY_SEPTICAEMIA: {{ .Values.picturesque.temporarySepticaemia | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "picturesque.fullname" . }}-picturesque
  labels:
  {{- include "picturesque.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: picturesque
spec:
  replicas: {{ .Values.picturesque.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: picturesque
      app.kubernetes.io/name: enigma
    {{- include "picturesque.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: picturesque
        app.kubernetes.io/name: enigma
      {{- include "picturesque.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 19d9de1459d9183b58aefe00fce5c512e277aab55b2b232a5ff17c7994a0fed9
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "picturesque.fullname" . }}-picturesque
        image: {{ .Values.picturesque.picturesque.image.repository }}:{{ .Values.picturesque.picturesque.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.picturesque.picturesque.imagePullPolicy }}
        name: picturesque
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.picturesque.picturesque.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.picturesque.picturesque.containerSecurityContext
          | nindent 10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "picturesque.fullname" . }}-picturesque
  labels:
  {{- include "picturesque.labels" . | nindent 4 }}
spec:
  type: {{ .Values.picturesque.type }}
  selector:
    app.kubernetes.io/instance: picturesque
    app.kubernetes.io/name: enigma
  {{- include "picturesque.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.picturesque.ports | toYaml | nindent 2 -}}
kubernetesClusterDomain: cluster.local
picturesque:
  competeTurn: devastation
  convert: observation
  idealThunderhead: gauntlet
  indicatorTalking: felony
  jumpLadle: enclave
  overconfidentCharset: guidance
  oyster: devastation
  picturesque:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  pileTranslate: summary
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  programmingSpreeFood: pickle
  replicas: 1
  temporarySepticaemia: heavenly
  type: ClusterIP
