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: add nodeport config to dugtrio #307

Closed
wants to merge 1 commit into from
Closed
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/dugtrio/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ home: https://github.com/ethpandaops/dugtrio
sources:
- https://github.com/ethpandaops/dugtrio
type: application
version: 0.0.4
version: 0.0.5
appVersion: "1.0.0"
maintainers:
- name: pk910
Expand Down
11 changes: 9 additions & 2 deletions charts/dugtrio/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

# dugtrio

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

Fault tolerant load balancer for beacon chain RPC apis

Expand Down Expand Up @@ -35,6 +35,14 @@ endpoints:

| 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 |
| affinity | object | `{}` | Affinity configuration for pods |
| annotations | object | `{}` | Annotations for the StatefulSet |
| config | string | See `values.yaml` | Config file |
Expand Down Expand Up @@ -80,7 +88,6 @@ endpoints:
| priorityClassName | string | `nil` | Pod priority class |
| resources | object | `{}` | Resource requests and limits |
| 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
22 changes: 0 additions & 22 deletions charts/dugtrio/templates/NOTES.txt

This file was deleted.

23 changes: 23 additions & 0 deletions charts/dugtrio/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 "dugtrio.fullname" $ }}-nodeport-0
labels:
{{- include "dugtrio.labels" $ | nindent 4 }}
pod: {{ include "dugtrio.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 "dugtrio.selectorLabels" $ | nindent 4 }}
statefulset.kubernetes.io/pod-name: "{{ include "dugtrio.fullname" $ }}-0"
{{- end }}
2 changes: 1 addition & 1 deletion charts/dugtrio/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
labels:
{{- include "dugtrio.labels" . | nindent 4 }}
spec:
type: {{ .Values.service.type }}
type: ClusterIP
ports:
- port: {{ include "dugtrio.httpPort" . }}
targetPort: http
Expand Down
28 changes: 25 additions & 3 deletions charts/dugtrio/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,31 @@ ingress:
# hosts:
# - chart-example.local

service:
# -- Service type
type: ClusterIP
# When NodePort is enabled, your port will be exposed via service type NodePort.
# This is useful if you want to expose the load balancer to the Internet, or other machines on your network.
# 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
Loading