Skip to content

Commit

Permalink
feat: add nodeport config to blutgang
Browse files Browse the repository at this point in the history
  • Loading branch information
barnabasbusa committed Apr 15, 2024
1 parent a03634a commit a273ce9
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 7 deletions.
2 changes: 1 addition & 1 deletion charts/blutgang/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ icon: https://github.com/rainshowerLabs/blutgang/assets/55022497/ec668c7a-5f56-4
sources:
- https://github.com/rainshowerLabs/blutgang
type: application
version: 0.0.6
version: 0.0.7
maintainers:
- name: barnabasbusa
email: busa.barnabas@gmail.com
11 changes: 9 additions & 2 deletions charts/blutgang/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

# blutgang

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

Blutgang is a blazing fast, caching, minimalistic load balancer designed with Ethereum's JSON-RPC in mind. Historical RPC queries are cached in a local database, bypassing the need for slow, repeating calls to your node.

Expand All @@ -15,6 +15,14 @@ Blutgang is a blazing fast, caching, minimalistic load balancer designed with Et

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| NodePort.enabled | bool | `false` | Expose P2P port via NodePort |
| NodePort.initContainer.image.pullPolicy | string | `"IfNotPresent"` | Container pull policy |
| NodePort.initContainer.image.repository | string | `"lachlanevenson/k8s-kubectl"` | Container image to fetch nodeport information |
| NodePort.initContainer.image.tag | string | `"v1.25.4"` | Container tag |
| NodePort.port | int | `31000` | NodePort to be used |
| NodePort.portForwardContainer.image.pullPolicy | string | `"IfNotPresent"` | Container pull policy |
| NodePort.portForwardContainer.image.repository | string | `"alpine/socat"` | Container image for the port forwarder |
| NodePort.portForwardContainer.image.tag | string | `"latest"` | Container tag |
| adminNamespace | object | See `values.yaml` | Admin Namespace |
| affinity | object | `{}` | Affinity configuration for pods |
| annotations | object | `{}` | Annotations for the StatefulSet |
Expand Down Expand Up @@ -61,7 +69,6 @@ Blutgang is a blazing fast, caching, minimalistic load balancer designed with Et
| rpcList | list | `[]` | RPC list for the blutgang container CSV list of rpcs [default: ] |
| secretEnv | object | `{}` | Additional env variables injected via a created secret |
| securityContext | object | See `values.yaml` | The security context for pods |
| service.type | string | `"ClusterIP"` | Service type |
| serviceAccount.annotations | object | `{}` | Annotations to add to the service account |
| serviceAccount.create | bool | `true` | Specifies whether a service account should be created |
| 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 |
Expand Down
23 changes: 23 additions & 0 deletions charts/blutgang/templates/service.nodeport.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{{- if .Values.NodePort.enabled -}}
---
apiVersion: v1
kind: Service
metadata:
name: {{ include "blutgang.fullname" $ }}-nodeport-0
labels:
{{- include "blutgang.labels" $ | nindent 4 }}
pod: {{ include "blutgang.fullname" $ }}-0
type: nodeport
spec:
type: NodePort
externalTrafficPolicy: Local
ports:
- name: nodeport-tcp
port: {{ .Values.httpPort }}
protocol: TCP
targetPort: http
nodePort: {{ .Values.NodePort.port }}
selector:
{{- include "blutgang.selectorLabels" $ | nindent 4 }}
statefulset.kubernetes.io/pod-name: "{{ include "blutgang.fullname" $ }}-0"
{{- end }}
2 changes: 1 addition & 1 deletion charts/blutgang/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
labels:
{{- include "blutgang.labels" . | nindent 4 }}
spec:
type: {{ .Values.service.type }}
type: ClusterIP
ports:
- port: {{ .Values.httpPort }}
targetPort: http
Expand Down
28 changes: 25 additions & 3 deletions charts/blutgang/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,31 @@ ingress:
# hosts:
# - chart-example.local

service:
# -- Service type
type: ClusterIP
# When NodePort is enabled, your P2P port will be exposed via service type NodePort.
# This is useful if you want to expose and announce your node to the Internet.
# Limitation: You can only one have one replica when exposing via NodePort.
# Check the chart README.md for more details
NodePort:
# -- Expose P2P port via NodePort
enabled: false
# -- NodePort to be used
port: 31000
initContainer:
image:
# -- Container image to fetch nodeport information
repository: lachlanevenson/k8s-kubectl
# -- Container tag
tag: v1.25.4
# -- Container pull policy
pullPolicy: IfNotPresent
portForwardContainer:
image:
# -- Container image for the port forwarder
repository: alpine/socat
# -- Container tag
tag: latest
# -- Container pull policy
pullPolicy: IfNotPresent

# -- Affinity configuration for pods
affinity: {}
Expand Down

0 comments on commit a273ce9

Please sign in to comment.