# 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/v1beta1
kind: StatefulSet
metadata:
  name: {{ include "common.fullname" . }}
  namespace: {{ include "common.namespace" . }}
  labels:
    app: {{ include "common.name" . }}
    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
    release: {{ .Release.Name }}
    heritage: {{ .Release.Service }}
spec:
  selector:
    matchLabels:
      app: {{ include  "common.name" . }}
      release: {{ .Release.Name }}
  serviceName: {{ include "common.servicename" . }}
  replicas: {{ .Values.replicaCount }}
  podManagementPolicy: {{ .Values.podManagementPolicy }}
  updateStrategy:
    type: {{ .Values.updateStrategy.type }}
  template:
    metadata:
      labels:
        app: {{ include "common.name" . }}
        release: {{ .Release.Name }}
      name: {{ include "common.name" . }}
    spec:
      hostNetwork: {{ .Values.hostNetwork }}
      containers:
      - name: {{ include "common.name" . }}
        image: {{ .Values.image }}
        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
        ports:
        {{- range $index, $ports := .Values.service.ports }}
        - containerPort: {{ $ports.port }}
        {{- end }}
        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: "{{ .Release.Name }}"
          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 }}
