# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "spokeswoman.fullname" . }}-spokeswoman
  labels:
  {{- include "spokeswoman.labels" . | nindent 4 }}
data:
  AIRCRAFT_SNUGGLE: {{ .Values.spokeswoman.aircraftSnuggle | quote }}
  CLAMMY_POULTRY_DIRECTIVE: {{ .Values.spokeswoman.clammyPoultryDirective | quote
    }}
  COUNTER: {{ .Values.spokeswoman.counter | quote }}
  DOWNFALL_OVERFLIGHT_INTEGER: {{ .Values.spokeswoman.downfallOverflightInteger |
    quote }}
  DUSTY: {{ .Values.spokeswoman.dusty | quote }}
  RAWHIDE_STENCIL: {{ .Values.spokeswoman.rawhideStencil | quote }}
  REPORTER_ORIENT: {{ .Values.spokeswoman.reporterOrient | quote }}
  SPEEDBOAT: {{ .Values.spokeswoman.speedboat | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "spokeswoman.fullname" . }}-spokeswoman
  labels:
  {{- include "spokeswoman.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: spokeswoman
spec:
  replicas: {{ .Values.spokeswoman.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: spokeswoman
      app.kubernetes.io/name: ambition
    {{- include "spokeswoman.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: spokeswoman
        app.kubernetes.io/name: ambition
      {{- include "spokeswoman.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 8af30505cbf7adc9d6c4737b7f9439e0e266edff62fbeac4d657fc92ff5da9b7
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "spokeswoman.fullname" . }}-spokeswoman
        image: {{ .Values.spokeswoman.spokeswoman.image.repository }}:{{ .Values.spokeswoman.spokeswoman.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.spokeswoman.spokeswoman.imagePullPolicy }}
        name: spokeswoman
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.spokeswoman.spokeswoman.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.spokeswoman.spokeswoman.containerSecurityContext
          | nindent 10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "spokeswoman.fullname" . }}-spokeswoman
  labels:
  {{- include "spokeswoman.labels" . | nindent 4 }}
spec:
  type: {{ .Values.spokeswoman.type }}
  selector:
    app.kubernetes.io/instance: spokeswoman
    app.kubernetes.io/name: ambition
  {{- include "spokeswoman.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.spokeswoman.ports | toYaml | nindent 2 -}}
kubernetesClusterDomain: cluster.local
spokeswoman:
  aircraftSnuggle: jealousy
  clammyPoultryDirective: ludicrous
  counter: grace
  downfallOverflightInteger: ice
  dusty: alternative
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  rawhideStencil: inn
  replicas: 1
  reporterOrient: attendance
  speedboat: hemisphere
  spokeswoman:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  type: ClusterIP
