From d3adc1e8102218aed5cdaefec09ef05bf63f8357 Mon Sep 17 00:00:00 2001 From: Ali Behjati Date: Fri, 29 Sep 2023 14:22:51 +0200 Subject: [PATCH] chore: remove pythnet chart --- charts/pythnet-rpc/.helmignore | 23 ---- charts/pythnet-rpc/Chart.yaml | 6 - charts/pythnet-rpc/README.md | 53 --------- charts/pythnet-rpc/templates/NOTES.txt | 22 ---- charts/pythnet-rpc/templates/_helpers.tpl | 51 -------- charts/pythnet-rpc/templates/deployment.yaml | 111 ------------------ charts/pythnet-rpc/templates/ingress.yaml | 61 ---------- charts/pythnet-rpc/templates/service.yaml | 27 ----- .../templates/tests/test-connection.yaml | 15 --- charts/pythnet-rpc/values.yaml | 90 -------------- 10 files changed, 459 deletions(-) delete mode 100644 charts/pythnet-rpc/.helmignore delete mode 100644 charts/pythnet-rpc/Chart.yaml delete mode 100644 charts/pythnet-rpc/README.md delete mode 100644 charts/pythnet-rpc/templates/NOTES.txt delete mode 100644 charts/pythnet-rpc/templates/_helpers.tpl delete mode 100644 charts/pythnet-rpc/templates/deployment.yaml delete mode 100644 charts/pythnet-rpc/templates/ingress.yaml delete mode 100644 charts/pythnet-rpc/templates/service.yaml delete mode 100644 charts/pythnet-rpc/templates/tests/test-connection.yaml delete mode 100644 charts/pythnet-rpc/values.yaml diff --git a/charts/pythnet-rpc/.helmignore b/charts/pythnet-rpc/.helmignore deleted file mode 100644 index 0e8a0eb..0000000 --- a/charts/pythnet-rpc/.helmignore +++ /dev/null @@ -1,23 +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/ diff --git a/charts/pythnet-rpc/Chart.yaml b/charts/pythnet-rpc/Chart.yaml deleted file mode 100644 index 2003cf5..0000000 --- a/charts/pythnet-rpc/Chart.yaml +++ /dev/null @@ -1,6 +0,0 @@ -apiVersion: v2 -name: pythnet-rpc -description: Pythnet Network RPC -type: application -version: 0.1.2 -appVersion: "v1.13.6-20220607" diff --git a/charts/pythnet-rpc/README.md b/charts/pythnet-rpc/README.md deleted file mode 100644 index 1afd540..0000000 --- a/charts/pythnet-rpc/README.md +++ /dev/null @@ -1,53 +0,0 @@ -# pythnet-rpc - -![Version: 0.1.2](https://img.shields.io/badge/Version-0.1.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v1.13.6-20220607](https://img.shields.io/badge/AppVersion-v1.13.6--20220607-informational?style=flat-square) - -Pythnet Network RPC - -## Values - -| Key | Type | Default | Description | -|-----|------|---------|-------------| -| affinity | object | `{}` | | -| fullnameOverride | string | `""` | | -| image.pullPolicy | string | `"IfNotPresent"` | | -| image.repository | string | `"public.ecr.aws/pyth-network/pythnet"` | | -| image.tag | string | `""` | | -| imagePullSecrets | list | `[]` | | -| ingress.annotations | object | `{}` | | -| ingress.className | string | `""` | | -| ingress.enabled | bool | `false` | | -| ingress.hosts[0].host | string | `"chart-example.local"` | | -| ingress.hosts[0].paths[0].path | string | `"/"` | | -| ingress.hosts[0].paths[0].pathType | string | `"ImplementationSpecific"` | | -| ingress.tls | list | `[]` | | -| nameOverride | string | `""` | | -| nodeSelector | object | `{}` | | -| podAnnotations | object | `{}` | | -| podSecurityContext.fsGroup | int | `10001` | | -| podSecurityContext.runAsGroup | int | `10001` | | -| podSecurityContext.runAsNonRoot | bool | `true` | | -| podSecurityContext.runAsUser | int | `10001` | | -| pythnet.accumulatorSequenceAddr | string | `"8MuVR15V86sSELdpW4UYTyx7WTXRARF1Bj7GJHgTJP3K"` | Wormhole accumulator sequence account address in the network | -| pythnet.entrypoint | string | `"entrypoint.pythnet.pyth.network:8001"` | Rendezvous with the cluster at this gossip entrypoint | -| pythnet.expectedBankHash | string | `"84ztrmopeEhQMxweSPvohG3Hv6zgqrvd7pRjR4QQWKoD"` | When wait-for-supermajority , require the bank at to have this hash | -| pythnet.expectedGenesisHash | string | `"GLKkBUr6r72nBtGrtBPJLRqtsh8wXZanX4xfnqKnWwKq"` | Require the genesis have this hash | -| pythnet.expectedShredVersion | int | `35891` | Require the shred version be this value | -| pythnet.logLevel | string | `"warn"` | Pythnet log level. Valid values are: trace, debug, info, warn, error | -| pythnet.messageBufferPid | string | `"7Vbmv1jt4vyuqBZcpYPpnVhrqVe5e6ZPb6JxDcffRHUM"` | Message Buffer program id in the network | -| pythnet.wormholePid | string | `"H3fxXJ86ADW2PNuDDmZJg6mzTtPxkYCpNuQUTgmJ7AjU"` | Wormhole program id in the network | -| replicaCount | int | `1` | | -| resources.limits | object | `{}` | | -| resources.requests.cpu | int | `4` | | -| resources.requests.memory | string | `"4Gi"` | | -| securityContext.allowPrivilegeEscalation | bool | `false` | | -| securityContext.capabilities.drop[0] | string | `"ALL"` | | -| securityContext.readOnlyRootFilesystem | bool | `true` | | -| service.gossipPort | int | `9999` | | -| service.httpRpcPort | int | `8899` | | -| service.type | string | `"ClusterIP"` | | -| service.wsRpcPort | int | `8900` | | -| tolerations | list | `[]` | | - ----------------------------------------------- -Autogenerated from chart metadata using [helm-docs v1.11.0](https://github.com/norwoodj/helm-docs/releases/v1.11.0) diff --git a/charts/pythnet-rpc/templates/NOTES.txt b/charts/pythnet-rpc/templates/NOTES.txt deleted file mode 100644 index 6acc646..0000000 --- a/charts/pythnet-rpc/templates/NOTES.txt +++ /dev/null @@ -1,22 +0,0 @@ -1. Get the application URL by running these commands: -{{- if .Values.ingress.enabled }} -{{- range $host := .Values.ingress.hosts }} - {{- range .paths }} - http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }} - {{- end }} -{{- end }} -{{- else if contains "NodePort" .Values.service.type }} - export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "pythnet-rpc.fullname" . }}) - export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") - echo http://$NODE_IP:$NODE_PORT -{{- else if contains "LoadBalancer" .Values.service.type }} - NOTE: It may take a few minutes for the LoadBalancer IP to be available. - You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "pythnet-rpc.fullname" . }}' - export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "pythnet-rpc.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") - echo http://$SERVICE_IP:{{ .Values.service.port }} -{{- else if contains "ClusterIP" .Values.service.type }} - export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "pythnet-rpc.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") - export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}") - echo "Visit http://127.0.0.1:8080 to use your application" - kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT -{{- end }} diff --git a/charts/pythnet-rpc/templates/_helpers.tpl b/charts/pythnet-rpc/templates/_helpers.tpl deleted file mode 100644 index d473c5b..0000000 --- a/charts/pythnet-rpc/templates/_helpers.tpl +++ /dev/null @@ -1,51 +0,0 @@ -{{/* -Expand the name of the chart. -*/}} -{{- define "pythnet-rpc.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "pythnet-rpc.fullname" -}} -{{- if .Values.fullnameOverride }} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} -{{- else }} -{{- $name := default .Chart.Name .Values.nameOverride }} -{{- if contains $name .Release.Name }} -{{- .Release.Name | trunc 63 | trimSuffix "-" }} -{{- else }} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} -{{- end }} -{{- end }} -{{- end }} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "pythnet-rpc.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{/* -Common labels -*/}} -{{- define "pythnet-rpc.labels" -}} -helm.sh/chart: {{ include "pythnet-rpc.chart" . }} -{{ include "pythnet-rpc.selectorLabels" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end }} - -{{/* -Selector labels -*/}} -{{- define "pythnet-rpc.selectorLabels" -}} -app.kubernetes.io/name: {{ include "pythnet-rpc.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- end }} diff --git a/charts/pythnet-rpc/templates/deployment.yaml b/charts/pythnet-rpc/templates/deployment.yaml deleted file mode 100644 index 034d253..0000000 --- a/charts/pythnet-rpc/templates/deployment.yaml +++ /dev/null @@ -1,111 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ include "pythnet-rpc.fullname" . }} - labels: - {{- include "pythnet-rpc.labels" . | nindent 4 }} -spec: - replicas: {{ .Values.replicaCount }} - selector: - matchLabels: - {{- include "pythnet-rpc.selectorLabels" . | nindent 6 }} - template: - metadata: - {{- with .Values.podAnnotations }} - annotations: - {{- toYaml . | nindent 8 }} - {{- end }} - labels: - {{- include "pythnet-rpc.selectorLabels" . | nindent 8 }} - spec: - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - securityContext: - {{- toYaml .Values.podSecurityContext | nindent 8 }} - containers: - - name: {{ .Chart.Name }} - image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} - command: - - /bin/bash - - -c - - |- - set -xe - solana-keygen new -o /data/identity.json --no-bip39-passphrase --force - solana-validator \ - --identity /data/identity.json \ - --ledger /data/ledger \ - --accounts /data/accounts \ - --snapshots /data/snapshots \ - --no-voting \ - --expected-bank-hash {{ .Values.pythnet.expectedBankHash }} \ - --expected-genesis-hash {{ .Values.pythnet.expectedGenesisHash }} \ - --expected-shred-version {{ .Values.pythnet.expectedShredVersion }} \ - --entrypoint {{ .Values.pythnet.entrypoint }} \ - --full-rpc-api \ - --private-rpc \ - --enable-rpc-transaction-history \ - --rpc-bind-address 0.0.0.0 \ - --rpc-port 8899 \ - --dynamic-port-range 8000-8079 \ - --wal-recovery-mode skip_any_corrupted_record \ - --limit-ledger-size 50000000 \ - --maximum-full-snapshots-to-retain 10 \ - --no-os-network-limits-test \ - --no-poh-speed-test \ - --no-port-check \ - --log - - env: - - name: RUST_LOG - value: warn - - name: MESSAGE_BUFFER_PID - value: {{ .Values.pythnet.messageBufferPid }} - - name: WORMHOLE_PID - value: {{ .Values.pythnet.wormholePid }} - - name: ACCUMULATOR_SEQUENCE_ADDR - value: {{ .Values.pythnet.accumulatorSequenceAddr }} - livenessProbe: - httpGet: - port: 8899 - path: /health - initialDelaySeconds: 15 - ports: - - containerPort: 8900 - - containerPort: 9999 - ports: - - name: http-rpc - containerPort: 8899 - protocol: TCP - - name: ws-rpc - containerPort: 8900 - protocol: TCP - - name: gossip-tcp - containerPort: 9999 - protocol: TCP - - name: gossip-udp - containerPort: 9999 - protocol: UDP - resources: - {{- toYaml .Values.resources | nindent 12 }} - securityContext: - {{- toYaml .Values.securityContext | nindent 12 }} - volumeMounts: - - name: data - mountPath: /data - volumes: - - name: data - emptyDir: {} - {{- with .Values.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.affinity }} - affinity: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} diff --git a/charts/pythnet-rpc/templates/ingress.yaml b/charts/pythnet-rpc/templates/ingress.yaml deleted file mode 100644 index 4d26321..0000000 --- a/charts/pythnet-rpc/templates/ingress.yaml +++ /dev/null @@ -1,61 +0,0 @@ -{{- if .Values.ingress.enabled -}} -{{- $fullName := include "pythnet-rpc.fullname" . -}} -{{- $svcPort := .Values.service.port -}} -{{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }} - {{- if not (hasKey .Values.ingress.annotations "kubernetes.io/ingress.class") }} - {{- $_ := set .Values.ingress.annotations "kubernetes.io/ingress.class" .Values.ingress.className}} - {{- end }} -{{- end }} -{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}} -apiVersion: networking.k8s.io/v1 -{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} -apiVersion: networking.k8s.io/v1beta1 -{{- else -}} -apiVersion: extensions/v1beta1 -{{- end }} -kind: Ingress -metadata: - name: {{ $fullName }} - labels: - {{- include "pythnet-rpc.labels" . | nindent 4 }} - {{- with .Values.ingress.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - {{- if and .Values.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }} - ingressClassName: {{ .Values.ingress.className }} - {{- end }} - {{- if .Values.ingress.tls }} - tls: - {{- range .Values.ingress.tls }} - - hosts: - {{- range .hosts }} - - {{ . | quote }} - {{- end }} - secretName: {{ .secretName }} - {{- end }} - {{- end }} - rules: - {{- range .Values.ingress.hosts }} - - host: {{ .host | quote }} - http: - paths: - {{- range .paths }} - - path: {{ .path }} - {{- if and .pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }} - pathType: {{ .pathType }} - {{- end }} - backend: - {{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }} - service: - name: {{ $fullName }} - port: - number: {{ $svcPort }} - {{- else }} - serviceName: {{ $fullName }} - servicePort: {{ $svcPort }} - {{- end }} - {{- end }} - {{- end }} -{{- end }} diff --git a/charts/pythnet-rpc/templates/service.yaml b/charts/pythnet-rpc/templates/service.yaml deleted file mode 100644 index 32d731e..0000000 --- a/charts/pythnet-rpc/templates/service.yaml +++ /dev/null @@ -1,27 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ include "pythnet-rpc.fullname" . }} - labels: - {{- include "pythnet-rpc.labels" . | nindent 4 }} -spec: - type: {{ .Values.service.type }} - ports: - - port: {{ .Values.service.httpRpcPort }} - name: http-rpc - targetPort: http-rpc - protocol: TCP - - port: {{ .Values.service.wsRpcPort }} - name: ws-rpc - targetPort: ws-rpc - protocol: TCP - - port: {{ .Values.service.gossipPort }} - name: gossip-tcp - targetPort: gossip-tcp - protocol: TCP - - port: {{ .Values.service.gossipPort }} - name: gossip-udp - targetPort: gossip-udp - protocol: UDP - selector: - {{- include "pythnet-rpc.selectorLabels" . | nindent 4 }} diff --git a/charts/pythnet-rpc/templates/tests/test-connection.yaml b/charts/pythnet-rpc/templates/tests/test-connection.yaml deleted file mode 100644 index f1d0262..0000000 --- a/charts/pythnet-rpc/templates/tests/test-connection.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: v1 -kind: Pod -metadata: - name: "{{ include "pythnet-rpc.fullname" . }}-test-connection" - labels: - {{- include "pythnet-rpc.labels" . | nindent 4 }} - annotations: - "helm.sh/hook": test -spec: - containers: - - name: wget - image: busybox - command: ['wget'] - args: ['{{ include "pythnet-rpc.fullname" . }}:{{ .Values.service.port }}'] - restartPolicy: Never diff --git a/charts/pythnet-rpc/values.yaml b/charts/pythnet-rpc/values.yaml deleted file mode 100644 index 6c909c5..0000000 --- a/charts/pythnet-rpc/values.yaml +++ /dev/null @@ -1,90 +0,0 @@ -# Default values for Pythnet mainnet rpc config -pythnet: - # -- Pythnet log level. Valid values are: trace, debug, info, warn, error - logLevel: warn - - # -- When wait-for-supermajority , require the bank at to have this hash - expectedBankHash: 84ztrmopeEhQMxweSPvohG3Hv6zgqrvd7pRjR4QQWKoD - # -- Require the genesis have this hash - expectedGenesisHash: GLKkBUr6r72nBtGrtBPJLRqtsh8wXZanX4xfnqKnWwKq - # -- Require the shred version be this value - expectedShredVersion: 35891 - # -- Rendezvous with the cluster at this gossip entrypoint - entrypoint: entrypoint.pythnet.pyth.network:8001 - - # -- Message Buffer program id in the network - messageBufferPid: 7Vbmv1jt4vyuqBZcpYPpnVhrqVe5e6ZPb6JxDcffRHUM - # -- Wormhole program id in the network - wormholePid: H3fxXJ86ADW2PNuDDmZJg6mzTtPxkYCpNuQUTgmJ7AjU - # -- Wormhole accumulator sequence account address in the network - accumulatorSequenceAddr: 8MuVR15V86sSELdpW4UYTyx7WTXRARF1Bj7GJHgTJP3K - # The values below are for Pythtest - # expectedBankHash: CjcYdoVMN7i84Fzs1QyyUJbmxaVho5k9MokEjMHtX1xz - # expectedGenesisHash: EkCkB7RWVrgkcpariRpd3pjf7GwiCMZaMHKUpB5Na1Ve - # expectedShredVersion: 15535 - # entrypoint: 35.214.10.159:8000 - # messageBufferPid: 7Vbmv1jt4vyuqBZcpYPpnVhrqVe5e6ZPb6JxDcffRHUM - # wormholePid: EUrRARh92Cdc54xrDn6qzaqjA77NRrCcfbr8kPwoTL4z - # accumulatorSequenceAddr: Ao4tQp1ouW9w73CE34npzSDjgPG5FGz8KmoSauzCwuh7 - -# Default values for pythnet-rpc production config -replicaCount: 1 - -image: - repository: public.ecr.aws/pyth-network/pythnet - pullPolicy: IfNotPresent - # Overrides the image tag whose default is the chart appVersion. - tag: "" - -imagePullSecrets: [] -nameOverride: "" -fullnameOverride: "" - -podAnnotations: {} - -podSecurityContext: - runAsUser: 10001 - runAsGroup: 10001 - fsGroup: 10001 - runAsNonRoot: true - -securityContext: - capabilities: - drop: - - ALL - readOnlyRootFilesystem: true - allowPrivilegeEscalation: false - -service: - type: ClusterIP - httpRpcPort: 8899 - wsRpcPort: 8900 - gossipPort: 9999 - -ingress: - enabled: false - className: "" - annotations: {} - # kubernetes.io/ingress.class: nginx - # kubernetes.io/tls-acme: "true" - hosts: - - host: chart-example.local - paths: - - path: / - pathType: ImplementationSpecific - tls: [] - # - secretName: chart-example-tls - # hosts: - # - chart-example.local - -resources: - limits: {} - requests: - cpu: 4 - memory: 4Gi - -nodeSelector: {} - -tolerations: [] - -affinity: {}