aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes/aaf/components/aaf-sms/charts/aaf-sms-vault/templates/statefulset.yaml
blob: 3e580eca41cc1b74377f91a7bfb19b56f9798ac5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
.highlight .hll { background-color: #ffffcc }
.highlight .c { color: #888888 } /* Comment */
.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
.highlight .k { color: #008800; font-weight: bold } /* Keyword */
.highlight .ch { color: #888888 } /* Comment.Hashbang */
.highlight .cm { color: #888888 } /* Comment.Multiline */
.highlight .cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */
.highlight .cpf { color: #888888 } /* Comment.PreprocFile */
.highlight .c1 { color: #888888 } /* Comment.Single */
.highlight .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */
.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .gr { color: #aa0000 } /* Generic.Error */
.highlight .gh { color: #333333 } /* Generic.Heading */
.highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
.highlight .go { color: #888888 } /* Generic.Output */
.highlight .gp { color: #555555 } /* Generic.Prompt */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #666666 } /* Generic.Subheading */
.highlight .gt { color: #aa0000 } /* Generic.Traceback */
.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */
.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */
.highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */
.highlight .kp { color: #008800 } /* Keyword.Pseudo */
.highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */
.highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */
.highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */
.highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */
.highlight .na { color: #336699 } /* Name.Attribute */
.highlight .nb { color: #003388 } /* Name.Builtin */
.highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */
.highlight .no { color: #003366; font-weight: bold } /* Name.Constant */
.highlight .nd { color: #555555 } /* Name.Decorator */
.highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */
.highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */
.highlight .nl { color: #336699; font-style: italic } /* Name.Label */
.highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */
.highlight .py { color: #336699; font-weight: bold } /* Name.Property */
.highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */
.highlight .nv { color: #336699 } /* Name.Variable */
.highlight .ow { color: #008800 } /* Operator.Word */
.highlight .w { color: #bbbbbb } /* Text.Whitespace */
.highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */
.highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */
.highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */
.highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */
.highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */
.highlight .sa { color: #dd2200; background-col
{{/*
# Copyright 2018 Intel Corporation, Inc
# Modifications © 2020 AT&T
#
# 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:
  name: {{ include "common.fullname" . }}
  namespace: {{ include "common.namespace" . }}
  labels:
    app: {{ include "common.name" . }}
    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
    release: {{ include "common.release" . }}
    heritage: {{ .Release.Service }}
spec:
  replicas: {{ .Values.replicaCount }}
  selector:
    matchLabels:
      app: {{ include "common.name" . }}
  serviceName: {{ include "common.servicename" . }}
  template:
    metadata:
      labels:
        app: {{ include "common.name" . }}
        release: {{ include "common.release" . }}
    spec:
{{- if .Values.persistence.enabled }}
      initContainers:
        - name: fix-permission
          command:
            - /bin/sh
          args:
            - -c
            - |
              chmod -R 775 /consul/data
              chown -R 100:1000 /consul/data
          image: "{{ .Values.global.busyboxRepository }}/{{ .Values.global.busyboxImage }}"
          imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
          volumeMounts:
            - mountPath: /consul/data
              name: {{ include "common.fullname" . }}-data
{{- end }}
      containers:
      - image: "{{ include "common.repository" . }}/{{ .Values.image.vault }}"
        name: {{ include "common.name" . }}
        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
        args: ["server"]
        ports:
        - containerPort: {{ .Values.service.internalPort }}
        volumeMounts:
        - mountPath: /vault/config/config.json
          name: {{ include "common.fullname" . }}-vault
          subPath: config.json
        - mountPath: /etc/localtime
          name: localtime
          readOnly: true
        resources:
{{ include "common.resources" . | indent 10 }}
      - image: "{{ include "common.repository" . }}/{{ .Values.image.consul }}"
        name: {{ include "common.name" . }}-backend
        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
        args: ["agent","-server","-bind","0.0.0.0","-bootstrap-expect=1","-config-file","/consul/config/config.json"]
        ports:
        - name: http
          containerPort: 8500
        volumeMounts:
{{- if .Values.persistence.enabled }}
        - mountPath: /consul/data
          name: {{ include "common.fullname" . }}-data
{{- end }}
        - mountPath: /consul/config/config.json
          name: {{ include "common.fullname" . }}-consulconfiguration
          subPath: config.json
        - mountPath: /etc/localtime
          name: localtime
          readOnly: true
        resources:
{{ include "common.resources" . | indent 10 }}
      volumes:
        - name: {{ include "common.fullname" . }}-consulconfiguration
          configMap:
            name: {{ include "common.fullname" . }}-consul
        - name: {{ include "common.fullname" . }}-vault
          configMap:
            name: {{ include "common.fullname" . }}-vault
        - name: localtime
          hostPath:
            path: /etc/localtime
      imagePullSecrets:
      - name: "{{ include "common.namespace" . }}-docker-registry-key"
{{- if .Values.persistence.enabled }}
  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:
      - {{ .Values.persistence.accessMode | quote }}
      storageClassName: {{ include "common.storageClass" . }}
      resources:
        requests:
          storage: {{ .Values.persistence.size | quote }}
{{- end }}