# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "shipyard.fullname" . }}-shipyard
  labels:
  {{- include "shipyard.labels" . | nindent 4 }}
data:
  BID_SAFETY_ALLOW: {{ .Values.shipyard.bidSafetyAllow | quote }}
  BOOTEE_AGENCY: {{ .Values.shipyard.booteeAgency | quote }}
  CRACK_BOUT: {{ .Values.shipyard.crackBout | quote }}
  INCENSE: {{ .Values.shipyard.incense | quote }}
  OPTIMISATION: {{ .Values.shipyard.optimisation | quote }}
  ORCHESTRA_ADVENTUROUS: {{ .Values.shipyard.orchestraAdventurous | quote }}
  PATIO: {{ .Values.shipyard.patio | quote }}
  PROSE: {{ .Values.shipyard.prose | quote }}
  SAVANNAH_WIND_TRUSTEE: {{ .Values.shipyard.savannahWindTrustee | quote }}
  SPORT_FANTASY_CACAO: {{ .Values.shipyard.sportFantasyCacao | quote }}
  TAKEOVER_CONDITION_VIXEN: {{ .Values.shipyard.takeoverConditionVixen | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "shipyard.fullname" . }}-shipyard
  labels:
  {{- include "shipyard.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: shipyard
spec:
  replicas: {{ .Values.shipyard.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: shipyard
      app.kubernetes.io/name: circulation
    {{- include "shipyard.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: shipyard
        app.kubernetes.io/name: circulation
      {{- include "shipyard.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 3d1750ad1cb37ac97f4ea2c6dbeaa0eebff79002794ff8f18193de29c18d6556
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "shipyard.fullname" . }}-shipyard
        image: {{ .Values.shipyard.shipyard.image.repository }}:{{ .Values.shipyard.shipyard.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.shipyard.shipyard.imagePullPolicy }}
        name: shipyard
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.shipyard.shipyard.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.shipyard.shipyard.containerSecurityContext
          | nindent 10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "shipyard.fullname" . }}-shipyard
  labels:
  {{- include "shipyard.labels" . | nindent 4 }}
spec:
  type: {{ .Values.shipyard.type }}
  selector:
    app.kubernetes.io/instance: shipyard
    app.kubernetes.io/name: circulation
  {{- include "shipyard.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.shipyard.ports | toYaml | nindent 2 -}}
kubernetesClusterDomain: cluster.local
shipyard:
  bidSafetyAllow: terminology
  booteeAgency: unusual
  crackBout: silver
  incense: contact
  optimisation: wax
  orchestraAdventurous: bracket
  patio: cutlet
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  prose: unemployment
  replicas: 1
  savannahWindTrustee: smoking
  shipyard:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  sportFantasyCacao: expect
  takeoverConditionVixen: appraise
  type: ClusterIP
