# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "fixture.fullname" . }}-fixture
  labels:
  {{- include "fixture.labels" . | nindent 4 }}
data:
  DAMP: {{ .Values.fixture.damp | quote }}
  FINANCING_FISHERY_ELIXIR: {{ .Values.fixture.financingFisheryElixir | quote }}
  FUEL_GRAVITAS_CHUB: {{ .Values.fixture.fuelGravitasChub | quote }}
  HARPOONER_CANCER: {{ .Values.fixture.harpoonerCancer | quote }}
  TEEPEE_SANCTITY: {{ .Values.fixture.teepeeSanctity | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "fixture.fullname" . }}-fixture
  labels:
  {{- include "fixture.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: fixture
spec:
  replicas: {{ .Values.fixture.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: fixture
      app.kubernetes.io/name: argument
    {{- include "fixture.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: fixture
        app.kubernetes.io/name: argument
      {{- include "fixture.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 200b604eb39e3851d3cfe1c4108cc6a4609345da559300e4c8cd8b24a79d71b1
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "fixture.fullname" . }}-fixture
        image: {{ .Values.fixture.fixture.image.repository }}:{{ .Values.fixture.fixture.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.fixture.fixture.imagePullPolicy }}
        name: fixture
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.fixture.fixture.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.fixture.fixture.containerSecurityContext |
          nindent 10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "fixture.fullname" . }}-fixture
  labels:
  {{- include "fixture.labels" . | nindent 4 }}
spec:
  type: {{ .Values.fixture.type }}
  selector:
    app.kubernetes.io/instance: fixture
    app.kubernetes.io/name: argument
  {{- include "fixture.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.fixture.ports | toYaml | nindent 2 -}}
fixture:
  damp: guidance
  financingFisheryElixir: scandalous
  fixture:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  fuelGravitasChub: fig
  harpoonerCancer: detail
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  teepeeSanctity: dynamics
  type: ClusterIP
kubernetesClusterDomain: cluster.local
