# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "ruffle.fullname" . }}-ruffle
  labels:
  {{- include "ruffle.labels" . | nindent 4 }}
data:
  ADVERB: {{ .Values.ruffle.adverb | quote }}
  ALPENHORN_REHABILITATE: {{ .Values.ruffle.alpenhornRehabilitate | quote }}
  ANNIVERSARY: {{ .Values.ruffle.anniversary | quote }}
  AUTHOR_WOEBEGONE: {{ .Values.ruffle.authorWoebegone | quote }}
  CYMBAL_TRANSPORTATION: {{ .Values.ruffle.cymbalTransportation | quote }}
  EMPLOYER: {{ .Values.ruffle.employer | quote }}
  HURT_SUPERIORITY_BLIZZARD: {{ .Values.ruffle.hurtSuperiorityBlizzard | quote }}
  PENDANT: {{ .Values.ruffle.pendant | quote }}
  STRIDE: {{ .Values.ruffle.stride | quote }}
  UPLIFT_ABNORMAL_FREON: {{ .Values.ruffle.upliftAbnormalFreon | quote }}
  WHIRL: {{ .Values.ruffle.whirl | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "ruffle.fullname" . }}-ruffle
  labels:
  {{- include "ruffle.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: ruffle
spec:
  replicas: {{ .Values.ruffle.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: ruffle
      app.kubernetes.io/name: sculptural
    {{- include "ruffle.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: ruffle
        app.kubernetes.io/name: sculptural
      {{- include "ruffle.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: bf86be0cbb3f5631ebb7676bcec99faa207477a1fe605ff235461fbb9e408194
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "ruffle.fullname" . }}-ruffle
        image: {{ .Values.ruffle.ruffle.image.repository }}:{{ .Values.ruffle.ruffle.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.ruffle.ruffle.imagePullPolicy }}
        name: ruffle
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.ruffle.ruffle.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.ruffle.ruffle.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "ruffle.fullname" . }}-ruffle
  labels:
  {{- include "ruffle.labels" . | nindent 4 }}
spec:
  type: {{ .Values.ruffle.type }}
  selector:
    app.kubernetes.io/instance: ruffle
    app.kubernetes.io/name: sculptural
  {{- include "ruffle.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.ruffle.ports | toYaml | nindent 2 -}}
kubernetesClusterDomain: cluster.local
ruffle:
  adverb: channel
  alpenhornRehabilitate: outside
  anniversary: relation
  authorWoebegone: temporariness
  cymbalTransportation: overt
  employer: oafish
  hurtSuperiorityBlizzard: booty
  pendant: psychoanalyst
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  ruffle:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  stride: chronicle
  type: ClusterIP
  upliftAbnormalFreon: bewildered
  whirl: photograph
