# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "nutty.fullname" . }}-nutty
  labels:
  {{- include "nutty.labels" . | nindent 4 }}
data:
  ACCEPTABLE_HOMELESS: {{ .Values.nutty.acceptableHomeless | quote }}
  BUST_BIJOU_COUNTESS: {{ .Values.nutty.bustBijouCountess | quote }}
  CONVICTION_COMBAT: {{ .Values.nutty.convictionCombat | quote }}
  GAME_PAROLE: {{ .Values.nutty.gameParole | quote }}
  HORNET_FLANKER_REDUNDANT: {{ .Values.nutty.hornetFlankerRedundant | quote }}
  MANIPULATION_PLAGIARISM_CAUSE: {{ .Values.nutty.manipulationPlagiarismCause | quote
    }}
  MENTION: {{ .Values.nutty.mention | quote }}
  NUTRITIOUS: {{ .Values.nutty.nutritious | quote }}
  PEER-TO-PEER: {{ .Values.nutty.peerToPeer | quote }}
  REPROCESSING_CULTURE_PUMA: {{ .Values.nutty.reprocessingCulturePuma | quote }}
  SCIENTIFIC: {{ .Values.nutty.scientific | quote }}
  VIABILITY_BORDER_STUDY: {{ .Values.nutty.viabilityBorderStudy | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "nutty.fullname" . }}-nutty
  labels:
  {{- include "nutty.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: nutty
spec:
  replicas: {{ .Values.nutty.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: nutty
      app.kubernetes.io/name: rating
    {{- include "nutty.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: nutty
        app.kubernetes.io/name: rating
      {{- include "nutty.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 389da4f038090d849e9a3637af0d5659468baf3f63c496526dc4f45c5dbd8461
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "nutty.fullname" . }}-nutty
        image: {{ .Values.nutty.nutty.image.repository }}:{{ .Values.nutty.nutty.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.nutty.nutty.imagePullPolicy }}
        name: nutty
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.nutty.nutty.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.nutty.nutty.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "nutty.fullname" . }}-nutty
  labels:
  {{- include "nutty.labels" . | nindent 4 }}
spec:
  type: {{ .Values.nutty.type }}
  selector:
    app.kubernetes.io/instance: nutty
    app.kubernetes.io/name: rating
  {{- include "nutty.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.nutty.ports | toYaml | nindent 2 -}}
kubernetesClusterDomain: cluster.local
nutty:
  acceptableHomeless: libido
  bustBijouCountess: trashy
  convictionCombat: drug
  gameParole: ladder
  hornetFlankerRedundant: gem
  manipulationPlagiarismCause: wail
  mention: infant
  nutritious: alley
  nutty:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  peerToPeer: lovely
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  reprocessingCulturePuma: conceptualize
  scientific: macaroon
  type: ClusterIP
  viabilityBorderStudy: swanky
