# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "broken.fullname" . }}-broken
  labels:
  {{- include "broken.labels" . | nindent 4 }}
data:
  AMBULANCE: {{ .Values.broken.ambulance | quote }}
  GIGGLE_SELECT_KIT: {{ .Values.broken.giggleSelectKit | quote }}
  RELATION_GRADUATION: {{ .Values.broken.relationGraduation | quote }}
  VEST_AGENT_NESTLING: {{ .Values.broken.vestAgentNestling | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "broken.fullname" . }}-broken
  labels:
  {{- include "broken.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: broken
spec:
  replicas: {{ .Values.broken.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: broken
      app.kubernetes.io/name: limo
    {{- include "broken.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: broken
        app.kubernetes.io/name: limo
      {{- include "broken.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: c463eda97fd3971cf0176640fb85e922389231608818c15209b1373fb6637f78
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "broken.fullname" . }}-broken
        image: {{ .Values.broken.broken.image.repository }}:{{ .Values.broken.broken.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.broken.broken.imagePullPolicy }}
        name: broken
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.broken.broken.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.broken.broken.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "broken.fullname" . }}-broken
  labels:
  {{- include "broken.labels" . | nindent 4 }}
spec:
  type: {{ .Values.broken.type }}
  selector:
    app.kubernetes.io/instance: broken
    app.kubernetes.io/name: limo
  {{- include "broken.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.broken.ports | toYaml | nindent 2 -}}
broken:
  ambulance: gladiolus
  broken:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  giggleSelectKit: gather
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  relationGraduation: tug
  replicas: 1
  type: ClusterIP
  vestAgentNestling: yawl
kubernetesClusterDomain: cluster.local
