From b65f2e09602f4a85e6d968193cf31eb4105949c0 Mon Sep 17 00:00:00 2001 From: Radek Scheibinger Date: Thu, 25 Apr 2024 10:54:07 +0200 Subject: [PATCH] Cleanup chainlink-cluster chart (#12950) * Cleanup chainlink-cluster chart CRIB chainlink-cluster chart has moved to internal repo. Deleting chart and integrating devspace config with internal repo via required ENV variable CHAINLINK_CLUSTER_HELM_CHART_URI * Delete helm related workflows and helm lint configs * fix reference to the go code which is now under crib directory * login to helm registry --- .ct.yml | 10 - .github/workflows/helm-chart-publish.yml | 41 -- .github/workflows/helm-chart.yml | 37 -- .gitignore | 1 - GNUmakefile | 4 +- charts/chainlink-cluster/.gitignore | 7 - charts/chainlink-cluster/.helmignore | 25 - charts/chainlink-cluster/Chart.lock | 15 - charts/chainlink-cluster/Chart.yaml | 22 - charts/chainlink-cluster/README.md | 174 ------- .../templates/chainlink-cm.yaml | 77 --- .../templates/chainlink-db-deployment.yaml | 154 ------ .../templates/chainlink-db-networkpolicy.yaml | 21 - .../templates/chainlink-db-service.yaml | 18 - .../templates/chainlink-node-deployment.yaml | 130 ------ .../chainlink-node-networkpolicy.yaml | 18 - .../templates/chainlink-node-service.yaml | 20 - .../templates/chainlink-pod-monitor.yaml | 18 - .../templates/chainlink-secret.yaml | 14 - .../templates/geth-config-map.yaml | 155 ------- .../templates/geth-deployment.yaml | 130 ------ .../templates/geth-networkpolicy.yaml | 25 - .../templates/geth-service.yaml | 21 - .../chainlink-cluster/templates/ingress.yaml | 43 -- .../templates/mockserver-networkpolicy.yaml | 21 - .../templates/networkpolicy-default.yaml | 43 -- .../templates/tests/test-connection.yaml | 15 - charts/chainlink-cluster/values.yaml | 439 ------------------ crib/.env.example | 4 + crib/devspace.yaml | 4 +- crib/scripts/check_env_vars.sh | 1 + crib/setup.sh | 27 +- .../values-profiles/README.md | 0 .../values-profiles/values-dev.yaml.example | 0 lintconf.yaml | 46 -- 35 files changed, 33 insertions(+), 1747 deletions(-) delete mode 100644 .ct.yml delete mode 100644 .github/workflows/helm-chart-publish.yml delete mode 100644 .github/workflows/helm-chart.yml delete mode 100644 charts/chainlink-cluster/.gitignore delete mode 100644 charts/chainlink-cluster/.helmignore delete mode 100644 charts/chainlink-cluster/Chart.lock delete mode 100644 charts/chainlink-cluster/Chart.yaml delete mode 100644 charts/chainlink-cluster/README.md delete mode 100644 charts/chainlink-cluster/templates/chainlink-cm.yaml delete mode 100644 charts/chainlink-cluster/templates/chainlink-db-deployment.yaml delete mode 100644 charts/chainlink-cluster/templates/chainlink-db-networkpolicy.yaml delete mode 100644 charts/chainlink-cluster/templates/chainlink-db-service.yaml delete mode 100644 charts/chainlink-cluster/templates/chainlink-node-deployment.yaml delete mode 100644 charts/chainlink-cluster/templates/chainlink-node-networkpolicy.yaml delete mode 100644 charts/chainlink-cluster/templates/chainlink-node-service.yaml delete mode 100644 charts/chainlink-cluster/templates/chainlink-pod-monitor.yaml delete mode 100644 charts/chainlink-cluster/templates/chainlink-secret.yaml delete mode 100644 charts/chainlink-cluster/templates/geth-config-map.yaml delete mode 100644 charts/chainlink-cluster/templates/geth-deployment.yaml delete mode 100644 charts/chainlink-cluster/templates/geth-networkpolicy.yaml delete mode 100644 charts/chainlink-cluster/templates/geth-service.yaml delete mode 100644 charts/chainlink-cluster/templates/ingress.yaml delete mode 100644 charts/chainlink-cluster/templates/mockserver-networkpolicy.yaml delete mode 100644 charts/chainlink-cluster/templates/networkpolicy-default.yaml delete mode 100644 charts/chainlink-cluster/templates/tests/test-connection.yaml delete mode 100644 charts/chainlink-cluster/values.yaml rename {charts/chainlink-cluster => crib}/values-profiles/README.md (100%) rename {charts/chainlink-cluster => crib}/values-profiles/values-dev.yaml.example (100%) delete mode 100644 lintconf.yaml diff --git a/.ct.yml b/.ct.yml deleted file mode 100644 index 18a6afe861d..00000000000 --- a/.ct.yml +++ /dev/null @@ -1,10 +0,0 @@ -# See: https://github.com/helm/chart-testing -target-branch: develop -chart-dirs: 'charts' -check-version-increment: false -validate-maintainers: false -charts-repos: - - mockserver=https://www.mock-server.com - - opentelemetry-collector=https://open-telemetry.github.io/opentelemetry-helm-charts - - tempo=https://grafana.github.io/helm-charts - - grafana=https://grafana.github.io/helm-charts diff --git a/.github/workflows/helm-chart-publish.yml b/.github/workflows/helm-chart-publish.yml deleted file mode 100644 index 927ed4b0166..00000000000 --- a/.github/workflows/helm-chart-publish.yml +++ /dev/null @@ -1,41 +0,0 @@ -name: Helm Publish - -on: - workflow_dispatch: - -jobs: - helm_release: - runs-on: ubuntu-latest - environment: build-develop - permissions: - id-token: write - contents: read - steps: - - name: Checkout repo - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 - - - name: Configure aws credentials - uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2 - with: - role-to-assume: ${{ secrets.AWS_ROLE_ARN_GATI }} - role-duration-seconds: ${{ secrets.AWS_ROLE_DURATION_SECONDS }} - aws-region: ${{ secrets.AWS_REGION }} - mask-aws-account-id: true - role-session-name: helm-publish.helm-release - - - name: Get Github Token - id: get-gh-token - uses: smartcontractkit/chainlink-github-actions/github-app-token-issuer@5874ff7211cf5a5a2670bb010fbff914eaaae138 # v2.3.12 - with: - url: ${{ secrets.GATI_LAMBDA_FUNCTION_URL }} - - - name: Install Helm - uses: azure/setup-helm@b7246b12e77f7134dc2d460a3d5bad15bbe29390 # v4.1.0 - - - name: Run chart-releaser - uses: helm/chart-releaser-action@a917fd15b20e8b64b94d9158ad54cd6345335584 # v1.6.0 - with: - charts_dir: charts - config: .github/cr.yaml - env: - CR_TOKEN: "${{ steps.get-gh-token.outputs.access-token }}" diff --git a/.github/workflows/helm-chart.yml b/.github/workflows/helm-chart.yml deleted file mode 100644 index f0dd25c5dbb..00000000000 --- a/.github/workflows/helm-chart.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: Helm Chart - -on: - pull_request: - paths: - - "charts/**" - - ".github/workflows/helm-chart.yml" - -jobs: - ci-lint-helm-charts: - runs-on: ubuntu-latest - steps: - - name: ci-lint-helm-charts - uses: smartcontractkit/.github/actions/ci-lint-charts@7fa39741b11e66ed59f8aad786d4b9356c389f3f # ci-lint-charts@0.2.0 - with: - # chart testing inputs - chart-testing-extra-args: "--lint-conf=lintconf.yaml" - charts-dir: charts/chainlink-cluster - # grafana inputs - metrics-job-name: ci-lint-helm-charts - gc-basic-auth: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }} - gc-host: ${{ secrets.GRAFANA_INTERNAL_HOST }} - gc-org-id: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }} - - ci-kubeconform: - runs-on: ubuntu-latest - steps: - - name: ci-kubeconform - uses: smartcontractkit/.github/actions/ci-kubeconform@1ae8a9a984814c4daf50aa96f03be2cba0ef3fec # ci-kubeconform@0.2.0 - with: - # kubeform inputs - charts-dir: charts/chainlink-cluster - # grafana inputs - metrics-job-name: ci-kubeconform - gc-basic-auth: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }} - gc-host: ${{ secrets.GRAFANA_INTERNAL_HOST }} - gc-org-id: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }} diff --git a/.gitignore b/.gitignore index b286c329292..ca388c85c2b 100644 --- a/.gitignore +++ b/.gitignore @@ -24,7 +24,6 @@ tools/clroot/db.sqlite3-wal .envrc .env* .dbenv -!charts/chainlink-cluster/.env.example !crib/.env.example !.github/actions/setup-postgres/.env .direnv diff --git a/GNUmakefile b/GNUmakefile index 524786585e9..48e15e39fb4 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -33,7 +33,7 @@ gomodtidy: ## Run go mod tidy on all modules. cd ./integration-tests && go mod tidy cd ./integration-tests/load && go mod tidy cd ./dashboard-lib && go mod tidy - cd ./charts/chainlink-cluster && go mod tidy + cd ./crib && go mod tidy .PHONY: docs docs: ## Install and run pkgsite to view Go docs @@ -96,7 +96,7 @@ generate: abigen codecgen mockery protoc ## Execute all go:generate commands. cd ./integration-tests && go generate -x ./... cd ./integration-tests/load && go generate -x ./... cd ./dashboard-lib && go generate -x ./... - cd ./charts/chainlink-cluster && go generate -x ./... + cd ./crib && go generate -x ./... .PHONY: testscripts testscripts: chainlink-test ## Install and run testscript against testdata/scripts/* files. diff --git a/charts/chainlink-cluster/.gitignore b/charts/chainlink-cluster/.gitignore deleted file mode 100644 index 9e704020530..00000000000 --- a/charts/chainlink-cluster/.gitignore +++ /dev/null @@ -1,7 +0,0 @@ -# Helm -charts/ -requirements.lock -.rendered -values-profiles/* -!values-profiles/values-dev.yaml.example -!values-profiles/README.md \ No newline at end of file diff --git a/charts/chainlink-cluster/.helmignore b/charts/chainlink-cluster/.helmignore deleted file mode 100644 index b88381301b2..00000000000 --- a/charts/chainlink-cluster/.helmignore +++ /dev/null @@ -1,25 +0,0 @@ -# Patterns to ignore when building packages. -# This supports shell glob matching, relative path matching, and -# negation (prefixed with !). Only one pattern per line. -.DS_Store -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*.orig -*~ -# Various IDEs -.project -.idea/ -*.tmproj -.vscode/ -.devspace/ -scripts/ diff --git a/charts/chainlink-cluster/Chart.lock b/charts/chainlink-cluster/Chart.lock deleted file mode 100644 index 11ebdfdf691..00000000000 --- a/charts/chainlink-cluster/Chart.lock +++ /dev/null @@ -1,15 +0,0 @@ -dependencies: -- name: mockserver - repository: https://www.mock-server.com - version: 5.14.0 -- name: opentelemetry-collector - repository: https://open-telemetry.github.io/opentelemetry-helm-charts - version: 0.82.0 -- name: tempo - repository: https://grafana.github.io/helm-charts - version: 1.7.2 -- name: grafana - repository: https://grafana.github.io/helm-charts - version: 7.3.2 -digest: sha256:37722063f68689c42ac1d6549ddfae4756370c1659b8ac1c0d7da8916c6fad3d -generated: "2024-04-23T17:49:50.347667-04:00" diff --git a/charts/chainlink-cluster/Chart.yaml b/charts/chainlink-cluster/Chart.yaml deleted file mode 100644 index d8d3dd98b22..00000000000 --- a/charts/chainlink-cluster/Chart.yaml +++ /dev/null @@ -1,22 +0,0 @@ -apiVersion: v2 -name: chainlink-cluster -description: Chainlink nodes cluster -version: 0.4.2 -appVersion: "2.6.0" -dependencies: - - name: mockserver - version: "5.14.0" - repository: "https://www.mock-server.com" - condition: mockserver.enabled - - name: opentelemetry-collector - version: "0.82.0" - repository: "https://open-telemetry.github.io/opentelemetry-helm-charts" - condition: opentelemetry-collector.enabled - - name: tempo - version: "1.7.2" - repository: "https://grafana.github.io/helm-charts" - condition: tempo.enabled - - name: grafana - version: "7.3.2" - repository: "https://grafana.github.io/helm-charts" - condition: grafana.enabled diff --git a/charts/chainlink-cluster/README.md b/charts/chainlink-cluster/README.md deleted file mode 100644 index 403ab9b876a..00000000000 --- a/charts/chainlink-cluster/README.md +++ /dev/null @@ -1,174 +0,0 @@ -# Chainlink cluster - -Example CL nodes cluster for system level tests -Install `kubefwd` (no nixpkg for it yet, planned) - -```sh -brew install txn2/tap/kubefwd -``` - -If you want to build images you need [docker](https://docs.docker.com/engine/install/) service running - -Enter the shell (from the root project dir) - -```sh -nix develop -``` - -# Develop - -## New cluster - -We are using [devspace](https://www.devspace.sh/docs/getting-started/installation?x0=3) - -Configure the cluster, see `deployments.app.helm.values` and [values.yaml](./values.yaml) comments for more details - -Set up your K8s access - -```sh -export DEVSPACE_IMAGE="..." -./setup.sh ${my-personal-namespace-name-crib} -``` - -Create a .env file based on the .env.sample file - -```sh -cp .env.sample .env -# Fill in the required values in .env -``` - -Build and deploy the current state of your repository - -```sh -devspace deploy -``` - -Default `ttl` is `72h`, use `ttl` command to update if you need more time - -Valid values are `1h`, `2m`, `3s`, etc. Go time format is invalid `1h2m3s` - -```sh -devspace run ttl ${namespace} 120h -``` - -If you want to deploy an image tag that is already available in ECR, use: - -```sh -devspace deploy --override-image-tag "" -``` - -If you want to deploy an image tag from a public ECR repo, use: - -```sh -export DEVSPACE_IMAGE=public.ecr.aws/chainlink/chainlink -devspace deploy --override-image-tag 2.9.0 -``` - -To apply custom TOML configuration specific for your nodes, create a `values-dev.yaml` file in the `./values-profiles` directory. Start by copying the example file: - -```sh -cp values-profiles/values-dev.yaml.example values-profiles/values-dev.yaml - -``` - -Then customize the values-dev.yaml file as needed. To use this configuration during deployment, pass the --profile local-dev flag: - -```sh -devspace deploy --profile local-dev -``` - -Forward ports to check UI or run tests - -```sh -devspace run connect ${my-personal-namespace-name-crib} -``` - -List ingress hostnames - -```sh -devspace run ingress-hosts -``` - -Destroy the cluster - -```sh -devspace purge -``` - -## Running load tests - -Check this [doc](../../integration-tests/load/ocr/README.md) - -If you used `devspace dev ...` always use `devspace reset pods` to switch the pods back - -# Helm - -If you would like to use `helm` directly, please uncomment data in `values.yaml` - -## Install from local files - -```sh -helm install -f values.yaml cl-cluster . -``` - -Forward all apps (in another terminal) - -```sh -sudo kubefwd svc -n cl-cluster -``` - -Then you can connect and run your tests - -## Install from release - -Add the repository - -```sh -helm repo add chainlink-cluster https://raw.githubusercontent.com/smartcontractkit/chainlink/helm-release/ -helm repo update -``` - -Set default namespace - -```sh -kubectl create ns cl-cluster -kubectl config set-context --current --namespace cl-cluster -``` - -## Create a new release - -Bump version in `Chart.yml` add your changes and add `helm_release` label to any PR to trigger a release - -## Helm Test - -```sh -helm test cl-cluster -``` - -## Uninstall - -```sh -helm uninstall cl-cluster -``` - -# Grafana dashboard - -We are using [Grabana](https://github.com/K-Phoen/grabana) lib to create dashboards programmatically - -You can also select dashboard platform in `INFRA_PLATFORM` either `kubernetes` or `docker` - -```sh -export LOKI_TENANT_ID=promtail -export LOKI_URL=... -export GRAFANA_URL=... -export GRAFANA_TOKEN=... -export PROMETHEUS_DATA_SOURCE_NAME=Thanos -export LOKI_DATA_SOURCE_NAME=Loki -export INFRA_PLATFORM=kubernetes -export GRAFANA_FOLDER=CRIB -export DASHBOARD_NAME=Core-Cluster-Load - -devspace run dashboard_deploy -``` - -Open Grafana folder `DashboardCoreDebug` and find dashboard `ChainlinkClusterDebug` diff --git a/charts/chainlink-cluster/templates/chainlink-cm.yaml b/charts/chainlink-cluster/templates/chainlink-cm.yaml deleted file mode 100644 index bd0c911331c..00000000000 --- a/charts/chainlink-cluster/templates/chainlink-cm.yaml +++ /dev/null @@ -1,77 +0,0 @@ -{{- if .Values.chainlink.enabled }} -{{- range $cfg := .Values.chainlink.nodes }} -apiVersion: v1 -kind: ConfigMap -metadata: - labels: - app: {{ $.Release.Name }}-{{ $cfg.name }}-cm - release: {{ $.Release.Name }} - name: {{ $.Release.Name }}-{{ $cfg.name }}-cm -data: - apicredentials: | - notreal@fakeemail.ch - fj293fbBnlQ!f9vNs - node-password: T.tLHkcmwePT/p,]sYuntjwHKAsrhm#4eRs4LuKHwvHejWYAC2JP4M8HimwgmbaZ - init.sql: | - CREATE - EXTENSION pg_stat_statements; - default.toml: | - {{- if (hasKey $cfg "toml") }} - {{ $cfg.toml | nindent 4 }} - {{- else if and (hasKey $.Values.chainlink.global "toml") $.Values.chainlink.global.toml }} - {{ $.Values.chainlink.global.toml | nindent 4 }} - {{- else }} - RootDir = './clroot' - [Log] - JSONConsole = true - Level = 'debug' - [WebServer] - AllowOrigins = '*' - SecureCookies = false - SessionTimeout = '999h0m0s' - [Feature] - FeedsManager = true - LogPoller = true - UICSAKeys = true - [OCR] - Enabled = true - DefaultTransactionQueueDepth = 0 - [P2P] - [P2P.V2] - Enabled = true - ListenAddresses = ['0.0.0.0:6690'] - AnnounceAddresses = ['0.0.0.0:6690'] - DeltaDial = '500ms' - DeltaReconcile = '5s' - {{- range $chainCfg := $.Values.geth.chains }} - [[EVM]] - ChainID = {{ $chainCfg.networkId | quote }} - MinContractPayment = '0' - AutoCreateKey = true - FinalityDepth = 1 - {{- if (hasKey $chainCfg "customEVMConfigToml") }} - {{- $chainCfg.customEVMConfigToml | nindent 4 }} - {{- end }} - [[EVM.Nodes]] - Name = 'node-{{ $chainCfg.networkId }}' - WSURL = 'ws://geth-{{ $chainCfg.networkId }}:8546' - HTTPURL = 'http://geth-{{ $chainCfg.networkId }}:8544' - {{- end }} - [WebServer.TLS] - HTTPSPort = 0 - {{- end }} - overrides.toml: | - {{- if (hasKey $cfg "overridesToml") }} - {{- $cfg.overridesToml | nindent 4 }} - {{- else if and (hasKey $.Values.chainlink.global "overridesToml") $.Values.chainlink.global.overridesToml }} - {{- $.Values.chainlink.global.overridesToml | nindent 4 }} - {{ else }} - {{- end }} - secrets.toml: | - {{ if (hasKey $cfg "secretsToml") }} - {{ $cfg.secretsToml | nindent 4 }} - {{ else }} - {{ end }} ---- -{{- end }} -{{- end }} diff --git a/charts/chainlink-cluster/templates/chainlink-db-deployment.yaml b/charts/chainlink-cluster/templates/chainlink-db-deployment.yaml deleted file mode 100644 index 0ca7c4afd71..00000000000 --- a/charts/chainlink-cluster/templates/chainlink-db-deployment.yaml +++ /dev/null @@ -1,154 +0,0 @@ -{{- if .Values.db.enabled }} -{{- range $cfg := .Values.chainlink.nodes }} -apiVersion: apps/v1 -{{ if $.Values.db.stateful }} -kind: StatefulSet -{{ else }} -kind: Deployment -{{ end }} -metadata: - name: {{ $.Release.Name }}-{{ $cfg.name }}-db - labels: - app: {{ $.Release.Name }}-db - instance: {{ $cfg.name }}-db - release: {{ $.Release.Name }} -spec: - {{ if $.Values.db.stateful }} - serviceName: {{ $.Release.Name }}-db-${{ $cfg.name }} - podManagementPolicy: Parallel - volumeClaimTemplates: - - metadata: - name: postgres - spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: {{ .Values.db.capacity }} - {{ end }} - selector: - matchLabels: - app: {{ $.Release.Name }}-db - # Used for testing. - # havoc-component-group and havoc-network-group are used by "havoc" chaos testing tool - havoc-component-group: db - havoc-network-group: db - instance: {{ $cfg.name }}-db - release: {{ $.Release.Name }} - template: - metadata: - labels: - app: {{ $.Release.Name }}-db - # Used for testing. - # havoc-component-group and havoc-network-group are used by "havoc" chaos testing tool - havoc-component-group: db - havoc-network-group: db - instance: {{ $cfg.name }}-db - release: {{ $.Release.Name }} - {{- range $key, $value := $.Values.labels }} - {{ $key }}: {{ $value | quote }} - {{- end }} - annotations: - prometheus.io/scrape: 'true' - app.kubernetes.io/managed-by: "Helm" - meta.helm.sh/release-namespace: "{{ $.Release.Namespace }}" - {{- range $key, $value := $.Values.podAnnotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} - spec: - volumes: - # TODO: breakout this config map into a separate one for the db. - - name: {{ $.Release.Name }}-{{ $cfg.name }}-cm - configMap: - name: {{ $.Release.Name }}-{{ $cfg.name }}-cm - securityContext: - {{- toYaml $.Values.db.podSecurityContext | nindent 8 }} - containers: - - name: chainlink-db - securityContext: - {{- toYaml $.Values.db.securityContext | nindent 12 }} - image: {{ default "postgres:11.15" $.Values.db.image }} - command: - - docker-entrypoint.sh - args: - - "-c" - - "shared_preload_libraries=pg_stat_statements" - - "-c" - - "pg_stat_statements.track=all" - ports: - - name: postgres - containerPort: 5432 - env: - - name: POSTGRES_DB - value: chainlink - - name: POSTGRES_PASSWORD - value: verylongdatabasepassword - - name: PGPASSWORD - value: verylongdatabasepassword - - name: PGUSER - value: postgres - lifecycle: - preStop: - exec: - command: [ "/bin/sh", "-c", "while $(psql -d chainlink -c \"SELECT COUNT(*) FROM pg_stat_activity WHERE datname = 'chainlink' AND state = 'active';\" -tA ); echo \"waiting for connection to become 0\"; sleep 10; fi; done" ] - livenessProbe: - exec: - command: - - pg_isready - - -U - - postgres - initialDelaySeconds: 1 - periodSeconds: 5 - timeoutSeconds: 10 - readinessProbe: - exec: - command: - - pg_isready - - -U - - postgres - initialDelaySeconds: 1 - periodSeconds: 5 - timeoutSeconds: 10 - startupProbe: - exec: - command: - - pg_isready - - -U - - postgres - initialDelaySeconds: 15 - periodSeconds: 5 - failureThreshold: 20 - {{ if (hasKey $.Values.db "resources") }} - resources: - requests: - memory: {{ default "256Mi" $.Values.db.resources.requests.memory }} - cpu: {{ default "250m" $.Values.db.resources.requests.cpu }} - limits: - memory: {{ default "256Mi" $.Values.db.resources.limits.memory }} - cpu: {{ default "250m" $.Values.db.resources.limits.cpu }} - {{ else }} - {{ end }} - volumeMounts: - - mountPath: /docker-entrypoint-initdb.d/init.sql - name: {{ $.Release.Name }}-{{ $cfg.name }}-cm - subPath: init.sql - {{ if $.Values.db.stateful }} - - mountPath: /var/lib/postgresql/data - name: postgres - subPath: postgres-db - {{ end }} -{{- with $.Values.nodeSelector }} - nodeSelector: - {{ toYaml . | indent 8 }} -{{- end }} -{{- with $.Values.affinity }} - affinity: - {{ toYaml . | indent 8 }} -{{- end }} -{{- with $.Values.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} -{{- end }} ---- -{{- end }} -{{- end }} diff --git a/charts/chainlink-cluster/templates/chainlink-db-networkpolicy.yaml b/charts/chainlink-cluster/templates/chainlink-db-networkpolicy.yaml deleted file mode 100644 index 53664884f26..00000000000 --- a/charts/chainlink-cluster/templates/chainlink-db-networkpolicy.yaml +++ /dev/null @@ -1,21 +0,0 @@ -{{- if and .Values.db.enabled .Values.networkPolicies.enabled }} -apiVersion: networking.k8s.io/v1 -kind: NetworkPolicy -metadata: - name: {{ $.Release.Name }}-db -spec: - podSelector: - matchLabels: - app: {{ $.Release.Name }}-db - policyTypes: - - Ingress - ingress: - - from: - # Allow all node pods to access the database pods. - - podSelector: - matchLabels: - app: {{ $.Release.Name }} - ports: - - protocol: TCP - port: 5432 -{{- end }} diff --git a/charts/chainlink-cluster/templates/chainlink-db-service.yaml b/charts/chainlink-cluster/templates/chainlink-db-service.yaml deleted file mode 100644 index 5ed7d0ca4dd..00000000000 --- a/charts/chainlink-cluster/templates/chainlink-db-service.yaml +++ /dev/null @@ -1,18 +0,0 @@ -{{- if .Values.db.enabled }} -{{- range $cfg := .Values.chainlink.nodes }} -apiVersion: v1 -kind: Service -metadata: - name: {{ $.Release.Name }}-db-{{ $cfg.name }} -spec: - selector: - app: {{ $.Release.Name }}-db - instance: {{ $cfg.name }}-db - release: {{ $.Release.Name }} - ports: - - protocol: TCP - port: 5432 - targetPort: 5432 ---- -{{- end }} -{{- end }} diff --git a/charts/chainlink-cluster/templates/chainlink-node-deployment.yaml b/charts/chainlink-cluster/templates/chainlink-node-deployment.yaml deleted file mode 100644 index e91a400967a..00000000000 --- a/charts/chainlink-cluster/templates/chainlink-node-deployment.yaml +++ /dev/null @@ -1,130 +0,0 @@ -{{- if .Values.chainlink.enabled }} -{{- range $index, $cfg := .Values.chainlink.nodes }} -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ if eq $index 0 }}{{ $.Release.Name }}-{{ $cfg.name }}-bootstrap{{ else }}{{ $.Release.Name }}-{{ $cfg.name }}{{ end }} - labels: - app: {{ $.Release.Name }} - instance: {{ $cfg.name }} - release: {{ $.Release.Name }} - {{- range $key, $value := $.Values.labels }} - {{ $key }}: {{ $value | quote }} - {{- end }} -spec: - strategy: - # Need to recreate the pod to deal with lease lock held by old pod. - type: Recreate - selector: - matchLabels: - app: {{ $.Release.Name }} - # Used for testing. - # havoc-component-group and havoc-network-group are used by "havoc" chaos testing tool - {{ if eq $index 0 }}{{ else }} - havoc-component-group: node - {{ end }} - {{ if eq $index 0 }}{{ else }} - havoc-network-group: {{ if gt $index 2 }}"1"{{ else }}"2"{{ end }} - {{ end }} - instance: {{ $cfg.name }} - release: {{ $.Release.Name }} - template: - metadata: - labels: - app: {{ $.Release.Name }} - # Used for testing. - # havoc-component-group and havoc-network-group are used by "havoc" chaos testing tool - {{ if eq $index 0 }}{{ else }} - havoc-component-group: node - {{ end }} - {{ if eq $index 0 }}{{ else }} - havoc-network-group: {{ if gt $index 2 }}"1"{{ else }}"2"{{ end }} - {{ end }} - - instance: {{ $cfg.name }} - release: {{ $.Release.Name }} - {{- range $key, $value := $.Values.labels }} - {{ $key }}: {{ $value | quote }} - {{- end }} - annotations: - prometheus.io/scrape: 'true' - {{- range $key, $value := $.Values.podAnnotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} - spec: - volumes: - - name: {{ $.Release.Name }}-{{ $cfg.name }}-cm - configMap: - name: {{ $.Release.Name }}-{{ $cfg.name }}-cm - securityContext: - {{- toYaml $.Values.chainlink.podSecurityContext | nindent 8 }} - containers: - - name: node - securityContext: - {{- toYaml $.Values.chainlink.securityContext | nindent 12 }} - image: {{ default "public.ecr.aws/chainlink/chainlink" $cfg.image }} - imagePullPolicy: Always - command: [ "bash", "-c", "while ! pg_isready -U postgres --host {{ $.Release.Name }}-db-{{ $cfg.name }} --port 5432; do echo \"waiting for database to start\"; sleep 1; done && chainlink -c /etc/node-secrets-volume/default.toml -c /etc/node-secrets-volume/overrides.toml -secrets /etc/node-secrets-volume/secrets.toml node start -d -p /etc/node-secrets-volume/node-password -a /etc/node-secrets-volume/apicredentials --vrfpassword=/etc/node-secrets-volume/apicredentials" ] - ports: - - name: access - containerPort: {{ $.Values.chainlink.web_port }} - - name: p2p - containerPort: {{ $.Values.chainlink.p2p_port }} - env: - - name: CL_DATABASE_URL - value: postgresql://postgres:verylongdatabasepassword@{{ $.Release.Name }}-db-{{ $cfg.name }}/chainlink?sslmode=disable - - name: CL_DEV - value: "false" - {{- range $name, $value := $.Values.chainlink.extraEnvVars }} - - name: "{{ $name }}" - value: "{{ $value }}" - {{- end }} - volumeMounts: - - name: {{ $.Release.Name }}-{{ $cfg.name }}-cm - mountPath: /etc/node-secrets-volume/ - livenessProbe: - httpGet: - path: /health - port: {{ $.Values.chainlink.web_port }} - initialDelaySeconds: 1 - periodSeconds: 5 - timeoutSeconds: 10 - readinessProbe: - httpGet: - path: /health - port: {{ $.Values.chainlink.web_port }} - initialDelaySeconds: 1 - periodSeconds: 5 - timeoutSeconds: 10 - startupProbe: - httpGet: - path: / - port: {{ $.Values.chainlink.web_port }} - initialDelaySeconds: 15 - periodSeconds: 5 - failureThreshold: 20 - {{ if (hasKey $cfg "resources") }} - resources: - requests: - memory: {{ default "1024Mi" $cfg.resources.requests.memory }} - cpu: {{ default "300m" $cfg.resources.requests.cpu }} - limits: - memory: {{ default "1024Mi" $cfg.resources.limits.memory }} - cpu: {{ default "300m" $cfg.resources.limits.cpu }} - {{ else }} - {{ end }} -{{- with $.Values.nodeSelector }} - nodeSelector: - {{ toYaml . | indent 8 }} -{{- end }} -{{- with $.Values.affinity }} - affinity: - {{ toYaml . | indent 8 }} -{{- end }} -{{- with $.Values.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} -{{- end }} ---- -{{- end }} -{{- end }} diff --git a/charts/chainlink-cluster/templates/chainlink-node-networkpolicy.yaml b/charts/chainlink-cluster/templates/chainlink-node-networkpolicy.yaml deleted file mode 100644 index 8f465288767..00000000000 --- a/charts/chainlink-cluster/templates/chainlink-node-networkpolicy.yaml +++ /dev/null @@ -1,18 +0,0 @@ -{{- if and .Values.chainlink.enabled .Values.networkPolicies.enabled }} -apiVersion: networking.k8s.io/v1 -kind: NetworkPolicy -metadata: - name: {{ $.Release.Name }}-node -spec: - podSelector: - matchLabels: - app: {{ $.Release.Name }} - policyTypes: - - Ingress - ingress: - # Allow all ingress traffic between the node pods. - - from: - - podSelector: - matchLabels: - app: {{ $.Release.Name }} -{{- end }} diff --git a/charts/chainlink-cluster/templates/chainlink-node-service.yaml b/charts/chainlink-cluster/templates/chainlink-node-service.yaml deleted file mode 100644 index 71b9ca498d2..00000000000 --- a/charts/chainlink-cluster/templates/chainlink-node-service.yaml +++ /dev/null @@ -1,20 +0,0 @@ -{{- if .Values.chainlink.enabled }} -{{- range $cfg := .Values.chainlink.nodes }} -apiVersion: v1 -kind: Service -metadata: - name: {{ $.Release.Name }}-{{ $cfg.name }} -spec: - ports: - - name: node-port - port: {{ $.Values.chainlink.web_port }} - targetPort: {{ $.Values.chainlink.web_port }} - - name: p2p-port - port: {{ $.Values.chainlink.p2p_port }} - targetPort: {{ $.Values.chainlink.p2p_port }} - selector: - instance: {{ $cfg.name }} - type: ClusterIP ---- -{{- end }} -{{- end }} diff --git a/charts/chainlink-cluster/templates/chainlink-pod-monitor.yaml b/charts/chainlink-cluster/templates/chainlink-pod-monitor.yaml deleted file mode 100644 index bb8c5d2b1a6..00000000000 --- a/charts/chainlink-cluster/templates/chainlink-pod-monitor.yaml +++ /dev/null @@ -1,18 +0,0 @@ -{{- if and .Values.chainlink.enabled .Values.prometheusMonitor }} -apiVersion: monitoring.coreos.com/v1 -kind: PodMonitor -metadata: - name: {{ $.Release.Name }}-pod-monitor - labels: - release: grafana-agent -spec: - namespaceSelector: - matchNames: - - {{ $.Release.Namespace }} - podMetricsEndpoints: - - port: access - selector: - matchLabels: - app: {{ $.Release.Name }} -{{- end }} ---- \ No newline at end of file diff --git a/charts/chainlink-cluster/templates/chainlink-secret.yaml b/charts/chainlink-cluster/templates/chainlink-secret.yaml deleted file mode 100644 index f0531b16511..00000000000 --- a/charts/chainlink-cluster/templates/chainlink-secret.yaml +++ /dev/null @@ -1,14 +0,0 @@ -{{- if .Values.chainlink.enabled }} -{{- range $cfg := .Values.chainlink.nodes }} -apiVersion: v1 -kind: Secret -metadata: - name: {{ $.Release.Name }}-{{ $cfg.name }}node-creds-secret -type: Opaque -data: - nodepassword: VC50TEhrY213ZVBUL3AsXXNZdW50andIS0FzcmhtIzRlUnM0THVLSHd2SGVqV1lBQzJKUDRNOEhpbXdnbWJhWgo= - apicredentials: bm90cmVhbEBmYWtlZW1haWwuY2hudHdvY2hhaW5zCg== - node-password: VC50TEhrY213ZVBUL3AsXXNZdW50andIS0FzcmhtIzRlUnM0THVLSHd2SGVqV1lBQzJKUDRNOEhpbXdnbWJhWgo= ---- -{{- end }} -{{- end }} diff --git a/charts/chainlink-cluster/templates/geth-config-map.yaml b/charts/chainlink-cluster/templates/geth-config-map.yaml deleted file mode 100644 index 6a5f4bacc0d..00000000000 --- a/charts/chainlink-cluster/templates/geth-config-map.yaml +++ /dev/null @@ -1,155 +0,0 @@ -{{ if and (hasKey .Values "geth") .Values.geth.enabled }} -{{- range $cfg := .Values.geth.chains }} -apiVersion: v1 -kind: ConfigMap -metadata: - labels: - app: geth-{{ $cfg.networkId }}-cm - release: {{ $.Release.Name }} - name: geth-{{ $cfg.networkId }}-cm -data: - key1: | - {"address":"f39fd6e51aad88f6f4ce6ab8827279cfffb92266","crypto":{"cipher":"aes-128-ctr","ciphertext":"c36afd6e60b82d6844530bd6ab44dbc3b85a53e826c3a7f6fc6a75ce38c1e4c6","cipherparams":{"iv":"f69d2bb8cd0cb6274535656553b61806"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"80d5f5e38ba175b6b89acfc8ea62a6f163970504af301292377ff7baafedab53"},"mac":"f2ecec2c4d05aacc10eba5235354c2fcc3776824f81ec6de98022f704efbf065"},"id":"e5c124e9-e280-4b10-a27b-d7f3e516b408","version":3} - key2: | - {"address":"70997970c51812dc3a010c7d01b50e0d17dc79c8","crypto":{"cipher":"aes-128-ctr","ciphertext":"f8183fa00bc112645d3e23e29a233e214f7c708bf49d72750c08af88ad76c980","cipherparams":{"iv":"796d08e3e1f71bde89ed826abda96cda"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"03c864a22a1f7b06b1da12d8b93e024ac144f898285907c58b2abc135fc8a35c"},"mac":"5fe91b1a1821c0d9f85dfd582354ead9612e9a7e9adc38b06a2beff558c119ac"},"id":"d2cab765-5e30-42ae-bb91-f090d9574fae","version":3} - key3: | - {"address":"3c44cdddb6a900fa2b585dd299e03d12fa4293bc","crypto":{"cipher":"aes-128-ctr","ciphertext":"2cd6ab87086c47f343f2c4d957eace7986f3b3c87fc35a2aafbefb57a06d9f1c","cipherparams":{"iv":"4e16b6cd580866c1aa642fb4d7312c9b"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"0cabde93877f6e9a59070f9992f7a01848618263124835c90d4d07a0041fc57c"},"mac":"94b7776ea95b0ecd8406c7755acf17b389b7ebe489a8942e32082dfdc1f04f57"},"id":"ade1484b-a3bb-426f-9223-a1f5e3bde2e8","version":3} - key4: | - {"address":"90f79bf6eb2c4f870365e785982e1f101e93b906","crypto":{"cipher":"aes-128-ctr","ciphertext":"15144214d323871e00f7b205368128061c91b77a27b7deec935f8f5b734f0d42","cipherparams":{"iv":"bb22ba8051ef9f60abded7a9f4f2c6ae"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"07331ef3035567c00830b4e50d5dd68bc877974b4ce38cd42fef755be01556c9"},"mac":"2294eacadaf2761851814451d8c7dcca20a606a0344335d98f09403aba4e82ca"},"id":"96af8cc7-97e1-4bba-8968-632b034986c2","version":3} - key5: | - {"address":"15d34aaf54267db7d7c367839aaf71a00a2c6a65","crypto":{"cipher":"aes-128-ctr","ciphertext":"057878284a6c74d3ad99910adddd6b477b383837dbf2280efea585f0f0fdb012","cipherparams":{"iv":"e6eab29d60b526f305f8d47badf48687"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"dfdca8066d2486da5cb9a909d03744e2a8c6537930271e85e7cd8a5d952c0f22"},"mac":"f8352be41c9a06d69111ca4d8fcff0eef079b68b1173cad99803538991716c5d"},"id":"a35bb452-0d57-42d5-8d25-5a00a40a4db8","version":3} - key6: | - {"address":"9965507d1a55bcc2695c58ba16fb37d819b0a4dc","crypto":{"cipher":"aes-128-ctr","ciphertext":"5a73201500307c6aa98edd44d962b344a893768331454a61595ec848e738e9d2","cipherparams":{"iv":"5282de2b3e2b305019a2fed5c62f3383"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"6ad001831d097f175fff7d6cf61301e9620b32afd9a7a6437e6030af14576a96"},"mac":"0a55eddbd13c713aa8b8c4106b2fb62bc1d1e18e7177207a444f83a4d8426ed5"},"id":"27aed2b2-cb94-4d37-8819-b15219187bb5","version":3} - key7: | - {"address":"976ea74026e726554db657fa54763abd0c3a0aa9","crypto":{"cipher":"aes-128-ctr","ciphertext":"a6edf11e81b38e60a549696236cb9efc026e87adc45a9521ea7b2c45a2a9fbb9","cipherparams":{"iv":"82f4c79cd4b28a8585a9c78d758f832b"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"87400e16ecc320dadff85eccbf4dbaaea2dd91e50047e4aa391799bb319c1fd8"},"mac":"80c83dad05998db6c673a97096fcfad54636458f4a3c82483686b253f8cc9b69"},"id":"fc7d7694-6206-48fc-bb25-36b523f90df6","version":3} - key8: | - {"address":"14dc79964da2c08b23698b3d3cc7ca32193d9955","crypto":{"cipher":"aes-128-ctr","ciphertext":"410f258bc8b12a0250cba22cbc5e413534fcf90bf322ced6943189ad9e43b4b9","cipherparams":{"iv":"1dd6077a8bee9b3bf2ca90e6abc8a237"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"5d3358bf99bbcb82354f40e5501abf4336bc141ee05d8feed4fbe7eb8c08c917"},"mac":"9cd959fa1e8129a8deb86e0264ec81d6cde79b5a19ae259b7d00543c9037908a"},"id":"689d7ad2-fe46-4c09-9c2a-a50e607989b8","version":3} - key9: | - {"address":"23618e81e3f5cdf7f54c3d65f7fbc0abf5b21e8f","crypto":{"cipher":"aes-128-ctr","ciphertext":"13dccac740314edea20d44e6f3592575bbcb739ec5892d635326cff3c386eb86","cipherparams":{"iv":"bf42d811cd41fa97ddcae3425f8c3211"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"d2fa67cbb5e86d5bf9a90e27b8747bac493614b45778d43e9da1c14e06b2401d"},"mac":"7d2797cf344704d8f36265238d3938e06952c78ab7dfcbac53dc7f472c93d933"},"id":"4c8e899e-80f0-4417-9b1e-c5e29049f1e7","version":3} - key10: | - {"address":"a0ee7a142d267c1f36714e4a8f75612f20a79720","crypto":{"cipher":"aes-128-ctr","ciphertext":"56bc8766f47aeafae74eea333e1e890a3776d7fae6c48cbdbffb270655ce050d","cipherparams":{"iv":"a66129e6a110b3ddf93b4355aa147c58"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"15c4e8bcc80920139eb236d91194825f1fce27dd2af281e0f2752d8a5dbc48bd"},"mac":"db01e720866ce8bb7897dfc7773e064003ad53429a79732ee769cf6d02273570"},"id":"87b2d76f-1b70-4e4f-8b2a-5d1915c1177c","version":3} - key11: | - {"address":"bcd4042de499d14e55001ccbb24a551f3b954096","crypto":{"cipher":"aes-128-ctr","ciphertext":"e455eda6e38d246c03b930f845adfc8721ca75e9f47135cd4c18dbc3e5c5440a","cipherparams":{"iv":"0b1a0a24acc1ad25b0f170f751c2cb27"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"69f324ed0787794878bf5f84d4dbbc70dec1274cad666399edc48640605f64c8"},"mac":"f07da09c460a69f943f5639545d2b3f72c1e9789f0421ad41d3078ea3db12c96"},"id":"7ec7bb3c-c486-4785-a4fc-f8f4b2fc7764","version":3} - key12: | - {"address":"71be63f3384f5fb98995898a86b02fb2426c5788","crypto":{"cipher":"aes-128-ctr","ciphertext":"4194377a05fd3d13e0a3155dad974a003fe5f7a3b5acb35d7d97c50daa8990d4","cipherparams":{"iv":"607670778baf62b1e86394cf1980487a"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"d63b890ad7f4fcc857681faabe9319dffc53893966ef0810bf64c4f319b0ffc5"},"mac":"bfaf924959e65c8030ece259d52ed52d5d21bd74f1a67ae545d4bb289a479e16"},"id":"0c6af842-384f-49b6-b5b7-199a1e05486b","version":3} - key13: | - {"address":"fabb0ac9d68b0b445fb7357272ff202c5651694a","crypto":{"cipher":"aes-128-ctr","ciphertext":"6bad79e57a9b80e1b2aa7292a2f72613615a43da2796abeac071ad06a2decff6","cipherparams":{"iv":"91f24b0da7179a0e62803cb2cba6bb49"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"153a063a0dcf7abe7fd730ba908d00856783f0814e1b684a6a08b519d5dbadda"},"mac":"b007d01324b2d05c9a0333e4fbf826681ee2f5ddb4007c6fab20ef923481ba8f"},"id":"fb09dfff-ac3b-46c5-8d88-f4549007977b","version":3} - key14: | - {"address":"1cbd3b2770909d4e10f157cabc84c7264073c9ec","crypto":{"cipher":"aes-128-ctr","ciphertext":"3a7b9d84afb8d6241974cf35a34cbce077aae04f4c0aea1730167c9d8266bd74","cipherparams":{"iv":"329b510bce6e63a53827a0c307c041b5"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"6648c7f4ed24d1134dcf5983a5ca4bc5ae16787f0813530d5ae4c9c61dd3623f"},"mac":"65098dcdaabfb404539aeeea20f41b24886f9d3a55b9a841e2769692e19b75e8"},"id":"2053c6ce-da95-44d2-af1f-1939319aaa45","version":3} - key15: | - {"address":"df3e18d64bc6a983f673ab319ccae4f1a57c7097","crypto":{"cipher":"aes-128-ctr","ciphertext":"ab5802ecd849b0931d822a59597f9b59277526c13dcf792d1f6771ff0a63c902","cipherparams":{"iv":"c10e50c9f7359d281bfddd90ffeee967"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"97848515d8c93caab641882fea9b1428de32a8cf006d998893d01c03a0c2f48c"},"mac":"a2c5fbf7f78e498ee4a8bb242b4a03d4fb77f4135218a5af1d4b99ebd8991c9d"},"id":"83fa51c4-48f7-4d1d-b368-c9bd9d8841ee","version":3} - key16: | - {"address":"cd3b766ccdd6ae721141f452c550ca635964ce71","crypto":{"cipher":"aes-128-ctr","ciphertext":"05f18b7afa63c3748f3c5c99c8f036df1295f7660380e3c6a3fc6252f40566aa","cipherparams":{"iv":"3346ffa57c1b04f678d373cce4e4383a"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"c21f4d22a2324039b3f7cd6dbfa757bc489fa676d700b3ee88d0e3b334698720"},"mac":"7762c08bb673333946e87c33108349d10850c559104e863c5b0826cd6e64df78"},"id":"67b3c79c-d696-4e1b-a381-d67553bc674b","version":3} - key17: | - {"address":"2546bcd3c84621e976d8185a91a922ae77ecec30","crypto":{"cipher":"aes-128-ctr","ciphertext":"accd54a6b3969a4aed305baa0cd35ce4b54dcc92d866ff8b3d23536609a282eb","cipherparams":{"iv":"93be3f925ddea06113b3dcac650e9b6b"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"092f7823a668981e14f715ae7352fa176461cddd94267f9dd6f23f9fe663ba9a"},"mac":"bb4792148205a4f0d8dfc5cd04725d0a4785a6d7e6ca0c208ffc0b005947821b"},"id":"368b24f6-6d1b-4fd5-a506-d73b5bb4aac8","version":3} - key18: | - {"address":"bda5747bfd65f08deb54cb465eb87d40e51b197e","crypto":{"cipher":"aes-128-ctr","ciphertext":"8bc3bf720dce7d010617edaf6db4ed35701c13ff67cd9dce742de77b4b4b3df0","cipherparams":{"iv":"50075ca52dd388719b27e3029f01a484"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"8e365100caeda20cc0a13c28517d62fc41d5cae1da4dae3fef51daf4b323da81"},"mac":"5ed7ad5aca897fd03ebeb08a7fcfa38d2eadc240b6eb6ad53f7c06c6ee9085de"},"id":"8b627671-46e5-4081-a25a-c928b135a87e","version":3} - key19: | - {"address":"dd2fd4581271e230360230f9337d5c0430bf44c0","crypto":{"cipher":"aes-128-ctr","ciphertext":"39c1bbd9c070465fb7828be95b3b0978482aab16b8b1f11db0022321bcaa9172","cipherparams":{"iv":"35bd60a818c50e65fee00031f0a33d8e"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"eecd539685126cfc1f444070d7528c5f570d71c48994118af8c50c316ef72a99"},"mac":"93224b4767a57a8cd394c37087f0dfc9393b381f09c45c5abc55cec5d719181f"},"id":"321978cb-f1bf-4790-8a29-5e5878f8dbb9","version":3} - key20: | - {"address":"8626f6940e2eb28930efb4cef49b2d1f2c9c1199","crypto":{"cipher":"aes-128-ctr","ciphertext":"8a3f1dc7b110c5ce59007f6e55fd7f055b41e518b1f34e93b4185aa44d8a1f92","cipherparams":{"iv":"02fe1b25039baf5abbdd448b932b2ab5"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"a75a6b250851f76f36132aad3ca944493b7d20a07bd4c7b1d8574596a240b35f"},"mac":"679d96ef17c9ac86960e61ced85eb551ba1895cfde2c8bb099e38dc1251a44f0"},"id":"5d3a08df-78f3-43e8-8978-75652502c962","version":3} - password.txt: | - init.sh: | - #!/bin/bash - if [ ! -d /chain/chain-data/keystore ]; then - echo "/chain/chain-data/keystore not found, running 'geth init'..." - geth init --datadir /chain/chain-data/ /chain/genesis.json - echo "...done!" - cp /chain/config/key* /chain/chain-data/keystore - fi - - cd /chain/chain-data && geth "$@" - genesis.json: | - { - "config": { - "chainId": {{ $cfg.networkId }}, - "homesteadBlock": 0, - "eip150Block": 0, - "eip155Block": 0, - "eip158Block": 0, - "eip160Block": 0, - "byzantiumBlock": 0, - "constantinopleBlock": 0, - "petersburgBlock": 0, - "istanbulBlock": 0, - "muirGlacierBlock": 0, - "berlinBlock": 0, - "londonBlock": 0, - "clique": { - "period": 2, - "epoch": 30000 - } - }, - "nonce": "0x0000000000000042", - "mixhash": "0x0000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "1", - "coinbase": "0x3333333333333333333333333333333333333333", - "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000", - "extraData": "0x0000000000000000000000000000000000000000000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb922660000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "gasLimit": "8000000000", - "alloc": { - "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266": { - "balance": "20000000000000000000000" - }, - "0x70997970C51812dc3A010C7d01b50e0d17dc79C8": { - "balance": "20000000000000000000000" - }, - "0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC": { - "balance": "20000000000000000000000" - }, - "0x90F79bf6EB2c4f870365E785982E1f101E93b906": { - "balance": "20000000000000000000000" - }, - "0x15d34AAf54267DB7D7c367839AAf71A00a2C6A65": { - "balance": "20000000000000000000000" - }, - "0x9965507D1a55bcC2695C58ba16FB37d819B0A4dc": { - "balance": "20000000000000000000000" - }, - "0x976EA74026E726554dB657fA54763abd0C3a0aa9": { - "balance": "20000000000000000000000" - }, - "0x14dC79964da2C08b23698B3D3cc7Ca32193d9955": { - "balance": "20000000000000000000000" - }, - "0x23618e81E3f5cdF7f54C3d65f7FBc0aBf5B21E8f": { - "balance": "20000000000000000000000" - }, - "0xa0Ee7A142d267C1f36714E4a8F75612F20a79720": { - "balance": "20000000000000000000000" - }, - "0xBcd4042DE499D14e55001CcbB24a551F3b954096": { - "balance": "20000000000000000000000" - }, - "0x71bE63f3384f5fb98995898A86B02Fb2426c5788": { - "balance": "20000000000000000000000" - }, - "0xFABB0ac9d68B0B445fB7357272Ff202C5651694a": { - "balance": "20000000000000000000000" - }, - "0x1CBd3b2770909D4e10f157cABC84C7264073C9Ec": { - "balance": "20000000000000000000000" - }, - "0xdF3e18d64BC6A983f673Ab319CCaE4f1a57C7097": { - "balance": "20000000000000000000000" - }, - "0xcd3B766CCDd6AE721141F452C550Ca635964ce71": { - "balance": "20000000000000000000000" - }, - "0x2546BcD3c84621e976D8185a91A922aE77ECEc30": { - "balance": "20000000000000000000000" - }, - "0xbDA5747bFD65F08deb54cb465eB87D40e51B197E": { - "balance": "20000000000000000000000" - }, - "0xdD2FD4581271e230360230F9337D5c0430Bf44C0": { - "balance": "20000000000000000000000" - }, - "0x8626f6940E2eb28930eFb4CeF49B2d1F2C9C1199": { - "balance": "20000000000000000000000" - } - } - } ---- -{{- end }} -{{- end }} diff --git a/charts/chainlink-cluster/templates/geth-deployment.yaml b/charts/chainlink-cluster/templates/geth-deployment.yaml deleted file mode 100644 index 6eccdbd20b4..00000000000 --- a/charts/chainlink-cluster/templates/geth-deployment.yaml +++ /dev/null @@ -1,130 +0,0 @@ -{{ if and (hasKey .Values "geth") .Values.geth.enabled }} -{{- range $cfg := .Values.geth.chains }} -apiVersion: apps/v1 -kind: Deployment -metadata: - name: geth-{{ $cfg.networkId }} - labels: - app: geth - release: {{ $.Release.Name }} - instance: geth-{{ $cfg.networkId }} -spec: - selector: - matchLabels: - app: geth - release: {{ $.Release.Name }} - instance: geth-{{ $cfg.networkId }} - # Used for testing. - # havoc-component-group and havoc-network-group are used by "havoc" chaos testing tool - havoc-component-group: "blockchain" - havoc-network-group: "blockchain" - template: - metadata: - labels: - app: geth - instance: geth-{{ $cfg.networkId }} - release: {{ $.Release.Name }} - # Used for testing. - # havoc-component-group and havoc-network-group are used by "havoc" chaos testing tool - havoc-component-group: "blockchain" - havoc-network-group: "blockchain" - annotations: - {{- range $key, $value := $.Values.podAnnotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} - spec: - volumes: - - name: configmap-volume - configMap: - name: geth-{{ $cfg.networkId }}-cm - - name: devchain-volume - emptyDir: {} - securityContext: - {{- toYaml $.Values.geth.podSecurityContext | nindent 8 }} - containers: - - name: geth-network - securityContext: - {{- toYaml $.Values.geth.securityContext | nindent 12 }} - image: "{{ default "ethereum/client-go" $.Values.geth.image }}:{{ default "stable" $.Values.geth.version }}" - command: [ "sh", "/chain/init.sh" ] - volumeMounts: - - name: devchain-volume - mountPath: /chain/chain-data - - name : configmap-volume - mountPath: /chain/genesis.json - subPath: genesis.json - - name : configmap-volume - mountPath: /chain/init.sh - subPath: init.sh - - name: configmap-volume - mountPath: /chain/config - args: - - '--password' - - '/chain/config/password.txt' - - '--datadir' - - '/chain/chain-data/' - - '--unlock' - - '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266' - - '--mine' - - '--miner.etherbase' - - '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266' - - '--ipcdisable' - - '--http.api' - - 'admin,debug,clique,eth,miner,net,personal,txpool,web3' - - '--http' - - '--http.vhosts' - - '*' - - '--http.addr' - - '0.0.0.0' - - '--http.port=8544' - - '--ws' - - '--ws.origins' - - '*' - - '--ws.addr' - - '0.0.0.0' - - '--ws.port=8546' - - '--graphql' - - '-graphql.corsdomain' - - '*' - - '--allow-insecure-unlock' - - '--rpc.allow-unprotected-txs' - - '--http.corsdomain' - - '*' - - '--vmdebug' - - '--networkid={{ $cfg.networkId }}' - - '--rpc.txfeecap' - - '0' - - '--dev.period' - - '{{ $.Values.geth.blocktime }}' - - '--miner.gasprice' - - '10000000000' - ports: - - name: http-rpc - containerPort: 8544 - - name: ws-rpc - containerPort: 8546 - {{ if (hasKey $.Values.geth "resources") }} - resources: - requests: - memory: {{ default "1024Mi" $.Values.geth.resources.requests.memory }} - cpu: {{ default "1000m" $.Values.geth.resources.requests.cpu }} - limits: - memory: {{ default "1024Mi" $.Values.geth.resources.limits.memory }} - cpu: {{ default "1000m" $.Values.geth.resources.limits.cpu }} - {{ else }} - {{ end }} -{{- with $.Values.nodeSelector }} - nodeSelector: - {{ toYaml . | indent 8 }} -{{- end }} -{{- with $.Values.affinity }} - affinity: - {{ toYaml . | indent 8 }} -{{- end }} -{{- with $.Values.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} -{{- end }} ---- -{{- end }} -{{- end }} diff --git a/charts/chainlink-cluster/templates/geth-networkpolicy.yaml b/charts/chainlink-cluster/templates/geth-networkpolicy.yaml deleted file mode 100644 index 2a37a92aaaa..00000000000 --- a/charts/chainlink-cluster/templates/geth-networkpolicy.yaml +++ /dev/null @@ -1,25 +0,0 @@ -{{ if and (hasKey .Values "geth") .Values.geth.enabled }} -{{- if .Values.networkPolicies.enabled }} -apiVersion: networking.k8s.io/v1 -kind: NetworkPolicy -metadata: - name: {{ $.Release.Name }}-geth -spec: - podSelector: - matchLabels: - app: geth - policyTypes: - - Ingress - ingress: - - from: - # Allow http and websocket connections from the node pods. - - podSelector: - matchLabels: - app: {{ $.Release.Name }} - ports: - - protocol: TCP - port: 8544 - - protocol: TCP - port: 8546 -{{- end }} -{{- end }} diff --git a/charts/chainlink-cluster/templates/geth-service.yaml b/charts/chainlink-cluster/templates/geth-service.yaml deleted file mode 100644 index 63a86a3d1d7..00000000000 --- a/charts/chainlink-cluster/templates/geth-service.yaml +++ /dev/null @@ -1,21 +0,0 @@ -{{ if and (hasKey .Values "geth") .Values.geth.enabled }} -{{- range $cfg := .Values.geth.chains }} -apiVersion: v1 -kind: Service -metadata: - name: geth-{{ $cfg.networkId }} -spec: - selector: - instance: geth-{{ $cfg.networkId }} - release: {{ $.Release.Name }} - ports: - - name: ws-rpc - port: {{ default "8546" $.Values.geth.wsrpc_port}} - targetPort: ws-rpc - - name: http-rpc - port: {{ default "8544" $.Values.geth.httprpc_port}} - targetPort: http-rpc - type: ClusterIP ---- -{{- end }} -{{- end }} diff --git a/charts/chainlink-cluster/templates/ingress.yaml b/charts/chainlink-cluster/templates/ingress.yaml deleted file mode 100644 index 9573ac54eb9..00000000000 --- a/charts/chainlink-cluster/templates/ingress.yaml +++ /dev/null @@ -1,43 +0,0 @@ -{{- if .Values.ingress.enabled -}} -apiVersion: networking.k8s.io/v1 -kind: Ingress -metadata: - name: {{ $.Release.Name }} - labels: - app: {{ $.Release.Name }} - release: {{ $.Release.Name }} - {{- range $key, $value := $.Values.labels }} - {{ $key }}: {{ $value | quote }} - {{- end }} - annotations: - alb.ingress.kubernetes.io/backend-protocol: HTTP - alb.ingress.kubernetes.io/certificate-arn: {{ $.Values.ingress.annotation_certificate_arn | quote }} - alb.ingress.kubernetes.io/group.name: {{ $.Values.ingress.annotation_group_name | quote }} - alb.ingress.kubernetes.io/scheme: internal - alb.ingress.kubernetes.io/target-type: ip - external-dns.alpha.kubernetes.io/ttl: "120" - {{- if .Values.ingress.extra_annotations }} - {{- range $key, $value := .Values.ingress.extra_annotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} - {{- end }} -spec: - {{- with .Values.ingress.ingressClassName }} - ingressClassName: {{ . }} - {{- end }} - rules: - {{- range .Values.ingress.hosts }} - - host: {{ .host }} - http: - paths: - {{- range .http.paths }} - - path: "/*" - pathType: ImplementationSpecific - backend: - service: - name: {{ .backend.service.name }} - port: - number: {{ .backend.service.port.number }} - {{- end }} - {{- end }} -{{- end -}} diff --git a/charts/chainlink-cluster/templates/mockserver-networkpolicy.yaml b/charts/chainlink-cluster/templates/mockserver-networkpolicy.yaml deleted file mode 100644 index 0fa48dcfc41..00000000000 --- a/charts/chainlink-cluster/templates/mockserver-networkpolicy.yaml +++ /dev/null @@ -1,21 +0,0 @@ -{{- if and .Values.mockserver.enabled .Values.networkPolicies.enabled }} -apiVersion: networking.k8s.io/v1 -kind: NetworkPolicy -metadata: - name: {{ $.Release.Name }}-mockserver -spec: - podSelector: - matchLabels: - app: mockserver - policyTypes: - - Ingress - ingress: - - from: - # Allow http traffic from the node pods. - - podSelector: - matchLabels: - app: {{ $.Release.Name }} - ports: - - protocol: TCP - port: 1080 -{{- end }} diff --git a/charts/chainlink-cluster/templates/networkpolicy-default.yaml b/charts/chainlink-cluster/templates/networkpolicy-default.yaml deleted file mode 100644 index 10927c26eb6..00000000000 --- a/charts/chainlink-cluster/templates/networkpolicy-default.yaml +++ /dev/null @@ -1,43 +0,0 @@ -{{- if and .Values.mockserver.enabled .Values.networkPolicies.enabled }} -apiVersion: networking.k8s.io/v1 -kind: NetworkPolicy -metadata: - name: default -spec: - podSelector: - matchLabels: {} - policyTypes: - - Ingress - - Egress - ingress: - {{- if and .Values.networkPolicyDefault.ingress.allowCustomCidrs (not (empty .Values.networkPolicyDefault.ingress.customCidrs)) }} - # Using a comma separated list to make it easy to pass in with: - # `helm template ... --set networkPolicyDefault.ingress.customCidrs=...` - {{- $cidrs := splitList "," .Values.networkPolicyDefault.ingress.customCidrs }} - - from: - {{- range $cidr := $cidrs }} - - ipBlock: - cidr: {{ $cidr | quote }} - {{- end }} - {{- else }} - # Deny all ingress if no rules are specified. Rules can still be specified in other templates. - - {} - {{- end }} - egress: - - to: - - namespaceSelector: - matchLabels: - kubernetes.io/metadata.name: "{{ $.Release.Namespace }}" - - to: - - namespaceSelector: - matchLabels: - kubernetes.io/metadata.name: kube-system - podSelector: - matchLabels: - k8s-app: kube-dns - ports: - - protocol: TCP - port: 53 - - protocol: UDP - port: 53 -{{- end }} \ No newline at end of file diff --git a/charts/chainlink-cluster/templates/tests/test-connection.yaml b/charts/chainlink-cluster/templates/tests/test-connection.yaml deleted file mode 100644 index b03b6a570c7..00000000000 --- a/charts/chainlink-cluster/templates/tests/test-connection.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: v1 -kind: Pod -metadata: - name: cl-nodes-connection-test - annotations: - "helm.sh/hook": test -spec: - containers: - {{- range $cfg := .Values.chainlink.nodes }} - - name: curl-{{ $cfg.name }} - image: radial/busyboxplus:curl - command: ['curl'] - args: [ '{{ $.Release.Name }}-{{ $cfg.name }}:{{ $.Values.chainlink.web_port }}' ] - {{- end }} - restartPolicy: Never \ No newline at end of file diff --git a/charts/chainlink-cluster/values.yaml b/charts/chainlink-cluster/values.yaml deleted file mode 100644 index d6315f488fd..00000000000 --- a/charts/chainlink-cluster/values.yaml +++ /dev/null @@ -1,439 +0,0 @@ -# override resources for keys "chainlink", "db", or "geth" if needed -# resources: -# requests: -# cpu: 350m -# memory: 1024Mi -# limits: -# cpu: 350m -# memory: 1024Mi -# images can be overriden for the same keys: -# image: ethereum/client-go -# version: stable -chainlink: - enabled: true - global: - # `toml` is initially set to null. Uncomment and modify the following example as needed. - # Example configuration parameters for all Chainlink nodes. Can be overridden by individual node configurations and via `overridesToml`. - # toml: |- - # [Log] - # Level = 'info' - # [WebServer] - # HTTPPort = 6688 - toml: null - # `overridesToml` is initially set to null. Uncomment and modify the following example as needed. - # Example configuration parameters that override the main configuration. - # overridesToml: |- - # [Log] - # Level = 'debug' - # [WebServer] - # HTTPPort = 6690 - overridesToml: null - podSecurityContext: - fsGroup: 14933 - securityContext: - capabilities: - drop: - - ALL - readOnlyRootFilesystem: false - runAsNonRoot: true - runAsUser: 14933 - runAsGroup: 14933 - web_port: 6688 - p2p_port: 6690 - nodes: - - name: node-1 - image: "public.ecr.aws/chainlink/chainlink:latest" - # default resources are 300m/1Gi - # first node need more resources to build faster inside container - # at least 2Gi of memory is required otherwise build will fail (OOM) - resources: - requests: - cpu: 2000m - memory: 2048Mi - limits: - cpu: 2000m - memory: 2048Mi - # override default config per node - # for example, use OCRv2 P2P setup, the whole config - # toml: | - # RootDir = './clroot' - # [Log] - # JSONConsole = true - # Level = 'debug' - # [WebServer] - # AllowOrigins = '*' - # SecureCookies = false - # SessionTimeout = '999h0m0s' - # [OCR2] - # Enabled = true - # [P2P] - # [P2P.V2] - # Enabled = false - # AnnounceAddresses = [] - # DefaultBootstrappers = [] - # DeltaDial = '15s' - # DeltaReconcile = '1m0s' - # ListenAddresses = [] - # [[EVM]] - # ChainID = '1337' - # MinContractPayment = '0' - # [[EVM.Nodes]] - # Name = 'node-0' - # WSURL = 'ws://geth:8546' - # HTTPURL = 'http://geth:8544' - # [WebServer.TLS] - # HTTPSPort = 0 - # or use overridesToml to override some part of configuration - # overridesToml: | - - name: node-2 - - name: node-3 - - name: node-4 - - name: node-5 - - name: node-6 - -# each CL node have a dedicated PostgreSQL 11.15 -# use StatefulSet by setting: -# -# stateful: true -# capacity 10Gi -# -# if you are running long tests -db: - enabled: true - podSecurityContext: - fsGroup: 999 - securityContext: - capabilities: - drop: - - ALL - readOnlyRootFilesystem: false - runAsNonRoot: true - runAsUser: 999 - runAsGroup: 999 - stateful: false - image: "postgres:15.6" - resources: - requests: - cpu: 1 - memory: 1024Mi - limits: - cpu: 1 - memory: 1024Mi -# default cluster shipped with latest Geth ( dev mode by default ) -geth: - enabled: true - podSecurityContext: - fsGroup: 999 - securityContext: - capabilities: - drop: - - ALL - readOnlyRootFilesystem: false - runAsNonRoot: true - runAsUser: 999 - runAsGroup: 999 - version: v1.12.0 - wsRpcPort: 8546 - httpRpcPort: 8544 - blocktime: 1 - chains: - - networkId: 1337 - # use to inject custom configuration for each chain, e.g. GasEstimator - # - customEVMConfigToml: | - # [EVM.GasEstimator] - # PriceMax = '200 gwei' - # LimitDefault = 6000000 - # FeeCapDefault = '200 gwei' - # [EVM.GasEstimator.BlockHistory] - # BlockHistorySize = 200 - # EIP1559FeeCapBufferBlocks = 0 - - networkId: 2337 - resources: - requests: - cpu: 1 - memory: 1024Mi - limits: - cpu: 1 - memory: 1024Mi -# mockserver is https://www.mock-server.com/where/kubernetes.html -# used to stub External Adapters -mockserver: - enabled: true - releasenameOverride: mockserver - service: - type: ClusterIP - app: - runAsUser: 999 - readOnlyRootFilesystem: false - port: 1080 - resources: - requests: - cpu: 1 - memory: 1024Mi - limits: - cpu: 1 - memory: 1024Mi -opentelemetry-collector: - enabled: true - mode: deployment - image: - repository: otel/opentelemetry-collector - tag: 0.95.0 - command: - name: otelcol - extraVolumes: - - name: trace-data - emptyDir: {} - extraVolumeMounts: - - name: trace-data - mountPath: /tracing - podSecurityContext: - fsGroup: 10001 - securityContext: - runAsNonRoot: true - runAsUser: 10001 - runAsGroup: 10001 - config: - receivers: - otlp: - protocols: - grpc: - endpoint: ${env:MY_POD_IP}:4317 - http: - endpoint: ${env:MY_POD_IP}:4318 - exporters: - otlp: - endpoint: app-tempo:4317 - tls: - insecure: true - service: - telemetry: - logs: - level: "debug" - pipelines: - traces: - receivers: [otlp] - exporters: [otlp] - -tempo: - enabled: true - image: - tag: "1.7.2" - # default storage path: /var/tempo/ - securityContext: - runAsNonRoot: true - runAsUser: 10001 - runAsGroup: 10001 - tempo: - storage: - trace: - backend: local # backend configuration to use - wal: - path: /tmp/tempo/wal # where to store the wal locally - local: - path: /tmp/tempo/blocks - -grafana: - enabled: true - image: - tag: 10.4.1 - rbac: - namespaced: true - datasources: - datasources.yaml: - apiVersion: 1 - datasources: - - name: Tempo - type: tempo - access: proxy - orgId: 1 - url: http://app-tempo:3100 - basicAuth: false - isDefault: true - version: 1 - editable: false - uid: tempo - jsonData: - httpMethod: GET - serviceMap: - datasourceUid: prometheus - env: - GF_AUTH_ANONYMOUS_ENABLED: "true" - GF_AUTH_ANONYMOUS_ORG_ROLE: "Admin" - GF_AUTH_DISABLE_LOGIN_FORM: "true" - GF_FEATURE_TOGGLES_ENABLE: "traceqlEditor tempoSearch tempoServiceGraph" - -ingress: - enabled: false - annotations: {} - ingressClassName: alb - hosts: - - host: chainlink-node-1.local - http: - paths: - - path: / - pathType: ImplementationSpecific - backend: - service: - name: chainlink-node-1 - port: - number: 6688 - - host: chainlink-node-2.local - http: - paths: - - path: / - pathType: ImplementationSpecific - backend: - service: - name: chainlink-node-2 - port: - number: 6688 - - host: chainlink-node-3.local - http: - paths: - - path: / - pathType: ImplementationSpecific - backend: - service: - name: chainlink-node-3 - port: - number: 6688 - - host: chainlink-node-4.local - http: - paths: - - path: / - pathType: ImplementationSpecific - backend: - service: - name: chainlink-node-4 - port: - number: 6688 - - host: chainlink-node-5.local - http: - paths: - - path: / - pathType: ImplementationSpecific - backend: - service: - name: chainlink-node-5 - port: - number: 6688 - - host: chainlink-node-6.local - http: - paths: - - path: / - pathType: ImplementationSpecific - backend: - service: - name: chainlink-node-6 - port: - number: 6688 - - host: chainlink-geth-http.local - http: - paths: - - path: / - pathType: ImplementationSpecific - backend: - service: - name: geth - port: - number: 8544 - - host: chainlink-geth-ws.local - http: - paths: - - path: / - pathType: ImplementationSpecific - backend: - service: - name: geth - port: - number: 8546 - - host: chainlink-mockserver.local - http: - paths: - - path: / - pathType: ImplementationSpecific - backend: - service: - name: mockserver - port: - number: 1080 - - host: chainlink-grafana.local - http: - paths: - - path: / - pathType: ImplementationSpecific - backend: - service: - name: grafana - port: - number: 80 -# monitoring.coreos.com/v1 PodMonitor for each node -prometheusMonitor: true - -# deployment placement, standard helm stuff -podAnnotations: -nodeSelector: -tolerations: -affinity: - -networkPolicies: - enabled: true - customPolicies: - grafanaToTempoEgress: - podSelector: - matchLabels: - app: grafana - egress: - - to: - - podSelector: - matchLabels: - app: tempo - ports: - - protocol: TCP - port: 3100 - tempoIngressFromGrafana: - podSelector: - matchLabels: - app: tempo - ingress: - - from: - - podSelector: - matchLabels: - app: grafana - ports: - - protocol: TCP - port: 3100 - chainlinkToOtelCollectorEgress: - podSelector: - matchLabels: - app: chainlink - egress: - - to: - - podSelector: - matchLabels: - app: otel-collector - ports: - - protocol: TCP - port: 4317 - otelCollectorToTempoEgress: - podSelector: - matchLabels: - app: otel-collector - egress: - - to: - - podSelector: - matchLabels: - app: tempo - ports: - - protocol: TCP - port: 4317 - -# Configure the default network policy. -networkPolicyDefault: - ingress: - allowCustomCidrs: false - # String of comma separated CIDRs - customCidrs: null - # Example: - # customCidrs: "10.0.0.0/16,192.168.0.1/24" diff --git a/crib/.env.example b/crib/.env.example index 703c7bf7f83..e35d0d3e580 100644 --- a/crib/.env.example +++ b/crib/.env.example @@ -13,5 +13,9 @@ DEVSPACE_INGRESS_CERT_ARN= # Time to wait for pods to be in `Ready` condition DEVSPACE_K8S_POD_WAIT_TIMEOUT=600s +# HELM repo URI for the crib-chainlink-cluster helm chart +CHAINLINK_CLUSTER_HELM_CHART_URI= + # The duration that the namespace and all of its associated resources will be kept alive. NS_TTL=72h + diff --git a/crib/devspace.yaml b/crib/devspace.yaml index 9c2895e9ac6..213fe4c24c7 100644 --- a/crib/devspace.yaml +++ b/crib/devspace.yaml @@ -99,8 +99,8 @@ deployments: helm: releaseName: "app" chart: - name: cl-cluster - path: ../charts/chainlink-cluster + name: ${CHAINLINK_CLUSTER_HELM_CHART_URI} + version: 0.5.0 # for simplicity, we define all the values here # they can be defined the same way in values.yml # devspace merges these "values" with the "values.yaml" before deploy diff --git a/crib/scripts/check_env_vars.sh b/crib/scripts/check_env_vars.sh index f26f78e7470..55480313800 100755 --- a/crib/scripts/check_env_vars.sh +++ b/crib/scripts/check_env_vars.sh @@ -7,6 +7,7 @@ required_vars=( "DEVSPACE_INGRESS_BASE_DOMAIN" "DEVSPACE_INGRESS_CERT_ARN" "DEVSPACE_K8S_POD_WAIT_TIMEOUT" + "CHAINLINK_CLUSTER_HELM_CHART_URI" "NS_TTL" ) diff --git a/crib/setup.sh b/crib/setup.sh index 536bef57c75..8e254909655 100755 --- a/crib/setup.sh +++ b/crib/setup.sh @@ -1,6 +1,20 @@ #!/usr/bin/env bash -set -e +set -euo pipefail + +# Function to extract the host URI of the ECR registry from OCI URI +extract_ecr_host_uri() { + local ecr_uri="$1" + # Regex to capture the ECR host URI + if [[ $ecr_uri =~ oci:\/\/([0-9]+\.dkr\.ecr\.[a-zA-Z0-9-]+\.amazonaws\.com) ]]; then + echo "${BASH_REMATCH[1]}" + else + echo "No valid ECR host URI found in the URI." + echo "Have you set CHAINLINK_CLUSTER_HELM_CHART_URI env var?" + exit 1 + fi +} + user_home="$HOME" file_path="$user_home/.aws/config" image="" @@ -33,5 +47,12 @@ else echo "Docker daemon is not running, exiting" exit 1 fi -aws ecr get-login-password --region us-west-2 | docker login --username AWS --password-stdin ${registry_id}.dkr.ecr.us-west-2.amazonaws.com -devspace use namespace $1 + +# Login to docker ECR registry +aws ecr get-login-password --region us-west-2 | docker login --username AWS --password-stdin "${registry_id}".dkr.ecr.us-west-2.amazonaws.com + +# Login to helm ECR registry +helm_registry_uri=$(extract_ecr_host_uri "${CHAINLINK_CLUSTER_HELM_CHART_URI}") +aws ecr get-login-password --region us-west-2 | helm registry login "$helm_registry_uri" --username AWS --password-stdin + +devspace use namespace "$1" diff --git a/charts/chainlink-cluster/values-profiles/README.md b/crib/values-profiles/README.md similarity index 100% rename from charts/chainlink-cluster/values-profiles/README.md rename to crib/values-profiles/README.md diff --git a/charts/chainlink-cluster/values-profiles/values-dev.yaml.example b/crib/values-profiles/values-dev.yaml.example similarity index 100% rename from charts/chainlink-cluster/values-profiles/values-dev.yaml.example rename to crib/values-profiles/values-dev.yaml.example diff --git a/lintconf.yaml b/lintconf.yaml deleted file mode 100644 index ff37371d476..00000000000 --- a/lintconf.yaml +++ /dev/null @@ -1,46 +0,0 @@ ---- -# Copied from: -# https://redhat-cop.github.io/ci/linting-testing-helm-charts.html -# with `min-spaces-from-content` changed to be compatible with prettier. -rules: - braces: - min-spaces-inside: 0 - max-spaces-inside: 0 - min-spaces-inside-empty: -1 - max-spaces-inside-empty: -1 - brackets: - min-spaces-inside: 0 - max-spaces-inside: 0 - min-spaces-inside-empty: -1 - max-spaces-inside-empty: -1 - colons: - max-spaces-before: 0 - max-spaces-after: 1 - commas: - max-spaces-before: 0 - min-spaces-after: 1 - max-spaces-after: 1 - comments: - require-starting-space: true - min-spaces-from-content: 1 - document-end: disable - document-start: disable # No --- to start a file - empty-lines: - max: 2 - max-start: 0 - max-end: 0 - hyphens: - max-spaces-after: 1 - indentation: - spaces: consistent - indent-sequences: whatever # - list indentation will handle both indentation and without - check-multi-line-strings: false - key-duplicates: enable - line-length: disable # Lines can be any length - new-line-at-end-of-file: disable - new-lines: - type: unix - trailing-spaces: enable - truthy: - level: warning -