From 433ed4ff9b508ae30659d635aaf6864ef4ea5442 Mon Sep 17 00:00:00 2001 From: Shawn Reuland Date: Fri, 29 Jul 2022 15:07:24 -0700 Subject: [PATCH] #4483: added k8s deployment manifest --- .../docker/ledgerexporter/ledgerexporter.yml | 90 +++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 services/horizon/docker/ledgerexporter/ledgerexporter.yml diff --git a/services/horizon/docker/ledgerexporter/ledgerexporter.yml b/services/horizon/docker/ledgerexporter/ledgerexporter.yml new file mode 100644 index 0000000000..6310a65505 --- /dev/null +++ b/services/horizon/docker/ledgerexporter/ledgerexporter.yml @@ -0,0 +1,90 @@ +# this file contains the ledgerexporter deployment and it's config artifacts. +# when importing the manifest with kubectl, will only create, skips any that already exist. +# +# make sure to include namespace destination, the manifest does not specify, +# otherwise it'll go in your current kubectl context. +# +# if defining the secrets for first time, substitue placeholders. +# +# $ kubectl create -f ledgerexporter.yml -n horizon-dev +apiVersion: v1 +kind: ConfigMap +metadata: + annotations: + fluxcd.io/ignore: "true" + labels: + app: ledgerexporter + name: ledgerexporter-pubnet-env +data: + START: "2" + END: "0" + # can only have CONTINUE or START set, not both. + #CONTINUE: "true" + WRITE_LATEST_PATH: "true" + CAPTIVE_CORE_USE_DB: "true" + HISTORY_ARCHIVE_URLS: "https://history.stellar.org/prd/core-live/core_live_001,https://history.stellar.org/prd/core-live/core_live_002,https://history.stellar.org/prd/core-live/core_live_003" + NETWORK_PASSPHRASE: "Public Global Stellar Network ; September 2015" + ARCHIVE_TARGET: "s3://horizon-ledgermeta-pubnet" +--- +apiVersion: v1 +kind: Secret +metadata: + labels: + app: ledgerexporter + name: ledgerexporter-pubnet-secret +type: Opaque +data: + AWS_REGION: + AWS_ACCESS_KEY_ID: + AWS_SECRET_ACCESS_KEY: = +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + annotations: + fluxcd.io/ignore: "true" + deployment.kubernetes.io/revision: "3" + labels: + app: ledgerexporter + name: ledgerexporter-deployment +spec: + selector: + matchLabels: + app: ledgerexporter + replicas: 1 + template: + metadata: + annotations: + fluxcd.io/ignore: "true" + prometheus.io/port: "6060" + prometheus.io/scrape: "false" + labels: + app: ledgerexporter + spec: + containers: + - envFrom: + - secretRef: + name: ledgerexporter-pubnet-secret + - configMapRef: + name: ledgerexporter-pubnet-env + image: stellar/horizon-ledgerexporter:latest + imagePullPolicy: Always + name: ledgerexporter + resources: + limits: + cpu: 1 + memory: 4Gi + requests: + cpu: 250m + memory: 500m + volumeMounts: + - mountPath: /cc + name: tempfs-volume + dnsPolicy: ClusterFirst + volumes: + - name: tempfs-volume + emptyDir: + medium: Memory + + +