Skip to content

Commit

Permalink
support multiple services in ingress (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jordan Hoeft authored Feb 22, 2024
1 parent f482f42 commit 8700729
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.bin
.bin
charts/**/charts
2 changes: 1 addition & 1 deletion charts/tsm-node/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ maintainers:
- name: Blockdaemon
email: [email protected]
type: application
version: 0.1.2
version: 0.1.3
appVersion: "61.0.2"
2 changes: 1 addition & 1 deletion charts/tsm-node/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# tsm-node

![Version: 0.1.2](https://img.shields.io/badge/Version-0.1.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 61.0.2](https://img.shields.io/badge/AppVersion-61.0.2-informational?style=flat-square)
![Version: 0.1.3](https://img.shields.io/badge/Version-0.1.3-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 61.0.2](https://img.shields.io/badge/AppVersion-61.0.2-informational?style=flat-square)

A Helm chart to deploy a Blockdaemon TSM node to kubernetes

Expand Down
49 changes: 49 additions & 0 deletions charts/tsm-node/ci/ingress-multi.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
replicaCount: 1
index: 0

config:
configFile: |
[Player]
Index = 0
PrivateKey = "replace me"
[Database]
DriverName = "sqlite3"
DataSourceName = "/tmp/tsmdb"
EncryptorMasterPassword = "ENCRYPTION_KEY"
[SDKServer]
Port = 8080
image:
repository: <the name of the repository where tsm-node is stored>
pullPolicy: IfNotPresent
tag: "61.0.2"
sdkService:
ports:
- port: 8080
name: sdk
targetPort: 8080
- port: 9000
name: mpc
targetPort: 9000

mpcService:
enabled: false

ingress:
enabled: true
className: "nginx"
annotations:
nginx.ingress.kubernetes.io/use-regex: "true"
nginx.ingress.kubernetes.io/rewrite-target: /$1
hosts:
- host: "tsm-sdk.example.com"
paths:
- path: /tsm0/(.*)
pathType: ImplementationSpecific
serviceName: tsm0-tsm-node
port: 8080
- path: /tsm1/(.*)
pathType: ImplementationSpecific
serviceName: tsm1-tsm-node
port: 8080
4 changes: 4 additions & 0 deletions charts/tsm-node/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,11 @@ spec:
pathType: {{ .pathType }}
backend:
service:
{{- if .serviceName }}
name: {{ .serviceName }}
{{- else }}
name: {{ $fullName }}
{{- end }}
port:
number: {{ .port }}
{{- end -}}
Expand Down

0 comments on commit 8700729

Please sign in to comment.