From 73bd1419bbbac04967dad5760aa15b476bec61eb Mon Sep 17 00:00:00 2001 From: Ben Smith Date: Mon, 4 Mar 2024 11:37:16 +0100 Subject: [PATCH] rm -r kubernetes in favour of infra repo --- kubernetes/Makefile | 12 ------- kubernetes/README.md | 31 ----------------- kubernetes/config/configmap.yaml | 59 -------------------------------- kubernetes/config/pod.yaml | 41 ---------------------- kubernetes/config/secrets.yaml | 8 ----- kubernetes/values.yaml | 17 --------- 6 files changed, 168 deletions(-) delete mode 100644 kubernetes/Makefile delete mode 100644 kubernetes/README.md delete mode 100644 kubernetes/config/configmap.yaml delete mode 100644 kubernetes/config/pod.yaml delete mode 100644 kubernetes/config/secrets.yaml delete mode 100644 kubernetes/values.yaml diff --git a/kubernetes/Makefile b/kubernetes/Makefile deleted file mode 100644 index 8b908d9..0000000 --- a/kubernetes/Makefile +++ /dev/null @@ -1,12 +0,0 @@ -RESOURCE_FILES = values.yaml - -delete: - kontemplate delete $(RESOURCE_FILES) - -apply: - kontemplate apply $(RESOURCE_FILES) - -hard-restart: delete apply - -restart: - kubectl rollout restart deployment arak-indexer diff --git a/kubernetes/README.md b/kubernetes/README.md deleted file mode 100644 index 0f8c71a..0000000 --- a/kubernetes/README.md +++ /dev/null @@ -1,31 +0,0 @@ -## Basic Usage (with kontemplate) - -Install [kontemplate](https://code.tvl.fyi/tree/ops/kontemplate) - -From within this directory - -### Delete Pod and Restart - -```sh -kontemplate delete values.yaml -kontemplate apply values.yaml -``` - -or use the make file - -```shell -make hard-restart -``` - -to check status and observe logs: - -```sh -kubectl get pods -kubectl logs -f [POD_NAME] -``` - -or, for convenience: - -```shell -kubectl logs -f $( kubectl get pods | grep arak-indexer | awk '{print $1}') -``` \ No newline at end of file diff --git a/kubernetes/config/configmap.yaml b/kubernetes/config/configmap.yaml deleted file mode 100644 index d7eef23..0000000 --- a/kubernetes/config/configmap.yaml +++ /dev/null @@ -1,59 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ .ConfigMapName }} - namespace: {{ .Namespace }} -data: - arak.toml: | - - [database.postgres] - schema = "mainnet" - - [indexer] - page-size = 25 - poll-interval = 10 - - ## ERC721: https://eips.ethereum.org/EIPS/eip-721#specification - [[event]] - name = "erc721_transfer" - start = 937820 - contract = "*" - signature = "event Transfer(address indexed from, address indexed to, uint256 indexed tokenId)" - - [[event]] - name = "erc721_approval" - start = 1176542 - contract = "*" - signature = "event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId)" - - ## ERC1155: https://eips.ethereum.org/EIPS/eip-1155#specification - [[event]] - name = "erc1155_transfer_single" - start = 6930509 - contract = "*" - signature = "event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value)" - - [[event]] - name = "erc1155_transfer_batch" - start = 7409271 - contract = "*" - signature = "event TransferBatch(address indexed operator, address indexed from, address indexed to, uint256[] ids, uint256[] values)" - - [[event]] - name = "erc1155_uri" - start = 6938760 - contract = "*" - signature = "event URI(string value, uint256 indexed id)" - - ### Overlapping Events - [[event]] - name = "approval_for_all" - start = 5220768 - contract = "*" - signature = "event ApprovalForAll(address indexed owner, address indexed operator, bool approved)" - - #[[event]] - #name = "indexed_approval_for_all" - #start = 0 - #contract = "*" - #signature = "event ApprovalForAll(address indexed owner, address indexed operator, bool indexed approved)" diff --git a/kubernetes/config/pod.yaml b/kubernetes/config/pod.yaml deleted file mode 100644 index 494b69c..0000000 --- a/kubernetes/config/pod.yaml +++ /dev/null @@ -1,41 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ .ProjectName }}-indexer - namespace: {{ .Namespace }} -spec: - replicas: 1 - selector: - matchLabels: - app: {{ .ProjectName }} - template: - metadata: - labels: - app: {{ .ProjectName }} - spec: - containers: - - name: {{ .ProjectName }} - image: {{ .ContainerRepo }}/{{ .ProjectName }}:{{ .ImageTag }} - imagePullPolicy: Always - volumeMounts: - - name: config-volume - mountPath: {{ .ConfigPath }}/{{ .ConfigFile }} - subPath: {{ .ConfigFile }} - env: - - name: ARAKCONFIG - value: {{ .ConfigPath }}/{{ .ConfigFile }} - - - name: NODE_URL - valueFrom: - secretKeyRef: - name: {{ .ProjectName }}-secrets - key: NODE_URL - - name: DB_STRING - valueFrom: - secretKeyRef: - name: {{ .ProjectName }}-secrets - key: DB_STRING - volumes: - - name: config-volume - configMap: - name: {{ .ProjectName }}-config diff --git a/kubernetes/config/secrets.yaml b/kubernetes/config/secrets.yaml deleted file mode 100644 index cdd57cb..0000000 --- a/kubernetes/config/secrets.yaml +++ /dev/null @@ -1,8 +0,0 @@ -apiVersion: v1 -kind: Secret -metadata: - name: arak-secrets -type: Opaque -data: - NODE_URL: DO_NOT_ACTUALLY_PUT_SECRETS_HERE - DB_STRING: DO_NOT_ACTUALLY_PUT_SECRETS_HERE diff --git a/kubernetes/values.yaml b/kubernetes/values.yaml deleted file mode 100644 index 770b2cf..0000000 --- a/kubernetes/values.yaml +++ /dev/null @@ -1,17 +0,0 @@ -global: - Namespace: default - ConfigMapName: arak-config - PodName: arak-indexer - ContainerRepo: ghcr.io/mintbase - ProjectName: arak - ImageTag: latest - ConfigFile: arak.toml - ConfigPath: /conf - -include: - # Notice how secrets are not explicitly included. - # This is because you should kubectl create and apply them - - name: "deployment" - path: "config/pod.yaml" - - name: "map" - path: "config/configmap.yaml"