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

Yaml config #2

Merged
merged 4 commits into from
Mar 21, 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/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.9
maintainers:
- name: skylenet
email: [email protected]
Expand Down
2 changes: 1 addition & 1 deletion charts/dshackle/ci/default-values.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
config: |
config:
version: v1
port: 2449
tls:
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/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ metadata:
{{- include "dshackle.labels" . | nindent 4 }}
data:
dshackle.yaml: |
{{- tpl .Values.config . | nindent 4 }}
{{- tpl (.Values.config | toYaml) . | nindent 4 }}
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
22 changes: 13 additions & 9 deletions charts/dshackle/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ image:
# -- dshackle container image repository
repository: emeraldpay/dshackle
# -- dshackle container image tag
tag: "0.14.0"
tag: "0.15.0"
# -- dshackle container pull policy
pullPolicy: IfNotPresent

Expand All @@ -25,15 +25,15 @@ customCommand: [] # Only change this if you need to change the default command

# -- Config file
# @default -- See `values.yaml`
config: |
config:
version: v1
port: {{ .Values.gRPCPort }}
port: "{{ .Values.gRPCPort }}"
tls:
enabled: false

proxy:
host: 0.0.0.0
port: {{ .Values.httpPort }}
port: "{{ .Values.internalHttpPort }}"
routes:
- id: eth
blockchain: ethereum
Expand All @@ -56,11 +56,11 @@ config: |
prometheus:
enabled: true
bind: 0.0.0.0
port: {{ .Values.metricsPort }}
port: "{{ .Values.metricsPort }}"
path: /metrics

health:
port: {{ .Values.healthPort }}
port: "{{ .Values.healthPort }}"
host: 0.0.0.0
path: /health
blockchains:
Expand All @@ -70,7 +70,7 @@ config: |
cache:
redis:
enabled: true
host: {{ .Release.Name }}-redis-master
host: "{{ .Release.Name }}-redis-master"
port: 6379
db: 0
password: ${REDIS_PASSWORD}
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
Loading