Skip to content

Commit

Permalink
Merge pull request #1 from techops-services/TECH-2422-improvements
Browse files Browse the repository at this point in the history
Improvements for `dshackle` chart
  • Loading branch information
cristidas authored Feb 14, 2024
2 parents c8d26b5 + 27d865a commit 2c9f6a8
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 10 deletions.
2 changes: 1 addition & 1 deletion charts/dshackle/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ icon: https://avatars.githubusercontent.com/u/49622339?s=200&v=4
sources:
- https://github.com/emeraldpay/dshackle
type: application
version: 0.1.7
version: 0.1.8
maintainers:
- name: skylenet
email: [email protected]
Expand Down
7 changes: 7 additions & 0 deletions charts/dshackle/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,10 @@ Create the name of the service account to use
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}

{{/*
HTTP port
*/}}
{{- define "dshackle.httpPort" -}}
{{- default 443 .Values.externalHttpPort }}
{{- end }}
2 changes: 1 addition & 1 deletion charts/dshackle/templates/ingress.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{- if .Values.ingress.enabled -}}
{{- $fullName := include "dshackle.fullname" . -}}
{{- $svcPort := .Values.httpPort -}}
{{- $svcPort := .Values.externalHttpPort -}}
{{- 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}}
Expand Down
4 changes: 2 additions & 2 deletions charts/dshackle/templates/service-headless.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ metadata:
spec:
clusterIP: None
ports:
- port: {{ .Values.httpPort }}
targetPort: http
- port: {{ .Values.externalHttpPort }}
targetPort: {{ .Values.internalHttpPort }}
protocol: TCP
name: http
- port: {{ .Values.gRPCPort }}
Expand Down
6 changes: 4 additions & 2 deletions charts/dshackle/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@ metadata:
name: {{ include "dshackle.fullname" . }}
labels:
{{- include "dshackle.labels" . | nindent 4 }}
annotations:
{{ toYaml .Values.service.annotations | nindent 4 }}
spec:
type: {{ .Values.service.type }}
ports:
- port: {{ .Values.httpPort }}
targetPort: http
- port: {{ .Values.externalHttpPort }}
targetPort: {{ .Values.internalHttpPort }}
protocol: TCP
name: http
- port: {{ .Values.gRPCPort }}
Expand Down
2 changes: 1 addition & 1 deletion charts/dshackle/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ spec:
readOnly: true
ports:
- name: http
containerPort: {{ .Values.httpPort }}
containerPort: {{ .Values.internalHttpPort }}
protocol: TCP
- name: grpc
containerPort: {{ .Values.gRPCPort }}
Expand Down
10 changes: 7 additions & 3 deletions charts/dshackle/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ config: |
proxy:
host: 0.0.0.0
port: {{ .Values.httpPort }}
port: {{ .Values.internalHttpPort }}
routes:
- id: eth
blockchain: ethereum
Expand Down Expand Up @@ -109,9 +109,13 @@ annotations: {}
# @default -- See `values.yaml`
gRPCPort: 2449

# -- HTTP Port
# -- External HTTP Port, where the service is exposed
# @default -- See `values.yaml`
httpPort: 8545
externalHttpPort: 443

# -- Internal HTTP Port, where pod and application running in the container are listening
# @default -- See `values.yaml`
internalHttpPort: 8545

# -- Metrics Port
# @default -- See `values.yaml`
Expand Down

0 comments on commit 2c9f6a8

Please sign in to comment.