# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "alpenhorn.fullname" . }}-alpenhorn
  labels:
  {{- include "alpenhorn.labels" . | nindent 4 }}
data:
  BREAKPOINT: {{ .Values.alpenhorn.breakpoint | quote }}
  BRIEFLY_ROB_TEXT: {{ .Values.alpenhorn.brieflyRobText | quote }}
  BUCKLE_ALLEGED: {{ .Values.alpenhorn.buckleAlleged | quote }}
  BUSTLE: {{ .Values.alpenhorn.bustle | quote }}
  CENTER: {{ .Values.alpenhorn.center | quote }}
  DISAPPOINTMENT_CONFERENCE: {{ .Values.alpenhorn.disappointmentConference | quote
    }}
  FATHER_ROCKET_UNSIGHTLY: {{ .Values.alpenhorn.fatherRocketUnsightly | quote }}
  GLIMPSE: {{ .Values.alpenhorn.glimpse | quote }}
  MESENCHYME_MIDNIGHT: {{ .Values.alpenhorn.mesenchymeMidnight | quote }}
  PITA_IMMIGRANT_MIDDLE: {{ .Values.alpenhorn.pitaImmigrantMiddle | quote }}
  RELATIONSHIP_ASTERISK_SYSTEMIZE: {{ .Values.alpenhorn.relationshipAsteriskSystemize
    | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "alpenhorn.fullname" . }}-alpenhorn
  labels:
  {{- include "alpenhorn.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: alpenhorn
spec:
  replicas: {{ .Values.alpenhorn.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: alpenhorn
      app.kubernetes.io/name: spooky
    {{- include "alpenhorn.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: alpenhorn
        app.kubernetes.io/name: spooky
      {{- include "alpenhorn.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: edd49a7a980d0e186737067be79b157e5280af7275c9476381f7bd0cdd638cd2
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "alpenhorn.fullname" . }}-alpenhorn
        image: {{ .Values.alpenhorn.alpenhorn.image.repository }}:{{ .Values.alpenhorn.alpenhorn.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.alpenhorn.alpenhorn.imagePullPolicy }}
        name: alpenhorn
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.alpenhorn.alpenhorn.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.alpenhorn.alpenhorn.containerSecurityContext
          | nindent 10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "alpenhorn.fullname" . }}-alpenhorn
  labels:
  {{- include "alpenhorn.labels" . | nindent 4 }}
spec:
  type: {{ .Values.alpenhorn.type }}
  selector:
    app.kubernetes.io/instance: alpenhorn
    app.kubernetes.io/name: spooky
  {{- include "alpenhorn.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.alpenhorn.ports | toYaml | nindent 2 -}}
alpenhorn:
  alpenhorn:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  breakpoint: abortion
  brieflyRobText: pruner
  buckleAlleged: servitude
  bustle: silicon
  center: major-league
  disappointmentConference: interconnection
  fatherRocketUnsightly: chili
  glimpse: imported
  mesenchymeMidnight: movie
  pitaImmigrantMiddle: chicken
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  relationshipAsteriskSystemize: accept
  replicas: 1
  type: ClusterIP
kubernetesClusterDomain: cluster.local
