# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "legacy.fullname" . }}-legacy
  labels:
  {{- include "legacy.labels" . | nindent 4 }}
data:
  ADOPT_FAITH_GREEN: {{ .Values.legacy.adoptFaithGreen | quote }}
  CALCULATION_FINALIZE_MEDAL: {{ .Values.legacy.calculationFinalizeMedal | quote
    }}
  EXCESS_STOLE_STUDIO: {{ .Values.legacy.excessStoleStudio | quote }}
  HARMONY_CRYSTAL: {{ .Values.legacy.harmonyCrystal | quote }}
  INEQUALITY_SEMANTICS: {{ .Values.legacy.inequalitySemantics | quote }}
  MARSHLAND: {{ .Values.legacy.marshland | quote }}
  MEN: {{ .Values.legacy.men | quote }}
  PULL: {{ .Values.legacy.pull | quote }}
  RIVER_DIVALENT_CONTINGENCY: {{ .Values.legacy.riverDivalentContingency | quote
    }}
  STRANGE: {{ .Values.legacy.strange | quote }}
  UTILITY_GLASS_BROCOLLI: {{ .Values.legacy.utilityGlassBrocolli | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "legacy.fullname" . }}-legacy
  labels:
  {{- include "legacy.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: legacy
spec:
  replicas: {{ .Values.legacy.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: legacy
      app.kubernetes.io/name: soprano
    {{- include "legacy.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: legacy
        app.kubernetes.io/name: soprano
      {{- include "legacy.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 4c58cef1a943cff61a2ab74fbee98850545e75bf50d8c32fc0bf2e80e9750e51
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "legacy.fullname" . }}-legacy
        image: {{ .Values.legacy.legacy.image.repository }}:{{ .Values.legacy.legacy.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.legacy.legacy.imagePullPolicy }}
        name: legacy
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.legacy.legacy.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.legacy.legacy.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "legacy.fullname" . }}-legacy
  labels:
  {{- include "legacy.labels" . | nindent 4 }}
spec:
  type: {{ .Values.legacy.type }}
  selector:
    app.kubernetes.io/instance: legacy
    app.kubernetes.io/name: soprano
  {{- include "legacy.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.legacy.ports | toYaml | nindent 2 -}}
kubernetesClusterDomain: cluster.local
legacy:
  adoptFaithGreen: hydrolysis
  calculationFinalizeMedal: needle
  excessStoleStudio: rock
  harmonyCrystal: inflation
  inequalitySemantics: starter
  legacy:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  marshland: subroutine
  men: crawdad
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  pull: hammock
  replicas: 1
  riverDivalentContingency: hostel
  strange: beggar
  type: ClusterIP
  utilityGlassBrocolli: concrete
