# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "glasses.fullname" . }}-glasses
  labels:
  {{- include "glasses.labels" . | nindent 4 }}
data:
  CORN_KNIT_TIDE: {{ .Values.glasses.cornKnitTide | quote }}
  DEPRESSIVE_REFECTORY: {{ .Values.glasses.depressiveRefectory | quote }}
  INCREASE_CAREER_BIOPSY: {{ .Values.glasses.increaseCareerBiopsy | quote }}
  MOCHA_IMPLEMENT: {{ .Values.glasses.mochaImplement | quote }}
  PRIVATE: {{ .Values.glasses.private | quote }}
  RUBBER: {{ .Values.glasses.rubber | quote }}
  SPECULATION: {{ .Values.glasses.speculation | quote }}
  TESTAMENT_DISARMAMENT: {{ .Values.glasses.testamentDisarmament | quote }}
  THANKFUL_PHOTODIODE_WEAVE: {{ .Values.glasses.thankfulPhotodiodeWeave | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "glasses.fullname" . }}-glasses
  labels:
  {{- include "glasses.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: glasses
spec:
  replicas: {{ .Values.glasses.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: glasses
      app.kubernetes.io/name: dungeon
    {{- include "glasses.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: glasses
        app.kubernetes.io/name: dungeon
      {{- include "glasses.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 53873b182a4f6e0d249aa6cd5893471e1963f152312f9b588bb18f132ab18b73
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "glasses.fullname" . }}-glasses
        image: {{ .Values.glasses.glasses.image.repository }}:{{ .Values.glasses.glasses.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.glasses.glasses.imagePullPolicy }}
        name: glasses
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.glasses.glasses.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.glasses.glasses.containerSecurityContext |
          nindent 10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "glasses.fullname" . }}-glasses
  labels:
  {{- include "glasses.labels" . | nindent 4 }}
spec:
  type: {{ .Values.glasses.type }}
  selector:
    app.kubernetes.io/instance: glasses
    app.kubernetes.io/name: dungeon
  {{- include "glasses.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.glasses.ports | toYaml | nindent 2 -}}
glasses:
  cornKnitTide: gorilla
  depressiveRefectory: row
  glasses:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  increaseCareerBiopsy: nestmate
  mochaImplement: watermelon
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  private: harbour
  replicas: 1
  rubber: guess
  speculation: baggie
  testamentDisarmament: elite
  thankfulPhotodiodeWeave: payoff
  type: ClusterIP
kubernetesClusterDomain: cluster.local
