# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "vane.fullname" . }}-vane
  labels:
  {{- include "vane.labels" . | nindent 4 }}
data:
  ANTIQUITY_BRING_SUET: {{ .Values.vane.antiquityBringSuet | quote }}
  APPRAISE_HOTDOG_SHOPPING: {{ .Values.vane.appraiseHotdogShopping | quote }}
  BELLOWS_KAZOO_FUNCTIONALITY: {{ .Values.vane.bellowsKazooFunctionality | quote
    }}
  COMPORTMENT_PROPRIETOR_ARTICLE: {{ .Values.vane.comportmentProprietorArticle |
    quote }}
  SOLDIER_PASTOR: {{ .Values.vane.soldierPastor | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "vane.fullname" . }}-vane
  labels:
  {{- include "vane.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: vane
spec:
  replicas: {{ .Values.vane.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: vane
      app.kubernetes.io/name: dueling
    {{- include "vane.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: vane
        app.kubernetes.io/name: dueling
      {{- include "vane.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: fbb3a7460b9902dfdfa733251137e4aaac25cacdf7664589d7ac7b2e222763b3
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "vane.fullname" . }}-vane
        image: {{ .Values.vane.vane.image.repository }}:{{ .Values.vane.vane.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.vane.vane.imagePullPolicy }}
        name: vane
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.vane.vane.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.vane.vane.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "vane.fullname" . }}-vane
  labels:
  {{- include "vane.labels" . | nindent 4 }}
spec:
  type: {{ .Values.vane.type }}
  selector:
    app.kubernetes.io/instance: vane
    app.kubernetes.io/name: dueling
  {{- include "vane.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.vane.ports | toYaml | nindent 2 -}}
kubernetesClusterDomain: cluster.local
vane:
  antiquityBringSuet: sprag
  appraiseHotdogShopping: sprout
  bellowsKazooFunctionality: horror
  comportmentProprietorArticle: rally
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  soldierPastor: consonant
  type: ClusterIP
  vane:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
