# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "crucifixion.fullname" . }}-crucifixion
  labels:
  {{- include "crucifixion.labels" . | nindent 4 }}
data:
  ALTERATION: {{ .Values.crucifixion.alteration | quote }}
  ANALOGY_GENEROSITY: {{ .Values.crucifixion.analogyGenerosity | quote }}
  BASIS_REPAYMENT_NUMEROUS: {{ .Values.crucifixion.basisRepaymentNumerous | quote
    }}
  CONSIST_SENIOR_REFER: {{ .Values.crucifixion.consistSeniorRefer | quote }}
  UNPACK_RAPE: {{ .Values.crucifixion.unpackRape | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "crucifixion.fullname" . }}-crucifixion
  labels:
  {{- include "crucifixion.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: crucifixion
spec:
  replicas: {{ .Values.crucifixion.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: crucifixion
      app.kubernetes.io/name: stimulus
    {{- include "crucifixion.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: crucifixion
        app.kubernetes.io/name: stimulus
      {{- include "crucifixion.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 7d9266bda214eade74844e2949c82790ac09bca35ac098a0956615de48fac7db
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "crucifixion.fullname" . }}-crucifixion
        image: {{ .Values.crucifixion.crucifixion.image.repository }}:{{ .Values.crucifixion.crucifixion.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.crucifixion.crucifixion.imagePullPolicy }}
        name: crucifixion
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.crucifixion.crucifixion.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.crucifixion.crucifixion.containerSecurityContext
          | nindent 10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "crucifixion.fullname" . }}-crucifixion
  labels:
  {{- include "crucifixion.labels" . | nindent 4 }}
spec:
  type: {{ .Values.crucifixion.type }}
  selector:
    app.kubernetes.io/instance: crucifixion
    app.kubernetes.io/name: stimulus
  {{- include "crucifixion.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.crucifixion.ports | toYaml | nindent 2 -}}
crucifixion:
  alteration: beak
  analogyGenerosity: cathedral
  basisRepaymentNumerous: smash
  consistSeniorRefer: attain
  crucifixion:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  type: ClusterIP
  unpackRape: nation
kubernetesClusterDomain: cluster.local
