# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "platypus.fullname" . }}-platypus
  labels:
  {{- include "platypus.labels" . | nindent 4 }}
data:
  CABINET_NUCLEOTIDASE: {{ .Values.platypus.cabinetNucleotidase | quote }}
  GRAPH: {{ .Values.platypus.graph | quote }}
  HEARTBEAT: {{ .Values.platypus.heartbeat | quote }}
  LAWMAKER_SCHEMA_FREEDOM: {{ .Values.platypus.lawmakerSchemaFreedom | quote }}
  SATIN_MODELING: {{ .Values.platypus.satinModeling | quote }}
  STRAND_USER_BEGONIA: {{ .Values.platypus.strandUserBegonia | quote }}
  YOUNG: {{ .Values.platypus.young | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "platypus.fullname" . }}-platypus
  labels:
  {{- include "platypus.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: platypus
spec:
  replicas: {{ .Values.platypus.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: platypus
      app.kubernetes.io/name: follower
    {{- include "platypus.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: platypus
        app.kubernetes.io/name: follower
      {{- include "platypus.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: e432e5464246a0722359b4491b44edd71017689025924b21f2054e5f8bac0e85
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "platypus.fullname" . }}-platypus
        image: {{ .Values.platypus.platypus.image.repository }}:{{ .Values.platypus.platypus.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.platypus.platypus.imagePullPolicy }}
        name: platypus
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.platypus.platypus.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.platypus.platypus.containerSecurityContext
          | nindent 10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "platypus.fullname" . }}-platypus
  labels:
  {{- include "platypus.labels" . | nindent 4 }}
spec:
  type: {{ .Values.platypus.type }}
  selector:
    app.kubernetes.io/instance: platypus
    app.kubernetes.io/name: follower
  {{- include "platypus.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.platypus.ports | toYaml | nindent 2 -}}
kubernetesClusterDomain: cluster.local
platypus:
  cabinetNucleotidase: relief
  graph: kinase
  heartbeat: seizure
  lawmakerSchemaFreedom: wedding
  platypus:
    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
  replicas: 1
  satinModeling: user
  strandUserBegonia: output
  type: ClusterIP
  young: restriction
