# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "shanty.fullname" . }}-shanty
  labels:
  {{- include "shanty.labels" . | nindent 4 }}
data:
  ADVOCATE_INVITE: {{ .Values.shanty.advocateInvite | quote }}
  BET_CHIVE_SPIRAL: {{ .Values.shanty.betChiveSpiral | quote }}
  CRICKET_STOT: {{ .Values.shanty.cricketStot | quote }}
  CUB: {{ .Values.shanty.cub | quote }}
  ECLIPTIC: {{ .Values.shanty.ecliptic | quote }}
  EXTENSION: {{ .Values.shanty.extension | quote }}
  PILL: {{ .Values.shanty.pill | quote }}
  RAILING: {{ .Values.shanty.railing | quote }}
  RID_NEIGHBORLY: {{ .Values.shanty.ridNeighborly | quote }}
  STILL_CONTINUITY_COMMITMENT: {{ .Values.shanty.stillContinuityCommitment | quote
    }}
  SYMBOLIZE_RESPONSIBILITY: {{ .Values.shanty.symbolizeResponsibility | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "shanty.fullname" . }}-shanty
  labels:
  {{- include "shanty.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: shanty
spec:
  replicas: {{ .Values.shanty.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: shanty
      app.kubernetes.io/name: fibroblast
    {{- include "shanty.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: shanty
        app.kubernetes.io/name: fibroblast
      {{- include "shanty.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: f637dd711b4cfea9bd1db16c8511e18067da62b679d65de8fa3e0da9fa698e12
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "shanty.fullname" . }}-shanty
        image: {{ .Values.shanty.shanty.image.repository }}:{{ .Values.shanty.shanty.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.shanty.shanty.imagePullPolicy }}
        name: shanty
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.shanty.shanty.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.shanty.shanty.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "shanty.fullname" . }}-shanty
  labels:
  {{- include "shanty.labels" . | nindent 4 }}
spec:
  type: {{ .Values.shanty.type }}
  selector:
    app.kubernetes.io/instance: shanty
    app.kubernetes.io/name: fibroblast
  {{- include "shanty.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.shanty.ports | toYaml | nindent 2 -}}
kubernetesClusterDomain: cluster.local
shanty:
  advocateInvite: randomisation
  betChiveSpiral: complement
  cricketStot: knowing
  cub: makeshift
  ecliptic: outfielder
  extension: jobless
  pill: staff
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  railing: sauce
  replicas: 1
  ridNeighborly: deranged
  shanty:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  stillContinuityCommitment: acknowledgment
  symbolizeResponsibility: adamant
  type: ClusterIP
