├── charts ├── cf-explorer-jobs │ ├── values.yaml │ ├── Chart.yaml │ └── templates │ │ └── explorer-db-dump.yaml ├── grafana-dashboards │ ├── values.yaml │ ├── Chart.yaml │ ├── install.sh │ ├── templates │ │ └── dashboards.yaml │ └── custom-dashboards │ │ ├── consumer-dashboard.json │ │ ├── cf-crawler.json │ │ └── cf-consumer.json ├── main-app │ ├── Chart.yaml │ ├── README.md │ ├── templates │ │ ├── 003-grafana-dashboards.yaml │ │ ├── 002-elastic-eck-stack.yaml │ │ ├── 001-prometheus-stack.yaml │ │ ├── 101-cf-explorer.yaml │ │ └── 100-cf-explorer-infra.yaml │ ├── values.yaml │ ├── values-sranjan-dev-preprod.yaml │ ├── values-dev-preprod.yaml │ ├── values-dev-preview.yaml │ ├── values-stg-preprod.yaml │ ├── values-stg-preview.yaml │ ├── values-pro-preprod.yaml │ ├── values-pro-preview.yaml │ ├── values-dev-mainnet.yaml │ ├── values-stg-mainnet.yaml │ └── values-pro-mainnet.yaml ├── elastic-eck-stack │ ├── Chart.yaml │ ├── values.yaml │ └── templates │ │ ├── 03-elasticsearch.yaml │ │ ├── 01-eck-operator.yaml │ │ ├── 03-kibana.yaml │ │ └── 02-filebeats.yaml ├── cf-explorer │ ├── Chart.yaml │ ├── templates │ │ ├── crawler-service.yaml │ │ ├── cardano-news-api-service.yaml │ │ ├── consumer-service.yaml │ │ ├── consumer-schedules-service.yaml │ │ ├── crawler-service-monitor.yaml │ │ ├── consumer-service-monitor.yaml │ │ ├── explorer-api-service-monitor.yaml │ │ ├── explorer-api-service.yaml │ │ ├── explorer-fe-service.yaml │ │ ├── explorer-rewards-api-service-monitor.yaml │ │ ├── consumer-schedules-service-monitor.yaml │ │ ├── explorer-authentication-service-monitor.yaml │ │ ├── explorer-rewards-api-service.yaml │ │ ├── explorer-authentication-service.yaml │ │ ├── explorer-rewards-api-ingress.yaml │ │ ├── explorer-authentication-ingress.yaml │ │ ├── cardano-news-api-deployment.yaml │ │ ├── explorer-api-ingress.yaml │ │ ├── explorer-fe-ingress.yaml │ │ ├── explorer-fe-deployment.yaml │ │ ├── explorer-rewards-api-deployment.yaml │ │ ├── crawler-deployment.yaml │ │ ├── explorer-authentication-deployment.yaml │ │ ├── consumer-deployment.yaml │ │ ├── explorer-api-deployment.yaml │ │ └── consumer-schedules-deployment.yaml │ ├── values-mainnet.yaml │ ├── values-preprod.yaml │ ├── values-preview.yaml │ └── values.yaml └── cf-explorer-infra │ ├── Chart.yaml │ ├── templates │ ├── kafka-init-cm.yaml │ ├── kafka-service.yaml │ ├── zookeeper-service.yaml │ ├── kafdrop-deployment.yaml │ ├── redis-cluster.yaml │ ├── redis.yaml │ ├── zookeeper-statefulset.yaml │ ├── postgres.yaml │ └── kafka-statefulset.yaml │ ├── values-dev.yaml │ ├── Chart.lock │ └── values.yaml ├── .gitignore ├── argocd-bootstrap ├── Chart.lock ├── Chart.yaml ├── templates │ └── 00-main-app.yaml ├── values.yaml ├── init-stg-mainnet.sh ├── init-stg-preprod.sh ├── init-dev-sranjan.sh ├── init-dev-mainnet.sh ├── init-dev-preprod.sh ├── init.sh └── README.md ├── CONTRIBUTING.md ├── SECURITY.md ├── README.md ├── CODE_OF_CONDUCT.md └── LICENSE /charts/cf-explorer-jobs/values.yaml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /charts/grafana-dashboards/values.yaml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /charts/main-app/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | name: main-app 3 | version: 0.0.1 4 | -------------------------------------------------------------------------------- /charts/grafana-dashboards/Chart.yaml: -------------------------------------------------------------------------------- 1 | name: grafana-dashboards 2 | version: 0.0.1 3 | -------------------------------------------------------------------------------- /charts/elastic-eck-stack/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | name: elastic-eck-stack 3 | version: 0.0.1 4 | -------------------------------------------------------------------------------- /charts/cf-explorer/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | name: cf-explorer 3 | type: application 4 | version: 0.0.1 -------------------------------------------------------------------------------- /charts/elastic-eck-stack/values.yaml: -------------------------------------------------------------------------------- 1 | spec: 2 | destination: 3 | server: https://kubernetes.default.svc 4 | -------------------------------------------------------------------------------- /charts/grafana-dashboards/install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | helm upgrade --install grafana-dashboard . -n observe 3 | -------------------------------------------------------------------------------- /charts/cf-explorer-jobs/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | name: cf-explorer-jobs 3 | type: application 4 | version: 0.0.1 -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | .keys 3 | .ansible 4 | **/values-secrets.yaml 5 | charts/**/charts 6 | argocd-bootstrap/**/charts 7 | -------------------------------------------------------------------------------- /charts/cf-explorer-infra/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | name: cf-explorer-infra 3 | type: application 4 | version: 0.0.1 5 | -------------------------------------------------------------------------------- /charts/cf-explorer-infra/templates/kafka-init-cm.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: ConfigMap 3 | metadata: 4 | name: kafka-init 5 | data: 6 | init.sh: | 7 | 8 | rm -rf /var/lib/kafka/data/lost+found 9 | -------------------------------------------------------------------------------- /charts/grafana-dashboards/templates/dashboards.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | data: 3 | {{ (.Files.Glob "custom-dashboards/*.json").AsConfig | indent 2 }} 4 | kind: ConfigMap 5 | metadata: 6 | name: grafana-custom-dashboards 7 | labels: 8 | grafana_dashboard: "1" 9 | -------------------------------------------------------------------------------- /charts/elastic-eck-stack/templates/03-elasticsearch.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: elasticsearch.k8s.elastic.co/v1 3 | kind: Elasticsearch 4 | metadata: 5 | name: quickstart 6 | spec: 7 | version: 8.7.1 8 | nodeSets: 9 | - name: default 10 | count: 1 11 | config: 12 | node.store.allow_mmap: false 13 | -------------------------------------------------------------------------------- /charts/cf-explorer-infra/values-dev.yaml: -------------------------------------------------------------------------------- 1 | postgresql: 2 | enabled: false 3 | 4 | ## Internal Dependencies: Kafka, Zookeper, etc. 5 | kafka: 6 | enabled: true 7 | service: 8 | type: NodePort 9 | nodePort: "30092" 10 | 11 | zookeeper: 12 | enabled: true 13 | service: 14 | type: NodePort 15 | nodePort: "30081" 16 | -------------------------------------------------------------------------------- /charts/cf-explorer/templates/crawler-service.yaml: -------------------------------------------------------------------------------- 1 | {{ with .Values.crawler }} 2 | {{ if .enabled }} 3 | --- 4 | apiVersion: v1 5 | kind: Service 6 | metadata: 7 | name: cf-ledger-crawler 8 | labels: 9 | app: cf-ledger-crawler 10 | spec: 11 | selector: 12 | app: cf-ledger-crawler 13 | ports: 14 | - protocol: TCP 15 | name: api 16 | port: {{ .port }} 17 | targetPort: api 18 | {{ end }} 19 | {{ end }} 20 | -------------------------------------------------------------------------------- /charts/cf-explorer/templates/cardano-news-api-service.yaml: -------------------------------------------------------------------------------- 1 | {{ with .Values.cardanoNewsApi }} 2 | {{ if .enabled }} 3 | --- 4 | apiVersion: v1 5 | kind: Service 6 | metadata: 7 | name: cardano-news-api 8 | labels: 9 | app: cardano-news-api 10 | spec: 11 | selector: 12 | app: cardano-news-api 13 | ports: 14 | - protocol: TCP 15 | name: api 16 | port: 80 17 | targetPort: api 18 | {{ end }} 19 | {{ end }} 20 | -------------------------------------------------------------------------------- /charts/cf-explorer/templates/consumer-service.yaml: -------------------------------------------------------------------------------- 1 | {{ with .Values.consumer }} 2 | {{ if .enabled }} 3 | --- 4 | apiVersion: v1 5 | kind: Service 6 | metadata: 7 | name: cf-ledger-consumer 8 | labels: 9 | app: cf-ledger-consumer 10 | spec: 11 | selector: 12 | app: cf-ledger-consumer 13 | ports: 14 | - protocol: TCP 15 | name: api 16 | port: {{ .port }} 17 | targetPort: api 18 | {{ end }} 19 | {{ end }} 20 | -------------------------------------------------------------------------------- /argocd-bootstrap/Chart.lock: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - name: argo-cd 3 | repository: https://argoproj.github.io/argo-helm 4 | version: 5.33.4 5 | - name: sealed-secrets 6 | repository: https://bitnami-labs.github.io/sealed-secrets 7 | version: 2.9.0 8 | - name: traefik 9 | repository: https://helm.traefik.io/traefik 10 | version: 23.0.1 11 | digest: sha256:b217e99d1335fcdffde997501eaa890b6bacabbf0f91c34c2b5af3d31cfd2121 12 | generated: "2023-05-17T14:57:21.454385+01:00" 13 | -------------------------------------------------------------------------------- /charts/cf-explorer-infra/Chart.lock: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - name: redis 3 | repository: https://charts.bitnami.com/bitnami 4 | version: 17.10.3 5 | - name: redis-cluster 6 | repository: https://charts.bitnami.com/bitnami 7 | version: 8.4.4 8 | - name: postgresql 9 | repository: https://charts.bitnami.com/bitnami 10 | version: 12.4.3 11 | digest: sha256:164df4e66cd049a060609e96ca1a99b45e0eeee454d00d27a1f3ad4033caba87 12 | generated: "2023-05-15T09:56:38.564503+01:00" 13 | -------------------------------------------------------------------------------- /charts/main-app/README.md: -------------------------------------------------------------------------------- 1 | # Main App 2 | 3 | The main app is the app that bootstraps a Kubernetes cluster with ArgoCD and in turn, all the services required. 4 | 5 | Customising deployments can be easily done by amending existing value files or creating new ones. 6 | 7 | For more details check [values-ggargiulo-dev-preprod.yaml](./values-ggargiulo-dev-preprod.yaml) 8 | 9 | 10 | 11 | ## ECK Ingress Configuration 12 | 13 | https://github.com/elastic/cloud-on-k8s/issues/2118 -------------------------------------------------------------------------------- /charts/cf-explorer/templates/consumer-schedules-service.yaml: -------------------------------------------------------------------------------- 1 | {{ with .Values.consumerSchedules }} 2 | {{ if .enabled }} 3 | --- 4 | apiVersion: v1 5 | kind: Service 6 | metadata: 7 | name: cf-ledger-consumer-schedules 8 | labels: 9 | app: cf-ledger-consumer-schedules 10 | spec: 11 | selector: 12 | app: cf-ledger-consumer-schedules 13 | ports: 14 | - protocol: TCP 15 | name: api 16 | port: {{ .port }} 17 | targetPort: api 18 | {{ end }} 19 | {{ end }} 20 | -------------------------------------------------------------------------------- /argocd-bootstrap/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | name: argocd-bootstrap 3 | version: 0.0.1 4 | dependencies: 5 | - name: argo-cd 6 | version: 5.33.4 7 | repository: https://argoproj.github.io/argo-helm 8 | condition: argo-cd.enabled 9 | - name: sealed-secrets 10 | version: 2.9.0 11 | repository: https://bitnami-labs.github.io/sealed-secrets 12 | condition: sealed-secrets.enabled 13 | - name: traefik 14 | version: 23.0.1 15 | repository: https://helm.traefik.io/traefik 16 | condition: traefik.enabled 17 | -------------------------------------------------------------------------------- /charts/cf-explorer/templates/crawler-service-monitor.yaml: -------------------------------------------------------------------------------- 1 | {{ with .Values.crawler }} 2 | {{ if and .enabled .monitoringEnabled }} 3 | --- 4 | apiVersion: monitoring.coreos.com/v1 5 | kind: ServiceMonitor 6 | metadata: 7 | name: cf-ledger-crawler 8 | labels: 9 | release: prometheus-stack 10 | spec: 11 | endpoints: 12 | - path: /actuator/prometheus 13 | port: api 14 | namespaceSelector: 15 | matchNames: 16 | - {{ $.Release.Namespace }} 17 | selector: 18 | matchLabels: 19 | app: cf-ledger-crawler 20 | {{ end }} 21 | {{ end }} -------------------------------------------------------------------------------- /charts/cf-explorer/templates/consumer-service-monitor.yaml: -------------------------------------------------------------------------------- 1 | {{ with .Values.consumer }} 2 | {{ if and .enabled .monitoringEnabled }} 3 | --- 4 | apiVersion: monitoring.coreos.com/v1 5 | kind: ServiceMonitor 6 | metadata: 7 | name: cf-ledger-consumer 8 | labels: 9 | release: prometheus-stack 10 | spec: 11 | endpoints: 12 | - path: /actuator/prometheus 13 | port: api 14 | namespaceSelector: 15 | matchNames: 16 | - {{ $.Release.Namespace }} 17 | selector: 18 | matchLabels: 19 | app: cf-ledger-consumer 20 | {{ end }} 21 | {{ end }} -------------------------------------------------------------------------------- /charts/cf-explorer/templates/explorer-api-service-monitor.yaml: -------------------------------------------------------------------------------- 1 | {{ with .Values.explorerApi }} 2 | {{ if and .enabled .monitoringEnabled }} 3 | --- 4 | apiVersion: monitoring.coreos.com/v1 5 | kind: ServiceMonitor 6 | metadata: 7 | name: cf-explorer-api 8 | labels: 9 | release: prometheus-stack 10 | spec: 11 | endpoints: 12 | - path: /actuator/prometheus 13 | port: api 14 | namespaceSelector: 15 | matchNames: 16 | - {{ $.Release.Namespace }} 17 | selector: 18 | matchLabels: 19 | app: cf-explorer-api 20 | {{ end }} 21 | {{ end }} -------------------------------------------------------------------------------- /charts/cf-explorer-infra/templates/kafka-service.yaml: -------------------------------------------------------------------------------- 1 | {{ with .Values.kafka }} 2 | {{ if .enabled }} 3 | --- 4 | apiVersion: v1 5 | kind: Service 6 | metadata: 7 | name: kafka-explorer 8 | labels: 9 | app: kafka-explorer 10 | spec: 11 | selector: 12 | app: kafka-explorer 13 | ports: 14 | - protocol: TCP 15 | name: api 16 | port: {{ .port }} 17 | targetPort: api 18 | {{- with .service.nodePort }} 19 | nodePort: {{ . }} 20 | {{- end}} 21 | type: {{ .service.type | default "ClusterIP" }} 22 | {{ end }} 23 | {{ end }} 24 | -------------------------------------------------------------------------------- /charts/cf-explorer/templates/explorer-api-service.yaml: -------------------------------------------------------------------------------- 1 | {{ with .Values.explorerApi }} 2 | {{ if .enabled }} 3 | --- 4 | apiVersion: v1 5 | kind: Service 6 | metadata: 7 | name: cf-explorer-api 8 | labels: 9 | app: cf-explorer-api 10 | spec: 11 | selector: 12 | app: cf-explorer-api 13 | ports: 14 | - protocol: TCP 15 | name: api 16 | port: 80 17 | targetPort: api 18 | {{- with .service.nodePort }} 19 | nodePort: {{ . }} 20 | {{- end}} 21 | type: {{ .service.type | default "ClusterIP" }} 22 | {{ end }} 23 | {{ end }} 24 | -------------------------------------------------------------------------------- /charts/cf-explorer/templates/explorer-fe-service.yaml: -------------------------------------------------------------------------------- 1 | {{ with .Values.explorerFrontEnd }} 2 | {{ if .enabled }} 3 | --- 4 | apiVersion: v1 5 | kind: Service 6 | metadata: 7 | name: cf-explorer-fe 8 | labels: 9 | app: cf-explorer-fe 10 | spec: 11 | selector: 12 | app: cf-explorer-fe 13 | ports: 14 | - protocol: TCP 15 | name: api 16 | port: {{ .port }} 17 | targetPort: api 18 | {{- with .service.nodePort }} 19 | nodePort: {{ . }} 20 | {{- end}} 21 | type: {{ .service.type | default "ClusterIP" }} 22 | {{ end }} 23 | {{ end }} 24 | -------------------------------------------------------------------------------- /charts/cf-explorer-infra/templates/zookeeper-service.yaml: -------------------------------------------------------------------------------- 1 | {{ with .Values.zookeeper }} 2 | {{ if .enabled }} 3 | --- 4 | apiVersion: v1 5 | kind: Service 6 | metadata: 7 | name: zookeeper-explorer 8 | labels: 9 | app: zookeeper-explorer 10 | spec: 11 | selector: 12 | app: zookeeper-explorer 13 | ports: 14 | - protocol: TCP 15 | name: api 16 | port: {{ .port }} 17 | targetPort: api 18 | {{- with .service.nodePort }} 19 | nodePort: {{ . }} 20 | {{- end}} 21 | type: {{ .service.type | default "ClusterIP" }} 22 | {{ end }} 23 | {{ end }} 24 | -------------------------------------------------------------------------------- /charts/cf-explorer/templates/explorer-rewards-api-service-monitor.yaml: -------------------------------------------------------------------------------- 1 | {{ with .Values.explorerRewardsApi }} 2 | {{ if and .enabled .monitoringEnabled }} 3 | --- 4 | apiVersion: monitoring.coreos.com/v1 5 | kind: ServiceMonitor 6 | metadata: 7 | name: cf-explorer-rewards-api 8 | labels: 9 | release: prometheus-stack 10 | spec: 11 | endpoints: 12 | - path: /actuator/prometheus 13 | port: api 14 | namespaceSelector: 15 | matchNames: 16 | - {{ $.Release.Namespace }} 17 | selector: 18 | matchLabels: 19 | app: cf-explorer-rewards-api 20 | {{ end }} 21 | {{ end }} -------------------------------------------------------------------------------- /charts/cf-explorer/templates/consumer-schedules-service-monitor.yaml: -------------------------------------------------------------------------------- 1 | {{ with .Values.consumerSchedules }} 2 | {{ if and .enabled .monitoringEnabled }} 3 | --- 4 | apiVersion: monitoring.coreos.com/v1 5 | kind: ServiceMonitor 6 | metadata: 7 | name: cf-ledger-consumer-schedules 8 | labels: 9 | release: prometheus-stack 10 | spec: 11 | endpoints: 12 | - path: /actuator/prometheus 13 | port: api 14 | namespaceSelector: 15 | matchNames: 16 | - {{ $.Release.Namespace }} 17 | selector: 18 | matchLabels: 19 | app: cf-ledger-consumer-schedules 20 | {{ end }} 21 | {{ end }} -------------------------------------------------------------------------------- /charts/cf-explorer/templates/explorer-authentication-service-monitor.yaml: -------------------------------------------------------------------------------- 1 | {{ with .Values.explorerAuthentication }} 2 | {{ if and .enabled .monitoringEnabled }} 3 | --- 4 | apiVersion: monitoring.coreos.com/v1 5 | kind: ServiceMonitor 6 | metadata: 7 | name: cf-explorer-authentication 8 | labels: 9 | release: prometheus-stack 10 | spec: 11 | endpoints: 12 | - path: /actuator/prometheus 13 | port: api 14 | namespaceSelector: 15 | matchNames: 16 | - {{ $.Release.Namespace }} 17 | selector: 18 | matchLabels: 19 | app: cf-explorer-authentication 20 | {{ end }} 21 | {{ end }} -------------------------------------------------------------------------------- /charts/cf-explorer/templates/explorer-rewards-api-service.yaml: -------------------------------------------------------------------------------- 1 | {{ with .Values.explorerRewardsApi }} 2 | {{ if .enabled }} 3 | --- 4 | apiVersion: v1 5 | kind: Service 6 | metadata: 7 | name: cf-explorer-rewards-api 8 | labels: 9 | app: cf-explorer-rewards-api 10 | spec: 11 | selector: 12 | app: cf-explorer-rewards-api 13 | ports: 14 | - protocol: TCP 15 | name: api 16 | port: 80 17 | targetPort: api 18 | {{- with .service.nodePort }} 19 | nodePort: {{ . }} 20 | {{- end}} 21 | type: {{ .service.type | default "ClusterIP" }} 22 | {{ end }} 23 | {{ end }} 24 | -------------------------------------------------------------------------------- /charts/cf-explorer/templates/explorer-authentication-service.yaml: -------------------------------------------------------------------------------- 1 | {{ with .Values.explorerAuthentication }} 2 | {{ if .enabled }} 3 | --- 4 | apiVersion: v1 5 | kind: Service 6 | metadata: 7 | name: cf-explorer-authentication 8 | labels: 9 | app: cf-explorer-authentication 10 | spec: 11 | selector: 12 | app: cf-explorer-authentication 13 | ports: 14 | - protocol: TCP 15 | name: api 16 | port: {{ .port }} 17 | targetPort: api 18 | {{- with .service.nodePort }} 19 | nodePort: {{ . }} 20 | {{- end}} 21 | type: {{ .service.type | default "ClusterIP" }} 22 | {{ end }} 23 | {{ end }} 24 | -------------------------------------------------------------------------------- /charts/elastic-eck-stack/templates/01-eck-operator.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: argoproj.io/v1alpha1 3 | kind: Application 4 | metadata: 5 | name: elastic-eck-operator 6 | namespace: argocd 7 | finalizers: 8 | - resources-finalizer.argocd.argoproj.io 9 | spec: 10 | project: default 11 | source: 12 | repoURL: https://helm.elastic.co 13 | targetRevision: 2.7.0 14 | chart: eck-operator 15 | syncPolicy: 16 | automated: 17 | prune: true 18 | syncOptions: 19 | - CreateNamespace=true 20 | 21 | destination: 22 | namespace: {{ .Release.Namespace }} 23 | server: {{ .Values.spec.destination.server }} 24 | -------------------------------------------------------------------------------- /charts/elastic-eck-stack/templates/03-kibana.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kibana.k8s.elastic.co/v1 3 | kind: Kibana 4 | metadata: 5 | name: quickstart 6 | spec: 7 | version: 8.7.1 8 | count: 1 9 | elasticsearchRef: 10 | name: quickstart 11 | http: 12 | tls: 13 | selfSignedCertificate: 14 | disabled: true 15 | --- 16 | apiVersion: networking.k8s.io/v1 17 | kind: Ingress 18 | metadata: 19 | name: kibana-ingress 20 | spec: 21 | rules: 22 | - host: kibana.{{ $.Values.domain }} 23 | http: 24 | paths: 25 | - path: / 26 | pathType: Prefix 27 | backend: 28 | service: 29 | name: quickstart-kb-http 30 | port: 31 | number: 5601 32 | -------------------------------------------------------------------------------- /charts/cf-explorer-infra/templates/kafdrop-deployment.yaml: -------------------------------------------------------------------------------- 1 | {{ with .Values.kafdrop }} 2 | {{ if .enabled }} 3 | --- 4 | apiVersion: apps/v1 5 | kind: Deployment 6 | metadata: 7 | name: kafdrop 8 | spec: 9 | replicas: {{ .replicas }} 10 | selector: 11 | matchLabels: 12 | app: kafdrop 13 | template: 14 | metadata: 15 | labels: 16 | app: kafdrop 17 | spec: 18 | containers: 19 | - name: kafdrop 20 | image: "{{ .image.repository }}:{{ .image.tag }}" 21 | env: 22 | - name: KAFKA_BROKERCONNECT 23 | value: "kafka-explorer:9092" 24 | ports: 25 | - name: api 26 | containerPort: {{ .port }} 27 | revisionHistoryLimit: 2 28 | {{ end }} 29 | {{ end }} 30 | -------------------------------------------------------------------------------- /charts/cf-explorer/templates/explorer-rewards-api-ingress.yaml: -------------------------------------------------------------------------------- 1 | {{ with .Values.explorerRewardsApi }} 2 | {{ if .enabled }} 3 | {{- $root := . -}} 4 | {{- range $v := $.Values.ingressDomains }} 5 | --- 6 | apiVersion: networking.k8s.io/v1 7 | kind: Ingress 8 | metadata: 9 | name: "cf-explorer-rewards-api-{{ $v.name }}" 10 | spec: 11 | rules: 12 | - host: "rewards-api.{{ $v.domain }}" 13 | http: 14 | paths: 15 | - path: / 16 | pathType: Prefix 17 | backend: 18 | service: 19 | name: cf-explorer-rewards-api 20 | port: 21 | number: 80 22 | tls: 23 | - hosts: 24 | - "rewards-api.{{ $v.domain }}" 25 | {{- end }} 26 | {{ end }} 27 | {{ end }} 28 | -------------------------------------------------------------------------------- /charts/main-app/templates/003-grafana-dashboards.yaml: -------------------------------------------------------------------------------- 1 | {{ if index .Values "grafana-dashboards" "enabled" }} 2 | --- 3 | apiVersion: argoproj.io/v1alpha1 4 | kind: Application 5 | metadata: 6 | name: grafana-dashboards 7 | namespace: argocd 8 | finalizers: 9 | - resources-finalizer.argocd.argoproj.io 10 | spec: 11 | project: default 12 | source: 13 | repoURL: git@github.com:cardano-foundation/cf-explorer.git 14 | targetRevision: {{ .Values.git.targetRevision | default "HEAD" }} 15 | path: charts/grafana-dashboards 16 | 17 | syncPolicy: 18 | automated: 19 | prune: true 20 | syncOptions: 21 | - CreateNamespace=true 22 | 23 | destination: 24 | namespace: observe 25 | server: {{ .Values.spec.destination.server }} 26 | {{ end }} 27 | -------------------------------------------------------------------------------- /charts/cf-explorer/templates/explorer-authentication-ingress.yaml: -------------------------------------------------------------------------------- 1 | {{ with .Values.explorerAuthentication }} 2 | {{ if .enabled }} 3 | {{- $root := . -}} 4 | {{- range $v := $.Values.ingressDomains }} 5 | --- 6 | apiVersion: networking.k8s.io/v1 7 | kind: Ingress 8 | metadata: 9 | name: "cf-explorer-authentication-{{ $v.name }}" 10 | spec: 11 | rules: 12 | - host: "auth-api.{{ $v.domain }}" 13 | http: 14 | paths: 15 | - path: / 16 | pathType: Prefix 17 | backend: 18 | service: 19 | name: cf-explorer-authentication 20 | port: 21 | number: {{ $root.port }} 22 | tls: 23 | - hosts: 24 | - "auth-api.{{ $v.domain }}" 25 | {{- end }} 26 | {{ end }} 27 | {{ end }} 28 | -------------------------------------------------------------------------------- /charts/main-app/values.yaml: -------------------------------------------------------------------------------- 1 | git: 2 | targetRevision: null 3 | 4 | # stage: one of [dev, uat, prod] 5 | stage: null 6 | 7 | # network: one of [mainnet, preprod, preview] 8 | network: null 9 | 10 | # domain: something like "grafana.dev.ggargiulo-clusters.eu-west-1.metadata.dev.cf-deployments.org" 11 | domain: null 12 | 13 | # Explorer Infra Parameters 14 | cf-explorer-infra: 15 | # Whether Infra resources should be deployed. 16 | enabled: true 17 | 18 | # Explorer Parameters 19 | cf-explorer: 20 | # Whether the Explorer Resources should be deployed. 21 | enabled: true 22 | 23 | # Elastic Stack Parameters 24 | elastic-stack: 25 | # Whether the Elastic Stack should be deployed. 26 | enabled: true 27 | 28 | grafana-dashboards: 29 | enabled: true 30 | 31 | spec: 32 | destination: 33 | server: https://kubernetes.default.svc 34 | -------------------------------------------------------------------------------- /charts/main-app/templates/002-elastic-eck-stack.yaml: -------------------------------------------------------------------------------- 1 | {{ if index .Values "elastic-stack" "enabled" }} 2 | --- 3 | apiVersion: argoproj.io/v1alpha1 4 | kind: Application 5 | metadata: 6 | name: elastic-eck-stack 7 | finalizers: 8 | - resources-finalizer.argocd.argoproj.io 9 | spec: 10 | project: default 11 | source: 12 | repoURL: git@github.com:cardano-foundation/cf-explorer.git 13 | targetRevision: {{ .Values.git.targetRevision | default "HEAD" }} 14 | path: charts/elastic-eck-stack 15 | helm: 16 | parameters: 17 | - name: "domain" 18 | value: {{ .Values.domain }} 19 | 20 | syncPolicy: 21 | automated: 22 | prune: true 23 | syncOptions: 24 | - CreateNamespace=true 25 | 26 | destination: 27 | namespace: elastic-stack 28 | server: {{ .Values.spec.destination.server }} 29 | {{ end }} 30 | -------------------------------------------------------------------------------- /argocd-bootstrap/templates/00-main-app.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: argoproj.io/v1alpha1 2 | kind: Application 3 | metadata: 4 | name: main-app 5 | annotations: 6 | "helm.sh/hook": post-install, pre-upgrade 7 | finalizers: 8 | - resources-finalizer.argocd.argoproj.io 9 | spec: 10 | project: default 11 | source: 12 | repoURL: git@github.com:cardano-foundation/cf-explorer.git 13 | targetRevision: {{ .Values.git.targetRevision | default "HEAD" }} 14 | path: charts/main-app 15 | helm: 16 | parameters: 17 | - name: "git.targetRevision" 18 | value: {{ .Values.git.targetRevision | default "HEAD" }} 19 | valueFiles: 20 | - {{ .Values.valueFile }} 21 | 22 | syncPolicy: 23 | automated: 24 | prune: true 25 | selfHeal: true 26 | destination: 27 | namespace: argocd 28 | server: https://kubernetes.default.svc 29 | -------------------------------------------------------------------------------- /charts/cf-explorer/templates/cardano-news-api-deployment.yaml: -------------------------------------------------------------------------------- 1 | {{ with .Values.cardanoNewsApi }} 2 | {{ if .enabled }} 3 | --- 4 | apiVersion: apps/v1 5 | kind: Deployment 6 | metadata: 7 | name: cardano-news-api 8 | spec: 9 | replicas: {{ .replicas }} 10 | selector: 11 | matchLabels: 12 | app: cardano-news-api 13 | template: 14 | metadata: 15 | labels: 16 | app: cardano-news-api 17 | spec: 18 | containers: 19 | - name: cardano-news-api 20 | image: "{{ .image.repository }}:{{ .image.tag }}" 21 | env: 22 | - name: CARDANO_NEWS_API_PORT 23 | value: {{ .port | quote }} 24 | ports: 25 | - name: api 26 | containerPort: {{ .port }} 27 | imagePullPolicy: Always 28 | imagePullSecrets: 29 | - name: regcred 30 | revisionHistoryLimit: 2 31 | {{ end }} 32 | {{ end }} 33 | -------------------------------------------------------------------------------- /charts/main-app/templates/001-prometheus-stack.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: argoproj.io/v1alpha1 2 | kind: Application 3 | metadata: 4 | name: prometheus-stack 5 | namespace: argocd 6 | finalizers: 7 | - resources-finalizer.argocd.argoproj.io 8 | spec: 9 | project: default 10 | source: 11 | repoURL: https://prometheus-community.github.io/helm-charts 12 | targetRevision: 45.7.1 13 | chart: kube-prometheus-stack 14 | helm: 15 | parameters: 16 | - name: "grafana.ingress.enabled" 17 | value: "true" 18 | - name: "grafana.ingress.hosts[0]" 19 | value: grafana.{{ $.Values.domain }} 20 | values: | 21 | grafana: 22 | plugins: 23 | - grafana-singlestat-panel 24 | syncPolicy: 25 | automated: 26 | prune: true 27 | syncOptions: 28 | - CreateNamespace=true 29 | - ServerSideApply=true 30 | 31 | destination: 32 | namespace: observe 33 | server: {{ .Values.spec.destination.server }} 34 | -------------------------------------------------------------------------------- /charts/cf-explorer/templates/explorer-api-ingress.yaml: -------------------------------------------------------------------------------- 1 | {{ with .Values.explorerApi }} 2 | {{ if .enabled }} 3 | {{- $root := . -}} 4 | apiVersion: traefik.containo.us/v1alpha1 5 | kind: Middleware 6 | metadata: 7 | name: api-cache-header-rewrite 8 | namespace: kube-system 9 | spec: 10 | headers: 11 | customResponseHeaders: 12 | Cache-Control: "max-age=20, must-revalidate" 13 | expires: 14 | {{- range $v := $.Values.ingressDomains }} 15 | --- 16 | apiVersion: networking.k8s.io/v1 17 | kind: Ingress 18 | metadata: 19 | name: "cf-explorer-api-{{ $v.name }}" 20 | annotations: 21 | traefik.ingress.kubernetes.io/router.middlewares: kube-system-api-cache-header-rewrite@kubernetescrd 22 | spec: 23 | rules: 24 | - host: "api.{{ $v.domain }}" 25 | http: 26 | paths: 27 | - path: / 28 | pathType: Prefix 29 | backend: 30 | service: 31 | name: cf-explorer-api 32 | port: 33 | number: 80 34 | tls: 35 | - hosts: 36 | - "api.{{ $v.domain }}" 37 | {{- end }} 38 | {{ end }} 39 | {{ end }} 40 | -------------------------------------------------------------------------------- /charts/cf-explorer/values-mainnet.yaml: -------------------------------------------------------------------------------- 1 | crawler: 2 | 3 | monitoringEnabled: true 4 | 5 | crawler: 6 | name: mainnet-crawler 7 | 8 | cardano: 9 | node: 10 | networkMagic: "764824073" 11 | address: relays-new.cardano-mainnet.iohk.io 12 | port: 3001 13 | 14 | consumer: 15 | 16 | monitoringEnabled: true 17 | 18 | network: mainnet 19 | 20 | postgres: 21 | schema: mainnet 22 | 23 | networkMagic: "764824073" 24 | 25 | explorerApi: 26 | enabled: true 27 | postgres: 28 | schema: mainnet 29 | monitoringEnabled: true 30 | 31 | explorerRewardsApi: 32 | enabled: true 33 | postgres: 34 | schema: mainnet 35 | monitoringEnabled: true 36 | koios: 37 | baseUrl: "https://koios-api.pro.dandelion-mainnet.eu-west-1.metadata.dev.cf-deployments.org/rpc/" 38 | 39 | explorerAuthentication: 40 | enabled: true 41 | postgres: 42 | schema: mainnet-auth 43 | monitoringEnabled: true 44 | 45 | explorerFrontEnd: 46 | enabled: true 47 | 48 | consumerSchedules: 49 | enabled: true 50 | postgres: 51 | schema: mainnet 52 | monitoringEnabled: true 53 | network: mainnet 54 | -------------------------------------------------------------------------------- /charts/main-app/templates/101-cf-explorer.yaml: -------------------------------------------------------------------------------- 1 | {{ if index .Values "cf-explorer" "enabled" }} 2 | --- 3 | apiVersion: argoproj.io/v1alpha1 4 | kind: Application 5 | metadata: 6 | name: cf-explorer 7 | namespace: argocd 8 | finalizers: 9 | - resources-finalizer.argocd.argoproj.io 10 | spec: 11 | project: default 12 | source: 13 | repoURL: git@github.com:cardano-foundation/cf-explorer.git 14 | targetRevision: {{ .Values.git.targetRevision | default "HEAD" }} 15 | path: charts/cf-explorer 16 | helm: 17 | parameters: 18 | - name: "domain" 19 | value: {{ .Values.domain }} 20 | - name: "network" 21 | value: {{ .Values.network }} 22 | valueFiles: 23 | - values-{{ .Values.network }}.yaml 24 | {{- with index .Values "cf-explorer" "values" }} 25 | values: | 26 | {{ toYaml . | indent 8 }} 27 | {{- end }} 28 | 29 | syncPolicy: 30 | automated: 31 | prune: true 32 | syncOptions: 33 | - CreateNamespace=true 34 | 35 | destination: 36 | namespace: cf-explorer 37 | server: {{ .Values.spec.destination.server }} 38 | {{ end }} 39 | -------------------------------------------------------------------------------- /charts/cf-explorer/values-preprod.yaml: -------------------------------------------------------------------------------- 1 | crawler: 2 | 3 | monitoringEnabled: true 4 | 5 | crawler: 6 | name: preprod-crawler 7 | 8 | cardano: 9 | node: 10 | networkMagic: "1" 11 | address: preprod-node.world.dev.cardano.org 12 | port: 30000 13 | 14 | consumer: 15 | 16 | monitoringEnabled: true 17 | 18 | network: preprod 19 | 20 | postgres: 21 | schema: preprod 22 | 23 | networkMagic: "1" 24 | 25 | explorerApi: 26 | enabled: true 27 | postgres: 28 | schema: preprod 29 | monitoringEnabled: true 30 | 31 | explorerRewardsApi: 32 | enabled: true 33 | postgres: 34 | schema: preprod 35 | monitoringEnabled: true 36 | network: preprod 37 | koios: 38 | baseUrl: "https://koios-api.pro.dandelion-preprod.eu-west-1.metadata.dev.cf-deployments.org/rpc/" 39 | 40 | explorerAuthentication: 41 | enabled: true 42 | postgres: 43 | schema: preprod-auth 44 | monitoringEnabled: true 45 | 46 | explorerFrontEnd: 47 | enabled: true 48 | 49 | consumerSchedules: 50 | enabled: true 51 | postgres: 52 | schema: preprod 53 | monitoringEnabled: true 54 | network: preprod 55 | -------------------------------------------------------------------------------- /charts/cf-explorer-infra/templates/redis-cluster.yaml: -------------------------------------------------------------------------------- 1 | {{ if index .Values "redis-cluster" "enabled" }} 2 | apiVersion: v1 3 | kind: Secret 4 | metadata: 5 | name: "redis-secrets" 6 | namespace: {{ $.Release.Namespace }} 7 | type: Opaque 8 | data: 9 | # generate 32 chars long random string, base64 encode it and then double-quote the result string. 10 | REDIS_MASTER_PASSWORD: {{ randAlphaNum 32 | b64enc | quote }} 11 | --- 12 | apiVersion: argoproj.io/v1alpha1 13 | kind: Application 14 | metadata: 15 | name: redis-cluster 16 | namespace: argocd 17 | finalizers: 18 | - resources-finalizer.argocd.argoproj.io 19 | spec: 20 | project: default 21 | source: 22 | repoURL: https://charts.bitnami.com/bitnami 23 | targetRevision: 8.6.1 24 | chart: redis-cluster 25 | helm: 26 | values: | 27 | auth: 28 | existingSecret: redis-secrets 29 | existingSecretPasswordKey: REDIS_MASTER_PASSWORD 30 | syncPolicy: 31 | automated: 32 | prune: true 33 | selfHeal: true 34 | destination: 35 | namespace: {{ .Release.Namespace }} 36 | server: https://kubernetes.default.svc 37 | {{ end }} 38 | -------------------------------------------------------------------------------- /charts/cf-explorer-infra/templates/redis.yaml: -------------------------------------------------------------------------------- 1 | {{ with .Values.redis }} 2 | {{ if .enabled }} 3 | apiVersion: v1 4 | kind: Secret 5 | metadata: 6 | name: "redis-secrets" 7 | namespace: {{ $.Release.Namespace }} 8 | type: Opaque 9 | data: 10 | # generate 32 chars long random string, base64 encode it and then double-quote the result string. 11 | REDIS_ENDPOINT: {{ "redis-headless:6379" | b64enc }} 12 | REDIS_MASTER_PASSWORD: {{ randAlphaNum 32 | b64enc | quote }} 13 | --- 14 | apiVersion: argoproj.io/v1alpha1 15 | kind: Application 16 | metadata: 17 | name: redis 18 | namespace: argocd 19 | finalizers: 20 | - resources-finalizer.argocd.argoproj.io 21 | spec: 22 | project: default 23 | source: 24 | repoURL: https://charts.bitnami.com/bitnami 25 | targetRevision: 17.10.3 26 | chart: redis 27 | helm: 28 | {{- with .values }} 29 | values: | 30 | {{ toYaml . | indent 8 }} 31 | {{- end }} 32 | syncPolicy: 33 | automated: 34 | prune: true 35 | selfHeal: true 36 | destination: 37 | namespace: {{ $.Release.Namespace }} 38 | server: https://kubernetes.default.svc 39 | {{ end }} 40 | {{ end }} 41 | -------------------------------------------------------------------------------- /charts/main-app/templates/100-cf-explorer-infra.yaml: -------------------------------------------------------------------------------- 1 | {{ if index .Values "cf-explorer-infra" "enabled" }} 2 | --- 3 | apiVersion: argoproj.io/v1alpha1 4 | kind: Application 5 | metadata: 6 | name: cf-explorer-infra 7 | namespace: argocd 8 | finalizers: 9 | - resources-finalizer.argocd.argoproj.io 10 | annotations: 11 | argocd.argoproj.io/sync-wave: "-1" 12 | spec: 13 | project: default 14 | source: 15 | repoURL: git@github.com:cardano-foundation/cf-explorer.git 16 | targetRevision: {{ .Values.git.targetRevision | default "HEAD" }} 17 | path: charts/cf-explorer-infra 18 | helm: 19 | {{- with index .Values "cf-explorer-infra" }} 20 | values: | 21 | {{ toYaml . | indent 8 }} 22 | {{- end }} 23 | 24 | ignoreDifferences: 25 | - group: "*" 26 | kind: "Secret" 27 | jqPathExpressions: 28 | - '.data' 29 | 30 | syncPolicy: 31 | automated: 32 | prune: true 33 | syncOptions: 34 | - CreateNamespace=true 35 | - RespectIgnoreDifferences=true 36 | 37 | destination: 38 | namespace: cf-explorer 39 | server: {{ .Values.spec.destination.server }} 40 | {{ end }} 41 | -------------------------------------------------------------------------------- /charts/cf-explorer/values-preview.yaml: -------------------------------------------------------------------------------- 1 | crawler: 2 | 3 | monitoringEnabled: true 4 | 5 | crawler: 6 | name: preview-crawler 7 | 8 | cardano: 9 | node: 10 | networkMagic: "2" 11 | address: preview-node.world.dev.cardano.org 12 | port: 30002 13 | 14 | consumer: 15 | 16 | monitoringEnabled: true 17 | 18 | network: preview 19 | 20 | postgres: 21 | schema: preview 22 | 23 | networkMagic: "2" 24 | 25 | explorerApi: 26 | enabled: true 27 | epochDays: 1 28 | postgres: 29 | schema: preview 30 | monitoringEnabled: true 31 | 32 | explorerRewardsApi: 33 | enabled: true 34 | postgres: 35 | schema: preview 36 | monitoringEnabled: true 37 | network: preview 38 | koios: 39 | baseUrl: "https://koios-api.pro.dandelion-preview.eu-west-1.metadata.dev.cf-deployments.org/rpc/" 40 | 41 | explorerAuthentication: 42 | enabled: true 43 | postgres: 44 | schema: preview-auth 45 | monitoringEnabled: true 46 | 47 | explorerFrontEnd: 48 | enabled: true 49 | 50 | consumerSchedules: 51 | enabled: true 52 | postgres: 53 | schema: preview 54 | monitoringEnabled: true 55 | network: preview 56 | -------------------------------------------------------------------------------- /charts/cf-explorer/templates/explorer-fe-ingress.yaml: -------------------------------------------------------------------------------- 1 | {{ with .Values.explorerFrontEnd }} 2 | {{ if .enabled }} 3 | {{ if .basicAuth }} 4 | apiVersion: traefik.containo.us/v1alpha1 5 | kind: Middleware 6 | metadata: 7 | name: explorer-frontend-auth 8 | namespace: kube-system 9 | spec: 10 | basicAuth: 11 | removeHeader: true 12 | secret: explorer-frontend-auth 13 | {{ end }} 14 | {{- $root := . -}} 15 | {{- range $v := $.Values.ingressDomains }} 16 | --- 17 | apiVersion: networking.k8s.io/v1 18 | kind: Ingress 19 | metadata: 20 | name: "cf-explorer-fe-{{ $v.name }}" 21 | {{ if $root.basicAuth }} 22 | annotations: 23 | traefik.ingress.kubernetes.io/router.middlewares: kube-system-explorer-frontend-auth@kubernetescrd 24 | {{ end }} 25 | spec: 26 | rules: 27 | - host: "{{ $v.domain }}" 28 | http: 29 | paths: 30 | - path: / 31 | pathType: Prefix 32 | backend: 33 | service: 34 | name: cf-explorer-fe 35 | port: 36 | number: {{ $root.port }} 37 | tls: 38 | - hosts: 39 | - "{{ $v.domain }}" 40 | {{- end }} 41 | {{ end }} 42 | {{ end }} 43 | -------------------------------------------------------------------------------- /charts/cf-explorer-infra/values.yaml: -------------------------------------------------------------------------------- 1 | ## Redis Configuration 2 | # There are two deployment types: Cluster and Standalone / Sentinel, they are mutually exclusive 3 | redis: 4 | enabled: true 5 | values: 6 | auth: 7 | existingSecret: redis-secrets 8 | existingSecretPasswordKey: REDIS_MASTER_PASSWORD 9 | replica: 10 | replicaCount: 0 11 | 12 | redis-cluster: 13 | enabled: false 14 | 15 | postgresql: 16 | enabled: true 17 | 18 | ## Internal Dependencies: Kafka, Zookeper, etc. 19 | kafka: 20 | enabled: true 21 | image: 22 | repository: "confluentinc/cp-kafka" 23 | tag: "7.0.0" 24 | port: 9092 25 | service: 26 | # If type changed to NodePort, specify the port to use externally 27 | type: ClusterIP 28 | nodePort: "" 29 | 30 | zookeeper: 31 | enabled: true 32 | image: 33 | repository: "confluentinc/cp-zookeeper" 34 | tag: "5.1.2" 35 | port: 2181 36 | service: 37 | # If type changed to NodePort, specify the port to use externally 38 | type: ClusterIP 39 | nodePort: "" 40 | 41 | kafdrop: 42 | enabled: true 43 | replicas: 1 44 | image: 45 | repository: "obsidiandynamics/kafdrop" 46 | tag: "latest" 47 | port: 9000 48 | -------------------------------------------------------------------------------- /charts/elastic-eck-stack/templates/02-filebeats.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: beat.k8s.elastic.co/v1beta1 3 | kind: Beat 4 | metadata: 5 | name: quickstart 6 | spec: 7 | type: filebeat 8 | version: 8.7.1 9 | elasticsearchRef: 10 | name: quickstart 11 | kibanaRef: 12 | name: quickstart 13 | config: 14 | filebeat.inputs: 15 | - type: container 16 | paths: 17 | - /var/log/containers/*.log 18 | daemonSet: 19 | podTemplate: 20 | spec: 21 | dnsPolicy: ClusterFirstWithHostNet 22 | hostNetwork: true 23 | securityContext: 24 | runAsUser: 0 25 | containers: 26 | - name: filebeat 27 | volumeMounts: 28 | - name: varlogcontainers 29 | mountPath: /var/log/containers 30 | - name: varlogpods 31 | mountPath: /var/log/pods 32 | - name: varlibdockercontainers 33 | mountPath: /var/lib/docker/containers 34 | volumes: 35 | - name: varlogcontainers 36 | hostPath: 37 | path: /var/log/containers 38 | - name: varlogpods 39 | hostPath: 40 | path: /var/log/pods 41 | - name: varlibdockercontainers 42 | hostPath: 43 | path: /var/lib/docker/containers 44 | -------------------------------------------------------------------------------- /argocd-bootstrap/values.yaml: -------------------------------------------------------------------------------- 1 | # Git Specific configuration 2 | git: 3 | # The target branch to point to. This can be set to a branch during chart development phase. Defaults to main 4 | targetRevision: null 5 | 6 | # ArgoCD parameters 7 | argo-cd: 8 | enabled: true 9 | server: 10 | extraArgs: 11 | - --insecure 12 | ingress: 13 | enabled: true 14 | config: 15 | repositories: | 16 | - url: https://charts.bitnami.com/bitnami 17 | name: bitnami 18 | type: helm 19 | - url: https://prometheus-community.github.io/helm-charts 20 | name: prometheus-community 21 | type: helm 22 | - url: https://grafana.github.io/helm-charts 23 | name: grafana 24 | type: helm 25 | - url: https://helm.traefik.io/traefik 26 | name: traefik 27 | type: helm 28 | - url: https://helm.elastic.co 29 | name: elastic 30 | type: helm 31 | - url: git@github.com:cardano-foundation/cf-explorer.git 32 | sshPrivateKeySecret: 33 | name: github-deploy-key 34 | key: cf-explorer 35 | resource.customizations: | 36 | networking.k8s.io/Ingress: 37 | health.lua: | 38 | hs = {} 39 | hs.status = "Healthy" 40 | return hs 41 | 42 | # Sealed Secrets configuration 43 | sealed-secrets: 44 | # Whether the Sealed Secrets app should be deployed. 45 | enabled: false 46 | 47 | # Traefik ingress configuration 48 | traefik: 49 | # Whether the Sealed Secrets app should be deployed. 50 | enabled: false 51 | -------------------------------------------------------------------------------- /charts/cf-explorer-jobs/templates/explorer-db-dump.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: batch/v1 3 | kind: CronJob 4 | metadata: 5 | name: explorer-db-dump 6 | spec: 7 | schedule: "0 0 31 2 *" 8 | jobTemplate: 9 | spec: 10 | template: 11 | spec: 12 | containers: 13 | - name: explorer-db-dump 14 | image: "{{ $.Values.annoyJobs.image.repository }}:{{ $.Values.annoyJobs.image.tag }}" 15 | env: 16 | - name: JAVA_OPTS 17 | value: "-Dconfig.resource=application.prod.conf" 18 | - name: SCALEWAY_S3_ACCESS_KEY_ID 19 | valueFrom: 20 | secretKeyRef: 21 | name: polygraph-s3-secret 22 | key: POLYGRAPH_S3_ACCESS_KEY 23 | - name: SCALEWAY_S3_SECRET_ACCESS_KEY 24 | valueFrom: 25 | secretKeyRef: 26 | name: polygraph-s3-secret 27 | key: POLYGRAPH_S3_SECRET_KEY 28 | - name: PGHOST 29 | value: polygraph-postgres-mainnet-postgresql 30 | - name: PGPORT 31 | value: "5432" 32 | - name: PGDATABASE 33 | value: polygraph 34 | - name: PGUSER 35 | value: polygraph 36 | - name: PGPASSWORD 37 | value: polygraph 38 | resources: 39 | limits: 40 | memory: "4Gi" 41 | cpu: 1 42 | requests: 43 | memory: "4Gi" 44 | cpu: 1 45 | restartPolicy: OnFailure 46 | -------------------------------------------------------------------------------- /charts/main-app/values-sranjan-dev-preprod.yaml: -------------------------------------------------------------------------------- 1 | stage: dev 2 | 3 | network: preprod 4 | 5 | domain: dev-sranjan.cf-explorer-preprod.eu-west-1.metadata.dev.cf-deployments.org 6 | 7 | cf-explorer-infra: 8 | enabled: true 9 | postgresql: 10 | dbSize: 150Gi 11 | kafka: 12 | dbSize: 20Gi 13 | 14 | elastic-stack: 15 | enabled: false 16 | 17 | cf-explorer: 18 | enabled: true 19 | values: 20 | ingressDomains: 21 | - name: cloudfront 22 | domain: dev-sranjan.cf-explorer-preprod.metadata.dev.cf-deployments.org 23 | - name: global-lb 24 | domain: dev-sranjan.cf-explorer-preprod.global.metadata.dev.cf-deployments.org 25 | - name: eu-west-1-lb 26 | domain: dev-sranjan.cf-explorer-preprod.eu-west-1.metadata.dev.cf-deployments.org 27 | crawler: 28 | enabled: false 29 | consumer: 30 | enabled: false 31 | explorerApi: 32 | enabled: true 33 | image: 34 | tag: "0.3.31" 35 | explorerRewardsApi: 36 | enabled: true 37 | image: 38 | tag: "0.1.7-SNAPSHOT" 39 | explorerAuthentication: 40 | enabled: false 41 | replicas: 1 42 | image: 43 | tag: "0.1.13" 44 | explorerFrontEnd: 45 | enabled: true 46 | image: 47 | tag: "0.4.24" 48 | reactAppPreProdAppUrl: "https://dev-sranjan.cf-explorer-preprod.eu-west-1.metadata.dev.cf-deployments.org" 49 | reactAppPreviewAppUrl: "https://dev.cf-explorer-preview.eu-west-1.metadata.dev.cf-deployments.org" 50 | reactAppMainnetAppUrl: "https://dev.cf-explorer-mainnet.eu-west-1.metadata.dev.cf-deployments.org" 51 | reactAppAuthUrl: "https://auth-api.dev.cf-explorer-preprod.eu-west-1.metadata.dev.cf-deployments.org/api/v1" 52 | consumerSchedules: 53 | enabled: true 54 | image: 55 | tag: "0.2.12" 56 | 57 | -------------------------------------------------------------------------------- /argocd-bootstrap/init-stg-mainnet.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set +x 4 | 5 | echo "Checking argocd namespace existence" 6 | kubectl get ns argocd > /dev/null 2>&1 7 | 8 | if [ $? != 0 ]; then 9 | echo "argocd namespace does not exist, creating..." 10 | kubectl create ns argocd > /dev/null 2>&1 11 | fi 12 | 13 | echo "Checking cf-explorer namespace existence" 14 | kubectl get ns cf-explorer > /dev/null 2>&1 15 | 16 | if [ $? != 0 ]; then 17 | echo "cf-explorer namespace does not exist, creating..." 18 | kubectl create ns cf-explorer > /dev/null 2>&1 19 | fi 20 | 21 | ## Create a Master Key 22 | # openssl req -new -newkey rsa:4096 -x509 -sha256 -days 365 -nodes -out tls.crt -keyout tls.key 23 | 24 | ## DockerHub secret 25 | kubectl create secret -n cf-explorer generic regcred \ 26 | --from-file=.dockerconfigjson=../.keys/docker-cred.json \ 27 | --type=kubernetes.io/dockerconfigjson \ 28 | --save-config \ 29 | --dry-run=client \ 30 | -o yaml \ 31 | | kubectl apply -f - 32 | 33 | # Git Hub deploy key 34 | kubectl create secret generic github-deploy-key \ 35 | --save-config \ 36 | --dry-run=client \ 37 | -o yaml \ 38 | -n argocd \ 39 | --from-file=../.keys/cf-explorer \ 40 | | kubectl apply -f - 41 | 42 | # Infra Secrets (eg Psql, Redis, etc.) 43 | kubectl create secret generic infra-other-secrets \ 44 | --save-config \ 45 | --dry-run=client \ 46 | -o yaml \ 47 | -n cf-explorer \ 48 | --from-env-file=../.keys/infra-secrets-stg-mainnet \ 49 | | kubectl apply -f - 50 | 51 | #echo "Fetching helm dependencies for main app" 52 | #helm dependency build 53 | 54 | echo "Updating helm dependencies for main app" 55 | helm dependency update 56 | 57 | helm upgrade --install argocd -n argocd . \ 58 | --set git.targetRevision=HEAD \ 59 | --set valueFile=values-stg-mainnet.yaml \ 60 | -f values-secrets.yaml 61 | -------------------------------------------------------------------------------- /argocd-bootstrap/init-stg-preprod.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set +x 4 | 5 | echo "Checking argocd namespace existence" 6 | kubectl get ns argocd > /dev/null 2>&1 7 | 8 | if [ $? != 0 ]; then 9 | echo "argocd namespace does not exist, creating..." 10 | kubectl create ns argocd > /dev/null 2>&1 11 | fi 12 | 13 | echo "Checking cf-explorer namespace existence" 14 | kubectl get ns cf-explorer > /dev/null 2>&1 15 | 16 | if [ $? != 0 ]; then 17 | echo "cf-explorer namespace does not exist, creating..." 18 | kubectl create ns cf-explorer > /dev/null 2>&1 19 | fi 20 | 21 | ## Create a Master Key 22 | # openssl req -new -newkey rsa:4096 -x509 -sha256 -days 365 -nodes -out tls.crt -keyout tls.key 23 | 24 | ## DockerHub secret 25 | kubectl create secret -n cf-explorer generic regcred \ 26 | --from-file=.dockerconfigjson=../.keys/docker-cred.json \ 27 | --type=kubernetes.io/dockerconfigjson \ 28 | --save-config \ 29 | --dry-run=client \ 30 | -o yaml \ 31 | | kubectl apply -f - 32 | 33 | # Git Hub deploy key 34 | kubectl create secret generic github-deploy-key \ 35 | --save-config \ 36 | --dry-run=client \ 37 | -o yaml \ 38 | -n argocd \ 39 | --from-file=../.keys/cf-explorer \ 40 | | kubectl apply -f - 41 | 42 | # Infra Secrets (eg Psql, Redis, etc.) 43 | kubectl create secret generic infra-other-secrets \ 44 | --save-config \ 45 | --dry-run=client \ 46 | -o yaml \ 47 | -n cf-explorer \ 48 | --from-env-file=../.keys/infra-secrets-stg-preprod \ 49 | | kubectl apply -f - 50 | 51 | #echo "Fetching helm dependencies for main app" 52 | #helm dependency build 53 | 54 | echo "Updating helm dependencies for main app" 55 | helm dependency update 56 | 57 | helm upgrade --install argocd -n argocd . \ 58 | --set git.targetRevision=HEAD \ 59 | --set valueFile=values-stg-preprod.yaml \ 60 | -f values-secrets.yaml 61 | -------------------------------------------------------------------------------- /argocd-bootstrap/init-dev-sranjan.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set +x 4 | 5 | echo "Checking argocd namespace existence" 6 | kubectl get ns argocd > /dev/null 2>&1 7 | 8 | if [ $? != 0 ]; then 9 | echo "argocd namespace does not exist, creating..." 10 | kubectl create ns argocd > /dev/null 2>&1 11 | fi 12 | 13 | echo "Checking cf-explorer namespace existence" 14 | kubectl get ns cf-explorer > /dev/null 2>&1 15 | 16 | if [ $? != 0 ]; then 17 | echo "cf-explorer namespace does not exist, creating..." 18 | kubectl create ns cf-explorer > /dev/null 2>&1 19 | fi 20 | 21 | ## Create a Master Key 22 | # openssl req -new -newkey rsa:4096 -x509 -sha256 -days 365 -nodes -out tls.crt -keyout tls.key 23 | 24 | ## DockerHub secret 25 | kubectl create secret -n cf-explorer generic regcred \ 26 | --from-file=.dockerconfigjson=../.keys/docker-cred.json \ 27 | --type=kubernetes.io/dockerconfigjson \ 28 | --save-config \ 29 | --dry-run=client \ 30 | -o yaml \ 31 | | kubectl apply -f - 32 | 33 | # Git Hub deploy key 34 | kubectl create secret generic github-deploy-key \ 35 | --save-config \ 36 | --dry-run=client \ 37 | -o yaml \ 38 | -n argocd \ 39 | --from-file=../.keys/cf-explorer \ 40 | | kubectl apply -f - 41 | 42 | # Infra Secrets (eg Psql, Redis, etc.) 43 | kubectl create secret generic infra-secrets \ 44 | --save-config \ 45 | --dry-run=client \ 46 | -o yaml \ 47 | -n cf-explorer \ 48 | --from-env-file=../.keys/infra-secrets-sranjan-dev \ 49 | | kubectl apply -f - 50 | 51 | #echo "Fetching helm dependencies for main app" 52 | #helm dependency build 53 | 54 | echo "Updating helm dependencies for main app" 55 | helm dependency update 56 | 57 | helm upgrade --install argocd -n argocd . \ 58 | --set git.targetRevision=develop \ 59 | --set valueFile=values-sranjan-dev-preprod.yaml \ 60 | -f values-secrets.yaml \ 61 | -f values-sranjan-dev.yaml 62 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to this project 2 | 3 | First off, thanks for taking the time to contribute! 🎉 4 | 5 | When contributing to this repository, please first describe the change you wish to make [via an issue](../../issues/new) before making a change. For every other form of discussion use the [discussions section](../../discussions) of this repo. 6 | Please note we have a [code of conduct](CODE_OF_CONDUCT.md), please follow it in all your interactions with the project. 7 | 8 | ## Issues and pull requests 9 | 10 | ### Bug reports 11 | 12 | [Submit an issue](../../issues/new) using the provided template for bug reports. If the template does not fit your purpose start with a blank issue. 13 | 14 | For bug reports, it's very important to fill in the information in the structure provided by the templates to help us analyzing the bug. 15 | 16 | ### Feature requests and ideas 17 | 18 | [Submit an issue](../../issues/new) using the provided template for feature requests. If the template does not fit your purpose start with a blank issue but make sure the name starts with a "FEATURE" in square brackets. 19 | 20 | If you are starting with a very vague idea instead of a concrete feature request post it in the [discussions section](../../discussions) of the repository where we can refine the idea with you and create a structured feature request from it. 21 | 22 | ### Creating a pull request 23 | 24 | Thank you for contributing your changes by opening a pull requests! To get something merged we usually require: 25 | 26 | - ❗ Description of the changes - please follow the [Conventional Commits specification](https://www.conventionalcommits.org/en/v1.0.0/#specification) as we use it to automatically generate our CHANGELOG ❗ 27 | - Quality of changes is ensured - through new or updated automated tests 28 | - Change is related to an issue (feature request or bug report) - ideally discussed beforehand 29 | - Well-scoped - we prefer multiple PRs, rather than a big one 30 | -------------------------------------------------------------------------------- /charts/cf-explorer-infra/templates/zookeeper-statefulset.yaml: -------------------------------------------------------------------------------- 1 | {{ with .Values.zookeeper }} 2 | {{ if .enabled }} 3 | --- 4 | apiVersion: apps/v1 5 | kind: StatefulSet 6 | metadata: 7 | name: zookeeper-explorer 8 | spec: 9 | replicas: 1 10 | selector: 11 | matchLabels: 12 | app: zookeeper-explorer 13 | template: 14 | metadata: 15 | labels: 16 | app: zookeeper-explorer 17 | spec: 18 | containers: 19 | - name: zookeeper-explorer 20 | image: "{{ .image.repository }}:{{ .image.tag }}" 21 | env: 22 | - name: ZOOKEEPER_SERVER_ID 23 | value: "1" 24 | - name: ZOOKEEPER_CLIENT_PORT 25 | value: {{ .port | quote }} 26 | - name: ZOOKEEPER_TICK_TIME 27 | value: "2000" 28 | - name: ZOOKEEPER_SERVERS 29 | value: "zookeeper:22888:23888" 30 | ports: 31 | - name: api 32 | containerPort: {{ .port }} 33 | livenessProbe: 34 | exec: 35 | command: [ '/bin/bash', '-c', 'echo "ruok" | nc -w 2 localhost 2181 | grep imok' ] 36 | startupProbe: 37 | exec: 38 | command: [ '/bin/bash', '-c', 'echo "ruok" | nc -w 2 localhost 2181 | grep imok' ] 39 | failureThreshold: 12 40 | periodSeconds: 5 41 | volumeMounts: 42 | - mountPath: /var/lib/zookeeper/data 43 | name: zookeeper-db 44 | subPath: data 45 | - mountPath: /var/lib/zookeeper/log 46 | name: zookeeper-db 47 | subPath: log 48 | - mountPath: /etc/zookeeper/secrets 49 | name: zookeeper-db 50 | subPath: secrets 51 | volumeClaimTemplates: 52 | - metadata: 53 | name: "zookeeper-db" 54 | spec: 55 | accessModes: [ "ReadWriteOnce" ] 56 | resources: 57 | requests: 58 | storage: {{ .dbSize | default "1Gi" }} 59 | revisionHistoryLimit: 2 60 | {{ end }} 61 | {{ end }} 62 | -------------------------------------------------------------------------------- /charts/main-app/values-dev-preprod.yaml: -------------------------------------------------------------------------------- 1 | stage: dev 2 | 3 | network: preprod 4 | 5 | domain: dev.cf-explorer-preprod.eu-west-1.metadata.dev.cf-deployments.org 6 | 7 | cf-explorer-infra: 8 | enabled: true 9 | postgresql: 10 | dbSize: 150Gi 11 | kafka: 12 | dbSize: 20Gi 13 | 14 | cf-explorer: 15 | enabled: true 16 | values: 17 | ingressDomains: 18 | - name: cloudfront 19 | domain: dev.cf-explorer-preprod.metadata.dev.cf-deployments.org 20 | - name: global-lb 21 | domain: dev.cf-explorer-preprod.global.metadata.dev.cf-deployments.org 22 | - name: eu-west-1-lb 23 | domain: dev.cf-explorer-preprod.eu-west-1.metadata.dev.cf-deployments.org 24 | crawler: 25 | enabled: true 26 | image: 27 | tag: "0.2.13" 28 | kafka: 29 | bootstrapServerSecret: 30 | name: kafka-secrets 31 | consumer: 32 | enabled: true 33 | image: 34 | tag: "0.3.14" 35 | explorerApi: 36 | enabled: true 37 | image: 38 | tag: "0.3.31" 39 | explorerRewardsApi: 40 | enabled: true 41 | image: 42 | tag: "0.1.7-SNAPSHOT" 43 | explorerAuthentication: 44 | enabled: true 45 | replicas: 1 46 | image: 47 | tag: "0.1.13" 48 | explorerFrontEnd: 49 | enabled: true 50 | image: 51 | tag: "0.4.24-PR2063" 52 | reactAppPreProdAppUrl: "https://dev.cf-explorer-preprod.eu-west-1.metadata.dev.cf-deployments.org" 53 | reactAppPreviewAppUrl: "https://dev.cf-explorer-preview.eu-west-1.metadata.dev.cf-deployments.org" 54 | reactAppMainnetAppUrl: "https://dev.cf-explorer-mainnet.eu-west-1.metadata.dev.cf-deployments.org" 55 | reactAppAuthUrl: "https://auth-api.dev.cf-explorer-preprod.eu-west-1.metadata.dev.cf-deployments.org/api/v1" 56 | consumerSchedules: 57 | enabled: true 58 | image: 59 | tag: "0.2.12" 60 | 61 | argo-cd: 62 | server: 63 | ingress: 64 | hosts: 65 | - argocd.dev.cf-explorer-preprod.eu-west-1.metadata.dev.cf-deployments.org 66 | -------------------------------------------------------------------------------- /charts/main-app/values-dev-preview.yaml: -------------------------------------------------------------------------------- 1 | stage: dev 2 | 3 | network: preview 4 | 5 | domain: dev.cf-explorer-preview.eu-west-1.metadata.dev.cf-deployments.org 6 | 7 | cf-explorer-infra: 8 | enabled: true 9 | postgresql: 10 | dbSize: 250Gi 11 | kafka: 12 | dbSize: 150Gi 13 | 14 | cf-explorer: 15 | enabled: true 16 | values: 17 | ingressDomains: 18 | - name: cloudfront 19 | domain: dev.cf-explorer-preview.metadata.dev.cf-deployments.org 20 | - name: global-lb 21 | domain: dev.cf-explorer-preview.global.metadata.dev.cf-deployments.org 22 | - name: eu-west-1-lb 23 | domain: dev.cf-explorer-preview.eu-west-1.metadata.dev.cf-deployments.org 24 | crawler: 25 | enabled: true 26 | image: 27 | tag: "0.2.13" 28 | kafka: 29 | bootstrapServerSecret: 30 | name: kafka-secrets 31 | consumer: 32 | enabled: true 33 | image: 34 | tag: "0.3.14" 35 | explorerApi: 36 | enabled: true 37 | image: 38 | tag: "0.3.31" 39 | explorerRewardsApi: 40 | enabled: true 41 | image: 42 | tag: "0.1.7-SNAPSHOT" 43 | explorerAuthentication: 44 | enabled: true 45 | replicas: 1 46 | image: 47 | tag: "0.1.13" 48 | explorerFrontEnd: 49 | enabled: true 50 | image: 51 | tag: "0.4.24-PR2063" 52 | reactAppPreProdAppUrl: "https://dev.cf-explorer-preprod.eu-west-1.metadata.dev.cf-deployments.org" 53 | reactAppPreviewAppUrl: "https://dev.cf-explorer-preview.eu-west-1.metadata.dev.cf-deployments.org" 54 | reactAppMainnetAppUrl: "https://dev.cf-explorer-mainnet.eu-west-1.metadata.dev.cf-deployments.org" 55 | reactAppAuthUrl: "https://auth-api.dev.cf-explorer-preview.eu-west-1.metadata.dev.cf-deployments.org/api/v1" 56 | consumerSchedules: 57 | enabled: true 58 | image: 59 | tag: "0.2.12" 60 | 61 | argo-cd: 62 | server: 63 | ingress: 64 | hosts: 65 | - argocd.dev.cf-explorer-preview.eu-west-1.metadata.dev.cf-deployments.org 66 | -------------------------------------------------------------------------------- /argocd-bootstrap/init-dev-mainnet.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set +x 4 | 5 | echo "Checking argocd namespace existence" 6 | kubectl get ns argocd > /dev/null 2>&1 7 | 8 | if [ $? != 0 ]; then 9 | echo "argocd namespace does not exist, creating..." 10 | kubectl create ns argocd > /dev/null 2>&1 11 | fi 12 | 13 | echo "Checking cf-explorer namespace existence" 14 | kubectl get ns cf-explorer > /dev/null 2>&1 15 | 16 | if [ $? != 0 ]; then 17 | echo "cf-explorer namespace does not exist, creating..." 18 | kubectl create ns cf-explorer > /dev/null 2>&1 19 | fi 20 | 21 | ## Create a Master Key 22 | # openssl req -new -newkey rsa:4096 -x509 -sha256 -days 365 -nodes -out tls.crt -keyout tls.key 23 | 24 | ## DockerHub secret 25 | kubectl create secret -n cf-explorer generic regcred \ 26 | --from-file=.dockerconfigjson=../.keys/docker-cred.json \ 27 | --type=kubernetes.io/dockerconfigjson \ 28 | --save-config \ 29 | --dry-run=client \ 30 | -o yaml \ 31 | | kubectl apply -f - 32 | 33 | # Git Hub deploy key 34 | kubectl create secret generic github-deploy-key \ 35 | --save-config \ 36 | --dry-run=client \ 37 | -o yaml \ 38 | -n argocd \ 39 | --from-file=../.keys/cf-explorer \ 40 | | kubectl apply -f - 41 | 42 | # Infra Secrets (eg Psql, Redis, etc.) 43 | kubectl create secret generic infra-secrets \ 44 | --save-config \ 45 | --dry-run=client \ 46 | -o yaml \ 47 | -n cf-explorer \ 48 | --from-env-file=../.keys/infra-secrets-dev-mainnet \ 49 | | kubectl apply -f - 50 | 51 | kubectl create secret generic infra-other-secrets \ 52 | --save-config \ 53 | --dry-run=client \ 54 | -o yaml \ 55 | -n cf-explorer \ 56 | --from-env-file=../.keys/infra-other-secrets-dev-mainnet \ 57 | | kubectl apply -f - 58 | 59 | #echo "Fetching helm dependencies for main app" 60 | #helm dependency build 61 | 62 | echo "Updating helm dependencies for main app" 63 | helm dependency update 64 | 65 | helm upgrade --install argocd -n argocd . \ 66 | --set git.targetRevision=HEAD \ 67 | --set valueFile=values-dev-mainnet.yaml \ 68 | -f values-secrets.yaml 69 | -------------------------------------------------------------------------------- /argocd-bootstrap/init-dev-preprod.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set +x 4 | 5 | echo "Checking argocd namespace existence" 6 | kubectl get ns argocd > /dev/null 2>&1 7 | 8 | if [ $? != 0 ]; then 9 | echo "argocd namespace does not exist, creating..." 10 | kubectl create ns argocd > /dev/null 2>&1 11 | fi 12 | 13 | echo "Checking cf-explorer namespace existence" 14 | kubectl get ns cf-explorer > /dev/null 2>&1 15 | 16 | if [ $? != 0 ]; then 17 | echo "cf-explorer namespace does not exist, creating..." 18 | kubectl create ns cf-explorer > /dev/null 2>&1 19 | fi 20 | 21 | ## Create a Master Key 22 | # openssl req -new -newkey rsa:4096 -x509 -sha256 -days 365 -nodes -out tls.crt -keyout tls.key 23 | 24 | ## DockerHub secret 25 | kubectl create secret -n cf-explorer generic regcred \ 26 | --from-file=.dockerconfigjson=../.keys/docker-cred.json \ 27 | --type=kubernetes.io/dockerconfigjson \ 28 | --save-config \ 29 | --dry-run=client \ 30 | -o yaml \ 31 | | kubectl apply -f - 32 | 33 | # Git Hub deploy key 34 | kubectl create secret generic github-deploy-key \ 35 | --save-config \ 36 | --dry-run=client \ 37 | -o yaml \ 38 | -n argocd \ 39 | --from-file=../.keys/cf-explorer \ 40 | | kubectl apply -f - 41 | 42 | # Infra Secrets (eg Psql, Redis, etc.) 43 | kubectl create secret generic infra-secrets \ 44 | --save-config \ 45 | --dry-run=client \ 46 | -o yaml \ 47 | -n cf-explorer \ 48 | --from-env-file=../.keys/infra-secrets-dev-preprod \ 49 | | kubectl apply -f - 50 | 51 | kubectl create secret generic infra-other-secrets \ 52 | --save-config \ 53 | --dry-run=client \ 54 | -o yaml \ 55 | -n cf-explorer \ 56 | --from-env-file=../.keys/infra-other-secrets-dev-preprod \ 57 | | kubectl apply -f - 58 | 59 | #echo "Fetching helm dependencies for main app" 60 | #helm dependency build 61 | 62 | echo "Updating helm dependencies for main app" 63 | helm dependency update 64 | 65 | helm upgrade --install argocd -n argocd . \ 66 | --set git.targetRevision=HEAD \ 67 | --set valueFile=values-dev-preprod.yaml \ 68 | -f values-secrets.yaml 69 | -------------------------------------------------------------------------------- /argocd-bootstrap/init.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set +x 4 | 5 | echo "Checking argocd namespace existence" 6 | kubectl get ns argocd > /dev/null 2>&1 7 | 8 | if [ $? != 0 ]; then 9 | echo "argocd namespace does not exist, creating..." 10 | kubectl create ns argocd > /dev/null 2>&1 11 | fi 12 | 13 | echo "Checking cf-explorer namespace existence" 14 | kubectl get ns cf-explorer > /dev/null 2>&1 15 | 16 | if [ $? != 0 ]; then 17 | echo "cf-explorer namespace does not exist, creating..." 18 | kubectl create ns cf-explorer > /dev/null 2>&1 19 | fi 20 | 21 | ## Create a Master Key 22 | # openssl req -new -newkey rsa:4096 -x509 -sha256 -days 365 -nodes -out tls.crt -keyout tls.key 23 | 24 | ## DockerHub secret 25 | kubectl create secret -n cf-explorer generic regcred \ 26 | --from-file=.dockerconfigjson=../.keys/docker-cred.json \ 27 | --type=kubernetes.io/dockerconfigjson \ 28 | --save-config \ 29 | --dry-run=client \ 30 | -o yaml \ 31 | | kubectl apply -f - 32 | 33 | ## Sealed Secrets certificates 34 | #kubectl create secret generic sealed-secrets-key \ 35 | # --save-config \ 36 | # --dry-run=client \ 37 | # -o yaml \ 38 | # -n argocd \ 39 | # --from-file=../.keys/tls.crt \ 40 | # --from-file=../.keys/tls.key \ 41 | # | kubectl apply -f - 42 | 43 | # Git Hub deploy key 44 | kubectl create secret generic github-deploy-key \ 45 | --save-config \ 46 | --dry-run=client \ 47 | -o yaml \ 48 | -n argocd \ 49 | --from-file=../.keys/cf-explorer \ 50 | | kubectl apply -f - 51 | 52 | # Infra Secrets (eg Psql, Redis, etc.) 53 | kubectl create secret generic infra-other-secrets \ 54 | --save-config \ 55 | --dry-run=client \ 56 | -o yaml \ 57 | -n cf-explorer \ 58 | --from-env-file=../.keys/infra-secrets-dev-mainnet \ 59 | | kubectl apply -f - 60 | 61 | #echo "Fetching helm dependencies for main app" 62 | #helm dependency build 63 | 64 | echo "Updating helm dependencies for main app" 65 | helm dependency update 66 | 67 | helm upgrade --install argocd -n argocd . \ 68 | --set git.targetRevision=feat/MET-1304-Update_Helm_Chart_Official_cluster \ 69 | --set valueFile=values-dev-mainnet.yaml \ 70 | -f values-secrets.yaml 71 | -------------------------------------------------------------------------------- /charts/main-app/values-stg-preprod.yaml: -------------------------------------------------------------------------------- 1 | stage: stg 2 | 3 | network: preprod 4 | 5 | domain: stg.cf-explorer-preprod.eu-west-1.metadata.dev.cf-deployments.org 6 | 7 | cf-explorer-infra: 8 | enabled: true 9 | postgresql: 10 | enabled: false 11 | kafka: 12 | dbSize: 20Gi 13 | 14 | cf-explorer: 15 | enabled: true 16 | values: 17 | ingressDomains: 18 | - name: cloudfront 19 | domain: stg.cf-explorer-preprod.metadata.dev.cf-deployments.org 20 | - name: global-lb 21 | domain: stg.cf-explorer-preprod.global.metadata.dev.cf-deployments.org 22 | - name: eu-west-1-lb 23 | domain: stg.cf-explorer-preprod.eu-west-1.metadata.dev.cf-deployments.org 24 | crawler: 25 | enabled: true 26 | image: 27 | tag: "0.2.14" 28 | consumer: 29 | enabled: true 30 | image: 31 | tag: "0.3.14" 32 | explorerApi: 33 | enabled: true 34 | postgres: 35 | secret: 36 | hostKey: POSTGRES_READ_ONLY_HOST 37 | image: 38 | tag: "0.3.31-PR746" 39 | tokenLogoEndpoint: https://stg-cf-explorer-token-logos.s3.eu-west-1.amazonaws.com/ 40 | explorerRewardsApi: 41 | enabled: true 42 | image: 43 | tag: "0.1.7-SNAPSHOT" 44 | explorerAuthentication: 45 | enabled: true 46 | replicas: 1 47 | image: 48 | tag: "0.1.13" 49 | explorerFrontEnd: 50 | enabled: true 51 | image: 52 | tag: "0.4.24-PR2063" 53 | reactAppPreProdAppUrl: "https://stg.cf-explorer-preprod.metadata.dev.cf-deployments.org" 54 | reactAppPreviewAppUrl: "https://stg.cf-explorer-preview.metadata.dev.cf-deployments.org" 55 | reactAppMainnetAppUrl: "https://stg.cf-explorer-mainnet.metadata.dev.cf-deployments.org" 56 | reactAppAuthUrl: "https://auth-api.stg.cf-explorer-preprod.eu-west-1.metadata.dev.cf-deployments.org/api/v1" 57 | consumerSchedules: 58 | enabled: true 59 | image: 60 | tag: "0.2.12" 61 | tokenLogoEndpoint: https://stg-cf-explorer-token-logos.s3.eu-west-1.amazonaws.com/ 62 | 63 | argo-cd: 64 | server: 65 | ingress: 66 | hosts: 67 | - argocd.stg.cf-explorer-preprod.metadata.dev.cf-deployments.org 68 | -------------------------------------------------------------------------------- /charts/main-app/values-stg-preview.yaml: -------------------------------------------------------------------------------- 1 | stage: stg 2 | 3 | network: preview 4 | 5 | domain: stg.cf-explorer-preview.eu-west-1.metadata.dev.cf-deployments.org 6 | 7 | cf-explorer-infra: 8 | enabled: true 9 | postgresql: 10 | enabled: false 11 | kafka: 12 | dbSize: 150Gi 13 | 14 | cf-explorer: 15 | enabled: true 16 | values: 17 | ingressDomains: 18 | - name: cloudfront 19 | domain: stg.cf-explorer-preview.metadata.dev.cf-deployments.org 20 | - name: global-lb 21 | domain: stg.cf-explorer-preview.global.metadata.dev.cf-deployments.org 22 | - name: eu-west-1-lb 23 | domain: stg.cf-explorer-preview.eu-west-1.metadata.dev.cf-deployments.org 24 | crawler: 25 | enabled: true 26 | image: 27 | tag: "0.2.14" 28 | consumer: 29 | enabled: true 30 | image: 31 | tag: "0.3.14" 32 | explorerApi: 33 | enabled: true 34 | postgres: 35 | secret: 36 | hostKey: POSTGRES_READ_ONLY_HOST 37 | image: 38 | tag: "0.3.31-PR746" 39 | tokenLogoEndpoint: https://stg-cf-explorer-token-logos.s3.eu-west-1.amazonaws.com/ 40 | explorerRewardsApi: 41 | enabled: true 42 | image: 43 | tag: "0.1.7-SNAPSHOT" 44 | explorerAuthentication: 45 | enabled: true 46 | replicas: 1 47 | image: 48 | tag: "0.1.13" 49 | explorerFrontEnd: 50 | enabled: true 51 | image: 52 | tag: "0.4.24-PR2063" 53 | reactAppPreProdAppUrl: "https://stg.cf-explorer-preprod.metadata.dev.cf-deployments.org" 54 | reactAppPreviewAppUrl: "https://stg.cf-explorer-preview.metadata.dev.cf-deployments.org" 55 | reactAppMainnetAppUrl: "https://stg.cf-explorer-mainnet.metadata.dev.cf-deployments.org" 56 | reactAppAuthUrl: "https://auth-api.stg.cf-explorer-preview.eu-west-1.metadata.dev.cf-deployments.org/api/v1" 57 | consumerSchedules: 58 | enabled: true 59 | image: 60 | tag: "0.2.12" 61 | tokenLogoEndpoint: https://stg-cf-explorer-token-logos.s3.eu-west-1.amazonaws.com/ 62 | 63 | argo-cd: 64 | server: 65 | ingress: 66 | hosts: 67 | - argocd.stg.cf-explorer-preview.metadata.dev.cf-deployments.org 68 | -------------------------------------------------------------------------------- /charts/main-app/values-pro-preprod.yaml: -------------------------------------------------------------------------------- 1 | git: 2 | targetRevision: main 3 | 4 | stage: pro 5 | 6 | network: preprod 7 | 8 | domain: preprod.beta.explorer.cardano.org 9 | 10 | cf-explorer-infra: 11 | enabled: true 12 | postgresql: 13 | enabled: false 14 | kafka: 15 | dbSize: 20Gi 16 | 17 | cf-explorer: 18 | enabled: true 19 | values: 20 | ingressDomains: 21 | - name: cloudfront 22 | domain: preprod.beta.explorer.cardano.org 23 | - name: global-lb 24 | domain: pro.cf-explorer-preprod.global.beta.explorer.cardano.org 25 | - name: eu-west-1-lb 26 | domain: pro.cf-explorer-preprod.eu-west-1.beta.explorer.cardano.org 27 | - name: us-east-1-lb 28 | domain: pro.cf-explorer-preprod.us-east-1.beta.explorer.cardano.org 29 | crawler: 30 | enabled: true 31 | image: 32 | tag: "0.2.14" 33 | consumer: 34 | enabled: true 35 | image: 36 | tag: "0.3.14" 37 | explorerApi: 38 | enabled: true 39 | postgres: 40 | secret: 41 | hostKey: POSTGRES_READ_ONLY_HOST 42 | image: 43 | tag: "0.3.31-PR746" 44 | tokenLogoEndpoint: https://pro-cf-explorer-token-logos.s3.eu-west-1.amazonaws.com/ 45 | explorerRewardsApi: 46 | enabled: true 47 | image: 48 | tag: "0.1.7-SNAPSHOT" 49 | explorerAuthentication: 50 | enabled: true 51 | replicas: 1 52 | image: 53 | tag: "0.1.13" 54 | emailFrom: "admin@beta.explorer.cardano.org" 55 | explorerFrontEnd: 56 | enabled: true 57 | image: 58 | tag: "0.4.24-PR2063" 59 | reactAppPreProdAppUrl: "https://preprod.beta.explorer.cardano.org" 60 | reactAppPreviewAppUrl: "https://preview.beta.explorer.cardano.org" 61 | reactAppMainnetAppUrl: "https://beta.explorer.cardano.org" 62 | reactAppAuthUrl: "https://auth-api.pro.cf-explorer-preprod.eu-west-1.beta.explorer.cardano.org/api/v1" 63 | consumerSchedules: 64 | enabled: true 65 | image: 66 | tag: "0.2.12" 67 | tokenLogoEndpoint: https://pro-cf-explorer-token-logos.s3.eu-west-1.amazonaws.com/ 68 | 69 | argo-cd: 70 | server: 71 | ingress: 72 | hosts: 73 | - argocd.pro.cf-explorer-preprod.eu-west-1.beta.explorer.cardano.org 74 | -------------------------------------------------------------------------------- /charts/main-app/values-pro-preview.yaml: -------------------------------------------------------------------------------- 1 | git: 2 | targetRevision: main 3 | 4 | stage: pro 5 | 6 | network: preview 7 | 8 | domain: preview.beta.explorer.cardano.org 9 | 10 | cf-explorer-infra: 11 | enabled: true 12 | postgresql: 13 | enabled: false 14 | kafka: 15 | dbSize: 150Gi 16 | 17 | cf-explorer: 18 | enabled: true 19 | values: 20 | ingressDomains: 21 | - name: cloudfront 22 | domain: preview.beta.explorer.cardano.org 23 | - name: global-lb 24 | domain: pro.cf-explorer-preview.global.beta.explorer.cardano.org 25 | - name: eu-west-1-lb 26 | domain: pro.cf-explorer-preview.eu-west-1.beta.explorer.cardano.org 27 | - name: us-east-1-lb 28 | domain: pro.cf-explorer-preview.us-east-1.beta.explorer.cardano.org 29 | crawler: 30 | enabled: true 31 | image: 32 | tag: "0.2.14" 33 | consumer: 34 | enabled: true 35 | image: 36 | tag: "0.3.14" 37 | explorerApi: 38 | enabled: true 39 | postgres: 40 | secret: 41 | hostKey: POSTGRES_READ_ONLY_HOST 42 | image: 43 | tag: "0.3.31-PR746" 44 | tokenLogoEndpoint: https://pro-cf-explorer-token-logos.s3.eu-west-1.amazonaws.com/ 45 | explorerRewardsApi: 46 | enabled: true 47 | image: 48 | tag: "0.1.7-SNAPSHOT" 49 | explorerAuthentication: 50 | enabled: true 51 | replicas: 1 52 | image: 53 | tag: "0.1.13" 54 | emailFrom: "admin@beta.explorer.cardano.org" 55 | explorerFrontEnd: 56 | enabled: true 57 | image: 58 | tag: "0.4.24-PR2063" 59 | reactAppPreProdAppUrl: "https://preprod.beta.explorer.cardano.org" 60 | reactAppPreviewAppUrl: "https://preview.beta.explorer.cardano.org" 61 | reactAppMainnetAppUrl: "https://beta.explorer.cardano.org" 62 | reactAppAuthUrl: "https://auth-api.pro.cf-explorer-preview.eu-west-1.beta.explorer.cardano.org/api/v1" 63 | consumerSchedules: 64 | enabled: true 65 | image: 66 | tag: "0.2.12" 67 | tokenLogoEndpoint: https://pro-cf-explorer-token-logos.s3.eu-west-1.amazonaws.com/ 68 | 69 | argo-cd: 70 | server: 71 | ingress: 72 | hosts: 73 | - argocd.pro.cf-explorer-preview.eu-west-1.beta.explorer.cardano.org 74 | -------------------------------------------------------------------------------- /charts/main-app/values-dev-mainnet.yaml: -------------------------------------------------------------------------------- 1 | stage: dev 2 | 3 | network: mainnet 4 | 5 | domain: dev.cf-explorer-mainnet.eu-west-1.metadata.dev.cf-deployments.org 6 | 7 | cf-explorer-infra: 8 | enabled: true 9 | redis: 10 | values: 11 | master: 12 | persistence: 13 | size: 20Gi 14 | diagnosticMode: 15 | enabled: false 16 | postgresql: 17 | dbSize: 1500Gi 18 | kafka: 19 | dbSize: 750Gi 20 | 21 | cf-explorer: 22 | enabled: true 23 | values: 24 | ingressDomains: 25 | - name: cloudfront 26 | domain: dev.cf-explorer-mainnet.metadata.dev.cf-deployments.org 27 | - name: global-lb 28 | domain: dev.cf-explorer-mainnet.global.metadata.dev.cf-deployments.org 29 | - name: eu-west-1-lb 30 | domain: dev.cf-explorer-mainnet.eu-west-1.metadata.dev.cf-deployments.org 31 | crawler: 32 | enabled: true 33 | image: 34 | tag: "0.2.13" 35 | kafka: 36 | bootstrapServerSecret: 37 | name: kafka-secrets 38 | consumer: 39 | enabled: true 40 | image: 41 | tag: "0.3.14" 42 | explorerApi: 43 | enabled: true 44 | image: 45 | tag: "0.3.31" 46 | kafka: 47 | bootstrapServerSecret: 48 | name: kafka-secrets 49 | explorerRewardsApi: 50 | enabled: true 51 | image: 52 | tag: "0.1.7-SNAPSHOT" 53 | explorerAuthentication: 54 | enabled: true 55 | replicas: 1 56 | image: 57 | tag: "0.1.13" 58 | explorerFrontEnd: 59 | enabled: true 60 | image: 61 | tag: "0.4.24-PR2063" 62 | reactAppPreProdAppUrl: "https://dev.cf-explorer-preprod.eu-west-1.metadata.dev.cf-deployments.org" 63 | reactAppPreviewAppUrl: "https://dev.cf-explorer-preview.eu-west-1.metadata.dev.cf-deployments.org" 64 | reactAppMainnetAppUrl: "https://dev.cf-explorer-mainnet.eu-west-1.metadata.dev.cf-deployments.org" 65 | reactAppAuthUrl: "https://auth-api.dev.cf-explorer-mainnet.eu-west-1.metadata.dev.cf-deployments.org/api/v1" 66 | consumerSchedules: 67 | enabled: true 68 | image: 69 | tag: "0.2.14" 70 | 71 | argo-cd: 72 | server: 73 | ingress: 74 | hosts: 75 | - argocd.dev.cf-explorer-mainnet.eu-west-1.metadata.dev.cf-deployments.org 76 | -------------------------------------------------------------------------------- /charts/cf-explorer/templates/explorer-fe-deployment.yaml: -------------------------------------------------------------------------------- 1 | {{ with .Values.explorerFrontEnd }} 2 | {{ if .enabled }} 3 | --- 4 | apiVersion: apps/v1 5 | kind: Deployment 6 | metadata: 7 | name: cf-explorer-fe 8 | spec: 9 | replicas: {{ .replicas }} 10 | selector: 11 | matchLabels: 12 | app: cf-explorer-fe 13 | template: 14 | metadata: 15 | labels: 16 | app: cf-explorer-fe 17 | spec: 18 | containers: 19 | - name: cf-explorer-fe 20 | image: "{{ .image.repository }}:{{ .image.tag }}" 21 | # command: ["bash", "-c", "sleep 999999"] 22 | env: 23 | - name: DANGEROUSLY_DISABLE_HOST_CHECK 24 | value: "true" 25 | - name: HOST 26 | value: "0.0.0.0" 27 | - name: PORT 28 | value: {{ .port | quote }} 29 | 30 | - name: REACT_APP_JSD_WIDGET_KEY 31 | valueFrom: 32 | secretKeyRef: 33 | name: {{ .jira.widget.secretName }} 34 | key: {{ .jira.widget.secretKey }} 35 | 36 | - name: REACT_APP_NETWORK 37 | value: {{ tpl .reactAppNetwork $ }} 38 | - name: REACT_APP_API_URL 39 | value: {{ tpl .reactAppApiUrl $ }} 40 | - name: REACT_APP_PREPROD_APP_URL 41 | value: {{ tpl .reactAppPreProdAppUrl $ }} 42 | - name: REACT_APP_PREVIEW_APP_URL 43 | value: {{ tpl .reactAppPreviewAppUrl $ }} 44 | - name: REACT_APP_MAINNET_APP_URL 45 | value: {{ tpl .reactAppMainnetAppUrl $ }} 46 | - name: REACT_APP_AUTH_API_URL 47 | value: {{ tpl .reactAppAuthUrl $ }} 48 | 49 | - name: REACT_APP_EXT_ADA_PRICE_URL 50 | value: https://www.coingecko.com/en/coins/cardano 51 | - name: REACT_APP_CARDANO_NEWS_URL 52 | value: {{ tpl .reactAppCardanoNewsUrl $ }} 53 | - name: REACT_APP_NETWORK_NAMES 54 | value: '{"mainnet":"Mainnet","preprod":"Preprod", "preview":"Preview"}' 55 | 56 | ports: 57 | - name: api 58 | containerPort: {{ .port }} 59 | imagePullPolicy: Always 60 | imagePullSecrets: 61 | - name: regcred 62 | revisionHistoryLimit: 2 63 | {{ end }} 64 | {{ end }} 65 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | ## Reporting a Vulnerability 4 | 5 | The Cardano Foundation Explorer project takes security seriously. We appreciate your efforts in disclosing any potential vulnerabilities responsibly. 6 | 7 | If you have discovered a security vulnerability within this project, please report it to us as soon as possible. We encourage responsible disclosure and kindly ask you to follow the guidelines outlined below. 8 | 9 | ## Guidelines for Responsible Disclosure 10 | 11 | To ensure that the security vulnerability is properly addressed, we request that you adhere to the following guidelines: 12 | 13 | 1. **Do not exploit the vulnerability**: Do not attempt to exploit the vulnerability or gain unauthorized access to any user data. Only perform actions that are necessary to identify or validate the vulnerability. 14 | 15 | 2. **Privately disclose the vulnerability**: Please do not disclose the vulnerability publicly before we have had an opportunity to investigate and address the issue. We appreciate your discretion. 16 | 17 | 3. **Contact us directly**: Send an email to our team at security@cardanofoudnation.org with the subject line: "[Cardano Foundation Explorer] Security Vulnerability Report" 18 | 19 | 4. **Provide detailed information**: In your report, please include detailed information about the vulnerability, including steps to reproduce it and any potential impact. 20 | 21 | 5. **Share your contact information**: We would appreciate it if you could provide your name and contact information, including your email address or other means of communication, so we can reach out to you if we require any additional information. 22 | 23 | 6. **Keep communication confidential**: While we investigate and address the vulnerability, we kindly request that you keep all communication related to the vulnerability confidential. 24 | 25 | 7. **Allow time for a response**: We strive to acknowledge vulnerability reports as soon as possible and will make every effort to respond within a reasonable timeframe. Please be patient while we investigate and address the reported issue. 26 | 27 | ## Recognition and Acknowledgment 28 | 29 | We believe in recognizing the valuable contributions of the security community and are open to acknowledging those who responsibly disclose vulnerabilities. If you would like to be acknowledged for your responsible disclosure, please let us know when reporting the vulnerability. However, we respect your privacy and will not disclose any personal information without your explicit consent. 30 | 31 | Thank you for helping us ensure the security of the Cardano Foundation Explorer project and the broader Cardano ecosystem. Your efforts are greatly appreciated. 32 | -------------------------------------------------------------------------------- /charts/cf-explorer-infra/templates/postgres.yaml: -------------------------------------------------------------------------------- 1 | {{ with .Values.postgresql }} 2 | {{ if .enabled }} 3 | apiVersion: v1 4 | kind: Secret 5 | metadata: 6 | name: "postgres-secrets" 7 | namespace: {{ $.Release.Namespace }} 8 | type: Opaque 9 | data: 10 | POSTGRES_USER: {{ .dbUser | default "cardano" | b64enc | quote }} 11 | POSTGRES_HOST: {{ .dbHost | default "postgresql" | b64enc | quote }} 12 | POSTGRES_PORT: {{ .dbPort | default "5432" | b64enc | quote }} 13 | POSTGRES_DB: {{ .dbName | default "explorer_api" | b64enc | quote }} 14 | POSTGRES_ADMIN_PASSWORD: {{ randAlphaNum 16 | b64enc | quote }} 15 | POSTGRES_PASSWORD: {{ randAlphaNum 16 | b64enc | quote }} 16 | POSTGRES_REPLICATION_PASSWORD: {{ randAlphaNum 16 | b64enc | quote }} 17 | --- 18 | apiVersion: argoproj.io/v1alpha1 19 | kind: Application 20 | metadata: 21 | name: postgresql 22 | namespace: argocd 23 | finalizers: 24 | - resources-finalizer.argocd.argoproj.io 25 | spec: 26 | project: default 27 | source: 28 | repoURL: https://charts.bitnami.com/bitnami 29 | targetRevision: 12.4.3 30 | chart: postgresql 31 | helm: 32 | values: | 33 | auth: 34 | username: {{ .dbUser | default "cardano" }} 35 | existingSecret: postgres-secrets 36 | secretKeys: 37 | adminPasswordKey: POSTGRES_ADMIN_PASSWORD 38 | userPasswordKey: POSTGRES_PASSWORD 39 | replicationPasswordKey: POSTGRES_REPLICATION_PASSWORD 40 | database: {{ .dbName | default "explorer_api" }} 41 | primary: 42 | persistence: 43 | size: {{ .dbSize | default "8Gi" }} 44 | extendedConfiguration: |- 45 | effective_cache_size=12GB 46 | max_connections=250 47 | shared_buffers=4GB 48 | work_mem=2GB 49 | random_page_cost=1.1 50 | maintenance_work_mem=2GB 51 | shared_buffers=12GB 52 | checkpoint_completion_target=0.9 53 | synchronous_commit=off 54 | effective_io_concurrency=500 55 | wal_buffers=16MB 56 | min_wal_size=500MB 57 | max_wal_size=1GB 58 | max_parallel_workers_per_gather=4 59 | max_parallel_maintenance_workers=4 60 | track_counts=true 61 | autovacuum=on 62 | autovacuum_naptime=5min 63 | log_autovacuum_min_duration=0 64 | shmVolume: 65 | enabled: true 66 | sizeLimit: "32Gi" 67 | syncPolicy: 68 | automated: 69 | prune: true 70 | selfHeal: true 71 | destination: 72 | namespace: {{ $.Release.Namespace }} 73 | server: https://kubernetes.default.svc 74 | {{ end }} 75 | {{ end }} 76 | -------------------------------------------------------------------------------- /argocd-bootstrap/README.md: -------------------------------------------------------------------------------- 1 | # Cluster Bootstrapping 2 | 3 | This module is responsible for bootstrapping Kubernetes cluster for the Explorer projects. 4 | 5 | Clusters can be bootstrapped using the [init.sh](init.sh) script. Please check next paragraph to learn about the 6 | init script requirements 7 | 8 | ## Requirements 9 | 10 | The init script will deploy both [ArgoCD](https://argo-cd.readthedocs.io/en/stable/) and the [Main App](https://argo-cd.readthedocs.io/en/stable/operator-manual/cluster-bootstrapping/). 11 | Once installed, ArgoCD will observe the patterns of the GitOps approach and ensure that the kubernetes cluster deployment(s) are in sync 12 | with the definition contained in the relevant git projects. 13 | 14 | In order for ArgoCD to access GitHub, a number of _secrets_ need to be created. 15 | 1. Deployment keys for all the GitHub projects involved 16 | 2. [Sealed Secret](https://github.com/bitnami-labs/sealed-secrets) main key required to decrypt deployment keys at the point above 17 | 18 | ### Deployment Keys 19 | 20 | In order to work, ArgoCD will need access to many GitHub repositories. At least it will require access to the main app repository: the one 21 | that bootstraps the cluster. 22 | 23 | GitHub Deployment Keys can be setup to grant ArgoCD with the required permissions. 24 | 25 | Configuring deployment keys secrets is done in two steps: 26 | 1. deploying the relevant secrets via the [init.sh](https://github.com/cardano-foundation/cf-explorer/blob/feat/MET-755-Create_explorer_helm_chart/argocd-bootstrap/init.sh#L27) script 27 | 2. associate secret to repos: [values.yaml](https://github.com/cardano-foundation/cf-explorer/blob/feat/MET-755-Create_explorer_helm_chart/argocd-bootstrap/values.yaml#L37) 28 | 29 | ## Sealed Secret 30 | 31 | Kubernetes `Secrets` are not encrypted, but rather just base64 encoded. So it is recommended to **NOT** version control them. 32 | 33 | [Sealed Secrets](https://github.com/bitnami-labs/sealed-secrets) is the simplest solution for safely dealing with secrets and allow 34 | developer to version control them. 35 | 36 | From their own documentation: 37 | 38 | > Problem: "I can manage all my K8s config in git, except Secrets." 39 | 40 | > Solution: Encrypt your Secret into a SealedSecret, which is safe to store - even inside a public repository. 41 | > The SealedSecret can be decrypted only by the controller running in the target cluster and nobody else (not even the original author) 42 | > is able to obtain the original Secret from the SealedSecret. 43 | 44 | Creating a `Sealed Secrets` is simple and can be done via `openssl req -new -newkey rsa:4096 -x509 -sha256 -days 365 -nodes -out tls.crt -keyout tls.key`. 45 | 46 | This key needs to: 47 | 1. be used to encrypt all the secrets 48 | 2. deployed on the cluster as per the [init.sh](https://github.com/cardano-foundation/cf-explorer/blob/feat/MET-755-Create_explorer_helm_chart/argocd-bootstrap/init.sh#L17) script 49 | 50 | The key should be ideally secured on AWS Kms. 51 | -------------------------------------------------------------------------------- /charts/main-app/values-stg-mainnet.yaml: -------------------------------------------------------------------------------- 1 | stage: stg 2 | 3 | network: mainnet 4 | 5 | domain: stg.cf-explorer-mainnet.eu-west-1.metadata.dev.cf-deployments.org 6 | 7 | cf-explorer-infra: 8 | enabled: false 9 | 10 | cf-explorer: 11 | enabled: true 12 | values: 13 | ingressDomains: 14 | - name: cloudfront 15 | domain: stg.cf-explorer-mainnet.metadata.dev.cf-deployments.org 16 | - name: global-lb 17 | domain: stg.cf-explorer-mainnet.global.metadata.dev.cf-deployments.org 18 | - name: eu-west-1-lb 19 | domain: stg.cf-explorer-mainnet.eu-west-1.metadata.dev.cf-deployments.org 20 | crawler: 21 | enabled: true 22 | image: 23 | tag: "0.2.14" 24 | kafka: 25 | useSsl: "true" 26 | bootstrapServersSecret: 27 | name: infra-secrets 28 | redis: 29 | mode: managed-standalone 30 | standalone: 31 | useSsl: "true" 32 | consumer: 33 | enabled: true 34 | image: 35 | tag: "0.3.14" 36 | redis: 37 | mode: managed-standalone 38 | standalone: 39 | useSsl: "true" 40 | kafka: 41 | useSsl: "true" 42 | bootstrapServersSecret: 43 | name: infra-secrets 44 | explorerApi: 45 | enabled: true 46 | postgres: 47 | secret: 48 | hostKey: POSTGRES_READ_ONLY_HOST 49 | image: 50 | tag: "0.3.31-PR746" 51 | redis: 52 | mode: managed-standalone 53 | standalone: 54 | useSsl: "true" 55 | kafka: 56 | useSsl: "true" 57 | bootstrapServersSecret: 58 | name: infra-secrets 59 | tokenLogoEndpoint: https://stg-cf-explorer-token-logos.s3.eu-west-1.amazonaws.com/ 60 | explorerRewardsApi: 61 | enabled: true 62 | image: 63 | tag: "0.1.7-SNAPSHOT" 64 | explorerAuthentication: 65 | enabled: true 66 | replicas: 1 67 | image: 68 | tag: "0.1.13" 69 | redis: 70 | mode: managed-standalone 71 | standalone: 72 | useSsl: "true" 73 | explorerFrontEnd: 74 | enabled: true 75 | image: 76 | tag: "0.4.24-PR2063" 77 | reactAppPreProdAppUrl: "https://stg.cf-explorer-preprod.metadata.dev.cf-deployments.org" 78 | reactAppPreviewAppUrl: "https://stg.cf-explorer-preview.metadata.dev.cf-deployments.org" 79 | reactAppMainnetAppUrl: "https://stg.cf-explorer-mainnet.metadata.dev.cf-deployments.org" 80 | reactAppAuthUrl: "https://auth-api.stg.cf-explorer-mainnet.eu-west-1.metadata.dev.cf-deployments.org/api/v1" 81 | consumerSchedules: 82 | enabled: true 83 | image: 84 | tag: "0.2.12" 85 | redis: 86 | mode: managed-standalone 87 | standalone: 88 | useSsl: "true" 89 | kafka: 90 | useSsl: "true" 91 | bootstrapServersSecret: 92 | name: infra-secrets 93 | tokenLogoEndpoint: https://stg-cf-explorer-token-logos.s3.eu-west-1.amazonaws.com/ 94 | 95 | argo-cd: 96 | server: 97 | ingress: 98 | hosts: 99 | - argocd.stg.cf-explorer-mainnet.metadata.dev.cf-deployments.org 100 | -------------------------------------------------------------------------------- /charts/main-app/values-pro-mainnet.yaml: -------------------------------------------------------------------------------- 1 | git: 2 | targetRevision: main 3 | 4 | stage: pro 5 | 6 | network: mainnet 7 | 8 | domain: beta.explorer.cardano.org 9 | 10 | cf-explorer-infra: 11 | enabled: false 12 | 13 | cf-explorer: 14 | enabled: true 15 | values: 16 | ingressDomains: 17 | - name: cloudfront 18 | domain: beta.explorer.cardano.org 19 | - name: global-lb 20 | domain: pro.cf-explorer-mainnet.global.beta.explorer.cardano.org 21 | - name: eu-west-1-lb 22 | domain: pro.cf-explorer-mainnet.eu-west-1.beta.explorer.cardano.org 23 | - name: us-east-1-lb 24 | domain: pro.cf-explorer-mainnet.us-east-1.beta.explorer.cardano.org 25 | crawler: 26 | enabled: true 27 | image: 28 | tag: "0.2.14" 29 | kafka: 30 | useSsl: "true" 31 | bootstrapServersSecret: 32 | name: infra-secrets 33 | redis: 34 | mode: managed-standalone 35 | standalone: 36 | useSsl: "true" 37 | consumer: 38 | enabled: true 39 | image: 40 | tag: "0.3.14" 41 | redis: 42 | mode: managed-standalone 43 | standalone: 44 | useSsl: "true" 45 | kafka: 46 | useSsl: "true" 47 | bootstrapServersSecret: 48 | name: infra-secrets 49 | explorerApi: 50 | enabled: true 51 | postgres: 52 | secret: 53 | hostKey: POSTGRES_READ_ONLY_HOST 54 | image: 55 | tag: "0.3.31-PR746" 56 | redis: 57 | mode: managed-standalone 58 | standalone: 59 | useSsl: "true" 60 | kafka: 61 | useSsl: "true" 62 | bootstrapServersSecret: 63 | name: infra-secrets 64 | tokenLogoEndpoint: https://pro-cf-explorer-token-logos.s3.eu-west-1.amazonaws.com/ 65 | explorerRewardsApi: 66 | enabled: true 67 | image: 68 | tag: "0.1.7-SNAPSHOT" 69 | explorerAuthentication: 70 | enabled: true 71 | replicas: 1 72 | image: 73 | tag: "0.1.13" 74 | redis: 75 | mode: managed-standalone 76 | standalone: 77 | useSsl: "true" 78 | emailFrom: "admin@beta.explorer.cardano.org" 79 | explorerFrontEnd: 80 | enabled: true 81 | image: 82 | tag: "0.4.24-PR2063" 83 | reactAppPreProdAppUrl: "https://preprod.beta.explorer.cardano.org" 84 | reactAppPreviewAppUrl: "https://preview.beta.explorer.cardano.org" 85 | reactAppMainnetAppUrl: "https://beta.explorer.cardano.org" 86 | reactAppAuthUrl: "https://auth-api.pro.cf-explorer-mainnet.eu-west-1.beta.explorer.cardano.org/api/v1" 87 | 88 | consumerSchedules: 89 | enabled: true 90 | image: 91 | tag: "0.2.12" 92 | redis: 93 | mode: managed-standalone 94 | standalone: 95 | useSsl: "true" 96 | kafka: 97 | useSsl: "true" 98 | bootstrapServersSecret: 99 | name: infra-secrets 100 | tokenLogoEndpoint: https://pro-cf-explorer-token-logos.s3.eu-west-1.amazonaws.com/ 101 | 102 | argo-cd: 103 | server: 104 | ingress: 105 | hosts: 106 | - argocd.pro.cf-explorer-mainnet.eu-west-1.beta.explorer.cardano.org 107 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Cardano Foundation Explorer Deployment 2 | 3 | This project contains manifests and scripts to bootstrap and deploy the Cardano Foundation Explorer project and all its 4 | dependencies. 5 | 6 | ```mermaid 7 | flowchart LR 8 | A[Explorer Frontend] --> B[Explorer API] 9 | A --> C[Explorer Authentication\n Service] 10 | C --> D[Keycloak] 11 | B --> E[(Postgres Database)] 12 | F[Explorer Rewards Service] --> E 13 | G[Koios] --> F 14 | H[Explorer Scheduled\n Services] --> E 15 | E --> H 16 | I[LedgerSync] --> E 17 | cp{{Explorer Common\nPackage}} 18 | 19 | style A fill:#5C8DFF,stroke:#5C8DFF 20 | style B fill:#5C8DFF,stroke:#5C8DFF 21 | style C fill:#5C8DFF,stroke:#5C8DFF 22 | style D fill:#1EC198,stroke:#1EC198 23 | style E fill:#1EC198,stroke:#1EC198 24 | 25 | style F fill:#5C8DFF,stroke:#5C8DFF 26 | style G fill:#1EC198,stroke:#1EC198 27 | style H fill:#5C8DFF,stroke:#5C8DFF 28 | style I fill:#1EC198,stroke:#1EC198 29 | style cp fill:#F6C667,stroke:#F6C667 30 | ``` 31 | 32 | ### Tested Configuration 33 | 34 | | Repository | Version | 35 | |--------------------------------|---------| 36 | | [cf-ledger-consumer-schedules](https://github.com/cardano-foundation/cf-ledger-consumer-schedules) | 0.2.19 | 37 | | [cf-explorer-api](https://github.com/cardano-foundation/cf-explorer-api) | 0.5.0 | 38 | | [cf-explorer-rewards-api](https://github.com/cardano-foundation/cf-explorer-rewards) | 0.1.7 | 39 | | [cf-explorer-authentication](https://github.com/cardano-foundation/cf-explorer-authentication) | 0.1.15 | 40 | | [cf-explorer-frontend](https://github.com/cardano-foundation/cf-explorer-frontend) | 0.5.3 | 41 | 42 | 43 | > [!NOTE] 44 | > Please ensure that you run these services alongside the latest version of [LedgerSync ⛓](https://github.com/cardano-foundation/cf-ledger-sync). 45 | 46 | ## Continuous Deployment 47 | 48 | [ArgoCD](https://argo-cd.readthedocs.io/en/stable/) ís the Continuous Deployment system of choice for deploying the applications 49 | that compose the Explorer system and all its dependencies. 50 | 51 | ## Bootstrap 52 | 53 | Bootstrapping a cluster is the process of deploying artifacts for the very first time. ArgoCD itself needs to be deployed the first time 54 | and then, in turn ArgoCD will deploy all the components under its control in a [GitOps](https://about.gitlab.com/topics/gitops/) fashion. 55 | 56 | An [Application](https://argo-cd.readthedocs.io/en/stable/core_concepts/) In ArgoCD is a: 57 | > A group of Kubernetes resources as defined by a manifest. This is a Custom Resource Definition (CRD). 58 | 59 | Some examples could be: 60 | 1. Microservices and all their resources (workers, network resources, DNS definitions, scaling policies) 61 | 2. Databases 62 | 3. System / Administration services (metric server etc) 63 | 64 | In order to bootstrap the cluster is used the technique of [App of Apps](https://argo-cd.readthedocs.io/en/stable/operator-manual/cluster-bootstrapping/). 65 | 66 | For more info, check the [README.md](argocd-bootstrap/README.md) 67 | 68 | # Helm Repositories 69 | 70 | Full list of helm repositories to add 71 | 72 | ```bash 73 | helm repo add argo-cd https://argoproj.github.io/argo-helm 74 | helm repo add sealed-secrets https://bitnami-labs.github.io/sealed-secrets 75 | helm repo add bitnami https://charts.bitnami.com/bitnami 76 | helm repo add traefik https://helm.traefik.io/traefik 77 | helm repo add prometheus-community https://prometheus-community.github.io/helm-charts 78 | helm repo add elastic https://helm.elastic.co 79 | ``` 80 | 81 | ## Embedded Services 82 | 83 | ### Kibana 84 | 85 | Kibana credentials are: 86 | 87 | * user: elastic 88 | * password: `kubectl get secret -n elastic-stack quickstart-es-elastic-user -o json | jq -r .data.elastic` 89 | -------------------------------------------------------------------------------- /charts/cf-explorer/templates/explorer-rewards-api-deployment.yaml: -------------------------------------------------------------------------------- 1 | {{ with .Values.explorerRewardsApi }} 2 | {{ if .enabled }} 3 | --- 4 | apiVersion: apps/v1 5 | kind: Deployment 6 | metadata: 7 | name: cf-explorer-rewards-api 8 | spec: 9 | replicas: {{ .replicas }} 10 | selector: 11 | matchLabels: 12 | app: cf-explorer-rewards-api 13 | template: 14 | metadata: 15 | labels: 16 | app: cf-explorer-rewards-api 17 | spec: 18 | containers: 19 | - name: cf-explorer-rewards-api 20 | image: "{{ .image.repository }}:{{ .image.tag }}" 21 | env: 22 | - name: SPRING_PROFILES_ACTIVE 23 | value: {{ .springProfiles }} 24 | - name: SERVER_PORT 25 | value: {{ .port | quote }} 26 | 27 | - name: POSTGRES_HOST 28 | valueFrom: 29 | secretKeyRef: 30 | name: {{ .postgres.secret.name }} 31 | key: {{ .postgres.secret.hostKey }} 32 | - name: POSTGRES_PORT 33 | valueFrom: 34 | secretKeyRef: 35 | name: {{ .postgres.secret.name }} 36 | key: {{ .postgres.secret.portKey }} 37 | - name: POSTGRES_USER 38 | valueFrom: 39 | secretKeyRef: 40 | name: {{ .postgres.secret.name }} 41 | key: {{ .postgres.secret.userKey }} 42 | - name: POSTGRES_PASSWORD 43 | valueFrom: 44 | secretKeyRef: 45 | name: {{ .postgres.secret.name }} 46 | key: {{ .postgres.secret.passwordKey }} 47 | - name: POSTGRES_DB 48 | valueFrom: 49 | secretKeyRef: 50 | name: {{ .postgres.secret.name }} 51 | key: {{ .postgres.secret.dbKey }} 52 | - name: POSTGRES_SCHEMA 53 | value: {{ .postgres.schema }} 54 | 55 | - name: NETWORK 56 | value: {{ .network }} 57 | 58 | - name: LIST_SIZE_EACH_THREAD 59 | value: "5" 60 | - name: POOL_MAX_SIZE 61 | value: "12" 62 | - name: POOL_CORE_SIZE 63 | value: "10" 64 | - name: FLYWAY_ENABLE 65 | value: "true" 66 | - name: FLYWAY_VALIDATE 67 | value: "false" 68 | 69 | - name: REWARD_PARALLEL_SAVING_ENABLED 70 | value: "true" 71 | - name: REWARD_SUB_LIST_SIZE 72 | value: "500" 73 | - name: REWARD_PARALLEL_SAVING_THREAD_NUM 74 | value: "10" 75 | 76 | - name: EPOCH_STAKE_PARALLEL_SAVING_ENABLED 77 | value: "true" 78 | - name: EPOCH_STAKE_SUB_LIST_SIZE 79 | value: "500" 80 | - name: EPOCH_STAKE_PARALLEL_SAVING_THREAD_NUM 81 | value: "10" 82 | 83 | - name: REWARD_LIST_SIZE_EACH_THREAD 84 | value: "5" 85 | - name: EPOCH_STAKE_LIST_SIZE_EACH_THREAD 86 | value: "5" 87 | - name: POOL_INFO_LIST_SIZE_EACH_THREAD 88 | value: "500" 89 | 90 | - name: POOL_INFO_DATA_JOB_ENABLED 91 | value: "true" 92 | - name: FETCH_AND_SAVE_POOL_INFO_DATA_DELAY 93 | value: "3600000" 94 | - name: KOIOS_BASE_URL_ENABLED 95 | value: {{ .koios.baseUrlEnabled | default "false" | quote }} 96 | - name: KOIOS_BASE_URL 97 | value: {{ .koios.baseUrl }} 98 | 99 | ports: 100 | - name: api 101 | containerPort: {{ .port }} 102 | imagePullPolicy: Always 103 | imagePullSecrets: 104 | - name: regcred 105 | revisionHistoryLimit: 2 106 | {{ end }} 107 | {{ end }} 108 | -------------------------------------------------------------------------------- /charts/cf-explorer-infra/templates/kafka-statefulset.yaml: -------------------------------------------------------------------------------- 1 | {{ with .Values.kafka }} 2 | {{ if .enabled }} 3 | apiVersion: v1 4 | kind: Secret 5 | metadata: 6 | name: "kafka-secrets" 7 | type: Opaque 8 | data: 9 | # generate 32 chars long random string, base64 encode it and then double-quote the result string. 10 | KAFKA_BOOTSTRAP_SERVERS_TLS: {{ "kafka-explorer:9092" | b64enc | quote }} 11 | --- 12 | apiVersion: apps/v1 13 | kind: StatefulSet 14 | metadata: 15 | name: kafka-explorer 16 | spec: 17 | replicas: 1 18 | selector: 19 | matchLabels: 20 | app: kafka-explorer 21 | template: 22 | metadata: 23 | labels: 24 | app: kafka-explorer 25 | spec: 26 | initContainers: 27 | - name: init 28 | command: [ "sh", "-x", "/configmap/init.sh" ] 29 | image: alpine 30 | imagePullPolicy: "Always" 31 | volumeMounts: 32 | - mountPath: /var/lib/kafka/data 33 | name: kafka-explorer 34 | - mountPath: /configmap 35 | name: kafka-init 36 | containers: 37 | - name: kafka-explorer 38 | image: "{{ .image.repository }}:{{ .image.tag }}" 39 | env: 40 | - name: KAFKA_ZOOKEEPER_CONNECT 41 | value: "zookeeper-explorer:2181" 42 | - name: KAFKA_LISTENER_SECURITY_PROTOCOL_MAP 43 | value: "PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT" 44 | - name: KAFKA_INTER_BROKER_LISTENER_NAME 45 | value: "PLAINTEXT" 46 | - name: KAFKA_ADVERTISED_LISTENERS 47 | value: "PLAINTEXT://kafka-explorer:9092,PLAINTEXT_HOST://localhost:29092" 48 | - name: KAFKA_ADVERTISED_HOST_NAME 49 | value: "kafka-explorer" 50 | - name: KAFKA_BROKER_ID 51 | value: "1" 52 | - name: KAFKA_BROKER_RACK 53 | value: "r1" 54 | - name: KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR 55 | value: "1" 56 | - name: KAFKA_DELETE_TOPIC_ENABLE 57 | value: "true" 58 | - name: KAFKA_AUTO_CREATE_TOPICS_ENABLE 59 | value: "true" 60 | - name: KAFKA_SCHEMA_REGISTRY_URL 61 | value: "schemaregistry:8085" 62 | - name: KAFKA_JMX_PORT 63 | value: "9991" 64 | - name: KAFKA_LOG_RETENTION_BYTES 65 | value: "-1" 66 | - name: KAFKA_LOG_RETENTION_HOURS 67 | value: "-1" 68 | - name: KAFKA_LOG_RETENTION_CHECK_INTERVAL_MS 69 | value: "604800000" 70 | - name: KAFKA_MESSAGE_MAX_BYTES 71 | value: "200000000" 72 | - name: KAFKA_SOCKET_REQUEST_MAX_BYTES 73 | value: "200000000" 74 | ports: 75 | - name: api 76 | containerPort: {{ .port }} 77 | livenessProbe: 78 | exec: 79 | command: [ '/bin/bash', '-c', 'nc -z localhost 9092' ] 80 | failureThreshold: 6 81 | periodSeconds: 10 82 | startupProbe: 83 | exec: 84 | command: [ '/bin/bash', '-c', 'nc -z localhost 9092' ] 85 | failureThreshold: 3 86 | periodSeconds: 10 87 | initialDelaySeconds: 30 88 | volumeMounts: 89 | - mountPath: /var/lib/kafka/data 90 | name: kafka-explorer 91 | subPath: data 92 | - mountPath: /etc/kafka/secrets 93 | name: kafka-explorer 94 | subPath: secrets 95 | volumes: 96 | - name: kafka-init 97 | configMap: 98 | name: kafka-init 99 | securityContext: 100 | fsGroup: 1000 101 | volumeClaimTemplates: 102 | - metadata: 103 | name: "kafka-explorer" 104 | spec: 105 | accessModes: [ "ReadWriteOnce" ] 106 | resources: 107 | requests: 108 | storage: {{ .dbSize | default "8Gi" }} 109 | revisionHistoryLimit: 2 110 | {{ end }} 111 | {{ end }} 112 | -------------------------------------------------------------------------------- /charts/cf-explorer/templates/crawler-deployment.yaml: -------------------------------------------------------------------------------- 1 | {{ with .Values.crawler }} 2 | {{ if .enabled }} 3 | --- 4 | apiVersion: apps/v1 5 | kind: Deployment 6 | metadata: 7 | name: cf-ledger-crawler 8 | spec: 9 | replicas: {{ .replicas }} 10 | selector: 11 | matchLabels: 12 | app: cf-ledger-crawler 13 | template: 14 | metadata: 15 | labels: 16 | app: cf-ledger-crawler 17 | spec: 18 | containers: 19 | - name: cf-ledger-crawler 20 | image: "{{ .image.repository }}:{{ .image.tag }}" 21 | # command: ["bash", "-c", "sleep 999999"] 22 | env: 23 | - name: SPRING_PROFILES_ACTIVE 24 | value: {{ .springProfiles }} 25 | 26 | - name: PORT 27 | value: {{ .port | quote }} 28 | - name: BOOTSTRAP_SERVER 29 | valueFrom: 30 | secretKeyRef: 31 | name: {{ .kafka.bootstrapServersSecret.name }} 32 | key: {{ .kafka.bootstrapServersSecret.key }} 33 | - name: KAFKA_USE_SSL 34 | value: {{ .kafka.useSsl | default "false" | quote }} 35 | 36 | {{- if eq .redis.mode "sentinel" }} 37 | - name: REDIS_MASTER_NAME 38 | value: {{ .redis.master.name }} 39 | - name: REDIS_SENTINEL_HOST 40 | value: {{ .redis.sentinel.host }} 41 | - name: REDIS_SENTINEL_PASS 42 | valueFrom: 43 | secretKeyRef: 44 | name: {{ .redis.secret.name }} 45 | key: {{ .redis.secret.key }} 46 | {{- else if eq .redis.mode "cluster" }} 47 | - name: REDIS_CLUSTER_PASSWORD 48 | valueFrom: 49 | secretKeyRef: 50 | name: {{ .redis.cluster.secret.name }} 51 | key: {{ .redis.cluster.secret.passwordKey }} 52 | - name: NODE_ADDRESSES 53 | valueFrom: 54 | secretKeyRef: 55 | name: {{ .redis.cluster.secret.name }} 56 | key: {{ .redis.cluster.secret.endpointKey }} 57 | {{- else if eq .redis.mode "elasticache" }} 58 | - name: REDIS_STANDALONE_HOST 59 | valueFrom: 60 | secretKeyRef: 61 | name: {{ .redis.secret.name }} 62 | key: REDIS_ENDPOINT 63 | - name: REDIS_STANDALONE_PORT 64 | value: "6379" 65 | - name: REDIS_STANDALONE_PASSWORD 66 | valueFrom: 67 | secretKeyRef: 68 | name: {{ .redis.secret.name }} 69 | key: {{ .redis.secret.key }} 70 | {{- else if eq .redis.mode "managed-standalone" }} 71 | - name: REDIS_STANDALONE_HOST 72 | valueFrom: 73 | secretKeyRef: 74 | name: redis-secrets 75 | key: REDIS_HOST 76 | - name: REDIS_STANDALONE_PORT 77 | valueFrom: 78 | secretKeyRef: 79 | name: redis-secrets 80 | key: REDIS_PORT 81 | - name: REDIS_STANDALONE_PASSWORD 82 | valueFrom: 83 | secretKeyRef: 84 | name: {{ .redis.secret.name }} 85 | key: {{ .redis.secret.key }} 86 | - name: REDIS_USE_SSL 87 | value: {{ .redis.standalone.useSsl | default "false" | quote }} 88 | {{- else }} 89 | - name: REDIS_STANDALONE_HOST 90 | value: {{ .redis.standalone.host }} 91 | - name: REDIS_STANDALONE_PORT 92 | value: {{ .redis.standalone.port | quote }} 93 | - name: REDIS_STANDALONE_PASSWORD 94 | valueFrom: 95 | secretKeyRef: 96 | name: {{ .redis.secret.name }} 97 | key: {{ .redis.secret.key }} 98 | - name: REDIS_USE_SSL 99 | value: {{ .redis.standalone.useSsl | default "false" | quote }} 100 | {{- end }} 101 | 102 | - name: CRAWLER_NAME 103 | value: {{ .crawler.name }} 104 | - name: BLOCKS_TOPIC 105 | value: {{ .crawler.blocks.topic }} 106 | - name: BLOCKS_ROLLBACK_TOPIC 107 | value: {{ .crawler.blocks.rollbackTopic }} 108 | 109 | - name: NODE_ADDRESS 110 | value: {{ .cardano.node.address }} 111 | - name: NODE_PORT 112 | value: {{ .cardano.node.port | quote }} 113 | - name: NETWORK_MAGIC 114 | value: {{ .cardano.node.networkMagic | quote }} 115 | 116 | ports: 117 | - name: api 118 | containerPort: {{ .port }} 119 | imagePullPolicy: Always 120 | imagePullSecrets: 121 | - name: regcred 122 | revisionHistoryLimit: 2 123 | {{ end }} 124 | {{ end }} 125 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | We as members, contributors, and leaders pledge to make participation in our 6 | community a harassment-free experience for everyone, regardless of age, body 7 | size, visible or invisible disability, ethnicity, sex characteristics, gender 8 | identity and expression, level of experience, education, socio-economic status, 9 | nationality, personal appearance, race, religion, or sexual identity 10 | and orientation. 11 | 12 | We pledge to act and interact in ways that contribute to an open, welcoming, 13 | diverse, inclusive, and healthy community. 14 | 15 | ## Our Standards 16 | 17 | Examples of behavior that contribute to a positive environment for our 18 | community include: 19 | 20 | - Demonstrating empathy and kindness toward other people 21 | - Being respectful of differing opinions, viewpoints, and experiences 22 | - Giving and gracefully accepting constructive feedback 23 | - Accepting responsibility and apologizing to those affected by our mistakes, 24 | and learning from the experience 25 | - Focusing on what is best, not just for us as individuals, but for the 26 | overall community 27 | 28 | Examples of unacceptable behavior include: 29 | 30 | - The use of sexualized language or imagery, and sexual attention or 31 | advances of any kind 32 | - Trolling, insulting or derogatory comments, and personal or political attacks 33 | - Public or private harassment 34 | - Publishing others' private information, such as a physical or email 35 | address, without their explicit permission 36 | - Other conduct which could reasonably be considered inappropriate in a 37 | professional setting 38 | 39 | ## Enforcement Responsibilities 40 | 41 | Community leaders are responsible for clarifying and enforcing our standards of 42 | acceptable behavior and will take appropriate and fair corrective action in 43 | response to any behavior that they deem inappropriate, threatening, offensive, 44 | or harmful. 45 | 46 | Community leaders have the right and responsibility to remove, edit, or reject 47 | comments, commits, code, wiki edits, issues, and other contributions that are 48 | not aligned to this Code of Conduct, and will communicate reasons for moderation 49 | decisions when appropriate. 50 | 51 | ## Scope 52 | 53 | This Code of Conduct applies within all community spaces, and also applies when 54 | an individual is officially representing the community in public spaces. 55 | Examples of representing our community include using an official e-mail address, 56 | posting via an official social media account, or acting as an appointed 57 | representative at an online or offline event. 58 | 59 | ## Enforcement 60 | 61 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 62 | reported to the community leaders responsible for enforcement at 63 | info@cardanofoundation.org. 64 | All complaints will be reviewed and investigated promptly and fairly. 65 | 66 | All community leaders are obligated to respect the privacy and security of the 67 | reporter of any incident. 68 | 69 | ## Enforcement Guidelines 70 | 71 | Community leaders will follow these Community Impact Guidelines in determining 72 | the consequences for any action they deem in violation of this Code of Conduct: 73 | 74 | ### 1. Correction 75 | 76 | **Community Impact**: Use of inappropriate language or other behavior deemed 77 | unprofessional or unwelcome in the community. 78 | 79 | **Consequence**: A private, written warning from community leaders, providing 80 | clarity around the nature of the violation and an explanation of why the 81 | behavior was inappropriate. A public apology may be requested. 82 | 83 | ### 2. Warning 84 | 85 | **Community Impact**: A violation through a single incident or series 86 | of actions. 87 | 88 | **Consequence**: A warning with consequences for continued behavior. No 89 | interaction with the people involved, including unsolicited interaction with 90 | those enforcing the Code of Conduct, for a specified period of time. This 91 | includes avoiding interactions in community spaces as well as external channels 92 | like social media. Violating these terms may lead to a temporary or 93 | permanent ban. 94 | 95 | ### 3. Temporary Ban 96 | 97 | **Community Impact**: A serious violation of community standards, including 98 | sustained inappropriate behavior. 99 | 100 | **Consequence**: A temporary ban from any sort of interaction or public 101 | communication with the community for a specified period of time. No public or 102 | private interaction with the people involved, including unsolicited interaction 103 | with those enforcing the Code of Conduct, is allowed during this period. 104 | Violating these terms may lead to a permanent ban. 105 | 106 | ### 4. Permanent Ban 107 | 108 | **Community Impact**: Demonstrating a pattern of violation of community 109 | standards, including sustained inappropriate behavior, harassment of an 110 | individual, or aggression toward or disparagement of classes of individuals. 111 | 112 | **Consequence**: A permanent ban from any sort of public interaction within 113 | the community. 114 | 115 | ## Attribution 116 | 117 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], 118 | version 2.0, available at 119 | https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. 120 | 121 | Community Impact Guidelines were inspired by [Mozilla's code of conduct 122 | enforcement ladder](https://github.com/mozilla/diversity). 123 | 124 | [homepage]: https://www.contributor-covenant.org 125 | 126 | For answers to common questions about this code of conduct, see the FAQ at 127 | https://www.contributor-covenant.org/faq. Translations are available at 128 | https://www.contributor-covenant.org/translations. 129 | -------------------------------------------------------------------------------- /charts/cf-explorer/templates/explorer-authentication-deployment.yaml: -------------------------------------------------------------------------------- 1 | {{ with .Values.explorerAuthentication }} 2 | {{ if .enabled }} 3 | --- 4 | apiVersion: apps/v1 5 | kind: Deployment 6 | metadata: 7 | name: cf-explorer-authentication 8 | spec: 9 | replicas: {{ .replicas }} 10 | selector: 11 | matchLabels: 12 | app: cf-explorer-authentication 13 | template: 14 | metadata: 15 | labels: 16 | app: cf-explorer-authentication 17 | spec: 18 | containers: 19 | - name: cf-explorer-authentication 20 | image: "{{ .image.repository }}:{{ .image.tag }}" 21 | # command: ["bash", "-c", "sleep 999999"] 22 | env: 23 | - name: SPRING_PROFILES_ACTIVE 24 | value: {{ .springProfiles }} 25 | 26 | - name: DB_HOST 27 | valueFrom: 28 | secretKeyRef: 29 | name: {{ .postgres.secret.name }} 30 | key: {{ .postgres.secret.hostKey }} 31 | - name: DB_PORT 32 | valueFrom: 33 | secretKeyRef: 34 | name: {{ .postgres.secret.name }} 35 | key: {{ .postgres.secret.portKey }} 36 | - name: DB_USERNAME 37 | valueFrom: 38 | secretKeyRef: 39 | name: {{ .postgres.secret.name }} 40 | key: {{ .postgres.secret.userKey }} 41 | - name: DB_PASSWORD 42 | valueFrom: 43 | secretKeyRef: 44 | name: {{ .postgres.secret.name }} 45 | key: {{ .postgres.secret.passwordKey }} 46 | - name: DB_NAME 47 | valueFrom: 48 | secretKeyRef: 49 | name: {{ .postgres.secret.name }} 50 | key: {{ .postgres.secret.dbKey }} 51 | - name: DB_SCHEMA 52 | value: {{ .postgres.schema }} 53 | 54 | {{- if eq .redis.mode "sentinel" }} 55 | - name: REDIS_MASTER_NAME 56 | value: {{ .redis.master.name }} 57 | - name: REDIS_SENTINEL_HOST 58 | value: {{ .redis.sentinel.host }} 59 | - name: REDIS_SENTINEL_PASS 60 | valueFrom: 61 | secretKeyRef: 62 | name: {{ .redis.secret.name }} 63 | key: {{ .redis.secret.key }} 64 | {{- else if eq .redis.mode "cluster" }} 65 | - name: REDIS_CLUSTER_PASSWORD 66 | valueFrom: 67 | secretKeyRef: 68 | name: {{ .redis.cluster.secret.name }} 69 | key: {{ .redis.cluster.secret.passwordKey }} 70 | - name: NODE_ADDRESSES 71 | valueFrom: 72 | secretKeyRef: 73 | name: {{ .redis.cluster.secret.name }} 74 | key: {{ .redis.cluster.secret.endpointKey }} 75 | {{- else if eq .redis.mode "elasticache" }} 76 | - name: REDIS_STANDALONE_HOST 77 | valueFrom: 78 | secretKeyRef: 79 | name: {{ .redis.secret.name }} 80 | key: REDIS_ENDPOINT 81 | - name: REDIS_STANDALONE_PORT 82 | value: "6379" 83 | - name: REDIS_STANDALONE_PASSWORD 84 | valueFrom: 85 | secretKeyRef: 86 | name: {{ .redis.secret.name }} 87 | key: {{ .redis.secret.key }} 88 | {{- else if eq .redis.mode "managed-standalone" }} 89 | - name: REDIS_STANDALONE_HOST 90 | valueFrom: 91 | secretKeyRef: 92 | name: redis-secrets 93 | key: REDIS_HOST 94 | - name: REDIS_STANDALONE_PORT 95 | valueFrom: 96 | secretKeyRef: 97 | name: redis-secrets 98 | key: REDIS_PORT 99 | - name: REDIS_STANDALONE_PASSWORD 100 | valueFrom: 101 | secretKeyRef: 102 | name: {{ .redis.secret.name }} 103 | key: {{ .redis.secret.key }} 104 | - name: REDIS_USE_SSL 105 | value: {{ .redis.standalone.useSsl | default "false" | quote }} 106 | {{- else }} 107 | - name: REDIS_STANDALONE_HOST 108 | value: {{ .redis.standalone.host }} 109 | - name: REDIS_STANDALONE_PORT 110 | value: {{ .redis.standalone.port | quote }} 111 | - name: REDIS_STANDALONE_PASSWORD 112 | valueFrom: 113 | secretKeyRef: 114 | name: {{ .redis.secret.name }} 115 | key: {{ .redis.secret.key }} 116 | - name: REDIS_USE_SSL 117 | value: {{ .redis.standalone.useSsl | default "false" | quote }} 118 | {{- end }} 119 | 120 | - name: FLYWAY_ENABLED 121 | value: {{ .flywayEnabled | quote }} 122 | - name: SWAGGER_CLIENT_URL 123 | value: {{ tpl .swaggerClientUrl $ }} 124 | - name: SWAGGER_SERVER_URL 125 | value: {{ .swaggerServerUrl }} 126 | - name: AWS_REGION 127 | valueFrom: 128 | secretKeyRef: 129 | name: {{ .region.secret.name }} 130 | key: {{ .region.secret.key }} 131 | - name: SES_EMAIL_FROM 132 | value: {{ .emailFrom }} 133 | - name: SES_EMAIL_FROM_NAME 134 | value: {{ .emailFromName }} 135 | - name: SES_ACCESS_KEY_ID 136 | valueFrom: 137 | secretKeyRef: 138 | name: infra-secrets 139 | key: SES_ACCESS_KEY_ID 140 | - name: SES_SECRET_ACCESS_KEY 141 | valueFrom: 142 | secretKeyRef: 143 | name: infra-secrets 144 | key: SES_SECRET_ACCESS_KEY 145 | 146 | ports: 147 | - name: api 148 | containerPort: {{ .port }} 149 | imagePullPolicy: Always 150 | imagePullSecrets: 151 | - name: regcred 152 | revisionHistoryLimit: 2 153 | {{ end }} 154 | {{ end }} 155 | -------------------------------------------------------------------------------- /charts/grafana-dashboards/custom-dashboards/consumer-dashboard.json: -------------------------------------------------------------------------------- 1 | { 2 | "annotations": { 3 | "list": [ 4 | { 5 | "builtIn": 1, 6 | "datasource": { 7 | "type": "grafana", 8 | "uid": "-- Grafana --" 9 | }, 10 | "enable": true, 11 | "hide": true, 12 | "iconColor": "rgba(0, 211, 255, 1)", 13 | "name": "Annotations & Alerts", 14 | "target": { 15 | "limit": 100, 16 | "matchAny": false, 17 | "tags": [], 18 | "type": "dashboard" 19 | }, 20 | "type": "dashboard" 21 | } 22 | ] 23 | }, 24 | "editable": true, 25 | "fiscalYearStartMonth": 0, 26 | "graphTooltip": 0, 27 | "id": 28, 28 | "links": [], 29 | "liveNow": false, 30 | "panels": [ 31 | { 32 | "gridPos": { 33 | "h": 1, 34 | "w": 24, 35 | "x": 0, 36 | "y": 0 37 | }, 38 | "id": 2, 39 | "title": "Bird eye view", 40 | "type": "row" 41 | }, 42 | { 43 | "datasource": { 44 | "type": "prometheus", 45 | "uid": "prometheus" 46 | }, 47 | "fieldConfig": { 48 | "defaults": { 49 | "color": { 50 | "mode": "palette-classic" 51 | }, 52 | "custom": { 53 | "axisCenteredZero": false, 54 | "axisColorMode": "text", 55 | "axisLabel": "", 56 | "axisPlacement": "auto", 57 | "barAlignment": 0, 58 | "drawStyle": "line", 59 | "fillOpacity": 0, 60 | "gradientMode": "none", 61 | "hideFrom": { 62 | "legend": false, 63 | "tooltip": false, 64 | "viz": false 65 | }, 66 | "lineInterpolation": "linear", 67 | "lineWidth": 1, 68 | "pointSize": 5, 69 | "scaleDistribution": { 70 | "type": "linear" 71 | }, 72 | "showPoints": "auto", 73 | "spanNulls": false, 74 | "stacking": { 75 | "group": "A", 76 | "mode": "none" 77 | }, 78 | "thresholdsStyle": { 79 | "mode": "off" 80 | } 81 | }, 82 | "mappings": [], 83 | "thresholds": { 84 | "mode": "absolute", 85 | "steps": [ 86 | { 87 | "color": "green", 88 | "value": null 89 | }, 90 | { 91 | "color": "red", 92 | "value": 80 93 | } 94 | ] 95 | } 96 | }, 97 | "overrides": [] 98 | }, 99 | "gridPos": { 100 | "h": 8, 101 | "w": 12, 102 | "x": 0, 103 | "y": 1 104 | }, 105 | "id": 4, 106 | "options": { 107 | "legend": { 108 | "calcs": [], 109 | "displayMode": "list", 110 | "placement": "bottom", 111 | "showLegend": true 112 | }, 113 | "tooltip": { 114 | "mode": "single", 115 | "sort": "none" 116 | } 117 | }, 118 | "targets": [ 119 | { 120 | "datasource": { 121 | "type": "prometheus", 122 | "uid": "prometheus" 123 | }, 124 | "editorMode": "builder", 125 | "expr": "sum(rate(consumer_block_processing_count_total[1h]))", 126 | "legendFormat": "__auto", 127 | "range": true, 128 | "refId": "A" 129 | } 130 | ], 131 | "title": "Blocks per second", 132 | "type": "timeseries" 133 | }, 134 | { 135 | "datasource": { 136 | "type": "prometheus", 137 | "uid": "prometheus" 138 | }, 139 | "fieldConfig": { 140 | "defaults": { 141 | "color": { 142 | "mode": "palette-classic" 143 | }, 144 | "custom": { 145 | "axisCenteredZero": false, 146 | "axisColorMode": "text", 147 | "axisLabel": "", 148 | "axisPlacement": "auto", 149 | "barAlignment": 0, 150 | "drawStyle": "line", 151 | "fillOpacity": 0, 152 | "gradientMode": "none", 153 | "hideFrom": { 154 | "legend": false, 155 | "tooltip": false, 156 | "viz": false 157 | }, 158 | "lineInterpolation": "linear", 159 | "lineWidth": 1, 160 | "pointSize": 5, 161 | "scaleDistribution": { 162 | "type": "linear" 163 | }, 164 | "showPoints": "auto", 165 | "spanNulls": false, 166 | "stacking": { 167 | "group": "A", 168 | "mode": "none" 169 | }, 170 | "thresholdsStyle": { 171 | "mode": "off" 172 | } 173 | }, 174 | "mappings": [], 175 | "thresholds": { 176 | "mode": "absolute", 177 | "steps": [ 178 | { 179 | "color": "green", 180 | "value": null 181 | }, 182 | { 183 | "color": "red", 184 | "value": 80 185 | } 186 | ] 187 | } 188 | }, 189 | "overrides": [] 190 | }, 191 | "gridPos": { 192 | "h": 8, 193 | "w": 12, 194 | "x": 0, 195 | "y": 9 196 | }, 197 | "id": 6, 198 | "options": { 199 | "legend": { 200 | "calcs": [], 201 | "displayMode": "list", 202 | "placement": "bottom", 203 | "showLegend": true 204 | }, 205 | "tooltip": { 206 | "mode": "single", 207 | "sort": "none" 208 | } 209 | }, 210 | "targets": [ 211 | { 212 | "datasource": { 213 | "type": "prometheus", 214 | "uid": "prometheus" 215 | }, 216 | "editorMode": "builder", 217 | "expr": "sum by(epoch) (rate(consumer_era_and_epoch_processing_timer_seconds_count[10m]))", 218 | "legendFormat": "__auto", 219 | "range": true, 220 | "refId": "A" 221 | } 222 | ], 223 | "title": "Epoch Processing Time", 224 | "type": "timeseries" 225 | } 226 | ], 227 | "refresh": "1m", 228 | "schemaVersion": 37, 229 | "style": "dark", 230 | "tags": [], 231 | "templating": { 232 | "list": [] 233 | }, 234 | "time": { 235 | "from": "now-12h", 236 | "to": "now" 237 | }, 238 | "timepicker": {}, 239 | "timezone": "", 240 | "title": "Consumer Dashboard [Simple]", 241 | "uid": "q5jOHZrVz", 242 | "version": 1, 243 | "weekStart": "" 244 | } -------------------------------------------------------------------------------- /charts/cf-explorer/templates/consumer-deployment.yaml: -------------------------------------------------------------------------------- 1 | {{ with .Values.consumer }} 2 | {{ if .enabled }} 3 | --- 4 | apiVersion: apps/v1 5 | kind: Deployment 6 | metadata: 7 | name: cf-ledger-consumer 8 | spec: 9 | replicas: {{ .replicas }} 10 | selector: 11 | matchLabels: 12 | app: cf-ledger-consumer 13 | template: 14 | metadata: 15 | labels: 16 | app: cf-ledger-consumer 17 | spec: 18 | containers: 19 | - name: cf-ledger-consumer 20 | image: "{{ .image.repository }}:{{ .image.tag }}" 21 | # command: ["bash", "-c", "sleep 999999"] 22 | env: 23 | - name: SPRING_PROFILES_ACTIVE 24 | value: {{ .springProfiles }} 25 | 26 | - name: POSTGRES_HOST 27 | valueFrom: 28 | secretKeyRef: 29 | name: {{ .postgres.secret.name }} 30 | key: {{ .postgres.secret.hostKey }} 31 | - name: POSTGRES_PORT 32 | valueFrom: 33 | secretKeyRef: 34 | name: {{ .postgres.secret.name }} 35 | key: {{ .postgres.secret.portKey }} 36 | - name: POSTGRES_USER 37 | valueFrom: 38 | secretKeyRef: 39 | name: {{ .postgres.secret.name }} 40 | key: {{ .postgres.secret.userKey }} 41 | - name: POSTGRES_PASSWORD 42 | valueFrom: 43 | secretKeyRef: 44 | name: {{ .postgres.secret.name }} 45 | key: {{ .postgres.secret.passwordKey }} 46 | - name: POSTGRES_DB 47 | valueFrom: 48 | secretKeyRef: 49 | name: {{ .postgres.secret.name }} 50 | key: {{ .postgres.secret.dbKey }} 51 | - name: SCHEMA 52 | value: {{ .postgres.schema }} 53 | 54 | {{- if eq .redis.mode "sentinel" }} 55 | - name: REDIS_MASTER_NAME 56 | value: {{ .redis.master.name }} 57 | - name: REDIS_SENTINEL_HOST 58 | value: {{ .redis.sentinel.host }} 59 | - name: REDIS_SENTINEL_PASS 60 | valueFrom: 61 | secretKeyRef: 62 | name: {{ .redis.secret.name }} 63 | key: {{ .redis.secret.key }} 64 | {{- else if eq .redis.mode "cluster" }} 65 | - name: REDIS_CLUSTER_PASSWORD 66 | valueFrom: 67 | secretKeyRef: 68 | name: {{ .redis.cluster.secret.name }} 69 | key: {{ .redis.cluster.secret.passwordKey }} 70 | - name: REDIS_NODE_ADDRESSES 71 | valueFrom: 72 | secretKeyRef: 73 | name: {{ .redis.cluster.secret.name }} 74 | key: {{ .redis.cluster.secret.endpointKey }} 75 | {{- else if eq .redis.mode "elasticache" }} 76 | - name: REDIS_STANDALONE_HOST 77 | valueFrom: 78 | secretKeyRef: 79 | name: {{ .redis.secret.name }} 80 | key: REDIS_ENDPOINT 81 | - name: REDIS_STANDALONE_PORT 82 | value: "6379" 83 | - name: REDIS_STANDALONE_PASSWORD 84 | valueFrom: 85 | secretKeyRef: 86 | name: {{ .redis.secret.name }} 87 | key: {{ .redis.secret.key }} 88 | {{- else if eq .redis.mode "managed-standalone" }} 89 | - name: REDIS_STANDALONE_HOST 90 | valueFrom: 91 | secretKeyRef: 92 | name: redis-secrets 93 | key: REDIS_HOST 94 | - name: REDIS_STANDALONE_PORT 95 | valueFrom: 96 | secretKeyRef: 97 | name: redis-secrets 98 | key: REDIS_PORT 99 | - name: REDIS_STANDALONE_PASSWORD 100 | valueFrom: 101 | secretKeyRef: 102 | name: {{ .redis.secret.name }} 103 | key: {{ .redis.secret.key }} 104 | - name: REDIS_USE_SSL 105 | value: {{ .redis.standalone.useSsl | default "false" | quote }} 106 | {{- else }} 107 | - name: REDIS_STANDALONE_HOST 108 | value: {{ .redis.standalone.host }} 109 | - name: REDIS_STANDALONE_PORT 110 | value: {{ .redis.standalone.port | quote }} 111 | - name: REDIS_STANDALONE_PASSWORD 112 | valueFrom: 113 | secretKeyRef: 114 | name: {{ .redis.secret.name }} 115 | key: {{ .redis.secret.key }} 116 | - name: REDIS_USE_SSL 117 | value: {{ .redis.standalone.useSsl | default "false" | quote }} 118 | {{- end }} 119 | 120 | - name: JPA_SHOW_SQL 121 | value: {{ .jpa.showSql | default false | quote}} 122 | - name: FLYWAY_ENABLE 123 | value: "true" 124 | - name: FLYWAY_VALIDATE 125 | value: "false" 126 | 127 | - name: BOOTSTRAP_SERVERS 128 | valueFrom: 129 | secretKeyRef: 130 | name: {{ .kafka.bootstrapServersSecret.name }} 131 | key: {{ .kafka.bootstrapServersSecret.key }} 132 | - name: KAFKA_USE_SSL 133 | value: {{ .kafka.useSsl | default "false" | quote }} 134 | 135 | - name: BLOCKS_TOPIC 136 | value: {{ .crawler.blocks.topic }} 137 | 138 | - name: MAXIMUM_POOL_SIZE 139 | value: {{ .maximumPoolSize | quote }} 140 | - name: JDBC_BATCH_SIZE 141 | value: {{ .jdbcBatchSize | quote }} 142 | - name: BLOCKS_BATCH_SIZE 143 | value: {{ .blocksBatchSize | quote }} 144 | - name: LOG 145 | value: {{ .logLevel }} 146 | 147 | - name: SUBMIT_API_CONFIG_URL 148 | value: "/genesis/{{ .network }}/submit-api-config.json" 149 | - name: BYRON_GENESIS_URL 150 | value: "/genesis/{{ .network }}/byron-genesis.json" 151 | - name: SHELLEY_GENESIS_URL 152 | value: "/genesis/{{ .network }}/shelley-genesis.json" 153 | - name: ALONZO_GENESIS_URL 154 | value: "/genesis/{{ .network }}/alonzo-genesis.json" 155 | - name: CONWAY_GENESIS_URL 156 | value: "/genesis/{{ .network }}/conway-genesis.json" 157 | 158 | # To be deprecated 159 | - name: FILE_GENESIS_PATH 160 | value: /genesis/ 161 | # To be deprecated 162 | - name: FILE_GENESIS 163 | value: "{{ .network }}.genesis.json" 164 | - name: NETWORK 165 | value: {{ .networkMagic | quote }} 166 | 167 | ports: 168 | - name: api 169 | containerPort: {{ .port }} 170 | imagePullPolicy: Always 171 | imagePullSecrets: 172 | - name: regcred 173 | revisionHistoryLimit: 2 174 | {{ end }} 175 | {{ end }} 176 | -------------------------------------------------------------------------------- /charts/cf-explorer/templates/explorer-api-deployment.yaml: -------------------------------------------------------------------------------- 1 | {{ with .Values.explorerApi }} 2 | {{ if .enabled }} 3 | --- 4 | apiVersion: apps/v1 5 | kind: Deployment 6 | metadata: 7 | name: cf-explorer-api 8 | spec: 9 | replicas: {{ .replicas }} 10 | selector: 11 | matchLabels: 12 | app: cf-explorer-api 13 | template: 14 | metadata: 15 | labels: 16 | app: cf-explorer-api 17 | spec: 18 | containers: 19 | - name: cf-explorer-api 20 | image: "{{ .image.repository }}:{{ .image.tag }}" 21 | # command: ["bash", "-c", "sleep 999999"] 22 | env: 23 | - name: SPRING_PROFILES_ACTIVE 24 | value: {{ .springProfiles }} 25 | 26 | - name: DB_HOST 27 | valueFrom: 28 | secretKeyRef: 29 | name: {{ .postgres.secret.name }} 30 | key: {{ .postgres.secret.hostKey }} 31 | - name: DB_PORT 32 | valueFrom: 33 | secretKeyRef: 34 | name: {{ .postgres.secret.name }} 35 | key: {{ .postgres.secret.portKey }} 36 | - name: DB_USERNAME 37 | valueFrom: 38 | secretKeyRef: 39 | name: {{ .postgres.secret.name }} 40 | key: {{ .postgres.secret.userKey }} 41 | - name: DB_PASSWORD 42 | valueFrom: 43 | secretKeyRef: 44 | name: {{ .postgres.secret.name }} 45 | key: {{ .postgres.secret.passwordKey }} 46 | - name: DB_NAME 47 | valueFrom: 48 | secretKeyRef: 49 | name: {{ .postgres.secret.name }} 50 | key: {{ .postgres.secret.dbKey }} 51 | - name: DB_SCHEMA 52 | value: {{ .postgres.schema }} 53 | 54 | - name: KAFKA_BOOTSTRAP_SERVER 55 | valueFrom: 56 | secretKeyRef: 57 | name: {{ .kafka.bootstrapServersSecret.name }} 58 | key: {{ .kafka.bootstrapServersSecret.key }} 59 | - name: KAFKA_USE_SSL 60 | value: {{ .kafka.useSsl | default "false" | quote }} 61 | - name: KAFKA_REPORTS_TOPIC 62 | value: {{ .kafka.reportsTopic }} 63 | 64 | - name: API_CHECK_REWARD_URL 65 | value: "{{ .explorerRewardsUrl }}/api/v1/rewards/fetch" 66 | - name: API_CHECK_POOL_HISTORY_URL 67 | value: "{{ .explorerRewardsUrl }}/api/v1/pool-history/fetch" 68 | - name: API_CHECK_POOL_INFO_URL 69 | value: "{{ .explorerRewardsUrl }}/api/v1/pool-info/fetch" 70 | - name: API_CHECK_EPOCH_STAKE_URL 71 | value: "{{ .explorerRewardsUrl }}/api/v1/epoch-stake/fetch" 72 | - name: API_CHECK_ADA_POTS_URL 73 | value: "{{ .explorerRewardsUrl }}/api/v1/ada-pots/fetch" 74 | - name: API_CHECK_EPOCH_URL 75 | value: "{{ .explorerRewardsUrl }}/api/v1/epochs/fetch" 76 | 77 | - name: API_NEWS_URL 78 | value: "http://cardano-news-api?limit=%d&offset=%d" 79 | - name: API_NEWS_CACHE_TIME 80 | value: "120" 81 | 82 | - name: API_MARKET_URL 83 | value: "https://api.coingecko.com/api/v3/coins/markets?ids=cardano&vs_currency=%s" 84 | - name: API_MARKET_CACHE_TIME 85 | value: "120" 86 | - name: REPORT_LIMIT_PER_24HOURS 87 | value: "2" 88 | - name: EPOCH_DAYS 89 | value: {{ .epochDays | default 5 | quote }} 90 | 91 | {{- if eq .redis.mode "sentinel" }} 92 | - name: REDIS_MASTER_NAME 93 | value: {{ .redis.master.name }} 94 | - name: REDIS_SENTINEL_HOST 95 | value: {{ .redis.sentinel.host }} 96 | - name: REDIS_SENTINEL_PASS 97 | valueFrom: 98 | secretKeyRef: 99 | name: {{ .redis.secret.name }} 100 | key: {{ .redis.secret.key }} 101 | {{- else if eq .redis.mode "cluster" }} 102 | - name: REDIS_CLUSTER_PASSWORD 103 | valueFrom: 104 | secretKeyRef: 105 | name: {{ .redis.cluster.secret.name }} 106 | key: {{ .redis.cluster.secret.passwordKey }} 107 | - name: NODE_ADDRESSES 108 | valueFrom: 109 | secretKeyRef: 110 | name: {{ .redis.cluster.secret.name }} 111 | key: {{ .redis.cluster.secret.endpointKey }} 112 | {{- else if eq .redis.mode "elasticache" }} 113 | - name: REDIS_STANDALONE_HOST 114 | valueFrom: 115 | secretKeyRef: 116 | name: {{ .redis.secret.name }} 117 | key: REDIS_ENDPOINT 118 | - name: REDIS_STANDALONE_PORT 119 | value: "6379" 120 | - name: REDIS_STANDALONE_PASSWORD 121 | valueFrom: 122 | secretKeyRef: 123 | name: {{ .redis.secret.name }} 124 | key: {{ .redis.secret.key }} 125 | {{- else if eq .redis.mode "managed-standalone" }} 126 | - name: REDIS_STANDALONE_HOST 127 | valueFrom: 128 | secretKeyRef: 129 | name: redis-secrets 130 | key: REDIS_HOST 131 | - name: REDIS_STANDALONE_PORT 132 | valueFrom: 133 | secretKeyRef: 134 | name: redis-secrets 135 | key: REDIS_PORT 136 | - name: REDIS_STANDALONE_PASSWORD 137 | valueFrom: 138 | secretKeyRef: 139 | name: {{ .redis.secret.name }} 140 | key: {{ .redis.secret.key }} 141 | - name: REDIS_USE_SSL 142 | value: {{ .redis.standalone.useSsl | default "false" | quote }} 143 | {{- else }} 144 | - name: REDIS_STANDALONE_HOST 145 | value: {{ .redis.standalone.host }} 146 | - name: REDIS_STANDALONE_PORT 147 | value: {{ .redis.standalone.port | quote }} 148 | - name: REDIS_STANDALONE_PASSWORD 149 | valueFrom: 150 | secretKeyRef: 151 | name: {{ .redis.secret.name }} 152 | key: {{ .redis.secret.key }} 153 | - name: REDIS_USE_SSL 154 | value: {{ .redis.standalone.useSsl | default "false" | quote }} 155 | {{- end }} 156 | - name: S3_BUCKET_NAME 157 | valueFrom: 158 | secretKeyRef: 159 | name: {{ .s3.secret.name }} 160 | key: {{ .s3.secret.bucketNameKey }} 161 | - name: S3_REGION 162 | valueFrom: 163 | secretKeyRef: 164 | name: {{ .s3.secret.name }} 165 | key: {{ .s3.secret.regionKey }} 166 | - name: S3_STORAGE_ENDPOINT 167 | valueFrom: 168 | secretKeyRef: 169 | name: {{ .s3.secret.name }} 170 | key: {{ .s3.secret.endpointKey }} 171 | - name: S3_ACCESS_KEY 172 | valueFrom: 173 | secretKeyRef: 174 | name: {{ .s3.secret.name }} 175 | key: {{ .s3.secret.accessKeyKey }} 176 | - name: S3_SECRET_KEY 177 | valueFrom: 178 | secretKeyRef: 179 | name: {{ .s3.secret.name }} 180 | key: {{ .s3.secret.secretKeyKey }} 181 | - name: TOKEN_LOGO_ENDPOINT 182 | value: {{ .tokenLogoEndpoint }} 183 | 184 | ports: 185 | - name: api 186 | containerPort: {{ .port }} 187 | imagePullPolicy: Always 188 | imagePullSecrets: 189 | - name: regcred 190 | revisionHistoryLimit: 2 191 | {{ end }} 192 | {{ end }} 193 | -------------------------------------------------------------------------------- /charts/cf-explorer/templates/consumer-schedules-deployment.yaml: -------------------------------------------------------------------------------- 1 | {{ with .Values.consumerSchedules }} 2 | {{ if .enabled }} 3 | --- 4 | apiVersion: apps/v1 5 | kind: Deployment 6 | metadata: 7 | name: cf-ledger-consumer-schedules 8 | spec: 9 | replicas: {{ .replicas }} 10 | selector: 11 | matchLabels: 12 | app: cf-ledger-consumer-schedules 13 | template: 14 | metadata: 15 | labels: 16 | app: cf-ledger-consumer-schedules 17 | spec: 18 | containers: 19 | - name: cf-ledger-consumer-schedules 20 | image: "{{ .image.repository }}:{{ .image.tag }}" 21 | 22 | env: 23 | - name: SPRING_PROFILES_ACTIVE 24 | value: {{ .springProfiles }} 25 | - name: SERVER_PORT 26 | value: {{ .port | quote }} 27 | 28 | - name: POSTGRES_HOST 29 | valueFrom: 30 | secretKeyRef: 31 | name: {{ .postgres.secret.name }} 32 | key: {{ .postgres.secret.hostKey }} 33 | - name: POSTGRES_PORT 34 | valueFrom: 35 | secretKeyRef: 36 | name: {{ .postgres.secret.name }} 37 | key: {{ .postgres.secret.portKey }} 38 | - name: POSTGRES_USER 39 | valueFrom: 40 | secretKeyRef: 41 | name: {{ .postgres.secret.name }} 42 | key: {{ .postgres.secret.userKey }} 43 | - name: POSTGRES_PASSWORD 44 | valueFrom: 45 | secretKeyRef: 46 | name: {{ .postgres.secret.name }} 47 | key: {{ .postgres.secret.passwordKey }} 48 | - name: POSTGRES_DB 49 | valueFrom: 50 | secretKeyRef: 51 | name: {{ .postgres.secret.name }} 52 | key: {{ .postgres.secret.dbKey }} 53 | - name: POSTGRES_SCHEMA 54 | value: {{ .postgres.schema }} 55 | 56 | - name: MAXIMUM_POOL_SIZE 57 | value: "48" 58 | - name: META_DATA_JOB_ENABLED 59 | value: "true" 60 | - name: REPORT_HISTORY_JOB_ENABLED 61 | value: "true" 62 | - name: EXPIRED_REPORTS_RATE 63 | value: "604800000" 64 | 65 | - name: POOL_OFFLINE_DATA_JOB_ENABLED 66 | value: "true" 67 | - name: CRAWL_POOL_DATA_DELAY 68 | value: "172800000" 69 | - name: INSERT_POOL_DATA_DELAY 70 | value: "180000" 71 | - name: TOKEN_METDATA_URL 72 | value: https://github.com/cardano-foundation/cardano-token-registry.git 73 | - name: TOKEN_METADATA_FOLDER 74 | value: "/mappings" 75 | - name: NETWORK_NAME 76 | value: {{ .network }} 77 | 78 | - name: KAFKA_BOOSTRAP_SERVER_URL 79 | valueFrom: 80 | secretKeyRef: 81 | name: {{ .kafka.bootstrapServersSecret.name }} 82 | key: {{ .kafka.bootstrapServersSecret.key }} 83 | - name: KAFKA_USE_SSL 84 | value: {{ .kafka.useSsl | default "false" | quote }} 85 | - name: KAFKA_GROUP_ID 86 | value: {{ .network }} 87 | - name: KAFKA_REPORTS_TOPIC 88 | value: {{ .kafka.reportsTopic }} 89 | 90 | - name: API_CHECK_REWARD_URL 91 | value: {{ .checkRewardUrl }} 92 | - name: API_CHECK_POOL_HISTORY_URL 93 | value: {{ .checkPoolHistoryUrl }} 94 | 95 | - name: TOP_DELEGATORS_FIXED_DELAY 96 | value: "300000" 97 | - name: TOKEN_PAGE_CACHE_FIXED_DELAY 98 | value: "100000" 99 | - name: TOKEN_PAGE_CACHE_TTL 100 | value: "300000" 101 | - name: UNIQUE_ACCOUNT_FIXED_DELAY 102 | value: "300000" 103 | - name: UNIQUE_ACCOUNT_ENABLED 104 | value: "true" 105 | 106 | {{- if eq .redis.mode "sentinel" }} 107 | - name: REDIS_MASTER_NAME 108 | value: {{ .redis.master.name }} 109 | - name: REDIS_SENTINEL_HOST 110 | value: {{ .redis.sentinel.host }} 111 | - name: REDIS_SENTINEL_PASS 112 | valueFrom: 113 | secretKeyRef: 114 | name: {{ .redis.secret.name }} 115 | key: {{ .redis.secret.key }} 116 | {{- else if eq .redis.mode "cluster" }} 117 | - name: REDIS_CLUSTER_PASSWORD 118 | valueFrom: 119 | secretKeyRef: 120 | name: {{ .redis.cluster.secret.name }} 121 | key: {{ .redis.cluster.secret.passwordKey }} 122 | - name: NODE_ADDRESSES 123 | valueFrom: 124 | secretKeyRef: 125 | name: {{ .redis.cluster.secret.name }} 126 | key: {{ .redis.cluster.secret.endpointKey }} 127 | {{- else if eq .redis.mode "elasticache" }} 128 | - name: REDIS_STANDALONE_HOST 129 | valueFrom: 130 | secretKeyRef: 131 | name: {{ .redis.secret.name }} 132 | key: REDIS_ENDPOINT 133 | - name: REDIS_STANDALONE_PORT 134 | value: "6379" 135 | - name: REDIS_STANDALONE_PASSWORD 136 | valueFrom: 137 | secretKeyRef: 138 | name: {{ .redis.secret.name }} 139 | key: {{ .redis.secret.key }} 140 | {{- else if eq .redis.mode "managed-standalone" }} 141 | - name: REDIS_STANDALONE_HOST 142 | valueFrom: 143 | secretKeyRef: 144 | name: redis-secrets 145 | key: REDIS_HOST 146 | - name: REDIS_STANDALONE_PORT 147 | valueFrom: 148 | secretKeyRef: 149 | name: redis-secrets 150 | key: REDIS_PORT 151 | - name: REDIS_STANDALONE_PASSWORD 152 | valueFrom: 153 | secretKeyRef: 154 | name: {{ .redis.secret.name }} 155 | key: {{ .redis.secret.key }} 156 | - name: REDIS_USE_SSL 157 | value: {{ .redis.standalone.useSsl | default "false" | quote }} 158 | {{- else }} 159 | - name: REDIS_STANDALONE_HOST 160 | value: {{ .redis.standalone.host }} 161 | - name: REDIS_STANDALONE_PORT 162 | value: {{ .redis.standalone.port | quote }} 163 | - name: REDIS_STANDALONE_PASSWORD 164 | valueFrom: 165 | secretKeyRef: 166 | name: {{ .redis.secret.name }} 167 | key: {{ .redis.secret.key }} 168 | - name: REDIS_USE_SSL 169 | value: {{ .redis.standalone.useSsl | default "false" | quote }} 170 | {{- end }} 171 | 172 | - name: REPORT_S3_BUCKET_NAME 173 | valueFrom: 174 | secretKeyRef: 175 | name: {{ .s3.secret.name }} 176 | key: {{ .s3.secret.report.bucketNameKey }} 177 | - name: REPORT_S3_REGION 178 | valueFrom: 179 | secretKeyRef: 180 | name: {{ .s3.secret.name }} 181 | key: {{ .s3.secret.report.regionKey }} 182 | - name: REPORT_S3_STORAGE_ENDPOINT 183 | valueFrom: 184 | secretKeyRef: 185 | name: {{ .s3.secret.name }} 186 | key: {{ .s3.secret.report.endpointKey }} 187 | - name: REPORT_S3_ACCESS_KEY 188 | valueFrom: 189 | secretKeyRef: 190 | name: {{ .s3.secret.name }} 191 | key: {{ .s3.secret.report.accessKeyKey }} 192 | - name: REPORT_S3_SECRET_KEY 193 | valueFrom: 194 | secretKeyRef: 195 | name: {{ .s3.secret.name }} 196 | key: {{ .s3.secret.report.secretKeyKey }} 197 | 198 | - name: TOKEN_LOGO_S3_BUCKET_NAME 199 | valueFrom: 200 | secretKeyRef: 201 | name: {{ .s3.secret.name }} 202 | key: {{ .s3.secret.tokenLogo.bucketNameKey }} 203 | - name: TOKEN_LOGO_S3_REGION 204 | valueFrom: 205 | secretKeyRef: 206 | name: {{ .s3.secret.name }} 207 | key: {{ .s3.secret.tokenLogo.regionKey }} 208 | - name: TOKEN_LOGO_S3_STORAGE_ENDPOINT 209 | valueFrom: 210 | secretKeyRef: 211 | name: {{ .s3.secret.name }} 212 | key: {{ .s3.secret.tokenLogo.endpointKey }} 213 | - name: TOKEN_LOGO_S3_ACCESS_KEY 214 | valueFrom: 215 | secretKeyRef: 216 | name: {{ .s3.secret.name }} 217 | key: {{ .s3.secret.tokenLogo.accessKeyKey }} 218 | - name: TOKEN_LOGO_S3_SECRET_KEY 219 | valueFrom: 220 | secretKeyRef: 221 | name: {{ .s3.secret.name }} 222 | key: {{ .s3.secret.tokenLogo.secretKeyKey }} 223 | - name: TOKEN_LOGO_ENDPOINT 224 | value: {{ .tokenLogoEndpoint }} 225 | 226 | 227 | ports: 228 | - name: api 229 | containerPort: {{ .port }} 230 | 231 | imagePullSecrets: 232 | - name: regcred 233 | revisionHistoryLimit: 2 234 | {{ end }} 235 | {{ end }} 236 | -------------------------------------------------------------------------------- /charts/cf-explorer/values.yaml: -------------------------------------------------------------------------------- 1 | crawler: 2 | enabled: true 3 | replicas: 1 4 | 5 | image: 6 | repository: "pro.registry.gitlab.metadata.dev.cf-deployments.org/base-infrastructure/docker-registry/cf-ledger-crawler" 7 | tag: "0.2.6" 8 | 9 | springProfiles: n2n,standalone,kafka 10 | 11 | port: 8080 12 | 13 | monitoringEnabled: false 14 | 15 | kafka: 16 | useSsl: "false" 17 | bootstrapServersSecret: 18 | name: kafka-secrets 19 | key: KAFKA_BOOTSTRAP_SERVERS_TLS 20 | 21 | redis: 22 | ## Redis Standalone Values Example 23 | mode: standalone 24 | secret: 25 | name: redis-secrets 26 | key: REDIS_MASTER_PASSWORD 27 | standalone: 28 | host: redis-headless 29 | port: 6379 30 | 31 | ## Redis Cluster Values Example 32 | # mode: cluster 33 | # secretName: cf-explorer-infra-redis-cluster 34 | # cluster: 35 | # hosts: cf-explorer-infra-redis-cluster-headless:6379 36 | 37 | master: 38 | name: mymaster 39 | sentinel: 40 | host: cf-explorer-redis-headless 41 | 42 | crawler: 43 | name: dev-crawler 44 | blocks: 45 | topic: local.crawler.blocks 46 | rollbackTopic: local.crawler.rollback-blocks 47 | 48 | 49 | 50 | cardano: 51 | node: 52 | networkMagic: "764824073" 53 | address: relays-new.cardano-mainnet.iohk.io 54 | port: 3001 55 | 56 | consumer: 57 | enabled: true 58 | replicas: 1 59 | 60 | image: 61 | repository: "pro.registry.gitlab.metadata.dev.cf-deployments.org/base-infrastructure/docker-registry/cf-ledger-consumer" 62 | tag: "0.2.13" 63 | 64 | springProfiles: aws, redis-standalone, caching 65 | 66 | port: 8080 67 | 68 | monitoringEnabled: false 69 | 70 | redis: 71 | ## Redis Standalone Values Example 72 | mode: standalone 73 | secret: 74 | name: redis-secrets 75 | key: REDIS_MASTER_PASSWORD 76 | standalone: 77 | host: redis-headless 78 | port: 6379 79 | 80 | postgres: 81 | schema: mainnet 82 | secret: 83 | name: postgres-secrets 84 | userKey: POSTGRES_USER 85 | hostKey: POSTGRES_HOST 86 | portKey: POSTGRES_PORT 87 | dbKey: POSTGRES_DB 88 | passwordKey: POSTGRES_PASSWORD 89 | 90 | jpa: 91 | showSql: false 92 | 93 | kafka: 94 | useSsl: "false" 95 | bootstrapServersSecret: 96 | name: kafka-secrets 97 | key: KAFKA_BOOTSTRAP_SERVERS_TLS 98 | 99 | crawler: 100 | blocks: 101 | topic: local.crawler.blocks 102 | 103 | maximumPoolSize: 64 104 | jdbcBatchSize: 500 105 | blocksBatchSize: 1000 106 | logLevel: debug 107 | network: mainnet 108 | networkMagic: "764824073" 109 | 110 | explorerApi: 111 | enabled: true 112 | replicas: 1 113 | 114 | image: 115 | repository: "pro.registry.gitlab.metadata.dev.cf-deployments.org/base-infrastructure/docker-registry/cf-explorer-api" 116 | tag: "0.3.9" 117 | 118 | springProfiles: dev,standalone,koios,s3 119 | 120 | port: 8080 121 | 122 | monitoringEnabled: false 123 | 124 | service: 125 | type: ClusterIP 126 | # nodePort: "30092" 127 | 128 | redis: 129 | ## Redis Standalone Values Example 130 | mode: standalone 131 | secret: 132 | name: redis-secrets 133 | key: REDIS_MASTER_PASSWORD 134 | standalone: 135 | host: redis-headless 136 | port: 6379 137 | 138 | kafka: 139 | useSsl: "false" 140 | bootstrapServersSecret: 141 | name: kafka-secrets 142 | key: KAFKA_BOOTSTRAP_SERVERS_TLS 143 | reportsTopic: dev.explorer.api.reports 144 | 145 | ## Redis Cluster Values Example 146 | # mode: cluster 147 | # secretName: cf-explorer-infra-redis-cluster 148 | # cluster: 149 | # hosts: cf-explorer-infra-redis-cluster-headless:6379 150 | 151 | explorerRewardsUrl: http://cf-explorer-rewards-api 152 | 153 | postgres: 154 | schema: mainnet 155 | secret: 156 | name: postgres-secrets 157 | userKey: POSTGRES_USER 158 | hostKey: POSTGRES_HOST 159 | portKey: POSTGRES_PORT 160 | dbKey: POSTGRES_DB 161 | passwordKey: POSTGRES_PASSWORD 162 | 163 | s3: 164 | secret: 165 | name: infra-secrets 166 | accessKeyKey: REPORT_S3_ACCESS_KEY 167 | secretKeyKey: REPORT_S3_SECRET_KEY 168 | bucketNameKey: REPORT_S3_BUCKET_NAME 169 | regionKey: REPORT_S3_REGION 170 | endpointKey: REPORT_S3_STORAGE_ENDPOINT 171 | 172 | tokenLogoEndpoint: https://dev-cf-explorer-token-logos.s3.eu-west-1.amazonaws.com/ 173 | 174 | explorerRewardsApi: 175 | enabled: true 176 | replicas: 1 177 | 178 | image: 179 | repository: "pro.registry.gitlab.metadata.dev.cf-deployments.org/base-infrastructure/docker-registry/cf-explorer-rewards" 180 | tag: "0.1.1-SNAPSHOT" 181 | 182 | springProfiles: dev,koios 183 | 184 | port: 8080 185 | 186 | monitoringEnabled: false 187 | 188 | service: 189 | type: ClusterIP 190 | # nodePort: "30092" 191 | 192 | postgres: 193 | schema: mainnet 194 | secret: 195 | name: postgres-secrets 196 | userKey: POSTGRES_USER 197 | hostKey: POSTGRES_HOST 198 | portKey: POSTGRES_PORT 199 | dbKey: POSTGRES_DB 200 | passwordKey: POSTGRES_PASSWORD 201 | 202 | network: mainnet 203 | 204 | koios: 205 | baseUrlEnabled: false 206 | baseUrl: "" 207 | 208 | explorerAuthentication: 209 | enabled: true 210 | replicas: 1 211 | 212 | image: 213 | repository: "pro.registry.gitlab.metadata.dev.cf-deployments.org/base-infrastructure/docker-registry/cf-explorer-authentication" 214 | tag: "v0.1.1-7-g2e0c779" 215 | 216 | springProfiles: dev, standalone, ses 217 | 218 | port: 8080 219 | 220 | monitoringEnabled: false 221 | 222 | service: 223 | type: ClusterIP 224 | # nodePort: "30092" 225 | 226 | redis: 227 | ## Redis Standalone Values Example 228 | mode: standalone 229 | secret: 230 | name: redis-secrets 231 | key: REDIS_MASTER_PASSWORD 232 | standalone: 233 | host: redis-headless 234 | port: 6379 235 | 236 | postgres: 237 | schema: mainnet-auth 238 | secret: 239 | name: postgres-secrets 240 | userKey: POSTGRES_USER 241 | hostKey: POSTGRES_HOST 242 | portKey: POSTGRES_PORT 243 | dbKey: POSTGRES_DB 244 | passwordKey: POSTGRES_PASSWORD 245 | 246 | region: 247 | secret: 248 | name: infra-secrets 249 | key: AWS_REGION 250 | 251 | flywayEnabled: true 252 | swaggerClientUrl: https://{{ .Values.domain }}/en 253 | swaggerServerUrl: http://localhost:8021 254 | emailFrom: admin@metadata.dev.cf-deployments.org 255 | emailFromName: Cardano Foundation 256 | 257 | explorerFrontEnd: 258 | enabled: true 259 | replicas: 1 260 | 261 | image: 262 | repository: "pro.registry.gitlab.metadata.dev.cf-deployments.org/base-infrastructure/docker-registry/cf-explorer-frontend" 263 | tag: "0.3.2" 264 | 265 | reactAppApiUrl: "https://api.{{ .Values.domain }}/api/v1" 266 | reactAppPreProdAppUrl: "https://{{ .Values.network }}.{{ .Values.domain }}" 267 | reactAppPreviewAppUrl: "https://{{ .Values.network }}.{{ .Values.domain }}" 268 | reactAppMainnetAppUrl: "https://{{ .Values.domain }}" 269 | reactAppAuthUrl: "https://auth-api.{{ .Values.domain }}/api/v1" 270 | reactAppNetwork: "{{ .Values.network }}" 271 | reactAppCardanoNewsUrl: "https://cardanofoundation.org/en/news/" 272 | 273 | port: 80 274 | 275 | service: 276 | type: ClusterIP 277 | # nodePort: "30092" 278 | 279 | jira: 280 | widget: 281 | secretName: infra-secrets 282 | secretKey: REACT_APP_JSD_WIDGET_KEY 283 | 284 | consumerSchedules: 285 | enabled: true 286 | replicas: 1 287 | 288 | image: 289 | repository: "pro.registry.gitlab.metadata.dev.cf-deployments.org/base-infrastructure/docker-registry/cf-ledger-consumer-schedules" 290 | tag: "0.2.2" 291 | 292 | springProfiles: dev,standalone,koios,s3 293 | 294 | port: 8080 295 | 296 | monitoringEnabled: false 297 | 298 | postgres: 299 | schema: mainnet 300 | secret: 301 | name: postgres-secrets 302 | userKey: POSTGRES_USER 303 | hostKey: POSTGRES_HOST 304 | portKey: POSTGRES_PORT 305 | dbKey: POSTGRES_DB 306 | passwordKey: POSTGRES_PASSWORD 307 | 308 | kafka: 309 | useSsl: "false" 310 | bootstrapServersSecret: 311 | name: kafka-secrets 312 | key: KAFKA_BOOTSTRAP_SERVERS_TLS 313 | reportsTopic: dev.explorer.api.reports 314 | 315 | redis: 316 | ## Redis Standalone Values Example 317 | mode: standalone 318 | secret: 319 | name: redis-secrets 320 | key: REDIS_MASTER_PASSWORD 321 | standalone: 322 | host: redis-headless 323 | port: 6379 324 | 325 | s3: 326 | secret: 327 | name: infra-secrets 328 | report: 329 | accessKeyKey: REPORT_S3_ACCESS_KEY 330 | secretKeyKey: REPORT_S3_SECRET_KEY 331 | bucketNameKey: REPORT_S3_BUCKET_NAME 332 | regionKey: REPORT_S3_REGION 333 | endpointKey: REPORT_S3_STORAGE_ENDPOINT 334 | tokenLogo: 335 | accessKeyKey: TOKEN_LOGO_S3_ACCESS_KEY 336 | secretKeyKey: TOKEN_LOGO_S3_SECRET_KEY 337 | bucketNameKey: TOKEN_LOGO_S3_BUCKET_NAME 338 | regionKey: TOKEN_LOGO_S3_REGION 339 | endpointKey: TOKEN_LOGO_S3_STORAGE_ENDPOINT 340 | 341 | checkRewardUrl: http://cf-explorer-rewards-api/api/v1/rewards/fetch 342 | checkPoolHistoryUrl: http://cf-explorer-rewards-api/api/v1/pool-history/fetch 343 | 344 | network: mainnet 345 | 346 | tokenLogoEndpoint: https://dev-cf-explorer-token-logos.s3.eu-west-1.amazonaws.com/ 347 | 348 | cardanoNewsApi: 349 | enabled: true 350 | replicas: 1 351 | 352 | image: 353 | repository: "pro.registry.gitlab.metadata.dev.cf-deployments.org/base-infrastructure/docker-registry/cardano-news-api" 354 | tag: "0.2.1" 355 | 356 | port: 8080 357 | 358 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright 2022 Cardano Foundation, Zug, Switzerland 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /charts/grafana-dashboards/custom-dashboards/cf-crawler.json: -------------------------------------------------------------------------------- 1 | { 2 | "annotations": { 3 | "list": [ 4 | { 5 | "builtIn": 1, 6 | "datasource": { 7 | "type": "grafana", 8 | "uid": "-- Grafana --" 9 | }, 10 | "enable": true, 11 | "hide": true, 12 | "iconColor": "rgba(0, 211, 255, 1)", 13 | "name": "Annotations & Alerts", 14 | "type": "dashboard" 15 | } 16 | ] 17 | }, 18 | "editable": true, 19 | "fiscalYearStartMonth": 0, 20 | "graphTooltip": 0, 21 | "id": 1, 22 | "links": [], 23 | "liveNow": false, 24 | "panels": [ 25 | { 26 | "colorBackground": false, 27 | "colorPostfix": false, 28 | "colorValue": true, 29 | "colors": [ 30 | "#299c46", 31 | "rgba(237, 129, 40, 0.89)", 32 | "#d44a3a" 33 | ], 34 | "datasource": { 35 | "type": "prometheus", 36 | "uid": "prometheus" 37 | }, 38 | "format": "none", 39 | "gauge": { 40 | "maxValue": 100, 41 | "minValue": 0, 42 | "show": false, 43 | "thresholdLabels": false, 44 | "thresholdMarkers": true 45 | }, 46 | "gridPos": { 47 | "h": 7, 48 | "w": 6, 49 | "x": 0, 50 | "y": 0 51 | }, 52 | "id": 9, 53 | "links": [], 54 | "mappingType": 1, 55 | "mappingTypes": [ 56 | { 57 | "name": "value to text", 58 | "value": 1 59 | }, 60 | { 61 | "name": "range to text", 62 | "value": 2 63 | } 64 | ], 65 | "maxDataPoints": 100, 66 | "nullPointMode": "connected", 67 | "postfix": "", 68 | "postfixFontSize": "50%", 69 | "prefix": "", 70 | "prefixFontSize": "50%", 71 | "rangeMaps": [ 72 | { 73 | "from": "null", 74 | "text": "N/A", 75 | "to": "null" 76 | } 77 | ], 78 | "sparkline": { 79 | "fillColor": "rgba(31, 118, 189, 0.18)", 80 | "full": false, 81 | "lineColor": "rgb(31, 120, 193)", 82 | "show": false 83 | }, 84 | "tableColumn": "", 85 | "targets": [ 86 | { 87 | "datasource": { 88 | "type": "prometheus", 89 | "uid": "prometheus" 90 | }, 91 | "editorMode": "code", 92 | "expr": "crawler_current_block_number", 93 | "legendFormat": "__auto", 94 | "range": true, 95 | "refId": "A" 96 | } 97 | ], 98 | "thresholds": "", 99 | "title": "Current Block Number", 100 | "type": "grafana-singlestat-panel", 101 | "valueFontSize": "100%", 102 | "valueMaps": [ 103 | { 104 | "op": "=", 105 | "text": "N/A", 106 | "value": "null" 107 | } 108 | ], 109 | "valueName": "current" 110 | }, 111 | { 112 | "colorBackground": false, 113 | "colorValue": true, 114 | "colors": [ 115 | "#299c46", 116 | "rgba(237, 129, 40, 0.89)", 117 | "#d44a3a" 118 | ], 119 | "datasource": { 120 | "type": "prometheus", 121 | "uid": "prometheus" 122 | }, 123 | "format": "none", 124 | "gauge": { 125 | "maxValue": 100, 126 | "minValue": 0, 127 | "show": false, 128 | "thresholdLabels": false, 129 | "thresholdMarkers": true 130 | }, 131 | "gridPos": { 132 | "h": 7, 133 | "w": 6, 134 | "x": 6, 135 | "y": 0 136 | }, 137 | "id": 10, 138 | "links": [], 139 | "mappingType": 1, 140 | "mappingTypes": [ 141 | { 142 | "$$hashKey": "object:152", 143 | "name": "value to text", 144 | "value": 1 145 | }, 146 | { 147 | "$$hashKey": "object:153", 148 | "name": "range to text", 149 | "value": 2 150 | } 151 | ], 152 | "maxDataPoints": 100, 153 | "nullPointMode": "connected", 154 | "pluginVersion": "9.5.3", 155 | "postfix": "", 156 | "postfixFontSize": "50%", 157 | "prefix": "", 158 | "prefixFontSize": "50%", 159 | "rangeMaps": [ 160 | { 161 | "from": "null", 162 | "text": "N/A", 163 | "to": "null" 164 | } 165 | ], 166 | "sparkline": { 167 | "fillColor": "rgba(31, 118, 189, 0.18)", 168 | "full": false, 169 | "lineColor": "rgb(31, 120, 193)", 170 | "show": false 171 | }, 172 | "tableColumn": "", 173 | "targets": [ 174 | { 175 | "datasource": { 176 | "type": "prometheus", 177 | "uid": "prometheus" 178 | }, 179 | "editorMode": "code", 180 | "expr": "crawler_current_era", 181 | "legendFormat": "__auto", 182 | "range": true, 183 | "refId": "A" 184 | } 185 | ], 186 | "thresholds": "", 187 | "title": "Current Block ERA", 188 | "type": "grafana-singlestat-panel", 189 | "valueFontSize": "100%", 190 | "valueMaps": [ 191 | { 192 | "$$hashKey": "object:155", 193 | "op": "=", 194 | "text": "BYRON", 195 | "value": "1" 196 | }, 197 | { 198 | "$$hashKey": "object:157", 199 | "op": "=", 200 | "text": "SHELLEY", 201 | "value": "2" 202 | }, 203 | { 204 | "$$hashKey": "object:159", 205 | "op": "=", 206 | "text": "ALLEGRA", 207 | "value": "3" 208 | }, 209 | { 210 | "$$hashKey": "object:161", 211 | "op": "=", 212 | "text": "MARY", 213 | "value": "4" 214 | }, 215 | { 216 | "$$hashKey": "object:163", 217 | "op": "=", 218 | "text": "ALONZO", 219 | "value": "5" 220 | }, 221 | { 222 | "$$hashKey": "object:165", 223 | "op": "=", 224 | "text": "BABBAGE", 225 | "value": "6" 226 | } 227 | ], 228 | "valueName": "current" 229 | }, 230 | { 231 | "datasource": { 232 | "type": "prometheus", 233 | "uid": "prometheus" 234 | }, 235 | "fieldConfig": { 236 | "defaults": { 237 | "color": { 238 | "mode": "thresholds" 239 | }, 240 | "mappings": [], 241 | "max": 100, 242 | "min": -1, 243 | "thresholds": { 244 | "mode": "absolute", 245 | "steps": [ 246 | { 247 | "color": "green", 248 | "value": null 249 | } 250 | ] 251 | }, 252 | "unit": "percent" 253 | }, 254 | "overrides": [] 255 | }, 256 | "gridPos": { 257 | "h": 7, 258 | "w": 6, 259 | "x": 12, 260 | "y": 0 261 | }, 262 | "id": 4, 263 | "options": { 264 | "orientation": "auto", 265 | "reduceOptions": { 266 | "calcs": [ 267 | "lastNotNull" 268 | ], 269 | "fields": "", 270 | "values": false 271 | }, 272 | "showThresholdLabels": false, 273 | "showThresholdMarkers": true 274 | }, 275 | "pluginVersion": "9.5.3", 276 | "targets": [ 277 | { 278 | "datasource": { 279 | "type": "prometheus", 280 | "uid": "prometheus" 281 | }, 282 | "editorMode": "code", 283 | "expr": "crawler_network_sync_percent", 284 | "legendFormat": "__auto", 285 | "range": true, 286 | "refId": "A" 287 | } 288 | ], 289 | "title": "Network Sync Percent", 290 | "type": "gauge" 291 | }, 292 | { 293 | "datasource": { 294 | "type": "prometheus", 295 | "uid": "prometheus" 296 | }, 297 | "fieldConfig": { 298 | "defaults": { 299 | "color": { 300 | "mode": "thresholds" 301 | }, 302 | "mappings": [], 303 | "thresholds": { 304 | "mode": "absolute", 305 | "steps": [ 306 | { 307 | "color": "green", 308 | "value": null 309 | } 310 | ] 311 | } 312 | }, 313 | "overrides": [] 314 | }, 315 | "gridPos": { 316 | "h": 7, 317 | "w": 6, 318 | "x": 18, 319 | "y": 0 320 | }, 321 | "id": 5, 322 | "options": { 323 | "orientation": "auto", 324 | "reduceOptions": { 325 | "calcs": [ 326 | "lastNotNull" 327 | ], 328 | "fields": "", 329 | "values": false 330 | }, 331 | "showThresholdLabels": false, 332 | "showThresholdMarkers": true 333 | }, 334 | "pluginVersion": "9.5.3", 335 | "targets": [ 336 | { 337 | "datasource": { 338 | "type": "prometheus", 339 | "uid": "prometheus" 340 | }, 341 | "editorMode": "code", 342 | "expr": "crawler_count_rollback_total", 343 | "legendFormat": "__auto", 344 | "range": true, 345 | "refId": "A" 346 | } 347 | ], 348 | "title": "Number of rollbacks", 349 | "type": "gauge" 350 | }, 351 | { 352 | "datasource": { 353 | "type": "prometheus", 354 | "uid": "prometheus" 355 | }, 356 | "fieldConfig": { 357 | "defaults": { 358 | "color": { 359 | "mode": "thresholds" 360 | }, 361 | "mappings": [], 362 | "thresholds": { 363 | "mode": "absolute", 364 | "steps": [ 365 | { 366 | "color": "green", 367 | "value": null 368 | } 369 | ] 370 | }, 371 | "unit": "s" 372 | }, 373 | "overrides": [] 374 | }, 375 | "gridPos": { 376 | "h": 8, 377 | "w": 8, 378 | "x": 0, 379 | "y": 7 380 | }, 381 | "id": 7, 382 | "options": { 383 | "displayMode": "gradient", 384 | "minVizHeight": 10, 385 | "minVizWidth": 0, 386 | "orientation": "horizontal", 387 | "reduceOptions": { 388 | "calcs": [ 389 | "lastNotNull" 390 | ], 391 | "fields": "", 392 | "values": false 393 | }, 394 | "showUnfilled": true, 395 | "valueMode": "color" 396 | }, 397 | "pluginVersion": "9.5.3", 398 | "targets": [ 399 | { 400 | "datasource": { 401 | "type": "prometheus", 402 | "uid": "prometheus" 403 | }, 404 | "editorMode": "code", 405 | "expr": "sum(crawler_block_processing_timer_seconds_sum) by (era)", 406 | "legendFormat": "{{era}}", 407 | "range": true, 408 | "refId": "A" 409 | } 410 | ], 411 | "title": "ERA processing time", 412 | "type": "bargauge" 413 | }, 414 | { 415 | "datasource": { 416 | "type": "prometheus", 417 | "uid": "prometheus" 418 | }, 419 | "fieldConfig": { 420 | "defaults": { 421 | "color": { 422 | "mode": "palette-classic" 423 | }, 424 | "custom": { 425 | "axisCenteredZero": false, 426 | "axisColorMode": "text", 427 | "axisLabel": "", 428 | "axisPlacement": "auto", 429 | "barAlignment": 0, 430 | "drawStyle": "line", 431 | "fillOpacity": 0, 432 | "gradientMode": "none", 433 | "hideFrom": { 434 | "legend": false, 435 | "tooltip": false, 436 | "viz": false 437 | }, 438 | "lineInterpolation": "linear", 439 | "lineWidth": 1, 440 | "pointSize": 5, 441 | "scaleDistribution": { 442 | "type": "linear" 443 | }, 444 | "showPoints": "auto", 445 | "spanNulls": false, 446 | "stacking": { 447 | "group": "A", 448 | "mode": "none" 449 | }, 450 | "thresholdsStyle": { 451 | "mode": "off" 452 | } 453 | }, 454 | "mappings": [], 455 | "thresholds": { 456 | "mode": "absolute", 457 | "steps": [ 458 | { 459 | "color": "green", 460 | "value": null 461 | }, 462 | { 463 | "color": "red", 464 | "value": 80 465 | } 466 | ] 467 | } 468 | }, 469 | "overrides": [] 470 | }, 471 | "gridPos": { 472 | "h": 8, 473 | "w": 8, 474 | "x": 8, 475 | "y": 7 476 | }, 477 | "id": 3, 478 | "options": { 479 | "legend": { 480 | "calcs": [], 481 | "displayMode": "list", 482 | "placement": "bottom", 483 | "showLegend": true 484 | }, 485 | "tooltip": { 486 | "mode": "single", 487 | "sort": "none" 488 | } 489 | }, 490 | "targets": [ 491 | { 492 | "datasource": { 493 | "type": "prometheus", 494 | "uid": "prometheus" 495 | }, 496 | "editorMode": "code", 497 | "expr": "sum(crawler_block_processing_timer_seconds_sum)/sum(crawler_block_processing_timer_seconds_count)", 498 | "legendFormat": "AVG processing time each block", 499 | "range": true, 500 | "refId": "A" 501 | } 502 | ], 503 | "title": "AVG processing time each block", 504 | "type": "timeseries" 505 | }, 506 | { 507 | "datasource": { 508 | "type": "prometheus", 509 | "uid": "prometheus" 510 | }, 511 | "fieldConfig": { 512 | "defaults": { 513 | "color": { 514 | "mode": "palette-classic" 515 | }, 516 | "custom": { 517 | "axisCenteredZero": false, 518 | "axisColorMode": "text", 519 | "axisLabel": "", 520 | "axisPlacement": "auto", 521 | "barAlignment": 0, 522 | "drawStyle": "line", 523 | "fillOpacity": 0, 524 | "gradientMode": "none", 525 | "hideFrom": { 526 | "legend": false, 527 | "tooltip": false, 528 | "viz": false 529 | }, 530 | "lineInterpolation": "linear", 531 | "lineWidth": 1, 532 | "pointSize": 5, 533 | "scaleDistribution": { 534 | "type": "linear" 535 | }, 536 | "showPoints": "auto", 537 | "spanNulls": false, 538 | "stacking": { 539 | "group": "A", 540 | "mode": "none" 541 | }, 542 | "thresholdsStyle": { 543 | "mode": "off" 544 | } 545 | }, 546 | "mappings": [], 547 | "thresholds": { 548 | "mode": "absolute", 549 | "steps": [ 550 | { 551 | "color": "green", 552 | "value": null 553 | }, 554 | { 555 | "color": "red", 556 | "value": 80 557 | } 558 | ] 559 | } 560 | }, 561 | "overrides": [] 562 | }, 563 | "gridPos": { 564 | "h": 8, 565 | "w": 8, 566 | "x": 16, 567 | "y": 7 568 | }, 569 | "id": 6, 570 | "interval": "60s", 571 | "options": { 572 | "legend": { 573 | "calcs": [], 574 | "displayMode": "list", 575 | "placement": "bottom", 576 | "showLegend": true 577 | }, 578 | "tooltip": { 579 | "mode": "single", 580 | "sort": "none" 581 | } 582 | }, 583 | "targets": [ 584 | { 585 | "datasource": { 586 | "type": "prometheus", 587 | "uid": "prometheus" 588 | }, 589 | "editorMode": "code", 590 | "expr": "sum(rate(crawler_block_processing_timer_seconds_count[1m]))*60", 591 | "legendFormat": "Number of block processed per minute", 592 | "range": true, 593 | "refId": "A" 594 | } 595 | ], 596 | "title": "Number of block processed per minute", 597 | "transformations": [], 598 | "type": "timeseries" 599 | }, 600 | { 601 | "datasource": { 602 | "type": "prometheus", 603 | "uid": "prometheus" 604 | }, 605 | "fieldConfig": { 606 | "defaults": { 607 | "color": { 608 | "mode": "palette-classic" 609 | }, 610 | "custom": { 611 | "axisCenteredZero": false, 612 | "axisColorMode": "text", 613 | "axisLabel": "", 614 | "axisPlacement": "auto", 615 | "barAlignment": 0, 616 | "drawStyle": "line", 617 | "fillOpacity": 0, 618 | "gradientMode": "none", 619 | "hideFrom": { 620 | "legend": false, 621 | "tooltip": false, 622 | "viz": false 623 | }, 624 | "lineInterpolation": "smooth", 625 | "lineWidth": 1, 626 | "pointSize": 5, 627 | "scaleDistribution": { 628 | "type": "linear" 629 | }, 630 | "showPoints": "auto", 631 | "spanNulls": false, 632 | "stacking": { 633 | "group": "A", 634 | "mode": "none" 635 | }, 636 | "thresholdsStyle": { 637 | "mode": "off" 638 | } 639 | }, 640 | "mappings": [], 641 | "thresholds": { 642 | "mode": "absolute", 643 | "steps": [ 644 | { 645 | "color": "green", 646 | "value": null 647 | }, 648 | { 649 | "color": "red", 650 | "value": 80 651 | } 652 | ] 653 | } 654 | }, 655 | "overrides": [] 656 | }, 657 | "gridPos": { 658 | "h": 9, 659 | "w": 24, 660 | "x": 0, 661 | "y": 15 662 | }, 663 | "id": 8, 664 | "options": { 665 | "legend": { 666 | "calcs": [], 667 | "displayMode": "table", 668 | "placement": "bottom", 669 | "showLegend": true 670 | }, 671 | "tooltip": { 672 | "mode": "single", 673 | "sort": "none" 674 | } 675 | }, 676 | "pluginVersion": "9.5.1", 677 | "targets": [ 678 | { 679 | "datasource": { 680 | "type": "prometheus", 681 | "uid": "prometheus" 682 | }, 683 | "editorMode": "code", 684 | "exemplar": false, 685 | "expr": "sum ( rate( crawler_block_processing_timer_seconds_count[1m] ) ) by (epoch)", 686 | "format": "time_series", 687 | "instant": false, 688 | "legendFormat": "Epoch {{epoch}}", 689 | "range": true, 690 | "refId": "A" 691 | } 692 | ], 693 | "title": "Epoch processing time", 694 | "transformations": [], 695 | "type": "timeseries" 696 | } 697 | ], 698 | "refresh": "5s", 699 | "schemaVersion": 38, 700 | "style": "dark", 701 | "tags": [], 702 | "templating": { 703 | "list": [] 704 | }, 705 | "time": { 706 | "from": "now-5m", 707 | "to": "now" 708 | }, 709 | "timepicker": {}, 710 | "timezone": "", 711 | "title": "Crawler Dashboard", 712 | "uid": "d64fe420-f1d9-44d3-a247-f805ff35c6eb", 713 | "version": 5, 714 | "weekStart": "" 715 | } -------------------------------------------------------------------------------- /charts/grafana-dashboards/custom-dashboards/cf-consumer.json: -------------------------------------------------------------------------------- 1 | { 2 | "annotations": { 3 | "list": [ 4 | { 5 | "builtIn": 1, 6 | "datasource": { 7 | "type": "grafana", 8 | "uid": "-- Grafana --" 9 | }, 10 | "enable": true, 11 | "hide": true, 12 | "iconColor": "rgba(0, 211, 255, 1)", 13 | "name": "Annotations & Alerts", 14 | "type": "dashboard" 15 | } 16 | ] 17 | }, 18 | "editable": true, 19 | "fiscalYearStartMonth": 0, 20 | "graphTooltip": 0, 21 | "id": 2, 22 | "links": [], 23 | "liveNow": false, 24 | "panels": [ 25 | { 26 | "colorBackground": false, 27 | "colorValue": true, 28 | "colors": [ 29 | "#299c46", 30 | "rgba(237, 129, 40, 0.89)", 31 | "#d44a3a" 32 | ], 33 | "datasource": { 34 | "type": "prometheus", 35 | "uid": "prometheus" 36 | }, 37 | "format": "none", 38 | "gauge": { 39 | "maxValue": 100, 40 | "minValue": 0, 41 | "show": false, 42 | "thresholdLabels": false, 43 | "thresholdMarkers": true 44 | }, 45 | "gridPos": { 46 | "h": 7, 47 | "w": 6, 48 | "x": 0, 49 | "y": 0 50 | }, 51 | "id": 1, 52 | "links": [], 53 | "mappingType": 1, 54 | "mappingTypes": [ 55 | { 56 | "$$hashKey": "object:48", 57 | "name": "value to text", 58 | "value": 1 59 | }, 60 | { 61 | "$$hashKey": "object:49", 62 | "name": "range to text", 63 | "value": 2 64 | } 65 | ], 66 | "maxDataPoints": 100, 67 | "nullPointMode": "connected", 68 | "pluginVersion": "9.5.3", 69 | "postfix": "", 70 | "postfixFontSize": "50%", 71 | "prefix": "", 72 | "prefixFontSize": "50%", 73 | "rangeMaps": [ 74 | { 75 | "from": "null", 76 | "text": "N/A", 77 | "to": "null" 78 | } 79 | ], 80 | "sparkline": { 81 | "fillColor": "rgba(31, 118, 189, 0.18)", 82 | "full": false, 83 | "lineColor": "rgb(31, 120, 193)", 84 | "show": false 85 | }, 86 | "tableColumn": "", 87 | "targets": [ 88 | { 89 | "datasource": { 90 | "type": "prometheus", 91 | "uid": "fb199bed-3c9e-4f57-87e4-4fc53379477e" 92 | }, 93 | "editorMode": "code", 94 | "expr": "consumer_current_block_number", 95 | "legendFormat": "__auto", 96 | "range": true, 97 | "refId": "A" 98 | } 99 | ], 100 | "thresholds": "", 101 | "title": "Current Block Number", 102 | "type": "grafana-singlestat-panel", 103 | "valueFontSize": "100%", 104 | "valueMaps": [ 105 | { 106 | "$$hashKey": "object:51", 107 | "op": "=", 108 | "text": "N/A", 109 | "value": "null" 110 | } 111 | ], 112 | "valueName": "avg" 113 | }, 114 | { 115 | "colorBackground": false, 116 | "colorValue": true, 117 | "colors": [ 118 | "#299c46", 119 | "rgba(237, 129, 40, 0.89)", 120 | "#d44a3a" 121 | ], 122 | "datasource": { 123 | "type": "prometheus", 124 | "uid": "prometheus" 125 | }, 126 | "format": "none", 127 | "gauge": { 128 | "maxValue": 100, 129 | "minValue": 0, 130 | "show": false, 131 | "thresholdLabels": false, 132 | "thresholdMarkers": true 133 | }, 134 | "gridPos": { 135 | "h": 7, 136 | "w": 6, 137 | "x": 6, 138 | "y": 0 139 | }, 140 | "id": 2, 141 | "links": [], 142 | "mappingType": 1, 143 | "mappingTypes": [ 144 | { 145 | "$$hashKey": "object:95", 146 | "name": "value to text", 147 | "value": 1 148 | }, 149 | { 150 | "$$hashKey": "object:96", 151 | "name": "range to text", 152 | "value": 2 153 | } 154 | ], 155 | "maxDataPoints": 100, 156 | "nullPointMode": "connected", 157 | "pluginVersion": "9.5.3", 158 | "postfix": "", 159 | "postfixFontSize": "50%", 160 | "prefix": "", 161 | "prefixFontSize": "50%", 162 | "rangeMaps": [ 163 | { 164 | "from": "null", 165 | "text": "N/A", 166 | "to": "null" 167 | } 168 | ], 169 | "sparkline": { 170 | "fillColor": "rgba(31, 118, 189, 0.18)", 171 | "full": false, 172 | "lineColor": "rgb(31, 120, 193)", 173 | "show": false 174 | }, 175 | "tableColumn": "", 176 | "targets": [ 177 | { 178 | "datasource": { 179 | "type": "prometheus", 180 | "uid": "fb199bed-3c9e-4f57-87e4-4fc53379477e" 181 | }, 182 | "editorMode": "code", 183 | "expr": "consumer_current_era", 184 | "legendFormat": "__auto", 185 | "range": true, 186 | "refId": "A" 187 | } 188 | ], 189 | "thresholds": "", 190 | "title": "Current Block ERA", 191 | "transformations": [ 192 | { 193 | "id": "convertFieldType", 194 | "options": { 195 | "conversions": [], 196 | "fields": {} 197 | } 198 | } 199 | ], 200 | "type": "grafana-singlestat-panel", 201 | "valueFontSize": "100%", 202 | "valueMaps": [ 203 | { 204 | "$$hashKey": "object:98", 205 | "op": "=", 206 | "text": "BYRON", 207 | "value": "1" 208 | }, 209 | { 210 | "$$hashKey": "object:100", 211 | "op": "=", 212 | "text": "SHELLEY", 213 | "value": "2" 214 | }, 215 | { 216 | "$$hashKey": "object:102", 217 | "op": "=", 218 | "text": "ALLEGRA", 219 | "value": "3" 220 | }, 221 | { 222 | "$$hashKey": "object:104", 223 | "op": "=", 224 | "text": "MARY", 225 | "value": "4" 226 | }, 227 | { 228 | "$$hashKey": "object:106", 229 | "op": "=", 230 | "text": "ALONZO", 231 | "value": "5" 232 | }, 233 | { 234 | "$$hashKey": "object:108", 235 | "op": "=", 236 | "text": "BABBAGE", 237 | "value": "6" 238 | } 239 | ], 240 | "valueName": "avg" 241 | }, 242 | { 243 | "datasource": { 244 | "type": "prometheus", 245 | "uid": "prometheus" 246 | }, 247 | "fieldConfig": { 248 | "defaults": { 249 | "color": { 250 | "mode": "thresholds" 251 | }, 252 | "mappings": [], 253 | "max": 100, 254 | "min": -1, 255 | "thresholds": { 256 | "mode": "absolute", 257 | "steps": [ 258 | { 259 | "color": "green", 260 | "value": null 261 | } 262 | ] 263 | }, 264 | "unit": "percent" 265 | }, 266 | "overrides": [] 267 | }, 268 | "gridPos": { 269 | "h": 7, 270 | "w": 6, 271 | "x": 12, 272 | "y": 0 273 | }, 274 | "id": 4, 275 | "options": { 276 | "orientation": "auto", 277 | "reduceOptions": { 278 | "calcs": [ 279 | "lastNotNull" 280 | ], 281 | "fields": "", 282 | "values": false 283 | }, 284 | "showThresholdLabels": false, 285 | "showThresholdMarkers": true 286 | }, 287 | "pluginVersion": "9.5.3", 288 | "targets": [ 289 | { 290 | "datasource": { 291 | "type": "prometheus", 292 | "uid": "fb199bed-3c9e-4f57-87e4-4fc53379477e" 293 | }, 294 | "editorMode": "code", 295 | "expr": "consumer_network_sync_percent", 296 | "legendFormat": "__auto", 297 | "range": true, 298 | "refId": "A" 299 | } 300 | ], 301 | "title": "Network Sync Percent", 302 | "type": "gauge" 303 | }, 304 | { 305 | "datasource": { 306 | "type": "prometheus", 307 | "uid": "prometheus" 308 | }, 309 | "fieldConfig": { 310 | "defaults": { 311 | "color": { 312 | "mode": "thresholds" 313 | }, 314 | "mappings": [], 315 | "thresholds": { 316 | "mode": "absolute", 317 | "steps": [ 318 | { 319 | "color": "green", 320 | "value": null 321 | } 322 | ] 323 | } 324 | }, 325 | "overrides": [] 326 | }, 327 | "gridPos": { 328 | "h": 7, 329 | "w": 6, 330 | "x": 18, 331 | "y": 0 332 | }, 333 | "id": 5, 334 | "options": { 335 | "orientation": "auto", 336 | "reduceOptions": { 337 | "calcs": [ 338 | "lastNotNull" 339 | ], 340 | "fields": "", 341 | "values": false 342 | }, 343 | "showThresholdLabels": false, 344 | "showThresholdMarkers": true 345 | }, 346 | "pluginVersion": "9.5.3", 347 | "targets": [ 348 | { 349 | "datasource": { 350 | "type": "prometheus", 351 | "uid": "fb199bed-3c9e-4f57-87e4-4fc53379477e" 352 | }, 353 | "editorMode": "code", 354 | "expr": "consumer_count_rollback_total", 355 | "legendFormat": "__auto", 356 | "range": true, 357 | "refId": "A" 358 | } 359 | ], 360 | "title": "Number of rollbacks", 361 | "type": "gauge" 362 | }, 363 | { 364 | "datasource": { 365 | "type": "prometheus", 366 | "uid": "prometheus" 367 | }, 368 | "fieldConfig": { 369 | "defaults": { 370 | "color": { 371 | "mode": "thresholds" 372 | }, 373 | "mappings": [], 374 | "thresholds": { 375 | "mode": "absolute", 376 | "steps": [ 377 | { 378 | "color": "green", 379 | "value": null 380 | } 381 | ] 382 | }, 383 | "unit": "s" 384 | }, 385 | "overrides": [] 386 | }, 387 | "gridPos": { 388 | "h": 8, 389 | "w": 8, 390 | "x": 0, 391 | "y": 7 392 | }, 393 | "id": 7, 394 | "options": { 395 | "displayMode": "gradient", 396 | "minVizHeight": 10, 397 | "minVizWidth": 0, 398 | "orientation": "horizontal", 399 | "reduceOptions": { 400 | "calcs": [ 401 | "lastNotNull" 402 | ], 403 | "fields": "", 404 | "values": false 405 | }, 406 | "showUnfilled": true, 407 | "valueMode": "color" 408 | }, 409 | "pluginVersion": "9.5.3", 410 | "targets": [ 411 | { 412 | "datasource": { 413 | "type": "prometheus", 414 | "uid": "fb199bed-3c9e-4f57-87e4-4fc53379477e" 415 | }, 416 | "editorMode": "code", 417 | "expr": "sum(consumer_era_and_epoch_processing_timer_seconds_sum) by (era)", 418 | "legendFormat": "{{era}}", 419 | "range": true, 420 | "refId": "A" 421 | } 422 | ], 423 | "title": "ERA processing time", 424 | "type": "bargauge" 425 | }, 426 | { 427 | "datasource": { 428 | "type": "prometheus", 429 | "uid": "prometheus" 430 | }, 431 | "fieldConfig": { 432 | "defaults": { 433 | "color": { 434 | "mode": "palette-classic" 435 | }, 436 | "custom": { 437 | "axisCenteredZero": false, 438 | "axisColorMode": "text", 439 | "axisLabel": "", 440 | "axisPlacement": "auto", 441 | "barAlignment": 0, 442 | "drawStyle": "line", 443 | "fillOpacity": 0, 444 | "gradientMode": "none", 445 | "hideFrom": { 446 | "legend": false, 447 | "tooltip": false, 448 | "viz": false 449 | }, 450 | "lineInterpolation": "linear", 451 | "lineWidth": 1, 452 | "pointSize": 5, 453 | "scaleDistribution": { 454 | "type": "linear" 455 | }, 456 | "showPoints": "auto", 457 | "spanNulls": false, 458 | "stacking": { 459 | "group": "A", 460 | "mode": "none" 461 | }, 462 | "thresholdsStyle": { 463 | "mode": "off" 464 | } 465 | }, 466 | "mappings": [], 467 | "thresholds": { 468 | "mode": "absolute", 469 | "steps": [ 470 | { 471 | "color": "green", 472 | "value": null 473 | }, 474 | { 475 | "color": "red", 476 | "value": 80 477 | } 478 | ] 479 | } 480 | }, 481 | "overrides": [] 482 | }, 483 | "gridPos": { 484 | "h": 8, 485 | "w": 8, 486 | "x": 8, 487 | "y": 7 488 | }, 489 | "id": 3, 490 | "options": { 491 | "legend": { 492 | "calcs": [], 493 | "displayMode": "list", 494 | "placement": "bottom", 495 | "showLegend": true 496 | }, 497 | "tooltip": { 498 | "mode": "single", 499 | "sort": "none" 500 | } 501 | }, 502 | "targets": [ 503 | { 504 | "datasource": { 505 | "type": "prometheus", 506 | "uid": "fb199bed-3c9e-4f57-87e4-4fc53379477e" 507 | }, 508 | "editorMode": "code", 509 | "expr": "sum(consumer_block_processing_timer_seconds_sum)/sum(consumer_block_processing_count_total)", 510 | "legendFormat": "AVG processing time each block", 511 | "range": true, 512 | "refId": "A" 513 | } 514 | ], 515 | "title": "AVG processing time each block", 516 | "type": "timeseries" 517 | }, 518 | { 519 | "datasource": { 520 | "type": "prometheus", 521 | "uid": "prometheus" 522 | }, 523 | "fieldConfig": { 524 | "defaults": { 525 | "color": { 526 | "mode": "palette-classic" 527 | }, 528 | "custom": { 529 | "axisCenteredZero": false, 530 | "axisColorMode": "text", 531 | "axisLabel": "", 532 | "axisPlacement": "auto", 533 | "barAlignment": 0, 534 | "drawStyle": "line", 535 | "fillOpacity": 0, 536 | "gradientMode": "none", 537 | "hideFrom": { 538 | "legend": false, 539 | "tooltip": false, 540 | "viz": false 541 | }, 542 | "lineInterpolation": "linear", 543 | "lineWidth": 1, 544 | "pointSize": 5, 545 | "scaleDistribution": { 546 | "type": "linear" 547 | }, 548 | "showPoints": "auto", 549 | "spanNulls": false, 550 | "stacking": { 551 | "group": "A", 552 | "mode": "none" 553 | }, 554 | "thresholdsStyle": { 555 | "mode": "off" 556 | } 557 | }, 558 | "mappings": [], 559 | "thresholds": { 560 | "mode": "absolute", 561 | "steps": [ 562 | { 563 | "color": "green", 564 | "value": null 565 | }, 566 | { 567 | "color": "red", 568 | "value": 80 569 | } 570 | ] 571 | } 572 | }, 573 | "overrides": [] 574 | }, 575 | "gridPos": { 576 | "h": 8, 577 | "w": 8, 578 | "x": 16, 579 | "y": 7 580 | }, 581 | "id": 6, 582 | "interval": "60s", 583 | "options": { 584 | "legend": { 585 | "calcs": [], 586 | "displayMode": "list", 587 | "placement": "bottom", 588 | "showLegend": true 589 | }, 590 | "tooltip": { 591 | "mode": "single", 592 | "sort": "none" 593 | } 594 | }, 595 | "targets": [ 596 | { 597 | "datasource": { 598 | "type": "prometheus", 599 | "uid": "fb199bed-3c9e-4f57-87e4-4fc53379477e" 600 | }, 601 | "editorMode": "code", 602 | "expr": "sum(rate(consumer_block_processing_count_total[1m]))*60", 603 | "legendFormat": "Number of block processed per minute", 604 | "range": true, 605 | "refId": "A" 606 | } 607 | ], 608 | "title": "Number of block processed per minute", 609 | "transformations": [], 610 | "type": "timeseries" 611 | }, 612 | { 613 | "datasource": { 614 | "type": "prometheus", 615 | "uid": "prometheus" 616 | }, 617 | "fieldConfig": { 618 | "defaults": { 619 | "color": { 620 | "mode": "palette-classic" 621 | }, 622 | "custom": { 623 | "axisCenteredZero": false, 624 | "axisColorMode": "text", 625 | "axisLabel": "", 626 | "axisPlacement": "auto", 627 | "barAlignment": 0, 628 | "drawStyle": "line", 629 | "fillOpacity": 0, 630 | "gradientMode": "none", 631 | "hideFrom": { 632 | "legend": false, 633 | "tooltip": false, 634 | "viz": false 635 | }, 636 | "lineInterpolation": "smooth", 637 | "lineWidth": 1, 638 | "pointSize": 5, 639 | "scaleDistribution": { 640 | "type": "linear" 641 | }, 642 | "showPoints": "auto", 643 | "spanNulls": false, 644 | "stacking": { 645 | "group": "A", 646 | "mode": "none" 647 | }, 648 | "thresholdsStyle": { 649 | "mode": "off" 650 | } 651 | }, 652 | "mappings": [], 653 | "thresholds": { 654 | "mode": "absolute", 655 | "steps": [ 656 | { 657 | "color": "green", 658 | "value": null 659 | }, 660 | { 661 | "color": "red", 662 | "value": 80 663 | } 664 | ] 665 | } 666 | }, 667 | "overrides": [] 668 | }, 669 | "gridPos": { 670 | "h": 9, 671 | "w": 24, 672 | "x": 0, 673 | "y": 15 674 | }, 675 | "id": 8, 676 | "options": { 677 | "legend": { 678 | "calcs": [], 679 | "displayMode": "table", 680 | "placement": "bottom", 681 | "showLegend": true 682 | }, 683 | "tooltip": { 684 | "mode": "single", 685 | "sort": "none" 686 | } 687 | }, 688 | "pluginVersion": "9.5.1", 689 | "targets": [ 690 | { 691 | "datasource": { 692 | "type": "prometheus", 693 | "uid": "b37a29fb-cdaf-4cea-b88d-45b8b0d93823" 694 | }, 695 | "editorMode": "code", 696 | "exemplar": false, 697 | "expr": "sum ( rate( consumer_era_and_epoch_processing_timer_seconds_count[1m] ) ) by (epoch)", 698 | "format": "time_series", 699 | "instant": false, 700 | "legendFormat": "Epoch {{epoch}}", 701 | "range": true, 702 | "refId": "A" 703 | } 704 | ], 705 | "title": "Epoch processing time", 706 | "transformations": [], 707 | "type": "timeseries" 708 | } 709 | ], 710 | "refresh": "5s", 711 | "schemaVersion": 38, 712 | "style": "dark", 713 | "tags": [], 714 | "templating": { 715 | "list": [] 716 | }, 717 | "time": { 718 | "from": "now-30m", 719 | "to": "now" 720 | }, 721 | "timepicker": {}, 722 | "timezone": "", 723 | "title": "Consumer Dashboard", 724 | "uid": "a9b90df6-ca3c-4ca1-8152-3cc2ea157696", 725 | "version": 6, 726 | "weekStart": "" 727 | } --------------------------------------------------------------------------------