# Copyright © 2018 Amdocs, AT&T, Bell Canada
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#       http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

apiVersion: apps/v1
kind: StatefulSet
metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
spec:
  selector: {{- include "common.selectors" . | nindent 4 }}
  serviceName: {{ include "common.servicename" . }}
  replicas: {{ .Values.replicaCount }}
  podManagementPolicy: {{ .Values.podManagementPolicy }}
  updateStrategy:
    type: {{ .Values.updateStrategy.type }}
  template:
    metadata: {{- include "common.templateMetadata" . | nindent 6 }}
    spec:
      hostNetwork: {{ .Values.hostNetwork }}
      containers:
      - name: {{ include "common.name" . }}
        image: "{{ include "common.repository" . }}/{{ .Values.image }}"
        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
        ports: {{ include "common.containerPorts" . | nindent 8  }}
        volumeMounts:
          - name: {{ include "common.fullname" . }}-data
            mountPath: /var/lib/cassandra
          - name: localtime
            mountPath: /etc/localtime
            readOnly: true
          - name: cassandra-entrypoint
            mountPath: /docker-entrypoint.sh
            subPath: docker-entrypoint.sh
          {{- range $key, $value := .Values.configOverrides }}
          - name: cassandra-config-{{ $key | replace "." "-" }}
            mountPath: /etc/cassandra/{{ $key }}
            subPath: {{ $key }}
          {{- end }}
        {{- if eq .Values.liveness.enabled true }}
        livenessProbe:
          exec:
           command:
            - /bin/bash
            - -c
            - nodetool status | grep $POD_IP | awk '$1!="UN" { exit 1; }'
          initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
          periodSeconds: {{ .Values.liveness.periodSeconds }}
          timeoutSeconds: {{ .Values.liveness.timeoutSeconds }}
          successThreshold: {{ .Values.liveness.successThreshold }}
          failureThreshold: {{ .Values.liveness.failureThreshold }}
        {{ end }}
        readinessProbe:
          exec:
            command:
            - /bin/bash
            - -c
            - nodetool status | grep $POD_IP | awk '$1!="UN" { exit 1; }'
          initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
          periodSeconds: {{ .Values.readiness.periodSeconds }}
          timeoutSeconds: {{ .Values.readiness.timeoutSeconds }}
          successThreshold: {{ .Values.readiness.successThreshold }}
          failureThreshold: {{ .Values.readiness.failureThreshold }}
        env:
          {{- $seed_size := default 1 .Values.replicaCount | int -}}
          {{- $global := . }}
          - name: CASSANDRA_SEEDS
          {{- if .Values.hostNetwork }}
            value: {{ required "You must fill \".Values.config.seeds\" with list of Cassandra seeds when hostNetwork is set to true" .Values.config.seeds | quote }}
          {{- else }}
            value: "{{- range $i, $e := until $seed_size }}{{ template "common.fullname" $global }}-{{ $i }}.{{ template "common.servicename" $global }}.{{ $global.Release.Namespace }}.svc.{{ $global.Values.config.cluster_domain }}{{- if (lt ( add1 $i ) $seed_size ) }},{{- end }}{{- end }}"
          {{- end }}
          - name: MAX_HEAP_SIZE
            value: {{ .Values.config.heap.max }}
          - name: HEAP_NEWSIZE
            value: {{ .Values.config.heap.min }}
          - name: JVM_OPTS
            value: {{ .Values.config.jvmOpts | quote }}
          - name: CASSANDRA_CLUSTER_NAME
            value: {{ .Values.config.clusterName | quote }}
          - name: CASSANDRA_DC
            value: {{ .Values.config.dataCenter | quote }}
          - name: CASSANDRA_RACK
            value: {{ .Values.config.rackName | quote }}
          - name: CASSANDRA_AUTO_BOOTSTRAP
            value: {{ .Values.config.autoBootstrap | quote }}
          - name: CASSANDRA_START_RPC
            value: {{ default "true" .Values.config.start_rpc | quote }}
          - name: CASSANDRA_ENDPOINT_SNITCH
            value: {{ default "GossipingPropertyFileSnitch" .Values.config.endpoint_snitch | quote }}
          - name: CASSANDRA_AUTHENTICATOR
            value: {{ default "PasswordAuthenticator" .Values.config.authenticator | quote }}
          - name: POD_IP
            valueFrom:
              fieldRef:
                fieldPath: status.podIP
        lifecycle:
          preStop:
            exec:
        {{- if not .Values.persistence.enabled }}
              command: ["/bin/sh", "-c", "exec nodetool decommission"]
        {{- else }}
              command: ["/bin/sh", "-c", "PID=$(pidof java) && kill $PID && while ps -p $PID > /dev/null; do sleep 1; done"]
        {{- end }}
        resources:
{{ toYaml .Values.resources | indent 10 }}
      {{- if .Values.nodeSelector }}
      nodeSelector:
{{ toYaml .Values.nodeSelector | indent 8 }}
      {{- end -}}
      {{- if .Values.affinity }}
      affinity:
{{ toYaml .Values.affinity | indent 8 }}
      {{- end }}
      volumes:
      - name: localtime
        hostPath:
          path: /etc/localtime
      {{- range $key, $value := .Values.configOverrides }}
      - name: cassandra-config-{{ $key | replace "." "-" }}
        configMap:
          name: {{ include "common.fullname" . }}-configOverrides
      {{- end }}
      - name: cassandra-entrypoint
        configMap:
          name: {{ include "common.fullname" . }}-entrypoint
          defaultMode: 0755
  {{- if not .Values.persistence.enabled }}
      - name: {{ include "common.fullname" . }}-data
        emptyDir: {}
  {{- else }}
  volumeClaimTemplates:
    - metadata:
        name: {{ include "common.fullname" . }}-data
        labels:
          name: {{ include "common.fullname" . }}
          chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
          release: "{{ include "common.release" . }}"
          heritage: "{{ .Release.Service }}"
      spec:
        accessModes:
        {{- if .Values.backup.enabled }}
        - ReadWriteMany
        {{- else }}
        - ReadWriteOnce
        {{- end }}
        storageClassName: {{ include "common.storageClass" . }}
        resources:
          requests:
            storage: {{ .Values.persistence.size | quote }}
  {{- end }}
