# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "industrialisation.fullname" . }}-industrialisation
  labels:
  {{- include "industrialisation.labels" . | nindent 4 }}
data:
  DEDUCTION_POIGNANCE_STOREY: {{ .Values.industrialisation.deductionPoignanceStorey
    | quote }}
  REVOLVER_VERIFY: {{ .Values.industrialisation.revolverVerify | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "industrialisation.fullname" . }}-industrialisation
  labels:
  {{- include "industrialisation.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: industrialisation
spec:
  replicas: {{ .Values.industrialisation.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: industrialisation
      app.kubernetes.io/name: enemy
    {{- include "industrialisation.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: industrialisation
        app.kubernetes.io/name: enemy
      {{- include "industrialisation.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: fc9707d547fb4ac07795dae7b466c53d02bb2d0a6fa777d47dd6a6dc3d54baf5
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "industrialisation.fullname" . }}-industrialisation
        image: {{ .Values.industrialisation.industrialisation.image.repository }}:{{ .Values.industrialisation.industrialisation.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.industrialisation.industrialisation.imagePullPolicy
          }}
        name: industrialisation
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.industrialisation.industrialisation.resources | nindent
          10 }}
        securityContext: {{- toYaml .Values.industrialisation.industrialisation.containerSecurityContext
          | nindent 10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "industrialisation.fullname" . }}-industrialisation
  labels:
  {{- include "industrialisation.labels" . | nindent 4 }}
spec:
  type: {{ .Values.industrialisation.type }}
  selector:
    app.kubernetes.io/instance: industrialisation
    app.kubernetes.io/name: enemy
  {{- include "industrialisation.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.industrialisation.ports | toYaml | nindent 2 -}}
industrialisation:
  deductionPoignanceStorey: scaffold
  industrialisation:
    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
  revolverVerify: pitch
  type: ClusterIP
kubernetesClusterDomain: cluster.local
