-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Chore/add new aggregation app (#166)
* chore(helm): add aggregation service * chore(helm): re-added cardano-node env vars for aggregation app as they are needed as well * chore(helm): bump cardano-node to 8.9.0-1 * chore: added flag for history cleanup enabled for LS2 aggregations * chore: replaces dash w/ underscors * chore: maybe still need to quote a boolean quoted string? * chore: parameterised aggregation, updated docker hub image path --------- Co-authored-by: Roberto C. Morano <[email protected]>
- Loading branch information
Showing
4 changed files
with
124 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
93 changes: 93 additions & 0 deletions
93
deploy/cf-ledger-sync/templates/ledger-sync-aggregation-deployment.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
{{ if .Values.aggregation.enabled }} | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: {{ include "cf-ledger-sync.fullname" . }}{{ print "-aggregation" }} | ||
labels: | ||
{{- include "cf-ledger-sync-aggregation.labels" . | nindent 4 }} | ||
spec: | ||
replicas: {{ .Values.replicaCount }} | ||
selector: | ||
matchLabels: | ||
{{- include "cf-ledger-sync-aggregation.selectorLabels" . | nindent 6 }} | ||
template: | ||
metadata: | ||
labels: | ||
{{- include "cf-ledger-sync-aggregation.selectorLabels" . | nindent 8 }} | ||
spec: | ||
{{- with .Values.imagePullSecrets }} | ||
imagePullSecrets: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
containers: | ||
- name: "{{ .Chart.Name }}-aggregation" | ||
image: "{{ .Values.aggregation.image.repository }}:{{ .Values.aggregation.image.tag | default .Chart.AppVersion }}" | ||
imagePullPolicy: {{ .Values.image.pullPolicy }} | ||
env: | ||
- name: NETWORK | ||
value: {{ .Values.network | default "preprod" }} | ||
- name: DB_DIALECT | ||
value: {{ .Values.aggregation.dbDialect | default "org.hibernate.dialect.PostgreSQLDialect" }} | ||
|
||
{{ if .Values.useLocalCardanoNode }} | ||
- name: STORE_CARDANO_HOST | ||
value: "cardano-node" | ||
- name: STORE_CARDANO_PORT | ||
value: "3001" | ||
{{ if eq .Values.localCardanoNode.network "preview" }} | ||
- name: STORE_CARDANO_PROTOCOL_MAGIC | ||
value: "2" | ||
{{- else if eq .Values.localCardanoNode.network "preprod" }} | ||
- name: STORE_CARDANO_PROTOCOL_MAGIC | ||
value: "1" | ||
{{- else if eq .Values.localCardanoNode.network "mainnet" }} | ||
- name: STORE_CARDANO_PROTOCOL_MAGIC | ||
value: "764824073" | ||
{{- else if eq .Values.localCardanoNode.network "sanchonet" }} | ||
- name: STORE_CARDANO_PROTOCOL_MAGIC | ||
value: "4" | ||
{{- end }} | ||
{{- else }} | ||
- name: STORE_CARDANO_HOST | ||
value: {{ .Values.storeCardanoHost | default "preprod-node.world.dev.cardano.org" }} | ||
- name: STORE_CARDANO_PORT | ||
value: {{ .Values.storeCardanoPort | default "30000" | quote }} | ||
- name: STORE_CARDANO_PROTOCOL_MAGIC | ||
value: {{ .Values.storeCardanoProtocolMagic | default "1" | quote }} | ||
{{- end }} | ||
|
||
## Postgres | ||
- name: POSTGRES_HOST | ||
valueFrom: | ||
secretKeyRef: | ||
name: postgres-secrets | ||
key: POSTGRES_HOST | ||
- name: POSTGRES_PORT | ||
valueFrom: | ||
secretKeyRef: | ||
name: postgres-secrets | ||
key: POSTGRES_PORT | ||
- name: POSTGRES_DB | ||
valueFrom: | ||
secretKeyRef: | ||
name: postgres-secrets | ||
key: POSTGRES_DB | ||
- name: SPRING_DATASOURCE_URL | ||
value: jdbc:postgresql://$(POSTGRES_HOST):$(POSTGRES_PORT)/$(POSTGRES_DB)?currentSchema={{ .Values.aggregation.dbSchema | default "public" }} | ||
- name: SPRING_DATASOURCE_USERNAME | ||
valueFrom: | ||
secretKeyRef: | ||
name: postgres-secrets | ||
key: POSTGRES_USER | ||
- name: SPRING_DATASOURCE_PASSWORD | ||
valueFrom: | ||
secretKeyRef: | ||
name: postgres-secrets | ||
key: POSTGRES_PASSWORD | ||
|
||
- name: STORE_ACCOUNT_HISTORYCLEANUPENABLED | ||
value: {{ .Values.aggregation.store.account.history_cleanup_enabled | quote }} | ||
resources: | ||
{{- toYaml .Values.aggregation.resources | nindent 12 }} | ||
{{{ end }}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters