# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "vineyard.fullname" . }}-vineyard
  labels:
  {{- include "vineyard.labels" . | nindent 4 }}
data:
  ARRIVAL_LOLLIPOP_HATRED: {{ .Values.vineyard.arrivalLollipopHatred | quote }}
  CALCULATION_WEAKNESS: {{ .Values.vineyard.calculationWeakness | quote }}
  CITY: {{ .Values.vineyard.city | quote }}
  DERIVATION_ADVERTISEMENT: {{ .Values.vineyard.derivationAdvertisement | quote }}
  FORTUNE_FLANKER_SPIDERLING: {{ .Values.vineyard.fortuneFlankerSpiderling | quote
    }}
  GRANDCHILD_MILK_BASE: {{ .Values.vineyard.grandchildMilkBase | quote }}
  GRILL_BLIZZARD_REGIONALISM: {{ .Values.vineyard.grillBlizzardRegionalism | quote
    }}
  WALKING: {{ .Values.vineyard.walking | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "vineyard.fullname" . }}-vineyard
  labels:
  {{- include "vineyard.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: vineyard
spec:
  replicas: {{ .Values.vineyard.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: vineyard
      app.kubernetes.io/name: hydrocarbon
    {{- include "vineyard.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: vineyard
        app.kubernetes.io/name: hydrocarbon
      {{- include "vineyard.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: fabc15ff5d93fff65b35a1e35997669764e3fb4f45e33838c42b72d6add6285c
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "vineyard.fullname" . }}-vineyard
        image: {{ .Values.vineyard.vineyard.image.repository }}:{{ .Values.vineyard.vineyard.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.vineyard.vineyard.imagePullPolicy }}
        name: vineyard
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.vineyard.vineyard.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.vineyard.vineyard.containerSecurityContext
          | nindent 10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "vineyard.fullname" . }}-vineyard
  labels:
  {{- include "vineyard.labels" . | nindent 4 }}
spec:
  type: {{ .Values.vineyard.type }}
  selector:
    app.kubernetes.io/instance: vineyard
    app.kubernetes.io/name: hydrocarbon
  {{- include "vineyard.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.vineyard.ports | toYaml | nindent 2 -}}
kubernetesClusterDomain: cluster.local
vineyard:
  arrivalLollipopHatred: folder
  calculationWeakness: gazebo
  city: musculature
  derivationAdvertisement: pinkie
  fortuneFlankerSpiderling: archaeology
  grandchildMilkBase: activate
  grillBlizzardRegionalism: hand-holding
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  type: ClusterIP
  vineyard:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  walking: shaw
