# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "naming.fullname" . }}-naming
  labels:
  {{- include "naming.labels" . | nindent 4 }}
data:
  BUFFALO_VENUE: {{ .Values.naming.buffaloVenue | quote }}
  CITRON_SIP: {{ .Values.naming.citronSip | quote }}
  INSTITUTE: {{ .Values.naming.institute | quote }}
  SCORN_PIRACY: {{ .Values.naming.scornPiracy | quote }}
  TOM-TOM: {{ .Values.naming.tomTom | quote }}
  TRACK_CENSUS: {{ .Values.naming.trackCensus | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "naming.fullname" . }}-naming
  labels:
  {{- include "naming.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: naming
spec:
  replicas: {{ .Values.naming.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: naming
      app.kubernetes.io/name: cocktail
    {{- include "naming.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: naming
        app.kubernetes.io/name: cocktail
      {{- include "naming.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 90d91a52d1755f314d5faac3d88eb395cf41536752b325d924ef21e12e80001d
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "naming.fullname" . }}-naming
        image: {{ .Values.naming.naming.image.repository }}:{{ .Values.naming.naming.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.naming.naming.imagePullPolicy }}
        name: naming
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.naming.naming.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.naming.naming.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "naming.fullname" . }}-naming
  labels:
  {{- include "naming.labels" . | nindent 4 }}
spec:
  type: {{ .Values.naming.type }}
  selector:
    app.kubernetes.io/instance: naming
    app.kubernetes.io/name: cocktail
  {{- include "naming.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.naming.ports | toYaml | nindent 2 -}}
kubernetesClusterDomain: cluster.local
naming:
  buffaloVenue: background
  citronSip: loutish
  institute: glue
  naming:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  scornPiracy: auto
  tomTom: outline
  trackCensus: pounding
  type: ClusterIP
