# 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: {{ .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 }}
