Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
apiVersion: apps/v1
kind: Deployment
metadata:
name: "{{ template "app.name" . }}"
namespace: {{ .Release.Namespace }}
labels:
{{- include "app.labels" . | nindent 4 }}
app.kubernetes.io/instance: {{ include "app.revision" . }}
app.kubernetes.io/part-of: rse
spec:
replicas: {{ .Values.replicaCount }}
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 1
maxUnavailable: 0
selector:
matchLabels:
{{- include "app.selectorLabels" . | nindent 6 }}
template:
metadata:
labels:
{{- include "app.labels" . | nindent 8 }}
annotations:
{{- include "app.metricsAnnotations" . | nindent 8 }}
{{- if .Values.podAnnotations }}
{{ toYaml .Values.podAnnotations | indent 8 }}
{{- end }}
spec:
securityContext:
{{- include "app.securitycontext" . | nindent 8 }}
imagePullSecrets:
- name: {{ .Values.image.pullSecrets }}
containers:
- name: {{ template "app.name" . }}
image: "{{ .Values.image.repository }}/{{ .Values.image.name }}:{{ default .Chart.AppVersion .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
env:
- name: PORT
value: {{ .Values.service.port | quote }}
- name: DATABASE_URL
value: {{ template "app.postgresql.connectionstring" (merge (dict "application" "true") .) }}
- name: NATS_URL
value: "{{ .Values.ssiAbstraction.nats.protocol }}://{{ .Values.ssiAbstraction.nats.url }}:{{ .Values.ssiAbstraction.nats.port }}"
- name: ECSURL
value: "{{ .Values.ssiAbstraction.elastic.protocol }}://{{ .Values.ssiAbstraction.elastic.url }}:{{ .Values.ssiAbstraction.elastic.port }}/"
- name: AGENT_HOST
value: "{{ .Values.ssiAbstraction.agent.protocol }}://{{ .Values.ssiAbstraction.agent.host }}"
- name: AGENT_URL_PATH
value: {{ .Values.ssiAbstraction.agent.urlPath }}
- name: AGENT_NAME
value: {{ .Values.ssiAbstraction.agent.name }}
- name: AGENT_INBOUND_PORT
value: ":{{ .Values.ssiAbstraction.agent.inboundPort }}"
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
- name: AGENT_PUBLIC_DID_SEED
value: {{ .Values.ssiAbstraction.agent.publicDidSeed | quote }}
- name: AGENT_AUTO_ACCEPT_CONNECTION
value: {{ .Values.ssiAbstraction.agent.autoAccept.connection | quote }}
- name: AGENT_AUTO_ACCEPT_CREDENTIAL
value: {{ .Values.ssiAbstraction.agent.autoAccept.credential | quote }}
- name: AGENT_LEDGER_ID
value: {{ .Values.ssiAbstraction.agent.ledgerId | quote }}
- name: LOG_LEVEL
value: {{ .Values.log.level | default "INFO" }}
- name: LOG_ENCODING
value: {{ .Values.log.encoding | default "json" }}
- name: AGENT_WALLET_KEY
value: {{ .Values.ssiAbstraction.agent.wallet.key | quote }}
- name: AGENT_WALLET_ID
value: {{ .Values.ssiAbstraction.agent.wallet.id | quote }}
{{- if .Values.extraVars }}
{{ toYaml .Values.extraVars | indent 8 }}
{{- end }}
ports:
{{- if .Values.metrics.enabled }}
- name: monitoring
containerPort: {{ .Values.metrics.port }}
{{- end }}
- name: http
containerPort: {{ .Values.service.port }}
- name: peer
containerPort: {{ .Values.ssiAbstraction.agent.peerPort }}
readinessProbe:
httpGet:
path: /v1/health
port: {{ .Values.service.port }}
initialDelaySeconds: 5
periodSeconds: 5
successThreshold: 2
failureThreshold: 2
timeoutSeconds: 5
resources:
{{ toYaml .Values.resources | indent 10 }}