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

feat(chart/eleel): update to handle new jwts config #274

Merged
merged 3 commits into from
Jan 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion charts/eleel/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: eleel
description: A multiplexer for Ethereum execution clients
home: https://github.com/sigp/eleel
type: application
version: 0.1.4
version: 0.1.5
maintainers:
- name: samcm
email: sam.calder-mason@ethereum.org
Expand Down
6 changes: 4 additions & 2 deletions charts/eleel/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

# eleel

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

A multiplexer for Ethereum execution clients

Expand All @@ -14,9 +14,12 @@ A multiplexer for Ethereum execution clients
| affinity | object | `{}` | Affinity configuration for pods |
| annotations | object | `{}` | Annotations for the Deployment |
| args | list | `[]` | Command arguments |
| clientJWTSecrets | object | `{}` | Client JWT secrets map |
| containerSecurityContext | object | See `values.yaml` | The security context for containers |
| controllerJWTSecret | string | `""` | Controller JWT secret |
| customArgs | list | `[]` | Custom args for the eleel container |
| customCommand | list | `[]` | Command replacement for the eleel container |
| eeJWTSecret | string | `""` | Execution Engine JWT secret |
| extraContainers | list | `[]` | Additional containers |
| extraEnv | list | `[]` | Additional env variables |
| extraPodPorts | list | `[]` | Extra Pod ports |
Expand All @@ -34,7 +37,6 @@ A multiplexer for Ethereum execution clients
| ingress.hosts[0].paths | list | `[]` | |
| ingress.tls | list | `[]` | Ingress TLS |
| initContainers | list | `[]` | Additional init containers |
| jwt | string | `""` | Execution Engine JWT secret |
| livenessProbe | object | See `values.yaml` | Liveness probe |
| nameOverride | string | `""` | Overrides the chart's name |
| nodeSelector | object | `{}` | Node selector for pods |
Expand Down
6 changes: 5 additions & 1 deletion charts/eleel/ci/ct-values.yaml
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
jwt: ecb22bc24e7d4061f7ed690ccd5846d7d73f5d2b9733267e12f56790398d908a
eeJWTSecret: ecb22bc24e7d4061f7ed690ccd5846d7d73f5d2b9733267e12f56790398d908a
controllerJWTSecret: ecb22bc24e7d4061f7ed690ccd5846d7d73f5d2b9733267e12f56790398d908a
clientJWTSecrets:
node1: c259fb249f7fa1882b1d4150ace73c1023aba4f6267b29a871ad5c9adc7a543a
node2: fb6073f77160f9a7ce11190d3612e841daea2e7319a59e1d82a8804e9fa193ee
12 changes: 11 additions & 1 deletion charts/eleel/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,14 @@ Create the name of the service account to use

{{- define "eleel.httpPort" -}}
{{ default 8552 }}
{{- end }}
{{- end }}

{{/*
Generate TOML format for client JWT secrets
*/}}
{{- define "eleel.clientJWTSecretsToToml" -}}
[secrets]
{{- range $key, $value := .Values.clientJWTSecrets }}
{{ $key }} = "{{ $value }}"
{{- end }}
{{- end -}}
13 changes: 4 additions & 9 deletions charts/eleel/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ spec:
- "eleel"
- --listen-address=0.0.0.0
- --listen-port={{ include "eleel.httpPort" . }}
{{- if .Values.jwt }}
- --ee-jwt-secret=/jwt.hex
{{- end }}
- --ee-jwt-secret=/config/execution.jwt
- --controller-jwt-secret=/config/controller.jwt
- --client-jwt-secrets=/config/client-secrets.toml
{{- if gt (len .Values.args) 0 }}
{{- toYaml .Values.args | nindent 10}}
{{- end }}
Expand All @@ -63,12 +63,9 @@ spec:
securityContext:
{{- toYaml .Values.containerSecurityContext | nindent 12 }}
volumeMounts:
{{- if .Values.jwt }}
- name: jwt
mountPath: "/jwt.hex"
subPath: jwt.hex
mountPath: "/config"
readOnly: true
{{- end }}
{{- if .Values.extraVolumeMounts }}
{{ toYaml .Values.extraVolumeMounts | nindent 12 }}
{{- end }}
Expand Down Expand Up @@ -112,8 +109,6 @@ spec:
{{- if .Values.extraVolumes }}
{{ toYaml .Values.extraVolumes | nindent 8}}
{{- end }}
{{- if .Values.jwt }}
- name: jwt
secret:
secretName: {{ include "eleel.fullname" . }}-jwt
{{- end }}
6 changes: 3 additions & 3 deletions charts/eleel/templates/secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ data:
{{- range $key, $value := .Values.secretEnv }}
{{ $key }}: {{ $value | b64enc }}
{{- end }}
{{- if .Values.jwt }}
---
apiVersion: v1
kind: Secret
metadata:
name: {{ include "eleel.fullname" . }}-jwt
type: Opaque
data:
jwt.hex: {{ .Values.jwt | b64enc }}
{{- end }}
execution.jwt: {{ .Values.eeJWTSecret | b64enc }}
controller.jwt: {{ .Values.controllerJWTSecret | b64enc }}
client-secrets.toml: {{ include "eleel.clientJWTSecretsToToml" . | b64enc }}
9 changes: 8 additions & 1 deletion charts/eleel/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,14 @@ args: []
#- --ee-url=http://your-eth1-node:8551

# -- Execution Engine JWT secret
jwt: ""
eeJWTSecret: ""
# -- Controller JWT secret
controllerJWTSecret: ""
# -- Client JWT secrets map
clientJWTSecrets: {}
## Example
# node1: c259fb249f7fa1882b1d4150ace73c1023aba4f6267b29a871ad5c9adc7a543a
# node2: fb6073f77160f9a7ce11190d3612e841daea2e7319a59e1d82a8804e9fa193ee

ingress:
# -- Ingress resource for the HTTP API
Expand Down