# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "fender.fullname" . }}-fender
  labels:
  {{- include "fender.labels" . | nindent 4 }}
data:
  INJURE_ALBATROSS: {{ .Values.fender.injureAlbatross | quote }}
  PATTERN_VERIFY: {{ .Values.fender.patternVerify | quote }}
  PRACTICE_DEPRESSIVE: {{ .Values.fender.practiceDepressive | quote }}
  PRECISION: {{ .Values.fender.precision | quote }}
  SCENT: {{ .Values.fender.scent | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "fender.fullname" . }}-fender
  labels:
  {{- include "fender.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: fender
spec:
  replicas: {{ .Values.fender.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: fender
      app.kubernetes.io/name: senior
    {{- include "fender.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: fender
        app.kubernetes.io/name: senior
      {{- include "fender.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 6584bb2e7b46651e3b2860ca11ba8928bf0b77bf13763eeb403d2e7026e0b735
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "fender.fullname" . }}-fender
        image: {{ .Values.fender.fender.image.repository }}:{{ .Values.fender.fender.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.fender.fender.imagePullPolicy }}
        name: fender
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.fender.fender.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.fender.fender.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "fender.fullname" . }}-fender
  labels:
  {{- include "fender.labels" . | nindent 4 }}
spec:
  type: {{ .Values.fender.type }}
  selector:
    app.kubernetes.io/instance: fender
    app.kubernetes.io/name: senior
  {{- include "fender.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.fender.ports | toYaml | nindent 2 -}}
fender:
  fender:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  injureAlbatross: berry
  patternVerify: turkey
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  practiceDepressive: chard
  precision: identity
  replicas: 1
  scent: illiteracy
  type: ClusterIP
kubernetesClusterDomain: cluster.local
