github.com/unigraph-dev/dgraph@v1.1.1-0.20200923154953-8b52b426f765/contrib/config/kubernetes/helm/templates/ratel-deployment.yaml (about)

     1  apiVersion: extensions/v1beta1
     2  kind: Deployment
     3  metadata:
     4    name: {{ template "dgraph.ratel.fullname" . }}
     5    labels:
     6      app: {{ template "dgraph.name" . }}
     7      chart: {{ template "dgraph.chart" . }}
     8      component: {{ .Values.ratel.name }}
     9      release: {{ .Release.Name }}
    10      heritage: {{ .Release.Service }}
    11  spec:
    12    selector:
    13      matchLabels:
    14        app: {{ template "dgraph.name" . }}
    15        chart: {{ template "dgraph.chart" . }}
    16        component: {{ .Values.ratel.name }}
    17        release: {{ .Release.Name }}
    18    replicas: {{ .Values.ratel.replicaCount }}
    19    template:
    20      metadata:
    21        labels:
    22          app: {{ template "dgraph.name" . }}
    23          chart: {{ template "dgraph.chart" . }}
    24          component: {{ .Values.ratel.name }}
    25          release: {{ .Release.Name }}
    26      spec:
    27        {{- if .Values.ratel.securityContext.enabled }}
    28        securityContext:
    29          fsGroup: {{ .Values.ratel.securityContext.fsGroup }}
    30          runAsUser: {{ .Values.ratel.securityContext.runAsUser }}    
    31        {{- end }}
    32  {{- include "dgraph.imagePullSecrets" . | indent 6 }}
    33        containers:
    34        - name: "{{ template "dgraph.ratel.fullname" . }}"
    35          image: "{{ template "dgraph.image" . }}"
    36          imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
    37          command:
    38            - dgraph-ratel
    39          ports:
    40          - name: http
    41            containerPort: 8000
    42          {{- if .Values.ratel.livenessProbe.enabled }}
    43          livenessProbe:
    44            httpGet:
    45              port: {{ .Values.ratel.livenessProbe.port }}
    46              path: {{ .Values.ratel.livenessProbe.path }}
    47            initialDelaySeconds: {{ .Values.ratel.livenessProbe.initialDelaySeconds }}
    48            periodSeconds: {{ .Values.ratel.livenessProbe.periodSeconds }}
    49            timeoutSeconds: {{ .Values.ratel.livenessProbe.timeoutSeconds }}
    50            successThreshold: {{ .Values.ratel.livenessProbe.successThreshold }}
    51            failureThreshold: {{ .Values.ratel.livenessProbe.failureThreshold }}
    52          {{- end }}
    53          {{- if .Values.ratel.readinessProbe.enabled }}
    54          readinessProbe:
    55            httpGet:
    56              port: {{ .Values.ratel.livenessProbe.port }}
    57              path: {{ .Values.ratel.livenessProbe.path }}          
    58            initialDelaySeconds: {{ .Values.ratel.readinessProbe.initialDelaySeconds }}
    59            periodSeconds: {{ .Values.ratel.readinessProbe.periodSeconds }}
    60            timeoutSeconds: {{ .Values.ratel.readinessProbe.timeoutSeconds }}
    61            successThreshold: {{ .Values.ratel.readinessProbe.successThreshold }}
    62            failureThreshold: {{ .Values.ratel.readinessProbe.failureThreshold }}
    63          {{- end }}
    64          resources:
    65  {{ toYaml .Values.ratel.resources | indent 10 }}