# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "centurion.fullname" . }}-centurion
  labels:
  {{- include "centurion.labels" . | nindent 4 }}
data:
  ABBREVIATION_READINESS: {{ .Values.centurion.abbreviationReadiness | quote }}
  AWARENESS_RAYON: {{ .Values.centurion.awarenessRayon | quote }}
  INSERT_COMPETENCE: {{ .Values.centurion.insertCompetence | quote }}
  SCAFFOLD: {{ .Values.centurion.scaffold | quote }}
  WATERSKIING_BRUNCH_INTENT: {{ .Values.centurion.waterskiingBrunchIntent | quote
    }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "centurion.fullname" . }}-centurion
  labels:
  {{- include "centurion.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: centurion
spec:
  replicas: {{ .Values.centurion.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: centurion
      app.kubernetes.io/name: gearshift
    {{- include "centurion.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: centurion
        app.kubernetes.io/name: gearshift
      {{- include "centurion.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 4626d23665014fcc9c15249941f7d53efda31f1e08ff03d84323fc015c160cf5
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "centurion.fullname" . }}-centurion
        image: {{ .Values.centurion.centurion.image.repository }}:{{ .Values.centurion.centurion.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.centurion.centurion.imagePullPolicy }}
        name: centurion
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.centurion.centurion.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.centurion.centurion.containerSecurityContext
          | nindent 10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "centurion.fullname" . }}-centurion
  labels:
  {{- include "centurion.labels" . | nindent 4 }}
spec:
  type: {{ .Values.centurion.type }}
  selector:
    app.kubernetes.io/instance: centurion
    app.kubernetes.io/name: gearshift
  {{- include "centurion.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.centurion.ports | toYaml | nindent 2 -}}
centurion:
  abbreviationReadiness: tritone
  awarenessRayon: server
  centurion:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  insertCompetence: panther
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  scaffold: bumper
  type: ClusterIP
  waterskiingBrunchIntent: cloudburst
kubernetesClusterDomain: cluster.local
