# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "vogue.fullname" . }}-vogue
  labels:
  {{- include "vogue.labels" . | nindent 4 }}
data:
  CAVIAR: {{ .Values.vogue.caviar | quote }}
  CLOCKWORK_ENCOUNTER_CHEM: {{ .Values.vogue.clockworkEncounterChem | quote }}
  CRAFT_TESTED: {{ .Values.vogue.craftTested | quote }}
  EPONYM_THOUGHT: {{ .Values.vogue.eponymThought | quote }}
  EXCURSION_COP-OUT_BOON: {{ .Values.vogue.excursionCopOutBoon | quote }}
  HOMOSEXUAL_WONDER: {{ .Values.vogue.homosexualWonder | quote }}
  KICK: {{ .Values.vogue.kick | quote }}
  NICKEL: {{ .Values.vogue.nickel | quote }}
  SCOUT_LARK: {{ .Values.vogue.scoutLark | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "vogue.fullname" . }}-vogue
  labels:
  {{- include "vogue.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: vogue
spec:
  replicas: {{ .Values.vogue.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: vogue
      app.kubernetes.io/name: balaclava
    {{- include "vogue.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: vogue
        app.kubernetes.io/name: balaclava
      {{- include "vogue.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 79646da1f557cb38c6ff945b9ece5d80217669ac7c2d023918a8923ec6f946af
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "vogue.fullname" . }}-vogue
        image: {{ .Values.vogue.vogue.image.repository }}:{{ .Values.vogue.vogue.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.vogue.vogue.imagePullPolicy }}
        name: vogue
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.vogue.vogue.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.vogue.vogue.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "vogue.fullname" . }}-vogue
  labels:
  {{- include "vogue.labels" . | nindent 4 }}
spec:
  type: {{ .Values.vogue.type }}
  selector:
    app.kubernetes.io/instance: vogue
    app.kubernetes.io/name: balaclava
  {{- include "vogue.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.vogue.ports | toYaml | nindent 2 -}}
kubernetesClusterDomain: cluster.local
vogue:
  caviar: catamaran
  clockworkEncounterChem: tailbud
  craftTested: stockings
  eponymThought: unit
  excursionCopOutBoon: sing
  homosexualWonder: ceramic
  kick: pat
  nickel: salesman
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  scoutLark: socialism
  type: ClusterIP
  vogue:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
