github.com/smartcontractkit/chainlink-testing-framework/libs@v0.0.0-20240227141906-ec710b4eb1a3/charts/qa-mock-adapter/templates/deployment.yaml (about)

     1  apiVersion: apps/v1
     2  kind: Deployment
     3  metadata:
     4    name: {{ template "chart.name" . }}
     5    namespace: {{ .Release.Namespace }}
     6    labels:
     7      app: {{ template "chart.name" . }}
     8      chart: {{ template "chart.name_version" . }}
     9      release: {{ .Release.Name }}
    10      heritage: {{ .Release.Service }}
    11  spec:
    12    replicas: {{ .Values.replicaCount }}
    13    selector:
    14      matchLabels:
    15        app: {{ template "chart.name" . }}
    16        release: {{ .Release.Name }}
    17    template:
    18      metadata:
    19  {{- if .Values.podAnnotations }}
    20        # Allows custom annotations to be specified
    21        annotations:
    22  {{ toYaml .Values.podAnnotations | indent 8 }}
    23  {{- end }}
    24        name: {{ template "chart.name" . }}
    25        labels:
    26          app: {{ template "chart.name" . }}
    27          release: {{ .Release.Name }}
    28      spec:
    29        containers:
    30          - name: {{ template "chart.name" . }}
    31            image: {{ .Values.image.repository }}/qa-mock-adapter:{{- if .Values.image.snapshot }}snapshot{{- else }}{{ .Chart.Version }}{{- end }}
    32  {{- if .Values.image.snapshot }}
    33            imagePullPolicy: Always
    34  {{- else }}
    35            imagePullPolicy: {{ .Values.image.pullPolicy }}
    36  {{- end }}
    37            securityContext:
    38              runAsUser: 65534 # nonroot
    39              readOnlyRootFilesystem: {{ .Values.app.readOnlyRootFilesystem }}
    40            ports:
    41              - name: serviceport
    42                containerPort: {{ .Values.app.serverPort }}
    43                protocol: TCP
    44            readinessProbe:
    45              httpGet:
    46                path: /
    47                port: serviceport
    48              initialDelaySeconds: 1
    49              periodSeconds: 5
    50              successThreshold: 1
    51              failureThreshold: 10
    52            livenessProbe:
    53              httpGet:
    54                path: /
    55                port: serviceport
    56              initialDelaySeconds: 1
    57              periodSeconds: 30
    58              successThreshold: 1
    59              failureThreshold: 10
    60            startupProbe:
    61              httpGet:
    62                path: /
    63                port: serviceport
    64              initialDelaySeconds: 30
    65              periodSeconds: 5
    66              failureThreshold: 20
    67  {{- if .Values.app.resources }}
    68            resources:
    69  {{ toYaml .Values.app.resources | indent 12 }}
    70  {{- end }}
    71  {{- with .Values.nodeSelector }}
    72        nodeSelector:
    73  {{ toYaml . | indent 8 }}
    74  {{- end }}
    75  {{- with .Values.affinity }}
    76        affinity:
    77  {{ toYaml . | indent 8 }}
    78  {{- end }}
    79  {{- with .Values.tolerations }}
    80        tolerations:
    81  {{ toYaml . | indent 8 }}
    82  {{- end }}