@fairmint/canton-node-sdk
Version:
Canton Node SDK
115 lines (113 loc) • 3.81 kB
YAML
# Copyright (c) 2024 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
{{ if .Values.ansWebUi.enabled }}
{{- $ansWebUiLabel := "ans-web-ui" }}
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
{{- include "splice-util-lib.default-labels" (set . "app" $ansWebUiLabel) | nindent 4 }}
migration: {{ .Values.migration.id | quote }}
name: {{ $ansWebUiLabel }}
namespace: {{ .Release.Namespace }}
spec:
replicas: 1
selector:
matchLabels:
app: {{ $ansWebUiLabel }}
strategy:
type: Recreate
template:
metadata:
annotations:
{{- toYaml .Values.pod.annotations | nindent 8 }}
labels:
{{- include "splice-util-lib.default-labels" (set . "app" $ansWebUiLabel) | nindent 8 }}
migration: {{ .Values.migration.id | quote }}
spec:
{{- include "splice-util-lib.service-account" .Values | nindent 6 }}
containers:
- name: ans-web-ui
image: "{{ .Values.imageRepo }}/ans-web-ui:{{ .Chart.AppVersion }}{{ ((.Values.imageDigests).ans_web_ui) }}"
{{- with .Values.imagePullPolicy }}
imagePullPolicy: {{ . }}
{{- end }}
env:
- name: SPLICE_APP_UI_NETWORK_NAME
value: {{ .Values.spliceInstanceNames.networkName | quote }}
- name: SPLICE_APP_UI_NETWORK_FAVICON_URL
value: {{ .Values.spliceInstanceNames.networkFaviconUrl | quote }}
- name: SPLICE_APP_UI_AMULET_NAME
value: {{ .Values.spliceInstanceNames.amuletName | quote }}
- name: SPLICE_APP_UI_AMULET_NAME_ACRONYM
value: {{ .Values.spliceInstanceNames.amuletNameAcronym | quote }}
- name: SPLICE_APP_UI_NAME_SERVICE_NAME
value: {{ .Values.spliceInstanceNames.nameServiceName | quote }}
- name: SPLICE_APP_UI_NAME_SERVICE_NAME_ACRONYM
value: {{ .Values.spliceInstanceNames.nameServiceNameAcronym | quote }}
- name: SPLICE_APP_UI_POLL_INTERVAL
value: {{ .Values.uiPollInterval | quote }}
{{- if .Values.disableAuth }}
- name: SPLICE_APP_UI_UNSAFE
value: "true"
- name: SPLICE_APP_UI_UNSAFE_SECRET
value: "unsafe"
- name: SPLICE_APP_UI_AUTH_AUDIENCE
value: "https://validator.example.com"
{{- else }}
- name: SPLICE_APP_UI_AUTH_CLIENT_ID
valueFrom:
secretKeyRef:
key: client-id
name: splice-app-cns-ui-auth
optional: false
- name: SPLICE_APP_UI_AUTH_URL
valueFrom:
secretKeyRef:
key: url
name: splice-app-cns-ui-auth
optional: false
- name: SPLICE_APP_UI_AUTH_AUDIENCE
value: {{ .Values.auth.audience | quote }}
{{- end }}
ports:
- containerPort: 8080
name: http
protocol: TCP
resources:
requests:
cpu: 0.1
memory: 240Mi
limits:
cpu: 1
memory: 1536Mi
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
apiVersion: v1
kind: Service
metadata:
name: {{ $ansWebUiLabel }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "splice-util-lib.default-labels" (set . "app" $ansWebUiLabel) | nindent 4 }}
migration: {{ .Values.migration.id | quote }}
spec:
selector:
app: {{ $ansWebUiLabel }}
ports:
- name: http
targetPort: http
port: {{ .Values.service.ans.port }}
protocol: TCP
{{- end }}