# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "rambler.fullname" . }}-rambler
  labels:
  {{- include "rambler.labels" . | nindent 4 }}
data:
  BOYFRIEND_EYEBROWS: {{ .Values.rambler.boyfriendEyebrows | quote }}
  DISCO_RINGWORM_TRACTOR: {{ .Values.rambler.discoRingwormTractor | quote }}
  ELBOW_LOCATION: {{ .Values.rambler.elbowLocation | quote }}
  FIG: {{ .Values.rambler.fig | quote }}
  INCONVENIENCE_BANDWIDTH_TIGHTS: {{ .Values.rambler.inconvenienceBandwidthTights
    | quote }}
  MEME_CLOTHE_ARMY: {{ .Values.rambler.memeClotheArmy | quote }}
  OCCURRENCE_HYBRIDIZATION: {{ .Values.rambler.occurrenceHybridization | quote }}
  TRANSCRIPT: {{ .Values.rambler.transcript | quote }}
  UPBEAT_TRUNK_FASCIA: {{ .Values.rambler.upbeatTrunkFascia | quote }}
  WILLOW_TRANSLATE: {{ .Values.rambler.willowTranslate | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "rambler.fullname" . }}-rambler
  labels:
  {{- include "rambler.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: rambler
spec:
  replicas: {{ .Values.rambler.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: rambler
      app.kubernetes.io/name: tickle
    {{- include "rambler.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: rambler
        app.kubernetes.io/name: tickle
      {{- include "rambler.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: a4290f6b03773193078f9b8cc4d5a279479274c30368b2a23866b11aeb6cfc3c
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "rambler.fullname" . }}-rambler
        image: {{ .Values.rambler.rambler.image.repository }}:{{ .Values.rambler.rambler.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.rambler.rambler.imagePullPolicy }}
        name: rambler
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.rambler.rambler.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.rambler.rambler.containerSecurityContext |
          nindent 10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "rambler.fullname" . }}-rambler
  labels:
  {{- include "rambler.labels" . | nindent 4 }}
spec:
  type: {{ .Values.rambler.type }}
  selector:
    app.kubernetes.io/instance: rambler
    app.kubernetes.io/name: tickle
  {{- include "rambler.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.rambler.ports | toYaml | nindent 2 -}}
kubernetesClusterDomain: cluster.local
rambler:
  boyfriendEyebrows: effector
  discoRingwormTractor: slipper
  elbowLocation: acetate
  fig: beak
  inconvenienceBandwidthTights: symptomatic
  memeClotheArmy: stranger
  occurrenceHybridization: designer
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  rambler:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  replicas: 1
  transcript: radiator
  type: ClusterIP
  upbeatTrunkFascia: acrylic
  willowTranslate: poke
