# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "fascinated.fullname" . }}-fascinated
  labels:
  {{- include "fascinated.labels" . | nindent 4 }}
data:
  NEWS_CHAMBER_TEACHING: {{ .Values.fascinated.newsChamberTeaching | quote }}
  SUET_COUNTY: {{ .Values.fascinated.suetCounty | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "fascinated.fullname" . }}-fascinated
  labels:
  {{- include "fascinated.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: fascinated
spec:
  replicas: {{ .Values.fascinated.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: fascinated
      app.kubernetes.io/name: clause
    {{- include "fascinated.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: fascinated
        app.kubernetes.io/name: clause
      {{- include "fascinated.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: a0660ee0782367b8f948605566f852683118128862fdc9ddb5ceabe9a7c505b8
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "fascinated.fullname" . }}-fascinated
        image: {{ .Values.fascinated.fascinated.image.repository }}:{{ .Values.fascinated.fascinated.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.fascinated.fascinated.imagePullPolicy }}
        name: fascinated
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.fascinated.fascinated.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.fascinated.fascinated.containerSecurityContext
          | nindent 10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "fascinated.fullname" . }}-fascinated
  labels:
  {{- include "fascinated.labels" . | nindent 4 }}
spec:
  type: {{ .Values.fascinated.type }}
  selector:
    app.kubernetes.io/instance: fascinated
    app.kubernetes.io/name: clause
  {{- include "fascinated.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.fascinated.ports | toYaml | nindent 2 -}}
fascinated:
  fascinated:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  newsChamberTeaching: sector
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  suetCounty: cartload
  type: ClusterIP
kubernetesClusterDomain: cluster.local
