Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[espresso] Espresso Sequencer AVS charts #117

Open
wants to merge 72 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 57 commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
6ccc9dc
feat: First version of Espresso helm chart
AntiD2ta Apr 24, 2024
c480e40
feat: Add Pod for espresso-keystore-cli
AntiD2ta Apr 25, 2024
d962adc
feat: Update key mgm automation
AntiD2ta Apr 25, 2024
1052f8f
chore: Allow overriding the namespace
AntiD2ta Apr 25, 2024
c185edc
fix: Type errors from env in the statefulset
AntiD2ta Apr 25, 2024
dd0f525
feat: Add volume claim template and remove unused mount
matilote Apr 26, 2024
4319aee
fix: Label ref
matilote Apr 26, 2024
75747c0
fix: Missing $
matilote Apr 26, 2024
42a7f12
feat: Update external secrets reference to be dynamic
matilote Apr 26, 2024
bc0eaa1
fix: Reference
matilote Apr 26, 2024
07a7770
feat: Add annotations to sa
matilote Apr 26, 2024
f4925cf
chore: Try with more args
matilote Apr 26, 2024
5f84f50
fix: Args and commands of sequencer container
AntiD2ta Apr 27, 2024
714beef
fix: db-keys init container condition
AntiD2ta Apr 27, 2024
f08ff9b
fix: Sequencer container args definition
AntiD2ta Apr 27, 2024
08ab5bb
fix: Improve image name definitions
AntiD2ta Apr 27, 2024
fc7e670
fix: Remove type suffix from db-keys SECRET_ID
AntiD2ta Apr 27, 2024
ee321cb
fix: Try new approach with sequencer command
AntiD2ta Apr 27, 2024
1ebd7d5
fix: Try passing double dash
AntiD2ta Apr 27, 2024
6fdaa0c
fix: Update values.yaml
AntiD2ta Apr 27, 2024
0976cab
fix: Mount .env volume for main container
AntiD2ta May 1, 2024
2e4f1f5
chore: Add diagnostic container
AntiD2ta May 1, 2024
85757e2
chore: Allow diagnostic container to access secrets
AntiD2ta May 1, 2024
ba63b5d
fix: init-setenv script
AntiD2ta May 1, 2024
b6cf521
fix: init-setenv script
AntiD2ta May 1, 2024
b446efc
fix: init-setenv script
AntiD2ta May 1, 2024
0eef786
chore: Update resource limits and requests
AntiD2ta May 1, 2024
ee3d9c4
chore: Update resource request memory
AntiD2ta May 1, 2024
e99f210
feat: Upgrade init-setenv script
AntiD2ta May 1, 2024
7d26c9b
chore: Run init-setenv init container last
AntiD2ta May 2, 2024
f9ca55d
feat: Get sequencer env secrets from dynamic Secret
AntiD2ta May 2, 2024
719a855
fix: Make init script more sh friendly
AntiD2ta May 2, 2024
b2ad503
feat: Allow ServiceAccount to create new Secrets
AntiD2ta May 2, 2024
25353ae
chore: Update diagnostic-container
AntiD2ta May 2, 2024
f2cf1c3
fix: Init-script delete secret before creating it to override it
AntiD2ta May 2, 2024
9c3aa8a
chore: Remove diagnostic-container
AntiD2ta May 2, 2024
eb37595
doc: Update chart documentation
AntiD2ta May 2, 2024
7f16206
style: Remove trailing spaces
AntiD2ta May 2, 2024
81f03dc
doc: Update chart README
AntiD2ta May 2, 2024
4bb0e1b
ci: Fix helm-docs image tag
AntiD2ta May 2, 2024
a736cb3
style: Fix indentation and clean code
AntiD2ta May 3, 2024
4d2de79
style: Clean statefulset.yaml code
AntiD2ta May 3, 2024
ed59b1b
refac: Clean ingress.yaml code
AntiD2ta May 6, 2024
07a0f96
attempt to fix secrets
matilote May 14, 2024
31fc9f3
remove redundant code
matilote May 14, 2024
6bb0109
ugly suffix way
matilote May 14, 2024
946794a
Update statefulset.yaml
matilote May 14, 2024
15637f4
add service monitor for espresso
matilote May 17, 2024
f635794
add ending to service monitor
matilote May 17, 2024
0b713ef
fix references
matilote May 17, 2024
faeec86
feat: Add role for servicemonitors and services by default
AntiD2ta Jul 25, 2024
2251f56
fix: Replace servicemonitors role for endpoints
AntiD2ta Jul 25, 2024
494b533
feat: Add ClusterRole
AntiD2ta Jul 26, 2024
7fe54e1
fix: Add global.rbac
AntiD2ta Jul 26, 2024
29ceffe
fix: Add rule for services
AntiD2ta Jul 26, 2024
87d2794
chore: Ignore servicemonitor interval by default
AntiD2ta Jul 26, 2024
2e59a48
fix: Service port name
AntiD2ta Jul 26, 2024
277dfc0
chore: Add comments to the init.sh script
AntiD2ta Sep 24, 2024
31a95e4
feat: Upgrade secret management
AntiD2ta Sep 24, 2024
fbf9734
feat: Allow using normal Secret resources instead of external secret
AntiD2ta Sep 24, 2024
b73e967
feat: Update Sequencer parameters
AntiD2ta Sep 24, 2024
ef70616
feat: Update nodes config with Decaf df settings
AntiD2ta Sep 25, 2024
02e2ff6
chore: Update chart version
AntiD2ta Sep 30, 2024
795a76f
chore: Update chart version
AntiD2ta Sep 30, 2024
e52024f
feat: Ignore da node type by default
AntiD2ta Sep 30, 2024
82ecb01
feat: Allow custom ExternalSecret name
AntiD2ta Sep 30, 2024
911d749
chore: Change ExternalSecret apiVersion
AntiD2ta Sep 30, 2024
4fa52dd
fix: init-setenv secretRef
AntiD2ta Oct 1, 2024
5f3a674
fix: Change ExternalSecret apiVersion
AntiD2ta Oct 1, 2024
37830a8
fix: Make sequencers container get keys from volumes
AntiD2ta Oct 1, 2024
97661c6
fix: Stop using direct pv keys
AntiD2ta Oct 1, 2024
d6ff0fe
chore: Print .env for debug purposes
AntiD2ta Oct 1, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
uses: docker/setup-buildx-action@v2

- name: Run helm-docs
run: docker run --rm --volume "$(pwd):/helm-docs" -u "$(id -u)" jnorwood/helm-docs:latest
run: docker run --rm --volume "$(pwd):/helm-docs" -u "$(id -u)" jnorwood/helm-docs:v1.12.0

- name: Check for unstaged changes
run: |
Expand Down
6 changes: 6 additions & 0 deletions charts/espresso/Chart.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
dependencies:
- name: common
repository: file://../common
version: 1.0.1
digest: sha256:16871b89b082fb3f3fa0c9bb12fa86f144272c29639386c444322cbaa454e17b
generated: "2024-01-24T14:35:14.068637+01:00"
19 changes: 19 additions & 0 deletions charts/espresso/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
apiVersion: v2
name: espresso
version: 1.0.0
appVersion: 0.0.1
kubeVersion: "^1.23.0-0"
description: A Helm chart that combines Kubernetes manifests and scripts to deploy Espresso Sequencer AVS nodes.
type: application
keywords:
- eigenlayer
- AVS
- espresso
home: https://docs.espressosys.com/sequencer
dependencies:
- name: common
repository: file://../common
version: 1.0.1
maintainers:
- name: matilote
- name: AntiD2ta
99 changes: 99 additions & 0 deletions charts/espresso/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
# espresso

![Version: 1.0.0](https://img.shields.io/badge/Version-1.0.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.0.1](https://img.shields.io/badge/AppVersion-0.0.1-informational?style=flat-square)

A Helm chart that combines Kubernetes manifests and scripts to deploy Espresso Sequencer AVS nodes.

**Homepage:** <https://docs.espressosys.com/sequencer>

## Maintainers

| Name | Email | Url |
| ---- | ------ | --- |
| matilote | | |
| AntiD2ta | | |

## Requirements

Kubernetes: `^1.23.0-0`

| Repository | Name | Version |
|------------|------|---------|
| file://../common | common | 1.0.1 |

## Values

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| externalSecrets.enabled | bool | `false` | |
| externalSecrets.secretStoreRef.kind | string | `"SecretStore"` | |
| externalSecrets.secretStoreRef.name | string | `"secretStoreRef"` | |
| fullnameOverride | string | `""` | Provide a name to substitute for the full names of resources |
| global.namespaceOverride | string | `""` | |
| global.persistence | object | `{"accessModes":["ReadWriteOnce"],"annotations":{},"size":"150Gi","storageClassName":""}` | Whether or not to allocate persistent volume disk for the data directory. In case of node failure, the node data directory will still persist. |
| global.serviceAccount | object | `{"annotations":{},"create":false}` | Service account ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ |
| image.pullPolicy | string | `"IfNotPresent"` | |
| image.repository | string | `"ghcr.io/espressosystems/espresso-sequencer/sequencer"` | |
| image.tag | string | `"main"` | |
| ingress.annotations | object | `{}` | |
| ingress.className | string | `""` | |
| ingress.enabled | bool | `false` | |
| ingress.hosts | list | `[]` | Hostnames. Can be provided if Ingress is enabled. |
| ingress.labels | object | `{}` | |
| ingress.paths | list | `[]` | Paths to use for ingress rules By default, the Service created by this chart is used as the target Service for the Ingress. If not defined the following default object will be used: - path: "/" port: 8000 pathType: "ImplementationSpecific" serviceName: "<common.names.fullname>" |
| ingress.routePrefix | string | `"/"` | Route Prefix. Can skip it if any item of path has the path defined. |
| ingress.tls | list | `[]` | TLS configuration for Ingress Secret must be manually created in the namespace |
| initImage | object | `{"pullPolicy":"IfNotPresent","repository":"bitnami/kubectl","tag":"1.28"}` | Init image is used to manage which secrets the pod should use. |
| keystoreCLI | object | `{"db":{"host":"","secretId":"","user":""},"image":{"pullPolicy":"IfNotPresent","repository":"nethermindeth/espresso-keystore-cli","tag":"v0.1.1"},"projectId":"","pv":{"secretId":""}}` | Keystore-CLI settings. Used to manage keys on Secret Store. |
| nodes.da.command[0] | string | `"sequencer"` | |
| nodes.da.command[10] | string | `"query"` | |
| nodes.da.command[1] | string | `"--"` | |
| nodes.da.command[2] | string | `"storage-sql"` | |
| nodes.da.command[3] | string | `"--"` | |
| nodes.da.command[4] | string | `"http"` | |
| nodes.da.command[5] | string | `"--"` | |
| nodes.da.command[6] | string | `"catchup"` | |
| nodes.da.command[7] | string | `"--"` | |
| nodes.da.command[8] | string | `"status"` | |
| nodes.da.command[9] | string | `"--"` | |
| nodes.da.externalSecrets.data | list | `[]` | |
| nodes.da.replicaCount | int | `0` | |
| nodes.da.resources.requests.memory | string | `"12000Mi"` | |
| nodes.da.sqlStorage | bool | `true` | |
| nodes.da.volumeMount | bool | `false` | |
| nodes.normal.command[0] | string | `"sequencer"` | |
| nodes.normal.command[1] | string | `"--"` | |
| nodes.normal.command[2] | string | `"http"` | |
| nodes.normal.command[3] | string | `"--"` | |
| nodes.normal.command[4] | string | `"catchup"` | |
| nodes.normal.command[5] | string | `"--"` | |
| nodes.normal.command[6] | string | `"status"` | |
| nodes.normal.externalSecrets.data | list | `[]` | |
| nodes.normal.replicaCount | int | `1` | |
| nodes.normal.resources.requests.memory | string | `"12000Mi"` | |
| nodes.normal.sqlStorage | bool | `false` | |
| nodes.normal.volumeMount | bool | `true` | |
| nodes_config.ESPRESSO_SEQUENCER_API_PORT | int | `80` | |
| nodes_config.ESPRESSO_SEQUENCER_BASE_FEE | int | `0` | |
| nodes_config.ESPRESSO_SEQUENCER_CDN_ENDPOINT | string | `"cdn.cappuccino.testnet.espresso.network:1737"` | |
| nodes_config.ESPRESSO_SEQUENCER_CHAIN_ID | int | `0` | |
| nodes_config.ESPRESSO_SEQUENCER_L1_PROVIDER | string | `""` | |
| nodes_config.ESPRESSO_SEQUENCER_MAX_BLOCK_SIZE | string | `"30000000"` | |
| nodes_config.ESPRESSO_SEQUENCER_ORCHESTRATOR_URL | string | `"https://orchestrator.cappuccino.testnet.espresso.network"` | |
| nodes_config.ESPRESSO_SEQUENCER_STATE_PEERS | string | `"https://query.cappuccino.testnet.espresso.network"` | |
| nodes_config.ESPRESSO_SEQUENCER_STORAGE_PATH | string | `"/mount/sequencer/store/"` | |
| nodes_config.ESPRESSO_STATE_RELAY_SERVER_URL | string | `"https://state-relay.cappuccino.testnet.espresso.network"` | |
| nodes_config.RUST_LOG | string | `"warn,libp2p=off"` | |
| nodes_config.RUST_LOG_FORMAT | string | `"json"` | |
| rbac.create | bool | `true` | |
| rbac.name | string | `""` | The name of the role to use. If not set and create is true, a name is generated using the fullname template |
| rbac.rules | list | `[{"apiGroups":[""],"resources":["secrets"],"verbs":["create","get","list","watch","delete"]}]` | Required Role rules |
| rbac.rules[0] | object | `{"apiGroups":[""],"resources":["secrets"],"verbs":["create","get","list","watch","delete"]}` | Required to create Sequencer env Secret. |
| service.annotations | object | `{}` | |
| service.type | string | `"ClusterIP"` | |
| serviceAccount | object | `{"annotations":{},"name":""}` | Service account ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ |
| serviceAccount.annotations | object | `{}` | Annotations to add to the service account |
| serviceAccount.name | string | `""` | The name of the service account to use. If not set and create is true, a name is generated using the fullname template |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.12.0](https://github.com/norwoodj/helm-docs/releases/v1.12.0)
8 changes: 8 additions & 0 deletions charts/espresso/templates/_helpers.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{{/*
Create a formatted image string with repository and tag
*/}}
{{- define "espresso.build_image_name" -}}
{{- $repository := index . 0 -}}
{{- $tag := index . 1 -}}
{{- printf "%s:%s" $repository $tag | quote -}}
{{- end -}}
10 changes: 10 additions & 0 deletions charts/espresso/templates/clusterrole.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{{- if .Values.rbac.create }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: {{ include "common.names.clusterRoleName" . }}
labels:
{{- include "common.labels.standard" . | nindent 4 }}
rules:
{{- toYaml .Values.rbac.clusterRules | nindent 0 }}
{{- end }}
16 changes: 16 additions & 0 deletions charts/espresso/templates/clusterrolebinding.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{{- if .Values.rbac.create }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: {{ include "common.names.clusterRoleName" . }}
labels:
{{- include "common.labels.standard" . | nindent 4 }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: {{ include "common.names.clusterRoleName" . }}
subjects:
- kind: ServiceAccount
name: {{ include "common.names.serviceAccountName" . }}
namespace: {{ .Release.Namespace }}
{{- end }}
61 changes: 61 additions & 0 deletions charts/espresso/templates/configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
{{- range $type, $specs := .Values.nodes }}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "common.names.fullname" $ }}-init-{{ $type }}
labels:
{{- include "common.labels.standard" $ | nindent 4 }}
data:
init.sh: |
function process_key() {
local key_var=$1
local prefix=$2
local final_var=$3

# Extract the value for the specified indexed key from the environment
local key_full=$(env | grep -e $key_var)

# Check if the string starts with the prefix and remove it
local key_value
if [[ $key_full == $prefix* ]]; then
key_value="${key_full#$prefix}"
else
key_value="$key_full"
fi

# Construct the final key name
local final_key="${key_value//$key_var/${final_var}}"

echo "$final_key"
}
# Get the index from the hostname
index=$(hostname | grep -o -E "[0-9]+$")
echo "Detected Pod Index: $index"

# Construct the variable names
state_key_var="ESPRESSO_SEQUENCER_PRIVATE_STATE_KEY_$index"
staking_key_var="ESPRESSO_SEQUENCER_PRIVATE_STAKING_KEY_$index"
key_prefix="espresso-sequencer-private-keys-{{ $type }}{{ if ne $.Values.global.suffix "" }}-{{ $.Values.global.suffix }}{{ end }}="
{{- if $specs.sqlStorage }}
postgres_host_var="ESPRESSO_SEQUENCER_POSTGRES_HOST"
postgres_user_var="ESPRESSO_SEQUENCER_POSTGRES_USER"
postgres_pass_var="ESPRESSO_SEQUENCER_POSTGRES_PASSWORD"
postgres_prefix="espresso-sequencer-postgres-{{ $type }}{{ if ne $.Values.global.suffix "" }}-{{ $.Values.global.suffix }}{{ end }}="
{{- end }}

# Process each key and write to the .env file
echo "$(process_key $state_key_var $key_prefix "ESPRESSO_SEQUENCER_PRIVATE_STATE_KEY")" > /etc/espresso/.env
echo "$(process_key $staking_key_var $key_prefix "ESPRESSO_SEQUENCER_PRIVATE_STAKING_KEY")" >> /etc/espresso/.env
{{- if $specs.sqlStorage }}
echo "$(process_key $postgres_host_var $postgres_prefix "ESPRESSO_SEQUENCER_POSTGRES_HOST")" >> /etc/espresso/.env
echo "$(process_key $postgres_user_var $postgres_prefix "ESPRESSO_SEQUENCER_POSTGRES_USER")" >> /etc/espresso/.env
echo "$(process_key $postgres_pass_var $postgres_prefix "ESPRESSO_SEQUENCER_POSTGRES_PASSWORD")" >> /etc/espresso/.env
{{- end }}
# echo "Dot env file content:"
# cat /etc/espresso/.env

# Create Secret with .env file
kubectl delete secret sequencer-env-secrets-{{ $type }} --ignore-not-found
kubectl create secret generic sequencer-env-secrets-{{ $type }} --from-env-file=/etc/espresso/.env
{{- end }}
52 changes: 52 additions & 0 deletions charts/espresso/templates/ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{{- if .Values.ingress.enabled -}}
---
{{- $baseServiceName := include "common.names.fullname" . -}}
{{- $routePrefix := .Values.ingress.routePrefix | default "/" -}}
{{- $defaultPath := list (dict "path" $routePrefix "port" 8000 "pathType" "ImplementationSpecific") -}}
{{- $paths := .Values.ingress.paths | default $defaultPath -}}
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}}
apiVersion: networking.k8s.io/v1
{{- else -}}
apiVersion: networking.k8s.io/v1beta1
{{- end }}
kind: Ingress
metadata:
{{- with .Values.ingress.annotations }}
annotations:
{{ toYaml . | indent 4}}
{{- end }}
name: {{ include "common.names.fullname" . }}
labels:
{{- include "common.labels.standard" . | nindent 4 }}
{{- with .Values.ingress.labels }}
{{ toYaml . | indent 4 }}
{{- end }}
{{- with $.Values.global.namespaceOverride }}
namespace: {{ . }}
{{- end }}
spec:
{{- with .Values.ingress.className }}
ingressClassName: {{ . }}
{{- end }}
rules:
{{- range .Values.ingress.hosts }}
- http:
paths:
{{- range .paths }}
- path: {{ .path }}
pathType: {{ .pathType }}
backend:
service:
name: {{ .serviceName | default $baseServiceName }}
port:
number: {{ .port }}
{{- end }}
{{- with .host }}
host: {{ . | quote }}
{{- end }}
{{- end }}
{{- with .Values.ingress.tls }}
tls:
{{ tpl (toYaml . | indent 4) . }}
{{- end }}
{{- end }}
10 changes: 10 additions & 0 deletions charts/espresso/templates/role.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{{- if .Values.rbac.create -}}
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: {{ include "common.names.fullname" . }}
labels:
{{- include "common.labels.standard" . | nindent 4 }}
rules:
{{- toYaml .Values.rbac.rules | nindent 0 }}
{{- end }}
15 changes: 15 additions & 0 deletions charts/espresso/templates/rolebinding.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{{- if .Values.rbac.create }}
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: {{ include "common.names.serviceAccountName" . }}
labels:
{{- include "common.labels.standard" . | nindent 4 }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: {{ include "common.names.serviceAccountName" . }}
subjects:
- kind: ServiceAccount
name: {{ include "common.names.serviceAccountName" . }}
{{- end }}
24 changes: 24 additions & 0 deletions charts/espresso/templates/secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{{- if .Values.externalSecrets.enabled }}
{{- range $type, $specs := .Values.nodes }}
---
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: "eso-espresso-sequencer-secrets-{{ $type }}"
{{- with $.Values.global.namespaceOverride }}
namespace: {{ . }}
{{- end }}
spec:
refreshInterval: "1h"
secretStoreRef:
name: {{ $.Values.externalSecrets.secretStoreRef.name }}
kind: {{ $.Values.externalSecrets.secretStoreRef.kind }}
target:
name: "eso-espresso-sequencer-secrets-{{ $type }}"
creationPolicy: Owner
{{- with $specs.externalSecrets.data }}
data:
{{- . | toYaml | trim | nindent 2 }}
{{- end }}
{{- end }}
{{- end }}
28 changes: 28 additions & 0 deletions charts/espresso/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{{- range $type, $specs := .Values.nodes }}
---
apiVersion: v1
kind: Service
metadata:
name: "{{ include "common.names.fullname" $ }}-{{ $type }}"
labels:
{{- include "common.labels.standard" $ | nindent 4 }}
pod: "{{ include "common.names.fullname" $ }}"
type: api
{{- with $.Values.service.annotations }}
annotations:
{{ toYaml . | nindent 4 | trim }}
{{- end }}
{{- with $.Values.global.namespaceOverride }}
namespace: {{ . }}
{{- end }}
spec:
type: {{ $.Values.service.type }} # ClusterIP, NodePort, LoadBalancer, or ExternalName
ports:
- name: api
port: {{ $.Values.nodes_config.ESPRESSO_SEQUENCER_API_PORT }}
targetPort: api
protocol: TCP
selector:
{{- include "common.labels.matchLabels" $ | nindent 4 }}
type: {{ $type }}
{{- end }}
16 changes: 16 additions & 0 deletions charts/espresso/templates/serviceaccount.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
{{- if .Values.global.serviceAccount.create -}}
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "common.names.serviceAccountName" $ }}
labels:
{{- include "common.labels.standard" $ | nindent 4 }}
{{- with .Values.global.serviceAccount.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with $.Values.global.namespaceOverride }}
namespace: {{ . }}
{{- end }}
{{- end }}
Loading
Loading