# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "metro.fullname" . }}-metro
  labels:
  {{- include "metro.labels" . | nindent 4 }}
data:
  ANESTHESIOLOGY: {{ .Values.metro.anesthesiology | quote }}
  CARE: {{ .Values.metro.care | quote }}
  DRAGONFLY_JUMBLED_LAPAROSCOPE: {{ .Values.metro.dragonflyJumbledLaparoscope | quote
    }}
  FAN_AQUATIC_TERM: {{ .Values.metro.fanAquaticTerm | quote }}
  FORAY: {{ .Values.metro.foray | quote }}
  LUCKY_REBEL: {{ .Values.metro.luckyRebel | quote }}
  NOTE_REWARD: {{ .Values.metro.noteReward | quote }}
  QUIVER_COMPLICATION_EXPANSIONISM: {{ .Values.metro.quiverComplicationExpansionism
    | quote }}
  STEP-DAUGHTER_HURT: {{ .Values.metro.stepDaughterHurt | quote }}
  SYSTEMIZE: {{ .Values.metro.systemize | quote }}
  TYPE: {{ .Values.metro.type | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "metro.fullname" . }}-metro
  labels:
  {{- include "metro.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: metro
spec:
  replicas: {{ .Values.metro.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: metro
      app.kubernetes.io/name: lycra
    {{- include "metro.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: metro
        app.kubernetes.io/name: lycra
      {{- include "metro.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 4fe20b1a5b0c8e3aeb5fb401701c437be385a85f1920b0cf82e9cf7f55beee2b
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "metro.fullname" . }}-metro
        image: {{ .Values.metro.metro.image.repository }}:{{ .Values.metro.metro.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.metro.metro.imagePullPolicy }}
        name: metro
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.metro.metro.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.metro.metro.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "metro.fullname" . }}-metro
  labels:
  {{- include "metro.labels" . | nindent 4 }}
spec:
  type: {{ .Values.metro.type }}
  selector:
    app.kubernetes.io/instance: metro
    app.kubernetes.io/name: lycra
  {{- include "metro.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.metro.ports | toYaml | nindent 2 -}}
kubernetesClusterDomain: cluster.local
metro:
  anesthesiology: billing
  care: outlaw
  dragonflyJumbledLaparoscope: vegetarian
  fanAquaticTerm: jump
  foray: discipline
  luckyRebel: bandwidth
  metro:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  noteReward: boat
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  quiverComplicationExpansionism: aboriginal
  replicas: 1
  stepDaughterHurt: saddle
  systemize: elderly
  type: execute
