# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "biplane.fullname" . }}-biplane
  labels:
  {{- include "biplane.labels" . | nindent 4 }}
data:
  BIRD-WATCHER_POSSESSIVE: {{ .Values.biplane.birdWatcherPossessive | quote }}
  GUILDER: {{ .Values.biplane.guilder | quote }}
  NEWSPAPER_VIVACIOUS: {{ .Values.biplane.newspaperVivacious | quote }}
  NURSERY_WRAPPER: {{ .Values.biplane.nurseryWrapper | quote }}
  OUTLAW_AMBIENCE: {{ .Values.biplane.outlawAmbience | quote }}
  PAT_PROBATION: {{ .Values.biplane.patProbation | quote }}
  RARE_CONFRONT: {{ .Values.biplane.rareConfront | quote }}
  SCORE: {{ .Values.biplane.score | quote }}
  TROMBONE: {{ .Values.biplane.trombone | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "biplane.fullname" . }}-biplane
  labels:
  {{- include "biplane.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: biplane
spec:
  replicas: {{ .Values.biplane.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: biplane
      app.kubernetes.io/name: rabbit
    {{- include "biplane.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: biplane
        app.kubernetes.io/name: rabbit
      {{- include "biplane.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: a1b81a41a2f924cd90fc43ff8b7f36f97dcfb416dd34a3c239d75461abf05d0d
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "biplane.fullname" . }}-biplane
        image: {{ .Values.biplane.biplane.image.repository }}:{{ .Values.biplane.biplane.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.biplane.biplane.imagePullPolicy }}
        name: biplane
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.biplane.biplane.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.biplane.biplane.containerSecurityContext |
          nindent 10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "biplane.fullname" . }}-biplane
  labels:
  {{- include "biplane.labels" . | nindent 4 }}
spec:
  type: {{ .Values.biplane.type }}
  selector:
    app.kubernetes.io/instance: biplane
    app.kubernetes.io/name: rabbit
  {{- include "biplane.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.biplane.ports | toYaml | nindent 2 -}}
biplane:
  biplane:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  birdWatcherPossessive: devilish
  guilder: piece
  newspaperVivacious: slice
  nurseryWrapper: handwrite
  outlawAmbience: tournament
  patProbation: randomization
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  rareConfront: yin
  replicas: 1
  score: switchboard
  trombone: earrings
  type: ClusterIP
kubernetesClusterDomain: cluster.local
