# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "originality.fullname" . }}-originality
  labels:
  {{- include "originality.labels" . | nindent 4 }}
data:
  AFTERLIFE_EVOCATION: {{ .Values.originality.afterlifeEvocation | quote }}
  AGENCY_YOKE_BIRTH: {{ .Values.originality.agencyYokeBirth | quote }}
  DEGREE_SOURWOOD: {{ .Values.originality.degreeSourwood | quote }}
  GLIDING: {{ .Values.originality.gliding | quote }}
  KNOW-HOW_SPARKLING: {{ .Values.originality.knowHowSparkling | quote }}
  PAST_SHEET: {{ .Values.originality.pastSheet | quote }}
  PLAGIARISM_TRAINER: {{ .Values.originality.plagiarismTrainer | quote }}
  ROTATION_DEPTH_VETERINARIAN: {{ .Values.originality.rotationDepthVeterinarian |
    quote }}
  SPLIT_OAK: {{ .Values.originality.splitOak | quote }}
  TRAIT: {{ .Values.originality.trait | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "originality.fullname" . }}-originality
  labels:
  {{- include "originality.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: originality
spec:
  replicas: {{ .Values.originality.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: originality
      app.kubernetes.io/name: pigeon
    {{- include "originality.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: originality
        app.kubernetes.io/name: pigeon
      {{- include "originality.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 0651b45806dbf5ea05736afd27b8a56c16ae8a3708d1e382d137af7274aa6e1e
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "originality.fullname" . }}-originality
        image: {{ .Values.originality.originality.image.repository }}:{{ .Values.originality.originality.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.originality.originality.imagePullPolicy }}
        name: originality
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.originality.originality.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.originality.originality.containerSecurityContext
          | nindent 10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "originality.fullname" . }}-originality
  labels:
  {{- include "originality.labels" . | nindent 4 }}
spec:
  type: {{ .Values.originality.type }}
  selector:
    app.kubernetes.io/instance: originality
    app.kubernetes.io/name: pigeon
  {{- include "originality.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.originality.ports | toYaml | nindent 2 -}}
kubernetesClusterDomain: cluster.local
originality:
  afterlifeEvocation: disease
  agencyYokeBirth: athletics
  degreeSourwood: corporation
  gliding: glockenspiel
  knowHowSparkling: roof
  originality:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  pastSheet: nervous
  plagiarismTrainer: surprise
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  rotationDepthVeterinarian: granddaughter
  splitOak: jacket
  trait: excellence
  type: ClusterIP
