# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "percentage.fullname" . }}-percentage
  labels:
  {{- include "percentage.labels" . | nindent 4 }}
data:
  ACCEPTABLE_KITCHEN: {{ .Values.percentage.acceptableKitchen | quote }}
  AGLET_OBEY: {{ .Values.percentage.agletObey | quote }}
  DRESS_SAVORY_EYEBROW: {{ .Values.percentage.dressSavoryEyebrow | quote }}
  EMITTER_CASUALTY_MAGIC: {{ .Values.percentage.emitterCasualtyMagic | quote }}
  HISSING_DEVELOP_EX-HUSBAND: {{ .Values.percentage.hissingDevelopExHusband | quote
    }}
  IMPARTIAL: {{ .Values.percentage.impartial | quote }}
  POSSESSIVE_ZEPHYR_SPOTLIGHT: {{ .Values.percentage.possessiveZephyrSpotlight |
    quote }}
  RIDING: {{ .Values.percentage.riding | quote }}
  TRANSACTION: {{ .Values.percentage.transaction | quote }}
  WRAPPER_INFANT: {{ .Values.percentage.wrapperInfant | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "percentage.fullname" . }}-percentage
  labels:
  {{- include "percentage.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: percentage
spec:
  replicas: {{ .Values.percentage.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: percentage
      app.kubernetes.io/name: gene
    {{- include "percentage.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: percentage
        app.kubernetes.io/name: gene
      {{- include "percentage.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 51abb433bfcd3b8a055dfd390d627581f217e069bb1836b27c867aa78735dd97
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "percentage.fullname" . }}-percentage
        image: {{ .Values.percentage.percentage.image.repository }}:{{ .Values.percentage.percentage.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.percentage.percentage.imagePullPolicy }}
        name: percentage
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.percentage.percentage.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.percentage.percentage.containerSecurityContext
          | nindent 10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "percentage.fullname" . }}-percentage
  labels:
  {{- include "percentage.labels" . | nindent 4 }}
spec:
  type: {{ .Values.percentage.type }}
  selector:
    app.kubernetes.io/instance: percentage
    app.kubernetes.io/name: gene
  {{- include "percentage.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.percentage.ports | toYaml | nindent 2 -}}
kubernetesClusterDomain: cluster.local
percentage:
  acceptableKitchen: van
  agletObey: leptocephalus
  dressSavoryEyebrow: carrier
  emitterCasualtyMagic: vibration
  hissingDevelopExHusband: twitter
  impartial: tentacle
  percentage:
    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
  possessiveZephyrSpotlight: eve
  replicas: 1
  riding: immigrant
  transaction: implication
  type: ClusterIP
  wrapperInfant: accuracy
