# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "nickel.fullname" . }}-nickel
  labels:
  {{- include "nickel.labels" . | nindent 4 }}
data:
  COUNTERPART_SUV: {{ .Values.nickel.counterpartSuv | quote }}
  DETECT_MUNDANE: {{ .Values.nickel.detectMundane | quote }}
  HEAVY_WILDEBEEST: {{ .Values.nickel.heavyWildebeest | quote }}
  MORTGAGE_CHEEK: {{ .Values.nickel.mortgageCheek | quote }}
  NEONATE_BLEND_VITRO: {{ .Values.nickel.neonateBlendVitro | quote }}
  NOON_INTERLOPER: {{ .Values.nickel.noonInterloper | quote }}
  PHOBIC_MALL_SKULLDUGGERY: {{ .Values.nickel.phobicMallSkullduggery | quote }}
  POMPOM_LACQUERWARE: {{ .Values.nickel.pompomLacquerware | quote }}
  SCRUB: {{ .Values.nickel.scrub | quote }}
  SEEKER_CELL_CONSUMPTION: {{ .Values.nickel.seekerCellConsumption | quote }}
  SUPPRESSION: {{ .Values.nickel.suppression | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "nickel.fullname" . }}-nickel
  labels:
  {{- include "nickel.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: nickel
spec:
  replicas: {{ .Values.nickel.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: nickel
      app.kubernetes.io/name: astrolabe
    {{- include "nickel.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: nickel
        app.kubernetes.io/name: astrolabe
      {{- include "nickel.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: e6187940690b1d18122ea7e0e5571478c9f8031c090ef3a744dc43947d03c975
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "nickel.fullname" . }}-nickel
        image: {{ .Values.nickel.nickel.image.repository }}:{{ .Values.nickel.nickel.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.nickel.nickel.imagePullPolicy }}
        name: nickel
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.nickel.nickel.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.nickel.nickel.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "nickel.fullname" . }}-nickel
  labels:
  {{- include "nickel.labels" . | nindent 4 }}
spec:
  type: {{ .Values.nickel.type }}
  selector:
    app.kubernetes.io/instance: nickel
    app.kubernetes.io/name: astrolabe
  {{- include "nickel.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.nickel.ports | toYaml | nindent 2 -}}
kubernetesClusterDomain: cluster.local
nickel:
  counterpartSuv: piquant
  detectMundane: browser
  heavyWildebeest: work
  mortgageCheek: falling-out
  neonateBlendVitro: blackness
  nickel:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  noonInterloper: trust
  phobicMallSkullduggery: raid
  pompomLacquerware: sneakers
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  scrub: researcher
  seekerCellConsumption: trolley
  suppression: left
  type: ClusterIP
