# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "ripe.fullname" . }}-ripe
  labels:
  {{- include "ripe.labels" . | nindent 4 }}
data:
  ARM-REST_PLUMBER: {{ .Values.ripe.armRestPlumber | quote }}
  ATTRACT: {{ .Values.ripe.attract | quote }}
  BALLET_IRRITATE: {{ .Values.ripe.balletIrritate | quote }}
  CASINO: {{ .Values.ripe.casino | quote }}
  EVERYBODY: {{ .Values.ripe.everybody | quote }}
  FICTION_SADDLE_CATACOMB: {{ .Values.ripe.fictionSaddleCatacomb | quote }}
  GODPARENT: {{ .Values.ripe.godparent | quote }}
  INJURE: {{ .Values.ripe.injure | quote }}
  PIGLET: {{ .Values.ripe.piglet | quote }}
  SPUR_SANCTITY_CREWMATE: {{ .Values.ripe.spurSanctityCrewmate | quote }}
  TOP-HAT_QUART: {{ .Values.ripe.topHatQuart | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "ripe.fullname" . }}-ripe
  labels:
  {{- include "ripe.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: ripe
spec:
  replicas: {{ .Values.ripe.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: ripe
      app.kubernetes.io/name: open
    {{- include "ripe.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: ripe
        app.kubernetes.io/name: open
      {{- include "ripe.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 2baa23f084d757eb6cbdab8ebff10782d7da0c35b690341365b59c731fa57df3
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "ripe.fullname" . }}-ripe
        image: {{ .Values.ripe.ripe.image.repository }}:{{ .Values.ripe.ripe.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.ripe.ripe.imagePullPolicy }}
        name: ripe
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.ripe.ripe.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.ripe.ripe.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "ripe.fullname" . }}-ripe
  labels:
  {{- include "ripe.labels" . | nindent 4 }}
spec:
  type: {{ .Values.ripe.type }}
  selector:
    app.kubernetes.io/instance: ripe
    app.kubernetes.io/name: open
  {{- include "ripe.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.ripe.ports | toYaml | nindent 2 -}}
kubernetesClusterDomain: cluster.local
ripe:
  armRestPlumber: body
  attract: damage
  balletIrritate: cape
  casino: plea
  everybody: originate
  fictionSaddleCatacomb: chandelier
  godparent: papaya
  injure: pen
  piglet: squalid
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  ripe:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  spurSanctityCrewmate: x-ray
  topHatQuart: throw
  type: ClusterIP
