From 30f418ea6e804d1eeccc2977913e38225f573c9c Mon Sep 17 00:00:00 2001 From: Mark Liu Date: Tue, 30 Jan 2024 09:08:48 +0900 Subject: [PATCH] Removing lodstar from production branch --- charts/lodestar/.helmignore | 23 ---- charts/lodestar/Chart.yaml | 18 ---- charts/lodestar/templates/_helpers.tpl | 62 ----------- charts/lodestar/templates/configmap.yaml | 34 ------ charts/lodestar/templates/ingress.yaml | 61 ----------- charts/lodestar/templates/service.yaml | 24 ----- charts/lodestar/templates/serviceaccount.yaml | 12 --- charts/lodestar/templates/statefulset.yaml | 83 --------------- charts/lodestar/values.yaml | 100 ------------------ 9 files changed, 417 deletions(-) delete mode 100644 charts/lodestar/.helmignore delete mode 100644 charts/lodestar/Chart.yaml delete mode 100644 charts/lodestar/templates/_helpers.tpl delete mode 100644 charts/lodestar/templates/configmap.yaml delete mode 100644 charts/lodestar/templates/ingress.yaml delete mode 100644 charts/lodestar/templates/service.yaml delete mode 100644 charts/lodestar/templates/serviceaccount.yaml delete mode 100644 charts/lodestar/templates/statefulset.yaml delete mode 100644 charts/lodestar/values.yaml diff --git a/charts/lodestar/.helmignore b/charts/lodestar/.helmignore deleted file mode 100644 index 0e8a0eb36..000000000 --- a/charts/lodestar/.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/lodestar/Chart.yaml b/charts/lodestar/Chart.yaml deleted file mode 100644 index c503c124a..000000000 --- a/charts/lodestar/Chart.yaml +++ /dev/null @@ -1,18 +0,0 @@ -apiVersion: v2 -name: lodestar -description: A Helm chart for Kubernetes - -# A chart can be either an 'application' or a 'library' chart. -# -# Application charts are a collection of templates that can be packaged into versioned archives -# to be deployed. -# -# Library charts provide useful utilities or functions for the chart developer. They're included as -# a dependency of application charts to inject those utilities and functions into the rendering -# pipeline. Library charts do not define any templates and therefore cannot be deployed. -type: application - -# This is the chart version. This version number should be incremented each time you make changes -# to the chart and its templates, including the app version. -# Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.1.0 diff --git a/charts/lodestar/templates/_helpers.tpl b/charts/lodestar/templates/_helpers.tpl deleted file mode 100644 index ba8f988be..000000000 --- a/charts/lodestar/templates/_helpers.tpl +++ /dev/null @@ -1,62 +0,0 @@ -{{/* -Expand the name of the chart. -*/}} -{{- define "lodestar.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 "lodestar.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 "lodestar.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{/* -Common labels -*/}} -{{- define "lodestar.labels" -}} -helm.sh/chart: {{ include "lodestar.chart" . }} -{{ include "lodestar.selectorLabels" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end }} - -{{/* -Selector labels -*/}} -{{- define "lodestar.selectorLabels" -}} -app.kubernetes.io/name: {{ include "lodestar.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- end }} - -{{/* -Create the name of the service account to use -*/}} -{{- define "lodestar.serviceAccountName" -}} -{{- if .Values.serviceAccount.create }} -{{- default (include "lodestar.fullname" .) .Values.serviceAccount.name }} -{{- else }} -{{- default "default" .Values.serviceAccount.name }} -{{- end }} -{{- end }} diff --git a/charts/lodestar/templates/configmap.yaml b/charts/lodestar/templates/configmap.yaml deleted file mode 100644 index 111c9e6cb..000000000 --- a/charts/lodestar/templates/configmap.yaml +++ /dev/null @@ -1,34 +0,0 @@ ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: "{{ include "lodestar.fullname" . }}" - labels: - {{- include "lodestar.labels" . | nindent 4 }} -data: - run.sh: | - #!/bin/sh - - for f in /home/charon/validator_keys/keystore-*.json; do - echo "Importing key ${f}" - - # Import keystore with password. - node /usr/app/packages/cli/bin/lodestar validator import \ - --dataDir="/opt/data" \ - --network="$NETWORK" \ - --importKeystores="$f" \ - --importKeystoresPassword="${f//json/txt}" - done - - echo "Imported all keys" - - exec node /usr/app/packages/cli/bin/lodestar validator \ - --dataDir="/opt/data" \ - --network="$NETWORK" \ - --metrics=true \ - --metrics.address="0.0.0.0" \ - --metrics.port={{ .Values.service.ports.metrics }} \ - --beaconNodes="$BEACON_NODE_ADDRESS" \ - --builder="$BUILDER_API_ENABLED" \ - --builder.selection="$BUILDER_SELECTION" \ - --distributed diff --git a/charts/lodestar/templates/ingress.yaml b/charts/lodestar/templates/ingress.yaml deleted file mode 100644 index 720a7e104..000000000 --- a/charts/lodestar/templates/ingress.yaml +++ /dev/null @@ -1,61 +0,0 @@ -{{- if .Values.ingress.enabled -}} -{{- $fullName := include "lodestar.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 "lodestar.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/lodestar/templates/service.yaml b/charts/lodestar/templates/service.yaml deleted file mode 100644 index fb0755924..000000000 --- a/charts/lodestar/templates/service.yaml +++ /dev/null @@ -1,24 +0,0 @@ ---- -apiVersion: v1 -kind: Service -metadata: - name: "{{ include "lodestar.fullname" . }}" - labels: - {{- include "lodestar.labels" . | nindent 4 }} -spec: - type: {{ .Values.service.type }} - ports: - - port: {{ .Values.service.ports.p2p }} - targetPort: p2p - protocol: TCP - name: p2p - - port: {{ .Values.service.ports.metrics }} - targetPort: metrics - protocol: TCP - name: metrics - - port: {{ .Values.service.ports.http }} - targetPort: http - protocol: TCP - name: http - selector: - {{- include "lodestar.selectorLabels" . | nindent 4 }} diff --git a/charts/lodestar/templates/serviceaccount.yaml b/charts/lodestar/templates/serviceaccount.yaml deleted file mode 100644 index bb615f853..000000000 --- a/charts/lodestar/templates/serviceaccount.yaml +++ /dev/null @@ -1,12 +0,0 @@ -{{- if .Values.serviceAccount.create -}} -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ include "lodestar.serviceAccountName" . }} - labels: - {{- include "lodestar.labels" . | nindent 4 }} - {{- with .Values.serviceAccount.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -{{- end }} diff --git a/charts/lodestar/templates/statefulset.yaml b/charts/lodestar/templates/statefulset.yaml deleted file mode 100644 index 2f5f6dee6..000000000 --- a/charts/lodestar/templates/statefulset.yaml +++ /dev/null @@ -1,83 +0,0 @@ ---- -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: {{ include "lodestar.fullname" . }} - labels: - {{- include "lodestar.labels" . | nindent 4 }} -spec: - replicas: {{ .Values.replicaCount }} - selector: - matchLabels: - {{- include "lodestar.selectorLabels" . | nindent 6 }} - template: - metadata: - {{- with .Values.podAnnotations }} - annotations: - {{- toYaml . | nindent 8 }} - {{- end }} - labels: - {{- include "lodestar.selectorLabels" . | nindent 8 }} - spec: - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - serviceAccountName: {{ include "lodestar.serviceAccountName" . }} - securityContext: - {{- toYaml .Values.podSecurityContext | nindent 8 }} - containers: - - name: {{ .Chart.Name }} - securityContext: - {{- toYaml .Values.securityContext | nindent 12 }} - image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} - command: - - "/bin/sh" - - "-c" - - "/opt/lodestar/run.sh" - ports: - - name: p2p - containerPort: {{ .Values.service.ports.p2p }} - protocol: TCP - - name: metrics - containerPort: {{ .Values.service.ports.metrics }} - protocol: TCP - - name: http - containerPort: {{ .Values.service.ports.http }} - protocol: TCP - livenessProbe: - {{- toYaml .Values.livenessProbe | nindent 12 }} - readinessProbe: - {{- toYaml .Values.readinessProbe | nindent 12 }} - resources: - {{- toYaml .Values.resources | nindent 12 }} - volumeMounts: - - mountPath: /opt/lodestar - name: data - - mountPath: /home/charon/validator_keys - name: validator-keys - env: - {{- toYaml .Values.env | nindent 12 }} - {{- with .Values.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.affinity }} - affinity: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} - volumes: - - name: data - configMap: - name: {{ include "lodestar.fullname" . }} - defaultMode: 0755 - - name: validator-keys - projected: - sources: - - secret: - name: {{ .Values.secrets.validatorKeys }} diff --git a/charts/lodestar/values.yaml b/charts/lodestar/values.yaml deleted file mode 100644 index 0d769dc5c..000000000 --- a/charts/lodestar/values.yaml +++ /dev/null @@ -1,100 +0,0 @@ -# Default values for lodestar. -# This is a YAML-formatted file. -# Declare variables to be passed into your templates. - -replicaCount: 1 - -image: - repository: chainsafe/lodestar - pullPolicy: IfNotPresent - # Overrides the image tag whose default is the chart appVersion. - tag: "v1.11.3" - -imagePullSecrets: [] -nameOverride: "" -fullnameOverride: "" - -env: - - name: "BEACON_NODE_ADDRESS" - value: "" - - name: "NETWORK" - value: "holesky" - - name: "BUILDER_API_ENABLED" - value: "true" - - name: "BUILDER_SELECTION" - value: "builderonly" - -# -- Kubernetes secrets names -secrets: - # -- validators keys - validatorKeys: "validator-keys" - -serviceAccount: - # Specifies whether a service account should be created - create: true - # Annotations to add to the service account - annotations: {} - # The name of the service account to use. - # If not set and create is true, a name is generated using the fullname template - name: "" - -podAnnotations: {} - -podSecurityContext: - {} - # fsGroup: 2000 - -securityContext: - {} - # capabilities: - # drop: - # - ALL - # readOnlyRootFilesystem: true - # runAsNonRoot: true - # runAsUser: 1000 - -service: - type: ClusterIP - ports: - metrics: 5064 - p2p: 9000 - http: 9596 - -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: - {} - # We usually recommend not to specify default resources and to leave this as a conscious - # choice for the user. This also increases chances charts run on environments with little - # resources, such as Minikube. If you do want to specify resources, uncomment the following - # lines, adjust them as necessary, and remove the curly braces after 'resources:'. - # limits: - # cpu: 100m - # memory: 128Mi - # requests: - # cpu: 100m - # memory: 128Mi - -nodeSelector: {} - -tolerations: [] - -affinity: {} - -livnessProbe: null -readinessProbe: null