# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "accessible.fullname" . }}-accessible
  labels:
  {{- include "accessible.labels" . | nindent 4 }}
data:
  AGRICULTURE_AFFILIATE: {{ .Values.accessible.agricultureAffiliate | quote }}
  ARMOUR_ABDOMEN_SIDEWALK: {{ .Values.accessible.armourAbdomenSidewalk | quote }}
  ASTERISK: {{ .Values.accessible.asterisk | quote }}
  GUERRILLA_SEPARATION: {{ .Values.accessible.guerrillaSeparation | quote }}
  NEBULOUS_PAYMENT: {{ .Values.accessible.nebulousPayment | quote }}
  PROCUREMENT: {{ .Values.accessible.procurement | quote }}
  SKIP: {{ .Values.accessible.skip | quote }}
  TESTING_MEADOW: {{ .Values.accessible.testingMeadow | quote }}
  TRUST: {{ .Values.accessible.trust | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "accessible.fullname" . }}-accessible
  labels:
  {{- include "accessible.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: accessible
spec:
  replicas: {{ .Values.accessible.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: accessible
      app.kubernetes.io/name: plagiarism
    {{- include "accessible.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: accessible
        app.kubernetes.io/name: plagiarism
      {{- include "accessible.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: c0704b90f484e3b8938cdaab36f3ac9d6d67b200accb1565fe82922d8b5322e7
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "accessible.fullname" . }}-accessible
        image: {{ .Values.accessible.accessible.image.repository }}:{{ .Values.accessible.accessible.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.accessible.accessible.imagePullPolicy }}
        name: accessible
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.accessible.accessible.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.accessible.accessible.containerSecurityContext
          | nindent 10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "accessible.fullname" . }}-accessible
  labels:
  {{- include "accessible.labels" . | nindent 4 }}
spec:
  type: {{ .Values.accessible.type }}
  selector:
    app.kubernetes.io/instance: accessible
    app.kubernetes.io/name: plagiarism
  {{- include "accessible.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.accessible.ports | toYaml | nindent 2 -}}
accessible:
  accessible:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  agricultureAffiliate: start
  armourAbdomenSidewalk: hunting
  asterisk: magical
  guerrillaSeparation: lavish
  nebulousPayment: recommend
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  procurement: speech
  replicas: 1
  skip: flute
  testingMeadow: interfere
  trust: chairperson
  type: ClusterIP
kubernetesClusterDomain: cluster.local
